Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. Update, I've got it to work, but I want the server to sync the ItemStacks NBT more often, does anyone know what method I should use to achieve this? this is pseudo code of what I'm trying to achieve public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) { if(energy.getEnergyStored() != prevEnergyStored) entityIn.connection.sendPacket(UPDATE_NBT); }
  2. I am setting my NBT in my getShareTag correctly, and the NBT should just work (deserialise/read automagically) client side. Am I missing something?
  3. I assume you have to override getBoundingBox in Block
  4. Your probably going to want to use Capabilities, they are well documented. Here's the rundown https://gist.github.com/williewillus/c8dc2a1e7963b57ef436c699f25a710d
  5. Other events usually have a getHand() method
  6. whats wrong with Try it before saying it doesn't work You also didn't post your EntityUtil.getActiveItemStack method
  7. what are you trying to do???
  8. They're on MCPBot, you can even add & change them if you want
  9. Also, you probably want all your methods to be static unless you are registering your EventHandler (in preInit)
  10. I’ve got an Item that has an energy capability that writes its energy amount to not every time it updates (is this the way I should be doing it?) but when energy is added to it by other items in my inventory (Actually Additions Batteries) the energy only updates on the server, not the client. If I drop the item and pick it up again or put it into another inventory (chest, furnace, generator etc) the energy updates to the right amount. However moving it around in my own inventory or using the item doesn’t update the energy. My code: https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/item/ItemEnergy.java > https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/item/ItemGun.java > https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/item/ItemRailgun113.java Provider https://github.com/Cadiboo/WIPTech/tree/master/src/main/java/cadiboo/wiptech/provider (ModularWeaponProvider & ModularWeaponProvider113) neither works What am I doing wrong/ should I be doing differently?
  11. Hi, I'm currently trying to look at how 1.13 handles its' furnace recipes (JSON!) and need to know how to use MCP to deobfuscate the latest snapshot's source code. I have tried a number of tutorials to use MCP, but it seems that since forge's existence direct use of MCP has dwindled almost out of existence. If anybody has this knowledge, it would be greatly appreciated if you could share it. A number of other people @Exsolutus, @MDW01 have expressed interest in the source code, and jabelar, Draco18s & diesieben07 have expressed interest about the workings of 1.13. I am trying to understand how to use https://github.com/MinecraftForge/MCPConfig in conjunction with MCP. Here is my latest attempt if it helps anyone
  12. Thats the solution. A lot of code is apparently handled specifically if the entity extends arrow, so you pretty much have to extend it. My current code that works perfectly
  13. Fixed everything a long time ago. Here are my current classes if it helps anyone. Entity Class https://github.com/Cadiboo/WIPTech/blob/master/src/main/java/cadiboo/wiptech/entity/projectile/EntityParamagneticProjectile113.java Entity Init https://github.com/Cadiboo/WIPTech/blob/3e6764e8ad5e441971c25e5e01ca6e15cef91eef/src/main/java/cadiboo/wiptech/init/Entities.java#L1-L121 Entity Registration https://github.com/Cadiboo/WIPTech/blob/3e6764e8ad5e441971c25e5e01ca6e15cef91eef/src/main/java/cadiboo/wiptech/handler/EventSubscriber.java#L37-L41 Entity Renderer Registration https://github.com/Cadiboo/WIPTech/blob/daa1f8985122ad526231771ed97c9f3eda34423b/src/main/java/cadiboo/wiptech/client/EventSubscriber.java#L101-L104
  14. Can I recommend BlockBench? http://blockbench.net
  15. 1) Please post your log in a spoiler (click the eye icon when posting), not as an attachment 2) Thats a vanilla log, please make sure you posted the correct log & are running forge
  16. for (int i = 0; i < Blocks.BLOCKS.length; i++) { event.getRegistry().register(new ItemBlock(Blocks.BLOCKS).setRegistryName(Blocks.BLOCKS.getRegistryName())); } from my code so for your code it would be event.getRegistry().register(new ItemBlock(Blocks.testBlock).setRegistryName(Blocks.testBlock.getRegistryName()));
  17. please show your itemBlock registration code (and any creative tab registration code if you have it)
  18. Can you use /setblock to place it? If so, Are you registering an ItemBlock for your block?
  19. setRegistryName(name); setRegistryName(new ResourceLocation(Reference.MODID, name));
  20. And your testblock class
  21. Can you post your main mod class?
  22. Also a GitHub link is very helpful if you have one, it allows you and us to see errors that might jump out at you on another platform
  23. Try deleting then recreating your resources directory. DON'T JUST PASTE your files back in, recreate every file & folder from scratch, or copy minecraft's version inside and delete everything you don't need. I had an issue where I had some very small problem with my lang file and had to do this
  24. com.feed_the_beast.ftbutilities this mod is responsible. https://en.wikipedia.org/wiki/Stack_overflow#Infinite_recursion
×
×
  • Create New...

Important Information

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