Jump to content

Tyron

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by Tyron

  1. Currently updating my mod to 1.7.2 - finally managed to fix the 1500 errors and immediate crashes after launch. Now I'm kinda stuck with getting my custom items to work. Currently they 1. Don't show in the creative inventory anymore, altough they still have setCreativeTab(CreativeTabs.tabMisc); in the constructor 2. The Items Textures don't seem to load. I've copied them to [forge directory]/bin/assets/[my mod name]/textures/items/ 3. Trying to craft an item, I get an NullPointerException at at net.minecraft.item.ItemStack.onCrafting(ItemStack.java:473) the affected line: par2EntityPlayer.addStat(StatList.objectCraftStats[item.getIdFromItem(this.field_151002_e)], par3); That NPE is particularly interesting. Seems like getIdFromItem() is null - but why? Here's how I init my items: private void initItems() { EmptyJar = registerItem(new ItemButterflyJar(), "emptyjar", "Empty Jar"); [....] } public Item registerItem(Item item, String internalname, String readablename) { item.setUnlocalizedName(internalname).setTextureName(internalname); GameRegistry.registerItem(item, internalname); LanguageRegistry.instance().addName(item, readablename); return item; } Any help is appreciated, thanks! [Edit:] I'm using Forge #1033
  2. I knew its going to be something completely obvious Thanks a lot for your help
  3. Am I doing something wrong? I've checked my code several times, I don't know what I've done wrong. EntityJoinWorldEvent gets called no problem, but BonemealEvent doesn't when I apply bone meal to a grass block. @Mod(modid = BackToTheRoots.MODID, version = BackToTheRoots.VERSION) public class BackToTheRoots implements IEventListener { public static final String MODID = "backtotheroots"; public static final String VERSION = "0.1"; @EventHandler public void init(FMLInitializationEvent event) throws Exception { FMLCommonHandler.instance().bus().register(this); MinecraftForge.EVENT_BUS.register(this); System.out.println("backtotheroots has init."); } @SubscribeEvent(priority = EventPriority.HIGHEST) public void onEntityJoinWorld(EntityJoinWorldEvent event) { System.out.println("join entity"); } @SubscribeEvent(priority = EventPriority.HIGHEST) void onBoneMealEvent(BonemealEvent evt) { System.out.println("i'm bonemealing stuff!"); } }
  4. Oh I see, thanks for the info
  5. I will be using Reflection to alter Enderman behavior, when I stumbled on this funny comment - whats this supposed to be? public class EntityEnderman extends EntityMob { private static final UUID attackingSpeedBoostModifierUUID = UUID.fromString("020E0DFB-87AE-4653-9556-831010E291A0"); private static final AttributeModifier attackingSpeedBoostModifier = (new AttributeModifier(attackingSpeedBoostModifierUUID, "Attacking speed boost", 6.199999809265137D, 0)).setSaved(false); @Deprecated //DO NOT TOUCH THIS EVER private static boolean[] carriableBlocks = new boolean[256];
  6. Updating my mod to 1.7, I'm wondering what happened to - @NetworkMod - @ForgeSubscribe - ICraftingHandler - ITickHandler
  7. Couldn't find anything in the General Discussion board or the wiki so I'm asking here. 2 Days ago ProfMobius added a lot of new mappings. I was wondering if there's a way to check to version of the Mappings downloaded by forge or even a way to update them?
  8. When I do that I get the Exception Message: Class [mymod] can not access a member of class net.minecraft.entity.monster.EntityEnderman with modifiers "private static" When using Reflection, are the sources also required as chylex instructed? If yes, where the gradle cache? Any help is very appreciated!
  9. I wanted to update my mod to Minecraft v1.5 so I downloaded MC Forge Build 1.5.1-7.7.1.623 Unfortunately with this build somehow eclipse doesn't let me do hot code replace anymore ("Scheme change not implemented") in debug mode. I'm using Eclipse v4.20. This error appears with any change i make (even just adding a whitespace somewhere) I haven't had any problems so far with hot code replace in Minecraft 1.3 or 1.4, so this is really strange. If it helps with anything here is the console output: http://tny.cz/559e0904 Anyone got any clues why? Any help would be greatly appreciated [Edit:] Hm ok, seems like only certain classes are affected. The problem occurs for me in a custom renderer class (which implements IItemRenderer)
  10. That is pretty much exactly what you could do with my suggested hook at http://www.minecraftforge.net/forum/index.php/topic,3237.0.html So yea, I really hope they add this soon It's actually not to many lines of code needed for Forge to make it.
  11. I want to add achievements to my mod that the user cannot discover beforehand on the achievements page so it stays secret Also this way the achievements feature can be more used like a notice popup when something notable has happened. So I made a method for that. Thought I'd share. http://www.minecraftforge.net/wiki/How_to_add_an_Achievement#Add_a_hidden_Achievement Enjoy.
  12. Stumbled upon the same bug, gave up searching as well, so I studied the code It renders the white screen when the achievement page only containes achievements without parent achievements. That prevents Gui.drawRect() (called from drawHorizontalLine() or drawVerticalLine()) from being called, which apparently is required due to some GL Options being set. If I were to make a guess, it would be GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); Dear MCForge devs: Please look into this. Should be only a matter of minutes to fix from here on. Thanks!
×
×
  • Create New...

Important Information

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