Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

HoBoS_TaCo

Forge Modder
  • Posts

    140
  • Joined

  • Last visited

Everything posted by HoBoS_TaCo

  1. I can't figure out how to check the item variable in the main class for an annotation rather than the item's actual class. //Main mod class @Loot(9) public static final Item beans = new ItemMod(2998) @Loot(5) public static final Item cake = new ItemMod(2999) //ItemMod class @Override public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer) { if (getClass().isAnnotationPresent(Loot.class)) { entityplayer.sendChatToPlayer("Loot = " + getClass().getAnnotation(Loot.class).value()); // This isn't sent to the player because it checks the ItemDayZ class for an annotation // and wont see the annotation where the item/variable is declared, i'm not sure how to // get it to check that for annotations. It only checks the ItemDayZ class for annotations. // I can't figure out how to check the item variable in the main class for an annotation // rather then this. } } //Loot.class @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.FIELD) public @interface Loot { public int value(); } Any help would be appreciated
  2. Use LivingDeathEvent if you want vanilla sheep to drop your item. @ForgeSubscribe public void playerKilledSheep(LivingDeathEvent event) { if(event.entityLiving instanceof EntitySheep) { event.entityLiving.dropItem(Item.porkCooked.shiftedIndex, 1); } }
  3. Is there a reason why Forge uses interfaces for some features and events for others?
  4. TheRaider explained it correctly, the package goes in mcp/src/minecraft and 1.4.6 will require you to fix up your imports using Ctrl-Shift-O. You can update nearly all imports by highlighting all packages and doing Ctrl-Shift-O.
  5. The problem is with NEI, there's either a problem with the mod or most likely you mucked something up on your end.
  6. The BiomeDecorator fields are protected again in 1.4.6. The AT needs to be updated.
  7. Zedicus explained how do it, when the crop's at a specific height (using metadata or another system) set the above block to the crop block. No one is going to code it for you and the hard part has been explained. Have a look at Minecraft's existing crops and code it.
  8. I use this, I hope it helps. @Override public void tickEnd(EnumSet<TickType> type, Object... tickData) { if (type.equals(EnumSet.of(TickType.PLAYER))) { onPlayerTick((EntityPlayer)tickData[0]); } } private void onPlayerTick(EntityPlayer player) { }
  9. A better way to add an EnumGameType would be great, I need it for my mod. About custom HUD's, it's pretty easy to add on the render tick but it is however difficult to hide specific parts or it entirely without hiding the held item. It looks like a player's PlayerController is set when a player logs in and can be set with IPlayerTracker's onPlayerLogin. A custom EntityPlayer isn't really needed since you can save to the player's nbt and do things using ticks already. Rendering to the world can be done with the render tick or the RenderWorldLast event. I also don't see the point of declaring the GameType in the @Mod annotation, it would most likely be registered with GameRegistry.registerGameType(EnumGameType)
  10. I know, it's in ForgeEssentials. I just thought it would be a great addition to vanilla forge.
  11. You're going to want to look at the IPlayerTracker class
  12. I'd love a /mods command that acted like bukkit's /plugins command. Sometimes it's nice to know what mods are installed on the server you're on.
  13. I've been trying to get a custom EnumGameType for my mod and I can't seem to get it to work. I know it has something to do with EnumHelper.addEnum() but I don't know where to put it. If anyone could help me out it would be appreciated
  14. Try deleting the eclipse folder in mcp and copy the one from forge/fml/ over.
  15. Delete the eclipse folder from your mcp folder
  16. I can't seem to get the link to work? http//dl.dropbox.com/u/5780473/Mine%20%26%20Blade%20Commander/Online%20Mod%20Installer%20Test/EasyModInstaller.html
  17. This thread got updated with the same problem: http://www.minecraftforge.net/forum/index.php/topic,3994.0.html
  18. I tried installing the Forge src the same way i've done successfully numerous times before and I hit a weird error. Anyone know what's causing it? Forge 6.4.2.443. MCP 723, the same mcp I have used before without problem. Clean Minecraft 1.4.5 client and server jars which i've used before without problem. Terminal log: EDIT: legend5140 helped me with this, I deleted the eclipse folder from my mcp folder and i'm good
  19. I made the repo online, cloned it into my mcp/src/common folder and renamed it to my package. I then put the code in the package which I could sync when ready. That probably made no cents, I hope it helped
  20. This is really nice. Does it work with coremods as well?
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.