Jump to content

GotoLink

Members
  • Posts

    2012
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by GotoLink

  1. renderBlocks.renderBlockByRenderType(block, te.xCoord, te.yCoord, te.zCoord); This is the problem. Check what this method does.
  2. That is probably a left over from mcp default, I get it too. Install.bat. Make mod. Recompile.bat. Reobfuscate.bat. Get mod in reobf folder.
  3. Personally I would replace the Exception thrown by an hook to another class.
  4. Look at the ItemBow class ?
  5. You should have a render type of -1 to use TESR.
  6. public float calcModifierLiving(int par1, EntityLivingBase par2EntityLivingBase) { return EnumCreatureHelper.getSoulCreatureAttribute() == EnumSoulCreatureAttribute.FROST ? (float)par1 * 2.5F : (float)par1 * 0.0F; } How does getter work without any argument ? Do you setSoulCreatureAttribute() somewhere ? Be sure not to cancel the event.You don't need a super.x(). This is it. The enchantment you will check by reading the NBTTag from the ItemStack of player.getHeldItem().
  7. I run install.bat, after that i run decompile I personally never run the decompile script when modding with Forge. Install is already doing it.
  8. Use PlayerInteractEvent to catch the right click action. Check if player has a block in hand which is a pumpkin...
  9. Let me think... FML itself is a coremod and deals with the loading order of other coremods and mods... I see three solutions to your problem (which actually is to not being able to register things through Forge methods): -make a coremod part and a mod part -load your own mod section in your coremod like FML does -don't use Forge methods, make your own
  10. item.getUnlocalizedName2() will give you the name the item is built with.
  11. There is a CombatTracker field (obfuscated) in EntityLivingBase. I think it keeps a list of latest damage done, with player names and such.
  12. @Override protected ResourceLocation func_110775_a(Entity entity) { return null; } I'd bet your mob has no texture. public void AddRenderer(Map map){ } { Ha, ModLoader code. Does it work ?
  13. IVillageCreationHandler ? Not sure that is what you need though.
  14. Hi BuildLight First question: I don't know whether it exists or not. (FMLServerStoppingEvent probably isn't what you look for) Second question: No, you can't tell, but for each object, the garbage collector calls finalize() during the process, so you can add things in it that you want to be done at that point (don't forget to call super.finalize() at the end then)
  15. Would you please describe exactly how is your dev setup, and what you do to recompile ?
  16. Yes, you got it right. Wait, so, do you have this effect or not ? I thought you wanted something to do the effect.
  17. I think, sending a pull request on github repository.
  18. You can search for MinecraftForge.EventBus.post(new LivingAttackEvent(args)) or similar. this is where the event is triggered. If you use PreInit, Init methods and such in your main mod class, you already know how to make a method that can receive an event. The only difference is the event argument, and the @ForgeSubscribe annotation instead of @EventHandler. Just place this method in a class (you can put in your main class at first) then register with MinecraftForge.EventBus.register(class); (you register the entire class, so you can put multiple events in one) You should already have methods ready to read and write an ItemStack NBTTag to get/set your enchantment by the way.
  19. Yes, only "sound" will work in your case.
  20. Implementing IConnectionHandler.
  21. When the player right click a furnace block, close furnace Gui, open your own.
  22. If you think your way is better, why is it not working ?
  23. Just do like you did with comboStreak.
  24. You are not "2. Modifying vanilla stuff". You are removing them, since they are hardcoded in vanilla but you want to make it your own code. Unless you know the entire Minecraft code (and most of Forge too) you shouldn't do that. You wouldn't know the consequences of such a modification. Coding wise, it is stupid to change/remove things when they don't belong to you. (I am aware reflection exists, but its primary goal isn't to remove private things) Would you remove part of Forge if you didn't like them ?
  25. First: @SideOnly(Side.CLIENT) Don't write it if you don't know what it means. Seriously. Don't. Now, in onUpdate, you can use world time as a counter or just increment your own counter field. If you want to use a TickHandler, you'll have to make a class with "implements ITickHandler". There are tutorials on it.
×
×
  • Create New...

Important Information

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