mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 20:22:33 +00:00
Fix crafting_multi rendering
This commit is contained in:
1 parent
37121e06ce
commit
a32096ad71
3 files changed
+17
-3
No files matched your search
@@ -128,7 +128,6 @@ public final class ContributorFancinessHandler extends LayerRenderer<AbstractCli
|
||||
ms.pop();
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private void renderFlower(MatrixStack ms, IRenderTypeBuffer buffers, PlayerEntity player, ItemStack flower) {
|
||||
ms.push();
|
||||
getEntityModel().bipedHead.translateRotate(ms);
|
||||
|
||||
@@ -10,7 +10,9 @@ package vazkii.botania.common.block;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.TallFlowerBlock;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.DyeColor;
|
||||
import net.minecraft.state.properties.DoubleBlockHalf;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraft.world.World;
|
||||
@@ -32,6 +34,19 @@ public class BlockModDoubleFlower extends TallFlowerBlock {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
// Normally, when an upper block is broken, the lower block recognizes the plant is no longer whole and automatically breaks itself.
|
||||
// But since we require shears, this is needed to pass the breaking context (tool, etc.) to the lower block.
|
||||
@Override
|
||||
public void onBlockHarvested(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||
if (state.get(HALF) == DoubleBlockHalf.UPPER) {
|
||||
BlockState lower = world.getBlockState(pos.down());
|
||||
if (lower.getBlock() == this && lower.get(HALF) == DoubleBlockHalf.LOWER) {
|
||||
lower.getBlock().onBlockHarvested(world, pos.down(), lower, player);
|
||||
}
|
||||
}
|
||||
super.onBlockHarvested(world, pos, state, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canGrow(@Nonnull IBlockReader world, @Nonnull BlockPos pos, @Nonnull BlockState state, boolean fuckifiknow) {
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user