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

CoderAtParadise

Forge Modder
  • Posts

    107
  • Joined

  • Last visited

Everything posted by CoderAtParadise

  1. After each different definition except for the last one you need a comma
  2. you are missing a bracket in your blockstate file so the json is incomplete and minecraft doesn't load it
  3. your blockstate file needs to be something like this "variants": { "variant=white": { "model": "mw:white_marble" }, "variant=pink": {"model":"mw:pink_marble"} } unless you want to create a custom state map which is what minecraft does for the planks but you cant use the vanilla StateMap for variants due to the fact that there is no option for your modid so you need to create your own CustomSateMap
  4. where you register the item texture remove "models/item", again minecraft defaults to that location so you don't need to specifiy it
  5. remove "textures/" from the json it already defaults to that location
  6. @Abastro as of 1.8 Item#getTextureName() and Item#setTextureName() don't exist in the item class or anywhere, the only reference to them is in the forge_at.cfg therefore what you are saying doesn't work the only way to set the texture of items in 1.8 that I know of is using the ItemModelMesher and to ask a question to @xwerswoodx have you registered the variant names cause otherwise the items aren't distinguished and the item doesn't know it is looking for multiple textures. To do this Register to the Model Bakery with ModelBakery.addVariantName(youritem,name) this needs to be done for every sub-Item that you have. than what you have will work
  7. YourItem when dealing with blocks becomes Item.getItemFromBlock(YourBlock)
  8. To your block state files you need to add your modid followed by a colon then the name of the block otherwise it defaults to looking in minecrafts directory
  9. I'm not sure if the setblocktoair function is in 1.7.10 but if it is you would use that instead cause I'm not completely sure Minecraft registers air as a block. Note mind has 1.8 and it's state system running through it so really can't remember 1.7 atm
  10. you need to change fifth parameter to a block as setblock only accepts it as a block not an int
  11. Solution Found Leaves will now decay After posting a previous answer which on further testing was bugged which I removed, I have since found the answer. The Easiest way for me as I am too lazy to copy and paste the code from my class is to provide a github link below. Look here and look at getStateFromMeta and getMetaFromState. Also take a look at onBlockPlaced as it fixes the way that if you place a leaf block it will set the decayable property to true. Hope this helps
  12. tile is so it follows naming conventions cause every block in minecraft starts with tile most of it was just my sorting through the code and making it readable for me and somethings were just to make it work in my environment cause somethings didn't work and were giving me errors. Pretty much eliminate everything that wasn't needed to solve the problem so that the actual problem identified itself.
  13. Your naming conventions were screwed up a bit and nothing was linking to each other On my github you will find all the changes i've made some where just so i could read your code
  14. A note unlocalized names for blocks need to have tile not block
  15. Going through a bit of my backend code i realized that i forgot to mention that you still have to register the item render to the inventory using Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item,metadata,new ModelResourceLocation(itemname,"inventory")); Edit:Maybe should read my ModelHelper
  16. I just uploaded to github my project with a working TESR item render what you should look at is CrystalMagicRenderHelper and the ClientProxy cause there are some differences in yours that mine doesn't have. And at the moment I'm not completely thinking straight. https://github.com/Voltab/crystal-magic
  17. To render a TESR you need to have a class extending TileEntityItemStackRenderer and example would be. //From a mod I'm currently writting public class CrystalMagicRenderHelper extends TileEntityItemStackRenderer { //the Tile enitty you want to render private TileFlare flareRender = new TileFlare(); @Override public void renderByItem(ItemStack itemStack) { Block block = Block.getBlockFromItem(itemStack.getItem()); //Your custom block if (block == CMBlocks.flare) { TileEntityRendererDispatcher.instance.renderTileEntityAt(this.flareRender, 0.0D, 0.0D, 0.0D, 0.0F); }else { //for minecraft to render its own tile entities such as the chest super.renderByItem(itemStack); } } } in your client proxy you need to have the call which is TileEntityItemStackRenderer.instance = new CrystalMagicRenderHelper(); best to also remove minecraft looking for the blockstate file with Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().registerBuiltInBlocks(block); and finally your item json needs to be { "parent": "builtin/entity" } and that should make the TESR render as an item EDIT:Unless I've forgotten something
  18. Easiest way to render the items in the tile entity would be a TESR a lot simpler as you are using a tile entity Just redid the render in a test environment I built, no positioning but it is possible. now the code public class TileShelfRender extends TileEntitySpecialRenderer { private RenderEntityItem itemRender; TileShelfRender() { itemRender = new RenderEntityItem(Minecraft.getMinecraft().getRenderManager(),Minecraft.getMinecraft().getRenderItem()) { @Override public int func_177078_a(ItemStack stack) { return SignedBytes.saturatedCast(Math.min(stack.stackSize /32,15) +1); } @Override public boolean shouldBob() {return false;} @Override public boolean shouldSpreadItems() {return false;} }; } public void render(ShelfTitleEntity te, double x, double y, double z, float par6, int par7) { for(int i = 0; i < 4; ++i) { if(te.getStackInSlot(i) != null) { EntityItem customItem = new EntityItem(te.getWorld()); customItem.hoverStart = 0.0F; customItem.setEntityItemStack(te.getStackInSlot(i)); GlStateManager.pushMatrix(); GlStateManager.translate((float)x,(float)y,(float)z); GlStateManager.translate(0.5F,0.7F,0.5F); GlStateManager.rotate(0.0F,0.0F,1.0F,0.0F); itemRender.doRender(customItem,0,0,0,0,0); GlStateManager.scale(0.7F,0.7F,0.7F); GlStateManager.popMatrix(); } } } @Override public void renderTileEntityAt(TileEntity te, double x, double y, double z, float p_180535_8_, int p_180535_9_) { render((ShelfTitleEntity)te,x,y,z,p_180535_8_,p_180535_9_); } } Just to show you it works http://i.imgur.com/NDkquNp.png?1[/img]
  19. Your ClientProxy is just called ClientProxy not CombinedClientProxy and I assume that it is the same for ServerProxy. The reason eclipse is not picking up an error is because it is a string
  20. read the log it says can't find class CombinedClientProxy TIP: Look at @SidedProxy in your main class
  21. another thing you need to have proxies if you want your mod to work on a server and move all your rendering into the client proxy
×
×
  • Create New...

Important Information

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