mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
nether version of the catalysts
This commit is contained in:
parent
0ef69b0560
commit
be96feb704
10 changed files with 72 additions and 16 deletions
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": {
|
|
||||||
"model": "naturesaura:block/conversion_catalyst"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"variants": {
|
|
||||||
"": {
|
|
||||||
"model": "naturesaura:block/crushing_catalyst"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "naturesaura:block/conversion_catalyst_nether"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "naturesaura:block/crushing_catalyst_nether"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,38 @@
|
||||||
|
package de.ellpeck.naturesaura.blocks;
|
||||||
|
|
||||||
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
||||||
|
import de.ellpeck.naturesaura.api.aura.type.IAuraType;
|
||||||
|
import de.ellpeck.naturesaura.data.BlockStateGenerator;
|
||||||
|
import de.ellpeck.naturesaura.reg.ICustomBlockState;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.item.BlockItemUseContext;
|
||||||
|
import net.minecraft.state.BooleanProperty;
|
||||||
|
import net.minecraft.state.StateContainer;
|
||||||
|
|
||||||
|
public class BlockCatalyst extends BlockImpl implements ICustomBlockState {
|
||||||
|
public static final BooleanProperty NETHER = BlockNatureAltar.NETHER;
|
||||||
|
|
||||||
|
public BlockCatalyst(String baseName, Properties properties) {
|
||||||
|
super(baseName, properties);
|
||||||
|
this.setDefaultState(this.getDefaultState().with(NETHER, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getStateForPlacement(BlockItemUseContext context) {
|
||||||
|
boolean nether = IAuraType.forWorld(context.getWorld()).isSimilar(NaturesAuraAPI.TYPE_NETHER);
|
||||||
|
return super.getStateForPlacement(context).with(NETHER, nether);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
|
||||||
|
super.fillStateContainer(builder);
|
||||||
|
builder.add(NETHER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void generateCustomBlockState(BlockStateGenerator generator) {
|
||||||
|
generator.models().cubeAll(this.getBaseName(), generator.modLoc("block/" + this.getBaseName()));
|
||||||
|
generator.models().cubeAll(this.getBaseName() + "_nether", generator.modLoc("block/" + this.getBaseName() + "_nether"));
|
||||||
|
}
|
||||||
|
}
|
|
@ -93,8 +93,8 @@ public final class ModRegistry {
|
||||||
new BlockFurnaceHeater(),
|
new BlockFurnaceHeater(),
|
||||||
new BlockPotionGenerator(),
|
new BlockPotionGenerator(),
|
||||||
new BlockAuraDetector(),
|
new BlockAuraDetector(),
|
||||||
new BlockImpl("conversion_catalyst", ModBlocks.prop(Material.ROCK).sound(SoundType.STONE).hardnessAndResistance(2.5F)),
|
new BlockCatalyst("conversion_catalyst", ModBlocks.prop(Material.ROCK).sound(SoundType.STONE).hardnessAndResistance(2.5F)),
|
||||||
new BlockImpl("crushing_catalyst", ModBlocks.prop(Material.ROCK).sound(SoundType.STONE).hardnessAndResistance(2.5F)),
|
new BlockCatalyst("crushing_catalyst", ModBlocks.prop(Material.ROCK).sound(SoundType.STONE).hardnessAndResistance(2.5F)),
|
||||||
new BlockFlowerGenerator(),
|
new BlockFlowerGenerator(),
|
||||||
new BlockPlacer(),
|
new BlockPlacer(),
|
||||||
new BlockHopperUpgrade(),
|
new BlockHopperUpgrade(),
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"nether=false": {
|
||||||
|
"model": "naturesaura:block/conversion_catalyst"
|
||||||
|
},
|
||||||
|
"nether=true": {
|
||||||
|
"model": "naturesaura:block/conversion_catalyst_nether"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"nether=false": {
|
||||||
|
"model": "naturesaura:block/crushing_catalyst"
|
||||||
|
},
|
||||||
|
"nether=true": {
|
||||||
|
"model": "naturesaura:block/crushing_catalyst_nether"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 692 B |
Binary file not shown.
After Width: | Height: | Size: 779 B |
Loading…
Reference in a new issue