-
[1.8.9] OBJ Model Block Not working?
Okay, but why doesn't the model work in the inventory when I use ModelLoader?
-
[1.8.9] OBJ Model Block Not working?
Oh, I figured it out. If I ItemModelMesher#register, instead of ModelLoader.setCustomModelResourceLocation It works in both the inventory and the world. Is there any reason I shouldn't use ItemModelMesher#register?
-
[1.8.9] OBJ Model Block Not working?
I didn't realize that it had to set the state map in preInit It had it in Init. That fixed it! Thanks! But now it doesn't work in the inventory?
-
[1.7.10] Add recipes for every item that extends a specific class
For getting a free enchantment id, you could always loop through the enchantmentsList array until you get to a null value and use that index as the id.
-
[1.8.9] OBJ Model Block Not working?
That still didn't seem to work... So I was looking over the mbe05 example again and it turns out I don't even need the ModelBakeEvent since I'm using a custom ModelLoader but it doesn't seem to work. blockstate json { "variants": { "normal": { "model": "cwm:Gemstone.obj" } } } Setting StateMap on Load OBJLoader.instance.addDomain(RefValues.MOD_ID); StateMapperBase objState = new StateMapperBase() { @Override protected ModelResourceLocation getModelResourceLocation(IBlockState iBlockState) { return new ModelResourceLocation(RefValues.MOD_ID+":"+RefValues.RUBY+RefValues.GEMSTONE); } }; ModelLoader.setCustomStateMapper(Gemstone.getGemstone(RefValues.RUBY), objState); Setting Item Renderer Item item = Item.getItemFromBlock(Gemstone.getGemstone(RefValues.RUBY)); Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(RefValues.MOD_ID+":"+RefValues.RUBY+RefValues.GEMSTONE)); Relevant console output [12:29:53] [Client thread/ERROR] [FML]: Model definition for location cwm:rubyGemstone#facing=north not found [12:29:53] [Client thread/ERROR] [FML]: Model definition for location cwm:rubyGemstone#facing=east not found [12:29:53] [Client thread/ERROR] [FML]: Model definition for location cwm:rubyGemstone#facing=south not found [12:29:44] [Client thread/ERROR] [FML]: Model definition for location cwm:rubyGemstone#facing=down not found [12:29:44] [Client thread/ERROR] [FML]: Model definition for location cwm:rubyGemstone#facing=west not found [12:29:44] [Client thread/ERROR] [FML]: Model definition for location cwm:rubyGemstone#facing=north not found
-
[1.8.9] OBJ Model Block Not working?
I tried adding my own custom state mapper but it doesn't seem to do anything? @SubscribeEvent public void ModelBakeEvent(ModelBakeEvent event){ StateMapperBase ignoreState = new StateMapperBase() { @Override protected ModelResourceLocation getModelResourceLocation(IBlockState iBlockState) { return new ModelResourceLocation(RefValues.MOD_ID+":"+RefValues.RUBY+RefValues.GEMSTONE); } }; ModelLoader.setCustomStateMapper(Gemstone.getGemstone(RefValues.RUBY), ignoreState); try { Function<ResourceLocation, TextureAtlasSprite> textureGetter = new Function<ResourceLocation, TextureAtlasSprite>() { public TextureAtlasSprite apply(ResourceLocation resourceLocation) { return Minecraft.getMinecraft().getTextureMapBlocks().registerSprite(resourceLocation); } }; OBJModel model = (OBJModel) OBJLoader.instance.loadModel(new ResourceLocation(RefValues.MOD_ID+":models/obj/Gemstone.obj")); IBakedModel baked = model.bake(model.getDefaultState(), Attributes.DEFAULT_BAKED_FORMAT, textureGetter); event.modelRegistry.putObject(new ModelResourceLocation(RefValues.MOD_ID+":"+RefValues.RUBY+RefValues.GEMSTONE, "inventory"), baked); } catch (IOException e) { e.printStackTrace(); } }
-
[1.8.9] OBJ Model Block Not working?
I am trying to use the OBJLoader to load and obj model in one of my blocks but for some reason it only works for the item itself and not the block? If I change the ModelResourceLocation from inventory to normal neither works? I tried to look at the mbe05 example but nothing seems to be wrong: https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe05_block_smartblockmodel2 My ModelBakeEvent: @SubscribeEvent public void ModelBakeEvent(ModelBakeEvent event){ try { Function<ResourceLocation, TextureAtlasSprite> textureGetter = new Function<ResourceLocation, TextureAtlasSprite>() { public TextureAtlasSprite apply(ResourceLocation resourceLocation) { return Minecraft.getMinecraft().getTextureMapBlocks().registerSprite(resourceLocation); } }; OBJModel model = (OBJModel) OBJLoader.instance.loadModel(new ResourceLocation(RefValues.MOD_ID+":models/obj/Gemstone.obj")); IBakedModel baked = model.bake(model.getDefaultState(), Attributes.DEFAULT_BAKED_FORMAT, textureGetter); event.modelRegistry.putObject(new ModelResourceLocation(RefValues.MOD_ID+":"+RefValues.RUBY+RefValues.GEMSTONE, "inventory"), baked); } catch (IOException e) { e.printStackTrace(); } }
-
[1.8] Change Color or Tint Blocks
That's what I thought but which event? The RenderBlockOverlayEvent doesn't seem to ever get created?
-
[1.8] Change Color or Tint Blocks
Is it possible to change the color of a block in the world, or tint it a certain color. I mean only the one Block in the world. For Example: Change the sand I'm currently looking at to green (But not any other sand in the world).
-
[1.8][SOLVED]Adding Icons that switch when a certain condition is met
You could just create the gui with a different texture depending on what opened it.
-
[1.8] Keypress to open crafting table
I'm trying to have a keypress open a crafting table but whenever I do it the crafting table GUI is messed up in the sense that every item is one to the right of where I have to click to pick it up and placing items in the crafting table equips them to the player (depending on the slot). public void onKeyInput(InputEvent.KeyInputEvent event) { if(KeyBindings.craftingButton.isPressed()){ EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; BlockWorkbench.InterfaceCraftingTable craftingTable = new BlockWorkbench.InterfaceCraftingTable(player.worldObj, player.playerLocation); player.displayGui(craftingTable); } }
-
Can't open inventory tabs in Forge Sever. Please help.
Then why does it work when I use a 1.7.10 cauldron server? I would really rather not use cauldron but it won't let me access the tabs in a forge server 1.7.10
-
Can't open inventory tabs in Forge Sever. Please help.
But they are all added with forge the same way. I was wondering if I was setting up the server wrong or something because I have seen it work on other servers.
-
Can't open inventory tabs in Forge Sever. Please help.
I'm trying to set up a modded server but whenever I add a mod that has a tab in the survival inventory I can't open it up. For example I can't open the tab for baubles in thaumcraft, the tab for galaticraft, or the tab for tinker's construct. All these tabs work in single player but once I join the server none of them work. I have tried just using each mod and it still doesn't work for any of them. There is no error printed to the console it just doesn't open. Please help. I am using Minecraft 1.7.10 forge server.
-
[1.7.10]Turn a file into a resourcelocation
No, the client would grab them from the sever whenever it needed them
IPS spam blocked by CleanTalk.