Jump to content

Silly511

Members
  • Posts

    176
  • Joined

Everything posted by Silly511

  1. I am trying to use an OBJ model for an item. I have added my mod to the OBJLoader using this code: OBJLoader.INSTANCE.addDomain(modid.toLowerCase()); But I don't know what to do after this. I tired simply making my OBJ model the parent of my item JSON but that gave this error: java.lang.IllegalStateException: vanilla model 'net.minecraft.client.renderer.block.model.ModelBlock@70ec30b2' can't have non-vanilla parent So how can apply an OBJ model to an item?
  2. Sorry didn't see your post on my other topic until now. I probably could use RenderHandEvent but honestly I don't think this is worth the effort.
  3. I am trying to call Minecraft.getMinecraft().entityRenderer.disableLightmap(); before my item renders and call Minecraft.getMinecraft().entityRenderer.enableLightmap(); when my item is finished rendering. How can I do that? I did it before in 1.7.10 using IItemRenderer but that doesn't exist anymore.
  4. I played around with events and got this: Using this code: @SubscribeEvent @SideOnly(Side.CLIENT) public void onItemFrameRender(RenderItemInFrameEvent event) { if (event.getItem().getItem() == EnchantedAura.circuit) { Minecraft.getMinecraft().entityRenderer.disableLightmap(); } } However because I don't re-enable the light map, this happens: Without the item: Is there something like the old IItemRenderer that would allow me to render layer 0 of my item, turn off the light map, render layer 1 of my item, then turn the light map back on?
  5. Unzipped 1.10.jar, searched for generated.json, the only file I found was item/generated which is a child of builtin/generated, which doesn't seem to exist. What do I do? Heres item/generated: { "parent": "builtin/generated", "display": { "ground": { "rotation": [ 0, 0, 0 ], "translation": [ 0, 2, 0], "scale":[ 0.5, 0.5, 0.5 ] }, "head": { "rotation": [ 0, 180, 0 ], "translation": [ 0, 13, 7], "scale":[ 1, 1, 1] }, "thirdperson_righthand": { "rotation": [ 0, 0, 0 ], "translation": [ 0, 3, 1 ], "scale": [ 0.55, 0.55, 0.55 ] }, "firstperson_righthand": { "rotation": [ 0, -90, 25 ], "translation": [ 1.13, 3.2, 1.13], "scale": [ 0.68, 0.68, 0.68 ] } } }
  6. I tried this: { "parent" : "item/generated", "textures" : { "layer0" : "EnchantedAura:items/CrystalCircuit", "layer1" : "EnchantedAura:items/CrystalCircuitOverlay" }, "elements" : [{ "shade" : false }] } Still missing texture cube. What am I doing wrong? (Again, probably something really stupid)
  7. When looking at that page I saw this: elements: Contains all the elements of the model. They can only have cubic forms. Cannot be set along side "parent" . So I don't think I can do this using elements. I think this might be impossible.
  8. { "parent" : "item/generated", "textures" : { "layer0" : "EnchantedAura:items/CrystalCircuit", "layer1" : "EnchantedAura:items/CrystalCircuitOverlay" }, "elements": { "shade" : false } }
  9. I tried that but it just makes my item turn into a missing texture cube.
  10. Ok let me try to explain from the beginning: I have an item, that uses the default item model, and I want to make part of it full-bright. I can't use shade : false because that needs to be put in "elements" : {} , but my item model is the default item model so I have no "elements" : {} . So how do I do this?
  11. Definitely a page I can learn a lot from, but it still doesn't tell me how to apply shade : false to the buildin model. I could do this if I could look at builtin/generated.json, but I couldn't find it. Does anyone know where it is? Or is it 'built in' as the name implies?
  12. I tried this and it doesn't work: { "parent" : "item/generated", "textures" : { "layer0" : "EnchantedAura:items/CrystalCircuit", "layer1" : "EnchantedAura:items/CrystalCircuitOverlay" }, "display": { "firstperson_righthand": { "rotation": [ 0, -90, 25 ], "translation": [ 1.13, 3.2, 1.13], "scale": [ 0.68, 0.68, 0.68 ], "shade" : false } } } What am I doing wrong? (Probably something really stupid)
  13. So basically I need to create a model exactly like item/generated but with shade:false ?
  14. Thats the problem: My item doesn't have a custom model. It uses the regular item model. How can I apply shade:false to the buildin item model?
  15. I have an item which has two render passes, and I would like to make the second render pass be full-bright. I did this in 1.7.10 using an IItemRenderer but since that was removed I can't use it. Is there a way to do this with JSON or do have to use some hacky way of doing it? Heres my current JSON file: { "parent" : "item/generated", "textures" : { "layer0" : "EnchantedAura:items/CrystalCircuit", "layer1" : "EnchantedAura:items/CrystalCircuitOverlay" } }
  16. Never mind I figured it out. I used PlayerInteractEvent and did it all on the server side. No packets needed.
  17. Right-click is onItemUse. There are no methods in the item class for left clicking except onBlockStartBreak and onBlockDestroyed which are called after you break the block not before(Which is what I want).
  18. I have an item that I need to make it run code when you left-click a block with it. Currently I am subscribing to MouseInputEvent and sending a packet to the the server if you left-clicked. The server then checks if you have that item in your hand, and if so, runs the code. Is their a more efficient way of doing it so that I'm not sending a packet every time the player left-clicks?
  19. Is there at least a way to trigger the death event? I was looking at ForgeEventFactory but there was no onDeath method.
  20. I am making a sword that will kill anything, but I've run into a problem. I am using EntityLivingBase#setHealth() to set the mob's health to zero. However when I use setHealth() zero the mob does not drop any drops. I am guessing that this is because setHealth() bypasses all hurt and death events. But the reason I'm using setHealth() zero is because I want to bypass all hurt and death events, so that other mods can't cancel the death event to bypass my sword. So is there a way to trigger the death and hurt events without having them cancelable? Heres my current code: @Override public boolean onLeftClickEntity(ItemStack item, EntityPlayer player, Entity entity) { if (entity instanceof EntityPlayer && ((EntityPlayer)entity).capabilities.isCreativeMode) return false; if (entity instanceof EntityLivingBase) { EntityLivingBase mob = (EntityLivingBase) entity; EntityHelper.knockbackEntity(player, mob); mob.setHealth(0); } return true; }
  21. The tooltip for my item is completely blank. Why? public class RainbowFontRenderer extends FontRenderer { public RainbowFontRenderer() { super(Minecraft.getMinecraft().gameSettings, new ResourceLocation("textures/font/ascii.png"), Minecraft.getMinecraft().renderEngine, false); } @Override public int drawStringWithShadow(String text, int x, int y, int color) { if (text.substring(1, .equals("#COSMIC#")) return super.drawStringWithShadow(text.substring(, x, y, RenderHelper.getRainbowColor()); else return super.drawStringWithShadow(text, x, y, color); } } Item: @Override public FontRenderer getFontRenderer(ItemStack stack) { return new RainbowFontRenderer(); }
  22. Ok I made a custom font renderer, but what should I put for the ResourceLocation? Heres my code: package silly511.enchantedaura.render; import silly511.core.helpers.RenderHelper; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.settings.GameSettings; import net.minecraft.util.ResourceLocation; public class RainbowFontRenderer extends FontRenderer { public RainbowFontRenderer() { super(Minecraft.getMinecraft().gameSettings, null, Minecraft.getMinecraft().renderEngine, true); } @Override public int drawStringWithShadow(String text, int x, int y, int color) { if (text.endsWith("#COSMIC#")) return super.drawStringWithShadow(text.replaceAll("#COSMIC#", ""), x, y, RenderHelper.getRainbowColor()); else return super.drawStringWithShadow(text, x, y, color); } } What do I put in place of null in the constructor?
×
×
  • Create New...

Important Information

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