Jump to content

GotoLink

Members
  • Posts

    2012
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GotoLink

  1. Why not FMLPreInitializationEvent ? Also you could check InventoryPlayer for other methods to check item in slots and such.
  2. Usually 1.2.5 means you have client source and server source. Updating would need merging the two, then use packets to send appropriate data. I already worked on Rise of the Automatons but never finished. You can see the progress on my github (Zetgeist repo).
  3. Basically every situations. In most cases, if a mod cancel an event instance, it does so for a reason, and thus not every time. Unless you are writing a mod for statistics (number of time something tried to do stuff), you don't need the cancelled event. It can hurt performance and it can produce weird effects when two mods trigger under the same event.
  4. The last one of your list is the method you seek.
  5. That @Override is actually good coding practice. Look it up. What you saw is a vanilla bug when wearing any damaged armor in 1.7.2.
  6. There is no "simple" way of doing this. If you want a process without hard-coded values, i see two options: -make it configurable by the user, with just vanilla items for default values -create a "fake" world instance where you set then break the leaves, and catch the drops to eventually get a sapling item
  7. Some more OOC ? public class Group{ private final List<Class> members; public Group(Class...classes){ this.members = Arrays.asList(classes); } public boolean hasMember(Class<?> test){ for(Class<?> member:members){ if(member.isAssignableFrom(test)) return true; } return false; } } public Group meanVanillaBiped = new Group(EntityZombie.class, EntitySkeleton.class, EntityCreeper.class);
  8. I suggest you post the MusicRecords with the minimal amount of code you want to change from it. Remove everything that you copied from the parent class ItemRecord. Not sure why you would need to change the ResourceLocation. It should work as-is.
  9. The addInformation is only supposed to read the info from the ItemStack. If packets are needed, send them from the onCreated method.
  10. When you define new sounds, you typically use modid:soundname format, resulting in the sound being placed in assets/modid/sounds/soundname.ogg and the corresponding sounds.json would be: { "soundname": {"category": "record","sounds": [{"name": "soundname","stream": true}]} }
  11. You are casting the damage value to int then to float. Why ?
  12. PlayerTickEvent should help do that.
  13. You can use the village related events, and IVillageCreationHandler.
  14. Well onCreated is server side and addInformation is client side. Make sure the tags are shared. @delpi You could override Item#getSubItems to add the NBT data to your items in creative menu. Stacking can depend on a lot of stuff, including NBT. It is also worth remembering that the same instance of ItemStack can't stack with itself, so ItemStack#copy() is useful when making a custom crafting process.
  15. No, you also have to set it as a dependency in your workspace, with gradle, you change the build.gradle file with a dependency body.
  16. targetMethod1Name ="getSkinUrl"; targetMethod2Name = "getCapeUrl"; You are targeting unobfuscated methods, so obviously, this isn't going to work in any other environment.
  17. ItemStack boots = event.player.getCurrentArmor(3); That isn't the boots slot content.
  18. Can't work with EntityAnimal. Use EntityCreature.
  19. I'd rather keep the water tag. It describes the main aspect of oceans and rivers perfectly. Maybe some "LARGE" or "DEEP" tag ?
  20. Your entity is missing the constructor with World as only argument. It is needed.
  21. 1) Override Block#getItemDropped(int, Random, int) 2) Change your block Material to one that requires a tool. (Material#setRequiresTool())
  22. Assuming you use 1.7.2, you should register a listener for ItemCraftedEvent. See wiki for tutorial.
  23. WorldGenTrees, WorldGenAbstractTree...
  24. Icon in 1.6 -> IIcon in 1.7.2. Such change. Wow. Metadata didn't change at all from 1.6. Thus the tutorial is still valid.
  25. Didn't you answer yourself with the /tellraw command ? It is called CommandMessageRaw in MCP.
×
×
  • Create New...

Important Information

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