Jump to content

Animefan8888

Forge Modder
  • Posts

    6157
  • Joined

  • Last visited

  • Days Won

    59

Everything posted by Animefan8888

  1. In preInit event has a Configuration object for your mod that is what you will use to create a config.
  2. Oh *I* can get the blockstate from an item stack. That's not the problem. The problem is I want to instantiate the tile entity associated with that state and invoke getCapbability. I have no control over what someone else's getCapbability does...such as doing worldObj.getBlockState(this.getPos()) Instantiate the TileEntity with Block#createTileEntity(IBlockState) using the method I said above. Which will give you the TileEntity for that specfic BlockState. Correct?
  3. You could call get placed blockstate or getStateFromMeta. If I understood it correctly you have an ItemStack of a Block you shouold be able to get the block from the Item in the stack, then get the blockstate from those methods. That doesn't actually solve the problem, because if the TE uses that world, it's BlockPos is still 0,0,0 and it itself doesn't exist there, so it will fail to retrieve its own blockstate.
  4. That is a different method. Oops, just searched for apply in ItemMonsterPlacer and saw that one first on closer inspection you are indeed correct.
  5. Change the parent back.
  6. I found the class ItemMonsterPlacer, but i wasn't able to find a method named applyEntityIdToItemStack :-/ It is actually called applyItemEntityDataToEntity in 1.10.2.
  7. You are probably better off doing that, but I believe my method of doing this would work. IE Create custom damage source deal 0.04 (somewhere around this), then subscribe to the living attack event (can't remember name off of the top of my head) and deal the appropriate amount of damage. Bypassing the whole need for a PR though would be nice for other features.
  8. His code is correct except maybe one thing. I believe it should be registered in preInit.
  9. The listener system. It is why when you create a GuiContainer you pass a container.
  10. Look at how the vanilla furnace syncs it's info it does so with its container.
  11. dont make it all into 1 json file, make 1 json file for the blockstate and 1 for the block model, make sure you put the blockstate json into the correct folder and the block model json in the correct one aswell That is the blockstate file... @gmod622 Post the console output.
  12. First thing is first do you know Java? If you do explain what a static reference is... EntityItem.getEntityItem()
  13. Attack with void DamageSource ie Entity#attackEntityFrom(DamageSource.outOfWorld, amount);
  14. What are you trying to do?
  15. Not null? Of course those are easy to find.
  16. In the RenderPlayerEvent.Pre get the model object for the player, then call set rotation. If that doesn't work I do not believe it is possible at the moment though another thing I would try is In Pre run a GL call to roatate and then in Post undo the rotation. You mean access the model through the event? Confirmed GL calls work, you'll just need to figure out the math for the rotation angle.
  17. In the RenderPlayerEvent.Pre get the model object for the player, then call set rotation. If that doesn't work I do not believe it is possible at the moment though another thing I would try is In Pre run a GL call to roatate and then in Post undo the rotation.
  18. I want to say it has to do with this line GL11.glScaled(0.8, 0.8, 0.; inside your GUI class. Try using the GL11.pop and push methods.
  19. Here's a pastebin link to the code: http://pastebin.com/8bWqKY2r Line 47 is the BlockModelRenderer.renderModel() call. I believe that you should not have lines 44, 46, and 48.
  20. Is ItemSeedFood your own class or a vanilla one? If vanilla calling your register function only ever registers a model for ItemModelProvider. Otherwise post ItemSeedFood.
  21. Is the model file name matching/correct? Is it in the right package? Is your texture in the right package? Is it the correct name? If you can't tell me post your JSON and a screenshot of your path.
  22. So you're asking me to copy this into my jsons? No this is how they should be structured normally.
  23. Post code, and private fields can be accessed through reflection; methods on the other hand should not be edited at all. Thus, the overriding the container by extending the container, you can submit a Pull Request on their github to add an event provide code and I think a patch file.
  24. Use your public static final variables instead of my in method variables and note "wr" is the modid, and the meta of 1 is incorrect use 0. You should really try the...
  25. The setRegistryName should be fine, but Item.getItemFromBlock doesn't respect aliasing it only accesses the registry data and not the aliasing data. My testing code... Block block = null; Item item = null; try { block = new BlockCauldron().setRegistryName(new ResourceLocation("wr", "cauldron")); item = new ItemBlockSpecial(block).setRegistryName(new ResourceLocation("wr", "cauldron")); GameRegistry.addSubstitutionAlias("minecraft:cauldron", Type.BLOCK, block); GameRegistry.addSubstitutionAlias("minecraft:cauldron", Type.ITEM, item); } catch (ExistingSubstitutionException e) { e.printStackTrace(); } ModelLoader.setCustomModelResourceLocation(item, 1, new ModelResourceLocation(new ResourceLocation(ModReference.MODID, "cauldron"), "inventory"));
×
×
  • Create New...

Important Information

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