Jump to content

izzie.llg

Members
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

izzie.llg's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hi all, In 1.7.10 you had the IItemRenderer class which you could use together with a custom Render class to custom render items in hand. This class is gone in 1.10.2, what is the substitute? Thanks, Izzie
  2. Is there really no substitute for the IItemRenderer class/functionality in 1.10.2? It was such a useful class!!
  3. Or another thought: I saw somewhere that you could put "variables" (not in the usual sense, but values that are calculated at runtime) inside the json file that you can manipulate outside the file in code. So I could have the Z-axis rotation as a variable in the json that I could change on ItemUse. Can you please tell me where to start on this idea? Thanks!
  4. Hi, Thanks for your reply. I looked at the ItemBow class. There is this in the Constructor: and then in the bow.JSON setting the model based on the pull variable: Which all makes sense but i don't think it will work with OBJ models. After debugging I found this code in OBJModel.java: @Override public ItemOverrideList getOverrides() { return ItemOverrideList.NONE; } Which means just before Minecraft would apply the overrides its checking to see if there are any overrides, which in the above code return none. So the apply function in "Item#addPropertyOverride" in my CerealBox class never gets called at all. Any other suggestions? Or will I have to add like 9 different json files each with a slightly incremented rotation and switch between them on itemUse?
  5. Hi all, I am trying to render a cereal box (a 3D OBJ Model) in my hand and on keypress rotate the model to make it look like I'm pouring cereal. It could either be a block or an item, whichever I can make this work with. The model is rendering fine in my hand, but I don't know how I can dynamically change the Z-axis rotation. In lets say 1.7.10, I would use an IItemRenderer and control the rotation with a variable in a custom TileEntitySpecialRenderer class. But since the IItemRenderer class is no longer in 1.10.2 I'm not sure what to do. Maybe use variants in the JSON file? If so could someone please link me a tutorial on adding variants to the Item/Block class that can then be accessed in the JSON? Thanks, Izzie
  6. Hey, I'm having the same issue. Did you ever figure out why? EDIT: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/modification-development/2126328-trying-to-register-configuration-event Here I found that when you register the event handler in the Mod class create a new class: FMLCommonHandler.instance().bus().register(new ConfigurationHandler());
  7. Hi Guys I'm trying to make a news guy with a camera mounted on his shoulder. Does anyone know Flan's Mod, the way some of his guns, like the D8 rocket launcher, when equipped changes the position of the arms and it looks like the rocket launcher is resting on the character's shoulder, with the arms holding it up. But for the life of me I can't find where the code does that? Does anyone know how to achieve this? How to I get the playerEntity to change the arm position? Thanks! EDIT: My original post got locked, but I found the solution so I'll post it in case somebody else needs it! I actually found what I was looking for. I basically took a few functions from the ItemBow class and modified them. Code: /* Creates a new Arrow (aboout to shoot) event and starts using the current item */ public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) { ArrowNockEvent event = new ArrowNockEvent(player, itemStack); MinecraftForge.EVENT_BUS.post(event); if (event.isCanceled()) { return event.result; } player.setItemInUse(itemStack, this.getMaxItemUseDuration(itemStack)); return itemStack; } /* In the bow class this is much shorter, its the time after which the bow is automatically released, but I don't want it to automatically release use of item that fast. */ public int getMaxItemUseDuration(ItemStack p_77626_1_) { return 999999999; } /* There are five pre-programmed arm positions: none, eat, drink, block, bow; */ public EnumAction getItemUseAction(ItemStack p_77661_1_) { return EnumAction.bow; }
×
×
  • Create New...

Important Information

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