-
Notifications
You must be signed in to change notification settings - Fork 8
How to override basalt generator
THIS GUIDE IS MEANT FOR VERSION 1.4.2 OR NEWER of the plugin and version 1.16 and over of Minecraft. It can still be used to understand the system in previous version but some options and material names are not available in the previous versions of the plugin and Minecraft.
There are different ways to override the basalt generator. You can either do so they have the same results and share tiers or you can do so only some tiers work on one type of generator. In this example are we going to make it so the cobblestone generators have they results and the basalt generators have their results.
We will start with creating the generator modes. By default there is already a cobblestone generator that looks like this:
generationModes:
'0':
blocks:
- WATER
- LAVA
displayName: 'Cobblestone generator'
fallback: COBBLESTONE
Then we just need to add the basalt generator. We start by adding a new section with the ID of 1. It is important that it has it own ID! The basalt generator is a bit different since it is requirred a soul_soil under the generator spot. We can set this with the fixedBlocks option. Here we are going to set DOWN to SOUL_SOIL. The basalt generator also has two other blocks which it needs to generate this is LAVA and BLUE_ICE. But it does matter where these blocks are. So we put these blocks under the blocks option. The section will now look something like this:
'1':
fixedBlocks:
DOWN: SOUL_SOIL
blocks:
- LAVA
- BLUE_ICE
This will now work as a basalt generator but right now it just acts as if it is a cobblestone generator. We will fix this later. For now we will add some extra options that will make it more amazing!
We can for example do this by setting the displayName option to 'Basalt generator' so the players know which tiers only support basalt generators. For this to work you need to have enabled the GUI->showSupportedModes option in the config.
We can also add a fallback block. This will be the block spawned if the player does not have a tier that supports this generator. In this case we will use SOUL_SAND. We do this by adding the option fallback: SOUL_SAND. This is not needed and if not set it will use the vanilla generator. (Vanilla fallback is basalt)
Our generationModes settings wil now look like this:
generationModes:
'0':
blocks:
- WATER
- LAVA
displayName: 'Cobblestone generator'
fallback: COBBLESTONE
'1':
fixedBlocks:
DOWN: SOUL_SOIL
blocks:
- LAVA
- BLUE_ICE
displayName: 'Basalt generator'
fallback: SOUL_SAND
We will now move over to setting up the tiers. We are going to do this by making two tier classes. A default and a nether class. THEY DO NOT NEED TO BE ON DIFFERENT CLASSES YOU CAN SUPPORT DIFFERENT GENERATORS FROM THE SAME CLASS THEY JUST NEED TO HAVE THEIR OWN TIERS!
There is not much different from 1.4.1 to 1.4.2 in making tiers. The only difference is that you can use the supportedGenerationMode option. This option uses the generator id to give the player a way to select a cobblestone generator tier and a basalt generator tier at the same time. And it limits where the tiers can be used. In this case we have given the tiers in the default class a supportedGenerationMode: '0' and the nether class a supportedGenerationMode: '1'. Which means that the default class should use the cobblestone generator and the nether class should use the basalt generator. If not selected then the tier can be used on all generators. A thing to notice when using this method is that we have created a nether class which means that the players need the permission customcobblegen.generator.nether to use these generators. I recommend doing it this way and just giving that permission out by default since it looks prettier in the config and the GUI. 👍
tiers:
default:
'0':
name: Default
icon: COBBLESTONE
price:
money: 0
contains:
COBBLESTONE: 90
COAL_ORE: 10
supportedGenerationMode: '0'
'1':
name: Basic
icon: COAL_BLOCK
price:
money: 1000
contains:
COBBLESTONE: 70
COAL_ORE: 20
IRON_ORE: 10
'2':
name: Advanced
icon: IRON_BLOCK
price:
money: 2000
items:
COBBLESTONE: 64
contains:
COBBLESTONE: 50
COAL_ORE: 30
IRON_ORE: 20
nether:
'0':
supportedGenerationMode: '1'
name: Basic Nether
icon: SOUL_SAND
price:
money: 0
xp: 5
contains:
NETHERRACK: 90
BASALT: 5
NETHER_GOLD_ORE: 5
'1':
supportedGenerationMode: '1'
name: Advanced Nether
icon: COAL_BLOCK
price:
money: 500
contains:
NETHERRACK: 60
BASALT: 20
NETHER_GOLD_ORE: 20
'2':
supportedGenerationMode: '1'
name: Pro Nether
icon: IRON_BLOCK
price:
money: 1000
contains:
NETHERRACK: 25
BASALT: 35
NETHER_GOLD_ORE: 30
GOLD_BLOCK: 10