Everything posted by DJ1TJOO
-
change hardness and resistance dynamically?
Is there a way to change the hardness and resistance of a block dynamically by for example getting a variable from a tile entity?
-
How to rotate z-axsis
So my model is against a wall so I should put it on the west or east side correct? Instead of on the north side
-
How to rotate z-axsis
- How to rotate z-axsis
how do I unrotate the z axsis?- How to rotate z-axsis
I've tried but it doesn't seem to work setted y: 90 and x to the z rotation I wanted didn't work- How to rotate z-axsis
I have a model and I want to rotate it on the z-axsis in the blockstate.json but it doesn't seem to work, does any one have an idea?- How would I send a SUpdateTileEntityPacket?
So I should just add an inventory slot?- How would I send a SUpdateTileEntityPacket?
Okay, but is it possible in my gui to stack them higher or should I make more input slots- How would I send a SUpdateTileEntityPacket?
They can in you' re own gui right? It works fine- How would I send a SUpdateTileEntityPacket?
It should be fixed- How would I send a SUpdateTileEntityPacket?
Yes but I was also uploading the build folder I redownloaded the git ignore- How would I send a SUpdateTileEntityPacket?
OO its still uploading- How would I send a SUpdateTileEntityPacket?
Try again: https://github.com/DJ1TJOO/fantasy20- How would I send a SUpdateTileEntityPacket?
https://github.com/DJ1TJOO/fantasy20- How would I send a SUpdateTileEntityPacket?
Then what is the right way to do it Edit: And how do I remove the disapearing of my items- How would I send a SUpdateTileEntityPacket?
@Override public void tick() { if(world.isRemote) {//client //Fantasy20.LOGGER.info("ResearchTableTile.tick-client"); } else {//server handler.ifPresent(h -> { second++; if(second > 19) { second = 0; //Fantasy20.LOGGER.info("ResearchTableTile.tick-server"); if(currentRecipe == null) { if(h.getStackInSlot(INPUT_SLOT).getItem().equals(ModItems.SCRAP)) { ResearchTableRecipe recipe = ResearchTable.getRecipe(h.getStackInSlot(INPUT_SLOT_2)); if(recipe != null) { if(h.getStackInSlot(INPUT_SLOT).getCount() >= recipe.getScrap()) { second = 0; timer = 0; completed = 0; currentRecipe = recipe.copy(); markDirty(); world.notifyBlockUpdate(pos, getBlockState(), getBlockState(), 2); } } } } else { if(h.getStackInSlot(INPUT_SLOT).getCount() < currentRecipe.getScrap() || !h.getStackInSlot(INPUT_SLOT_2).getItem().equals(currentRecipe.getInputItem())) { currentRecipe = null; second = 0; timer = 0; completed = 0; markDirty(); world.notifyBlockUpdate(pos, getBlockState(), getBlockState(), 2); } else { timer++; //System.err.println(timer/100); // System.err.println(timer/currentRecipe.getTime() * 100); if(timer > currentRecipe.getTime()) { h.extractItem(INPUT_SLOT, currentRecipe.getScrap(), false); h.extractItem(INPUT_SLOT_2, 1, false); h.insertItem(OUTPUT_SLOT, currentRecipe.getResultBlueprint(), false); //System.err.println(" " + currentRecipe.toString()); currentRecipe = null; second = 0; timer = 0; completed = 0; } if(currentRecipe != null) { completed = (int)(((double)((double)timer/(double)currentRecipe.getTime())) * 100); //System.err.println(completed); } //PacketHandler.INSTANCE.send(PacketDistributor.ALL, this.getUpdatePacket()); markDirty(); world.notifyBlockUpdate(pos, getBlockState(), getBlockState(), 2); } } } }); } } In the tileentity private ResearchTableTile tileEntity; private PlayerEntity playerEntity; private IItemHandler playerInventory; public ResearchTableContainer(int id, World world, BlockPos pos, PlayerInventory playerInventory, PlayerEntity playerEntity) { super(ModBlocks.RESEARCH_TABLE_CONTAINER, id); tileEntity = (ResearchTableTile) world.getTileEntity(pos); this.playerEntity = playerEntity; this.playerInventory = new InvWrapper(playerInventory); //tileEntity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).ifPresent(h -> { tileEntity.getHandler().ifPresent(h -> { addSlot(new SlotItemHandler(h, tileEntity.INPUT_SLOT, 19, 33)); addSlot(new SlotItemHandler(h, tileEntity.INPUT_SLOT_2, 55, 33)); addSlot(new SlotItemHandler(h, tileEntity.OUTPUT_SLOT, 137, 33)); }); //}); layoutPlayerInventorySlots(8, 83); } @Override public boolean canInteractWith(PlayerEntity player) { return isWithinUsableDistance(IWorldPosCallable.of(tileEntity.getWorld(), tileEntity.getPos()), playerEntity, ModBlocks.RESEARCH_TABLE); } private int addSlotRange(IItemHandler handler, int index, int x, int y, int amount, int dx) { for (int i = 0 ; i < amount ; i++) { addSlot(new SlotItemHandler(handler, index, x, y)); x += dx; index++; } return index; } private int addSlotBox(IItemHandler handler, int index, int x, int y, int horAmount, int dx, int verAmount, int dy) { for (int j = 0 ; j < verAmount ; j++) { index = addSlotRange(handler, index, x, y, horAmount, dx); y += dy; } return index; } private void layoutPlayerInventorySlots(int leftCol, int topRow) { // Player inventory addSlotBox(playerInventory, 9, leftCol, topRow, 9, 18, 3, 18); // Hotbar topRow += 58; addSlotRange(playerInventory, 0, leftCol, topRow, 9, 18); } public ResearchTableTile getTileEntity() { return tileEntity; } public void setTileEntity(ResearchTableTile tileEntity) { this.tileEntity = tileEntity; } In the Container private ResearchTableTile tileEntity; private ResourceLocation GUI = new ResourceLocation(Fantasy20.MODID, "textures/gui/research_table/gui.png"); public ResearchTableScreen(ResearchTableContainer screenContainer, PlayerInventory inv, ITextComponent titleIn) { super(screenContainer, inv, titleIn); tileEntity = getContainer().getTileEntity(); } @Override public boolean mouseDragged(double mouseX, double mouseY, int button, double mouseXVel, double mouseYVel) { return super.mouseDragged(mouseX, mouseY, button, mouseXVel, mouseYVel); } @Override public boolean mouseClicked(double mouseX, double mouseY, int button) { return super.mouseClicked(mouseX, mouseY, button); } @Override public boolean mouseReleased(double mouseX, double mouseY, int button) { return super.mouseReleased(mouseX, mouseY, button); } @Override public void mouseMoved(double mouseX, double mouseY) { super.mouseMoved(mouseX, mouseY); } @Override public void render(int mouseX, int mouseY, float partialTicks) { this.renderBackground(); super.render(mouseX, mouseY, partialTicks); this.renderHoveredToolTip(mouseX, mouseY); } @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { this.font.drawString(this.title.getFormattedText(), 8.0F, 6.0F, 4210752); } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { GlStateManager.color4f(1.0F, 1.0F, 1.0F, 1.0F); this.minecraft.getTextureManager().bindTexture(GUI); int relX = (this.width - this.xSize) / 2; int relY = (this.height - this.ySize) / 2; this.blit(relX, relY, 0, 0, this.xSize, this.ySize); // System.err.println(getContainer().getTileEntity().getCompleted()); if(tileEntity.getCurrentRecipe() != null) { int k = getCompletedLeft(24); //System.err.println(k); this.blit(relX + 91, relY + 33, 176, 0, k, 17); } } private int getCompletedLeft(int pixels) { int i = tileEntity.getCompleted(); return (int)(((double)i / (double)100) * (double)pixels); } In the screen Edit: Its used for the completed int to see the progressbar in the gui And I know that my code is a mess sometimes- How would I send a SUpdateTileEntityPacket?
- How would I send a SUpdateTileEntityPacket?
Or should I use packets then I have the question: how would I get the client world in the handle: private final BlockPos pos; private final int completed; public ResearchTableCompletedUpdatePacket(BlockPos pos, int completed) { this.pos = pos; this.completed = completed; } public static void encode(ResearchTableCompletedUpdatePacket msg, PacketBuffer buffer) { buffer.writeBlockPos(msg.pos); buffer.writeByte((byte)msg.completed); } public static ResearchTableCompletedUpdatePacket decode(PacketBuffer buffer) { return new ResearchTableCompletedUpdatePacket(buffer.readBlockPos(), buffer.readUnsignedByte()); } public static void handle(ResearchTableTile msg, Supplier<NetworkEvent.Context> context) { context.get().enqueueWork(() -> { TileEntity te = **WORLD**.getTileEntity(msg.pos); if(te instanceof ResearchTableTile) { ResearchTableTile dtt = (ResearchTableTile) te; } }); context.get().setPacketHandled(true); }- How would I send a SUpdateTileEntityPacket?
So you say that I need to send the notifyBlockUpdate but how would I get the old state and wich flag should I use?- How would I send a SUpdateTileEntityPacket?
I have an tile with an gui and I do all the calculations on the server side then I want to send the nbt data to the client. In another topic I saw someone using the SUpdateTileEntityPacket. This was an old topic from 1.11 and that doesn't work any more does someone have any idea? PacketHandler.INSTANCE.send(PacketDistributor.ALL, this.getUpdatePacket()); This is what I tried but it can't see the getUpdatePacket as a MSG: The method send(PacketDistributor.PacketTarget, MSG) in the type SimpleChannel is not applicable for the arguments (PacketDistributor<Void>, SUpdateTileEntityPacket)- How to add nbt in json crafting recipe?
I think it will work I will look at it in the afternoon. Thanks!- How to add nbt in json crafting recipe?
How would I add nbt to a crafting recipe? Here is what I have so far: { "type": "minecraft:crafting_shaped", "pattern": [ "xxx", "xxx" ], "key": { "x": { "item": "fantasy20:metal" } }, "result": { "item": "fantasy20:metal_floor", "count": 6 } } I want to check the data nbt compount- Make block blast resistand (1.14.4)
Any idea yet?- Make block blast resistand (1.14.4)
I can't seem to override the redstone interaction so I just removed it from the door code, but have you any idea why my door keeps exploding while it's resistance is similair to bedrock- Make block blast resistand (1.14.4)
@SuppressWarnings({ "unchecked", "rawtypes" }) public class DoorLockBlock extends Block { public static final DirectionProperty FACING; public static final BooleanProperty OPEN; public static final EnumProperty<DoorHingeSide> HINGE; public static final EnumProperty<DoubleBlockHalf> HALF; protected static final VoxelShape SOUTH_AABB; protected static final VoxelShape NORTH_AABB; protected static final VoxelShape WEST_AABB; protected static final VoxelShape EAST_AABB; protected DoorLockBlock(final Block.Properties p_i48413_1_) { super(p_i48413_1_); this.setDefaultState((BlockState)((BlockState)((BlockState)((BlockState)((BlockState)((BlockState)this.stateContainer.getBaseState()).with((IProperty)DoorBlock.FACING, (Comparable)Direction.NORTH)).with((IProperty)DoorBlock.OPEN, (Comparable)false)).with((IProperty)DoorBlock.HINGE, (Comparable)DoorHingeSide.LEFT)).with((IProperty)DoorBlock.HALF, (Comparable)DoubleBlockHalf.LOWER))); } public VoxelShape getShape(final BlockState p_220053_1_, final IBlockReader p_220053_2_, final BlockPos p_220053_3_, final ISelectionContext p_220053_4_) { final Direction lvt_5_1_ = (Direction)p_220053_1_.get((IProperty)DoorBlock.FACING); final boolean lvt_6_1_ = !(boolean)p_220053_1_.get((IProperty)DoorBlock.OPEN); final boolean lvt_7_1_ = p_220053_1_.get((IProperty)DoorBlock.HINGE) == DoorHingeSide.RIGHT; switch (DoorLockBlock.DoorBlock$1.field_185789_a[lvt_5_1_.ordinal()]) { default: { return lvt_6_1_ ? DoorLockBlock.EAST_AABB : (lvt_7_1_ ? DoorLockBlock.NORTH_AABB : DoorLockBlock.SOUTH_AABB); } case 2: { return lvt_6_1_ ? DoorLockBlock.SOUTH_AABB : (lvt_7_1_ ? DoorLockBlock.EAST_AABB : DoorLockBlock.WEST_AABB); } case 3: { return lvt_6_1_ ? DoorLockBlock.WEST_AABB : (lvt_7_1_ ? DoorLockBlock.SOUTH_AABB : DoorLockBlock.NORTH_AABB); } case 4: { return lvt_6_1_ ? DoorLockBlock.NORTH_AABB : (lvt_7_1_ ? DoorLockBlock.WEST_AABB : DoorLockBlock.EAST_AABB); } } } @SuppressWarnings("deprecation") public BlockState updatePostPlacement(final BlockState p_196271_1_, final Direction p_196271_2_, final BlockState p_196271_3_, final IWorld p_196271_4_, final BlockPos p_196271_5_, final BlockPos p_196271_6_) { final DoubleBlockHalf lvt_7_1_ = (DoubleBlockHalf)p_196271_1_.get((IProperty)DoorBlock.HALF); if (p_196271_2_.getAxis() == Direction.Axis.Y && lvt_7_1_ == DoubleBlockHalf.LOWER == (p_196271_2_ == Direction.UP)) { if (p_196271_3_.getBlock() == this && p_196271_3_.get((IProperty)DoorBlock.HALF) != lvt_7_1_) { return (BlockState)((BlockState)((BlockState)((BlockState)p_196271_1_.with((IProperty)DoorBlock.FACING, p_196271_3_.get((IProperty)DoorBlock.FACING))).with((IProperty)DoorBlock.OPEN, p_196271_3_.get((IProperty)DoorBlock.OPEN))).with((IProperty)DoorBlock.HINGE, p_196271_3_.get((IProperty)DoorBlock.HINGE))); } return Blocks.AIR.getDefaultState(); } else { if (lvt_7_1_ == DoubleBlockHalf.LOWER && p_196271_2_ == Direction.DOWN && !p_196271_1_.isValidPosition((IWorldReader)p_196271_4_, p_196271_5_)) { return Blocks.AIR.getDefaultState(); } return super.updatePostPlacement(p_196271_1_, p_196271_2_, p_196271_3_, p_196271_4_, p_196271_5_, p_196271_6_); } } public void harvestBlock(final World p_180657_1_, final PlayerEntity p_180657_2_, final BlockPos p_180657_3_, final BlockState p_180657_4_, @Nullable final TileEntity p_180657_5_, final ItemStack p_180657_6_) { super.harvestBlock(p_180657_1_, p_180657_2_, p_180657_3_, Blocks.AIR.getDefaultState(), p_180657_5_, p_180657_6_); } public void onBlockHarvested(final World p_176208_1_, final BlockPos p_176208_2_, final BlockState p_176208_3_, final PlayerEntity p_176208_4_) { final DoubleBlockHalf lvt_5_1_ = (DoubleBlockHalf)p_176208_3_.get((IProperty)DoorBlock.HALF); final BlockPos lvt_6_1_ = (lvt_5_1_ == DoubleBlockHalf.LOWER) ? p_176208_2_.up() : p_176208_2_.down(); final BlockState lvt_7_1_ = p_176208_1_.getBlockState(lvt_6_1_); if (lvt_7_1_.getBlock() == this && lvt_7_1_.get((IProperty)DoorBlock.HALF) != lvt_5_1_) { p_176208_1_.setBlockState(lvt_6_1_, Blocks.AIR.getDefaultState(), 35); p_176208_1_.playEvent(p_176208_4_, 2001, lvt_6_1_, Block.getStateId(lvt_7_1_)); final ItemStack lvt_8_1_ = p_176208_4_.getHeldItemMainhand(); if (!p_176208_1_.isRemote && !p_176208_4_.isCreative()) { Block.spawnDrops(p_176208_3_, p_176208_1_, p_176208_2_, (TileEntity)null, (Entity)p_176208_4_, lvt_8_1_); Block.spawnDrops(lvt_7_1_, p_176208_1_, lvt_6_1_, (TileEntity)null, (Entity)p_176208_4_, lvt_8_1_); } } super.onBlockHarvested(p_176208_1_, p_176208_2_, p_176208_3_, p_176208_4_); } public boolean allowsMovement(final BlockState p_196266_1_, final IBlockReader p_196266_2_, final BlockPos p_196266_3_, final PathType p_196266_4_) { switch (DoorLockBlock.DoorBlock$1.field_210338_b[p_196266_4_.ordinal()]) { case 1: { return (boolean)p_196266_1_.get((IProperty)DoorBlock.OPEN); } case 2: { return false; } case 3: { return (boolean)p_196266_1_.get((IProperty)DoorBlock.OPEN); } default: { return false; } } } private int getCloseSound() { return (this.material == Material.IRON) ? 1011 : 1012; } private int getOpenSound() { return (this.material == Material.IRON) ? 1005 : 1006; } @Nullable public BlockState getStateForPlacement(final BlockItemUseContext p_196258_1_) { final BlockPos lvt_2_1_ = p_196258_1_.getPos(); if (lvt_2_1_.getY() < 255 && p_196258_1_.getWorld().getBlockState(lvt_2_1_.up()).isReplaceable(p_196258_1_)) { return (BlockState)((BlockState)((BlockState)((BlockState)((BlockState)this.getDefaultState().with((IProperty)DoorBlock.FACING, (Comparable)p_196258_1_.getPlacementHorizontalFacing())).with((IProperty)DoorBlock.HINGE, (Comparable)this.getHingeSide(p_196258_1_)).with((IProperty)DoorBlock.OPEN, (Comparable)false)).with((IProperty)DoorBlock.HALF, (Comparable)DoubleBlockHalf.LOWER))); } return null; } public void onBlockPlacedBy(final World p_180633_1_, final BlockPos p_180633_2_, final BlockState p_180633_3_, final LivingEntity p_180633_4_, final ItemStack p_180633_5_) { p_180633_1_.setBlockState(p_180633_2_.up(), (BlockState)p_180633_3_.with((IProperty)DoorBlock.HALF, (Comparable)DoubleBlockHalf.UPPER), 3); } private DoorHingeSide getHingeSide(final BlockItemUseContext p_208073_1_) { final IBlockReader lvt_2_1_ = (IBlockReader)p_208073_1_.getWorld(); final BlockPos lvt_3_1_ = p_208073_1_.getPos(); final Direction lvt_4_1_ = p_208073_1_.getPlacementHorizontalFacing(); final BlockPos lvt_5_1_ = lvt_3_1_.up(); final Direction lvt_6_1_ = lvt_4_1_.rotateYCCW(); final BlockPos lvt_7_1_ = lvt_3_1_.offset(lvt_6_1_); final BlockState lvt_8_1_ = lvt_2_1_.getBlockState(lvt_7_1_); final BlockPos lvt_9_1_ = lvt_5_1_.offset(lvt_6_1_); final BlockState lvt_10_1_ = lvt_2_1_.getBlockState(lvt_9_1_); final Direction lvt_11_1_ = lvt_4_1_.rotateY(); final BlockPos lvt_12_1_ = lvt_3_1_.offset(lvt_11_1_); final BlockState lvt_13_1_ = lvt_2_1_.getBlockState(lvt_12_1_); final BlockPos lvt_14_1_ = lvt_5_1_.offset(lvt_11_1_); final BlockState lvt_15_1_ = lvt_2_1_.getBlockState(lvt_14_1_); final int lvt_16_1_ = (lvt_8_1_.func_224756_o(lvt_2_1_, lvt_7_1_) ? -1 : 0) + (lvt_10_1_.func_224756_o(lvt_2_1_, lvt_9_1_) ? -1 : 0) + (lvt_13_1_.func_224756_o(lvt_2_1_, lvt_12_1_) ? 1 : 0) + (lvt_15_1_.func_224756_o(lvt_2_1_, lvt_14_1_) ? 1 : 0); final boolean lvt_17_1_ = lvt_8_1_.getBlock() == this && lvt_8_1_.get((IProperty)DoorBlock.HALF) == DoubleBlockHalf.LOWER; final boolean lvt_18_1_ = lvt_13_1_.getBlock() == this && lvt_13_1_.get((IProperty)DoorBlock.HALF) == DoubleBlockHalf.LOWER; if ((lvt_17_1_ && !lvt_18_1_) || lvt_16_1_ > 0) { return DoorHingeSide.RIGHT; } if ((lvt_18_1_ && !lvt_17_1_) || lvt_16_1_ < 0) { return DoorHingeSide.LEFT; } final int lvt_19_1_ = lvt_4_1_.getXOffset(); final int lvt_20_1_ = lvt_4_1_.getZOffset(); final Vec3d lvt_21_1_ = p_208073_1_.getHitVec(); final double lvt_22_1_ = lvt_21_1_.x - lvt_3_1_.getX(); final double lvt_24_1_ = lvt_21_1_.z - lvt_3_1_.getZ(); return ((lvt_19_1_ < 0 && lvt_24_1_ < 0.5) || (lvt_19_1_ > 0 && lvt_24_1_ > 0.5) || (lvt_20_1_ < 0 && lvt_22_1_ > 0.5) || (lvt_20_1_ > 0 && lvt_22_1_ < 0.5)) ? DoorHingeSide.RIGHT : DoorHingeSide.LEFT; } public boolean onBlockActivated(BlockState p_220051_1_, final World p_220051_2_, final BlockPos p_220051_3_, final PlayerEntity p_220051_4_, final Hand p_220051_5_, final BlockRayTraceResult p_220051_6_) { if (this.material == Material.IRON) { return false; } p_220051_1_ = (BlockState)p_220051_1_.cycle((IProperty)DoorBlock.OPEN); p_220051_2_.setBlockState(p_220051_3_, p_220051_1_, 10); p_220051_2_.playEvent(p_220051_4_, ((boolean)p_220051_1_.get((IProperty)DoorBlock.OPEN)) ? this.getOpenSound() : this.getCloseSound(), p_220051_3_, 0); return true; } public void toggleDoor(final World p_176512_1_, final BlockPos p_176512_2_, final boolean p_176512_3_) { final BlockState lvt_4_1_ = p_176512_1_.getBlockState(p_176512_2_); if (lvt_4_1_.getBlock() != this || (boolean)lvt_4_1_.get((IProperty)DoorBlock.OPEN) == p_176512_3_) { return; } p_176512_1_.setBlockState(p_176512_2_, (BlockState)lvt_4_1_.with((IProperty)DoorBlock.OPEN, (Comparable)p_176512_3_), 10); this.playSound(p_176512_1_, p_176512_2_, p_176512_3_); } public void neighborChanged(final BlockState p_220069_1_, final World p_220069_2_, final BlockPos p_220069_3_, final Block p_220069_4_, final BlockPos p_220069_5_, final boolean p_220069_6_) { } public boolean isValidPosition(final BlockState p_196260_1_, final IWorldReader p_196260_2_, final BlockPos p_196260_3_) { final BlockPos lvt_4_1_ = p_196260_3_.down(); final BlockState lvt_5_1_ = p_196260_2_.getBlockState(lvt_4_1_); if (p_196260_1_.get((IProperty)DoorBlock.HALF) == DoubleBlockHalf.LOWER) { return lvt_5_1_.func_224755_d((IBlockReader)p_196260_2_, lvt_4_1_, Direction.UP); } return lvt_5_1_.getBlock() == this; } private void playSound(final World p_196426_1_, final BlockPos p_196426_2_, final boolean p_196426_3_) { p_196426_1_.playEvent((PlayerEntity)null, p_196426_3_ ? this.getOpenSound() : this.getCloseSound(), p_196426_2_, 0); } public PushReaction getPushReaction(final BlockState p_149656_1_) { return PushReaction.DESTROY; } public BlockRenderLayer getRenderLayer() { return BlockRenderLayer.CUTOUT; } public BlockState rotate(final BlockState p_185499_1_, final Rotation p_185499_2_) { return (BlockState)p_185499_1_.with((IProperty)DoorBlock.FACING, (Comparable)p_185499_2_.rotate((Direction)p_185499_1_.get((IProperty)DoorBlock.FACING))); } public BlockState mirror(final BlockState p_185471_1_, final Mirror p_185471_2_) { if (p_185471_2_ == Mirror.NONE) { return p_185471_1_; } return (BlockState)p_185471_1_.rotate(p_185471_2_.toRotation((Direction)p_185471_1_.get((IProperty)DoorBlock.FACING))).cycle((IProperty)DoorBlock.HINGE); } @OnlyIn(Dist.CLIENT) public long getPositionRandom(final BlockState p_209900_1_, final BlockPos p_209900_2_) { return MathHelper.getCoordinateRandom(p_209900_2_.getX(), p_209900_2_.down((int)((p_209900_1_.get((IProperty)DoorBlock.HALF) != DoubleBlockHalf.LOWER) ? 1 : 0)).getY(), p_209900_2_.getZ()); } protected void fillStateContainer(final StateContainer.Builder<Block, BlockState> p_206840_1_) { p_206840_1_.add(new IProperty[] { (IProperty)DoorBlock.HALF, (IProperty)DoorBlock.FACING, (IProperty)DoorBlock.OPEN, (IProperty)DoorBlock.HINGE}); } static { FACING = HorizontalBlock.HORIZONTAL_FACING; OPEN = BlockStateProperties.OPEN; HINGE = BlockStateProperties.DOOR_HINGE; HALF = BlockStateProperties.DOUBLE_BLOCK_HALF; SOUTH_AABB = Block.makeCuboidShape(0.0, 0.0, 0.0, 16.0, 16.0, 3.0); NORTH_AABB = Block.makeCuboidShape(0.0, 0.0, 13.0, 16.0, 16.0, 16.0); WEST_AABB = Block.makeCuboidShape(13.0, 0.0, 0.0, 16.0, 16.0, 16.0); EAST_AABB = Block.makeCuboidShape(0.0, 0.0, 0.0, 3.0, 16.0, 16.0); } static class DoorBlock$1 { private static int[] field_210338_b; private static int[] field_185789_a; static { DoorBlock$1.field_210338_b = new int[PathType.values().length]; try { DoorBlock$1.field_210338_b[PathType.LAND.ordinal()] = 1; } catch (NoSuchFieldError noSuchFieldError) {} try { DoorBlock$1.field_210338_b[PathType.WATER.ordinal()] = 2; } catch (NoSuchFieldError noSuchFieldError2) {} try { DoorBlock$1.field_210338_b[PathType.AIR.ordinal()] = 3; } catch (NoSuchFieldError noSuchFieldError3) {} DoorBlock$1.field_185789_a = new int[Direction.values().length]; try { DoorBlock$1.field_185789_a[Direction.EAST.ordinal()] = 1; } catch (NoSuchFieldError noSuchFieldError4) {} try { DoorBlock$1.field_185789_a[Direction.SOUTH.ordinal()] = 2; } catch (NoSuchFieldError noSuchFieldError5) {} try { DoorBlock$1.field_185789_a[Direction.WEST.ordinal()] = 3; } catch (NoSuchFieldError noSuchFieldError6) {} try { DoorBlock$1.field_185789_a[Direction.NORTH.ordinal()] = 4; } catch (NoSuchFieldError noSuchFieldError7) {} } } } It's the default minecraft doorblock but it has no redstone interaction - How to rotate z-axsis
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.