Jump to content

GotoLink

Members
  • Posts

    2012
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GotoLink

  1. ItemStack#getItem()
  2. Eclipse tells you to "Build Model" before. I'd advise you to tick the "Run before" box, and add "setupDevWorkspace" to the command, between "cleanEclipse" and "eclipse".
  3. world.setBlock(chunkX*16 + random.nextInt(16), 100, chunkZ*16 + random.nextInt(16), null, 5, chunkZ); Blocks can't be null in 1.7.
  4. Your statement is incorrect.
  5. Slots and containers aren't client-side. The obvious answer is no, you can't make the player drop the itemstack on client-side.
  6. 1\ Check the null values first. 2\ Don't make objects if you don't use them. 3\ You can get enum values from String. 4\ String[] o = new String[j]; Is void at initialization. 5\ The "command usage" is the help given to the player. Add some meaningful info here (parameters, expected values, etc).
  7. No, the core problem is initializing an object with itself in the definition. You are not supposed to call that method anyway, it is a forge hook.
  8. I meant remove. The RenderLiving* already renders the model you passed through the constructor. *Actually RendererLivingEntity, but whatever.
  9. Ho and clean the first three methods in RenderHunch, and its "Hunch model" field. They are useless.
  10. Your main class is completely wrong. Read the tutorials. Particularly about proxies.
  11. @Override public String getAccessTransformerClass() { return null; } That is the one you want to change to LAFAccessTransformer.
  12. Your custom ItemBlock is crashing when accessing #getSpriteNumber, that is what the error says.
  13. To be added in the build.gradle file: dependencies { compile fileTree(dir:'somedirectory', include: 'somedependency.jar') }
  14. Item#itemRand ? It is a Random, not a Item. You would better shuffle through GameData#itemRegistry.
  15. You should clear the "counter" map in #onDataPacket, before #readFromNBT. counter.put(new int[] { id, damage }, Integer.valueOf(count)); Int arrays aren't good for keys in a map. They don't behave like you think they would.
  16. Man, it is completely pointless to copy a private field if you are not using it yourself. In other words, your private fields is your stuff, not something Forge/Minecraft can touch. All in all, don't copy/paste like a printer, use some brain.
  17. You need to save the result of #newEventDrivenChannel(String) or you'll never be able to send a packet on your channel.
  18. When it comes to enum, == and #equals(Object) are equivalent, because each element of enum is implicitly static and final at creation time. The only difference is #equals(Object) is not null safe. Older versions of Battlegear posted child events of RenderGameOverlayEvent.Pre with a null ElementType.
  19. Ho, you can extend the KeyBinding class so that it can't be rebind, then set its default as F3, and register it. That should block the "F3" process, hopefully. By the way, this if(event.type == RenderGameOverlayEvent.ElementType.TEXT) is an actual fix for the Battlegear incompatibility. I wonder if i was clear enough about it.
  20. The first step is gradlew setupDevWorkspace. Did you change build.gradle file ?
  21. Obviously, cancelling this event would prevent other mods in-screen texts, if they planned to add those in such way. On the Battlegear topic, you should have asked directly to the mod topic, you just are lucky I came in here. Anyway, this crash shouldn't happen if you are listening to RenderGameOverlayEvent.Pre and using a newer Battlegear version. Also, ElementType is an enum. You can do if(event.type == RenderGameOverlayEvent.ElementType.TEXT) That would work the same.
  22. What code are you using to trigger this ? It should be something like: playSound("gemflow:Ambient_Hit"...)
  23. All the "tool classes" are in the Item class now. Just override Item#getToolClasses(ItemStack) and return as much as you want. You may also have to override Item#getHarvestLevel(ItemStack, String) Block#isToolEffective(String, int) Depending on what you want the effect to be for the blocks.
  24. Are you trying to load an old world ? It isn't going to work with tile entity data being corrupted.
  25. Don't register the keybind ? Since it is already in vanilla, you can reference it directly.
×
×
  • Create New...

Important Information

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