Jump to content

Dipo

Members
  • Posts

    33
  • Joined

  • Last visited

Dipo's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Not sure but try to remove the space "axis=z, variant=baobab" to "axis=z,variant=baobab"
  2. I know how to tell client about change, but i mean how to retrieve the name of it on the server side. I want to do exactly what is in chest. When u rename chest block in anvil and place it, then open it, the name of the item chest is shown above the inventory. But I don't know how to "move" the name of the ItemStack to the tileentity. But I've figured it out by overriding onBlockPlacedBy in my block class: @Override public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) { TileEntity atm = world.getTileEntity(pos); if (atm instanceof TileEntityATM) ((TileEntityATM) atm).setCustomName(stack.getDisplayName()); } But thanks anyway
  3. What's the name of your blockstate file and the path to it ? It looks like it can't find it... Caused by: java.io.FileNotFoundException: nntm:blockstates/log.json
  4. Minecraft version: 1.12.2 Forge version: 1.12.2-14.23.5.2824 Java version: Version 8 Update 211 (build 1.8.0_211-b12) When there was IInventory and ISidedInventory, inventory names were simple to use (getInventoryName, hasCustomInventoryName), but now there are capabilities and they don't have anything like inventory name. How Am I supposed to change name of inventory of TileEntity in GuiContainer ? I want to display in GUI the name of block renamed in anvil. I know how to save it in NBT, I just want to know if there is some way to retrieve it.
  5. So you need to get the entity of your player, but the method onPlayerDestroy does not come with this parameter. You can get the player only using world and get entities... but it is not accurate. You should use other method, try to override method called removedByPlayer, it comes with PlayerEntity as parameter. Keep in mind though, that you need to call the super method when overriding this, or your block will not be set to air. So sending the message should look like this: player.sendMessage(new StringTextComponent("your message"));
  6. It's called twice (once on server, once on client). If u want to run some code only once, you have to decide which side. If you want to send a message to a player, you need to run it on server side. To restrict code only to server side use world.isRemote check. It returns true for client worlds and false for server. And for sending messages to a player, I'm not sure if it wasn't changed in 1.14, but in previous versions it was EntityPlayer#sendMessage(ITextComponent).
  7. So you have to change this @Mod(modid = AutoPvP.MODID, version = AutoPvP.VERSION) to this @Mod(modid = Main.MODID, version = Main.VERSION)
  8. Wait, you have a link in your main class to AutoPvP... @Mod(modid = AutoPvP.MODID, version = AutoPvP.VERSION) So i thought that you have this class in your project. Don't you?
  9. I mean forge version, not just minecraft But u didn't post the autopvp class... And also post build.gradle file.
  10. Class names should always start with a capital letter. And can u post the autopvp class ? And which forge version are u using ?
  11. Minecraft version: 1.12.2 Forge version: 1.12.2-14.23.5.2824 Java version: Version 8 Update 211 (build 1.8.0_211-b12) Project on GitHub My GUI is working properly except one thing. It doesn't show item names when hovering over them. GuiWallet: Image:
  12. You are welcome, I'm glad I could help you.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.