Jump to content

coolboy4531

Members
  • Posts

    584
  • Joined

  • Last visited

Everything posted by coolboy4531

  1. Yes, Xcox123. This is how you place @NetworkMod. You need to place it before initializing or creating the class.
  2. It's "per se." Well. You can use IExtendedProperties, or even make entities with NBT. You can look at Minecraft's code of breeding (Child) for details of that. Create new data and make sure that "between each is a male and a female" to allow breeding. This would take quite some time to accomplish, but it's not impossible
  3. I'm guessing one of your ItemStacks are null. The most understanding point where it's null is where you define Entry. entry = (Entry)iterator.next(); In other words, check if iterator.next() is not null before you apply it to "Entry."
  4. I think your title is misleading. Minecraft.getMinecraft().thePlayer is a client-side method, which gets the player on the client side (this means for YOU only!) When you call renderEntityOnFire, you are calling it on the "client side" once again. You won't see it for other players (because it's client side) and you won't see it for mobs (because you never set it to render for mobs!)
  5. Look at PlayerEvent for more events about player actions. PlayerEvent.PlayerLoggedInEvent PlayerEvent.PlayerLoggedOutEvent You can use these 2 events for your issues.
  6. You can use PlayerEvent.PlayerRespawnEvent to give the item to the player.
  7. Might take some tricks and hacks, but this might work. Try using PlayerInteractEvent, check if the player is right-clicking and holding I guess "hay or wheat." That's what you want isn't it? It would be difficult to create an eating animation, but I think there's a method for that. If not, you can try using Java Reflection. Upon consuming it, create some kind of timer (if you want) and add the effects you want.
  8. Don't know the issue, but take a look at one of my friend's (I helped him work on it too) core-mods, SuperEnchants. I need to be extremely careful with copyright - this means I will only show byte[] transform I've trimmed down the code to what's useful for us to know. Transformer Class private static ArrayList<String> enchantList = new ArrayList(Arrays.asList(new String[] { "net.minecraft.enchantment.EnchantmentArrowDamage", "net.minecraft.enchantment.EnchantmentArrowFire", "net.minecraft.enchantment.EnchantmentArrowInfinite", "net.minecraft.enchantment.EnchantmentArrowKnockback [~]you get the point.[~]" }; public byte[] transform(String classname, String arg1, byte[] bytearray) { int e_index = 0; if (enchantList.contains(arg1)) { e_index = enchantList.indexOf(classname); System.out.println("Ready to transform class -> " + classname); return patchClassASM(classname, bytearray, false, e_index); } return bytearray; } I suggest you create an array-list like this one just in case it requires an index.
  9. I told you to change "arg0" to "arg1." Do it and I'm somewhat positive it'll work.
  10. Yeah what coolAlias said. I "remember" about that method but didn't know if it still existed so... I just gave him a way. Ignore the other posts, and use coolAlias's.
  11. EnumMovingObjectType.TILE has been replaced by MovingObjectPosition.MovingObjectType.BLOCK.
  12. Show us the exact location of the error, and what the error says.
  13. You are suppose to create an event class. I realize that you are using 1.6.4. This also means you should be using @ForgeSubscribe instead of @SubscribeEvent. Here ya go! http://www.minecraftforum.net/topic/1419836-forge-4x-events-howto/
  14. arg1. You can use the path of the imported class. (net.minecraft.entity.Entity) is an example. Even if it is obfuscated (in the Minecraft database, originally) - Forge edits that path, and puts it in the code without reobfuscation. This means that you can use that path even in the real game (not Eclipse environment).
  15. Use LivingFallEvent. Check if the event that gets hurt is "your entity" or "the entity you want" that takes fall damage. Change the "distance" to 0. Example: @SubscribeEvent public void livingFall(LivingFallEvent event) { if (event.entityLiving instanceof EntityPlayer) EntityPlayer player = (EntityPlayer) event.entityLiving; event.distance = 0F; }
  16. Use byte[] trasnform's arg1 (String). Here you can return a path to that class. Example: //Let's suppose e = net.minecraft.entity.Entity. if (arg0.equals("e")) can be replaced by: if (arg1.equals("net.minecraft.entity.Entity"))
  17. 0 = boots, 1 = leggings, 2 = chestplate, 3 = helmet
  18. HarvestDropsEvent is only called when the block actually drops an item. Since you removed the items from dropping (and leaves don't drop an item 100%), it will not drop the item because the event is never called. Use BlockEvent.BreakEvent to counteract this issue. Check if the block that breaks is a leave block, then spawn an "EntityItem" in the world as you can not "add" drops with this event. event.world.spawnEntityInWorld(new EntityItem(event.world, event.x, event.y, event.z, ItemStack stack));
  19. It has been recently changed to: @SubscribeEvent
  20. Use Minecraft#renderViewEntity#rayTrace. You should be able to figure out the fields if you know what they do.
  21. That's because you need are giving them woodName which is String[]. You need to set them both with a for loop if you want to display different names.
  22. @param (for custom tool material) name - you can put whatever you want. harvestLevel - what type of ore it can harvest, higher for better tools. maxUses - the maximum uses before a tool of that tool material breaks. efficiency - how fast a "pickaxe" breaks a block. damage - how much damage the "sword" does. enchantability - how good the enchantment of that tool. The "damage" float [in hearts] is called by the super of ItemSword. It calls that and puts the damage into the hash-multimap (might be complicated so ignore).
  23. Those are classes in the Minecraft files (by Mojang). GotoLink is trying to tell you to use your resources as which they've been created by Mojang themselves. Look in those files to see what is needed to be used and put in to generate trees.
×
×
  • Create New...

Important Information

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