-
[1.12] [Solved] Sending blockstate over network
Thanks! The latter did the trick. I think I can figure out the rest on my own.
-
[1.12] [Solved] Sending blockstate over network
Hey there, I'm working on a mod that notifies the player whenever certain tasks are done. One of the tasks finishes when a block changes to a certain state. I want the player to be able to select a specifc state and the server will then check whether or not the block has changed and then notify the player. My issue is sending the blockstate with its properties to the server so it can handle it. So I wanted to ask if there's any way to send a blockstate to the server with all it's properties. Sending the block as an ItemStack with damage didn't work for all states so I thought that it might be possible to convert the blockstate to JSON and then send that to the server but I didn't have any luck finding a way to do that. Here's the repository if anyone wants to look at it. Thank's in advance! Edit: Here's what I ended up using thanks to diesieben07 (not 100% finished)
-
[1.8] [Solved] Special collision for a block
Thanks! That worked As it seems the only thing that changed between 1.7 and 1.8 is the method parameters. Here's what I ended up using: I tried to use a switch case instead of the if/else but that didn't really work for me. As it seems the super call is necessary. I also added this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F) at the end since I want the highlight wire frame to be a full block. So thanks again^^
-
[1.8]Gui fontRenderer not working
Have you tried changing it to fontRendererObj ? I assume your tutorial code is from 1.7.10 because from 1.7 to 1.8 it changed from fontRenderer to fontRendererObj as far as I know.
-
[1.8] [Solved] Special collision for a block
Hello! So I've been trying to add stair-like collision to my block. What I basically want is that the player should be able to go through the area that is marked red in the image: I've looked around and tried to use addCollisionBoxesToList but that only made the player get stuck (Maybe because I used it wrong). Here's what I tried with addCollisionBoxesToList: @Override public void addCollisionBoxesToList(World worldIn, BlockPos pos, IBlockState state, AxisAlignedBB mask, List list, Entity collidingEntity) { double xPos = pos.getX(), yPos = pos.getY(), zPos = pos.getZ(); list.add(new AxisAlignedBB(xPos, yPos, zPos, xPos + 0.5F, yPos + 1.0F, zPos + 0.5F)); list.add(new AxisAlignedBB(xPos, yPos, zPos + 0.5F, xPos + 1.0F, yPos + 1.0F, zPos + 1.0F)); super.addCollisionBoxesToList(worldIn, pos, state, mask, list, collidingEntity); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); } Someone also said that I have to use collisionRayTrace but I have no idea how to use that method. And looking at the stair code didn't help me either. So yeah any help is welcome ^^
IPS spam blocked by CleanTalk.