Flammalix (WIP)

This commit is contained in:
paulevsGitch 2021-08-03 03:18:12 +03:00
parent 71cdc55a60
commit b6e4608ef2
11 changed files with 883 additions and 1 deletions

View file

@ -0,0 +1,36 @@
package ru.betterend.blocks;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import ru.betterend.blocks.basis.EndPlantBlock;
import ru.betterend.registry.EndBlocks;
public class FlammalixBlock extends EndPlantBlock {
private static final VoxelShape SHAPE = Block.box(2, 0, 2, 14, 14, 14);
public FlammalixBlock() {
super(false, 12);
}
@Override
protected boolean isTerrain(BlockState state) {
return state.is(EndBlocks.PALLIDIUM_FULL) ||
state.is(EndBlocks.PALLIDIUM_HEAVY) ||
state.is(EndBlocks.PALLIDIUM_THIN) ||
state.is(EndBlocks.PALLIDIUM_TINY);
}
@Override
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
return SHAPE;
}
@Override
public OffsetType getOffsetType() {
return OffsetType.NONE;
}
}

View file

@ -44,7 +44,7 @@ public class PallidiumBlock extends EndTerrainBlock {
return InteractionResult.PASS;
}
else if (level.isClientSide) {
return InteractionResult.CONSUME;
return InteractionResult.PASS;
}
ItemStack itemStack = player.getItemInHand(hand);

View file

@ -66,6 +66,7 @@ import ru.betterend.blocks.FilaluxBlock;
import ru.betterend.blocks.FilaluxLanternBlock;
import ru.betterend.blocks.FilaluxWingsBlock;
import ru.betterend.blocks.FlamaeaBlock;
import ru.betterend.blocks.FlammalixBlock;
import ru.betterend.blocks.FlowerPotBlock;
import ru.betterend.blocks.GlowingHymenophoreBlock;
import ru.betterend.blocks.GlowingMossBlock;
@ -126,6 +127,7 @@ import ru.betterend.blocks.UmbrellaTreeClusterEmptyBlock;
import ru.betterend.blocks.UmbrellaTreeMembraneBlock;
import ru.betterend.blocks.UmbrellaTreeSaplingBlock;
import ru.betterend.blocks.VentBubbleColumnBlock;
import ru.betterend.blocks.basis.EndPlantBlock;
import ru.betterend.blocks.basis.EndTerrainBlock;
import ru.betterend.blocks.basis.EndTripleTerrain;
import ru.betterend.blocks.basis.EndUnderwaterWallPlantBlock;
@ -332,6 +334,7 @@ public class EndBlocks extends BlockRegistry {
public static final Block LUTEBUS = registerBlock("lutebus", new TerrainPlantBlock(RUTISCUS));
public static final Block LAMELLARIUM = registerBlock("lamellarium", new TerrainPlantBlock(RUTISCUS));
public static final Block INFLEXIA = registerBlock("inflexia", new TerrainPlantBlock(PALLIDIUM_FULL, PALLIDIUM_HEAVY, PALLIDIUM_THIN, PALLIDIUM_TINY));
public static final Block FLAMMALIX = registerBlock("flammalix", new FlammalixBlock());
public static final Block BLUE_VINE_SEED = registerBlock("blue_vine_seed", new BlueVineSeedBlock());
public static final Block BLUE_VINE = registerEndBlockOnly("blue_vine", new BlueVineBlock());