Jump to content

Abastro

Forge Modder
  • Posts

    1075
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Abastro

  1. =/ =; @NovaViper So did you check if the dog's owner is not null?
  2. This is wrong. System.out.println("hello" + null); // prints "hellonull" So it was not clear; I'm blind. Sorry for that.
  3. Drop your own block registered with the oreDict, the translation to any other basalt is what the ore dict DOES. He might not want to add his own basalt block. Yes dropping another mods oredict item is not appropriate, but anyway he could want that. @fallingkitten Anyway, as @Draco18 said creating your own Bassalt block and registering it to the OreDict is better way.
  4. There is nothing wrong with your logic, you should only take care of exceptions. You should initialize tamedString to valid String, not null. (Show it as 'Not Tamed', etc.)
  5. But it is clear that the line this.fontRendererObj.drawString("Tamed: " + tamedString, topX + 190, topY - 140, 0xFFFFFF); can throw the NPE with tamedString. See the code in GuiDogInfo#drawScreen(int xMouse, int yMouse, float partialTickTime). tamedString is local variable in the method, it is initialized as null, and it is only substituted with valid value only if the dog is tamed. So it throws NPE otherwise.
  6. It is null when the dog is not tamed. See the code, all substitutions to tamedString is in if(this.dog.isTamed())
  7. No. The tamedString is null. I already said: When the dog entity is not tamed, tamedString remains null and makes crash. You should initialize it to something other like "Not Tamed" instead of null.
  8. 1. You should understand basic java for modding. 2. OreDictionary#getOres(String name) gives List of Itemstack registered with the oredict id. You could use first entry of it. (ofc you should check if the list is empty before that)
  9. ItemStack#getItem() gives the item of the ItemStack.
  10. You can just make the model render different via any data of the entity...
  11. When the dog entity is not tamed, tamedString remains null and makes crash. You should initialize it to something other like "Not Tamed" instead of null.
  12. Screenshot of the generated crops would be needed to diagnose this issue.
  13. As unchangeable EntityPainting.EnumArt plays important role on the render class, you should get rid of that. + Do not copy paste the code unless you understand what it does.
  14. Let the server send the container contents.
  15. What.. Why are you checking equals with biomeName and Biome itself? It cannot be same. As they are singletons to the biome, checking biomegenbase == BiomeGenBase.plains would be just okay.
  16. I just want some more explanations and solutions..
  17. No, I'm sure that something is making NBT to null. So it is needed to confirm that and identify this symptom.
  18. Try enchanting the item with Unbreaking. (Any damageable item would be able to have Unbreaking enchantment)
  19. So it doesn't also contain the enchantment tag? It's impossible. Are the enchantments of the item visible?
  20. It's very strange behavior.. Can your item be stacked?
  21. Do not call event handler methods yourself. and, HarvestDropsEvent should be used to change drops, since you cannot change drops with BreakEvent.
  22. ;I had mistaken GameRegistry#registerCustomItemStack with Item#getSubItems. It is for mods who want to find some Item with findItemStack.
  23. Post your current code.
  24. Yes, It's due to the light update. I think changing flag parameter of the setBlock would make the light update not done during placing blocks..
  25. There seems to be no event for that. You should use EntityItem#onUpdate(). EDIT: You should spawn custom EntityItem when the item is dropped. @Draco18s: Oh. I didn't know that;
×
×
  • Create New...

Important Information

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