-
Posts
592 -
Joined
-
Last visited
Everything posted by Eternaldoom
-
The harvest levels are defined in the item's ToolMaterial. I think they are the first number. The ToolMaterials can be found in Item. Note that the diamond material is called emerald.
-
[1.7.10] Rotate an Item's texture in inventory?
Eternaldoom replied to Eternaldoom's topic in Modder Support
I have a problem now. It renders correctly in the inventory, but often has a weird colored background. Any ideas how to fix this? Here is my Item Renderer code: public class ItemRendererCannon implements IItemRenderer{ public static RenderItem renderitem = new RenderItem(); @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { case EQUIPPED: return false; case EQUIPPED_FIRST_PERSON: return false; case ENTITY: return false; case INVENTORY: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch(type){ case EQUIPPED: break; case EQUIPPED_FIRST_PERSON: break; case ENTITY: break; case INVENTORY: Draw2D(item); break; default: break; } } public void Draw2D(ItemStack item){ IIcon icon = item.getItem().getIcon(item, 0); Tessellator tessellator = Tessellator.instance; tessellator.startDrawingQuads(); double minU1 = (double)icon.getMinU(); double minV1 = (double)icon.getMinV(); double maxU1 = (double)icon.getMaxU(); double maxV1 = (double)icon.getMaxV(); tessellator.addVertexWithUV(16.0, 16.0, 0.0, minU1, maxV1); tessellator.addVertexWithUV(16.0, 0.0, 0.0, maxU1, maxV1); tessellator.addVertexWithUV( 0.0, 0.0, 0.0, maxU1, minV1); tessellator.addVertexWithUV( 0.0, 16.0, 0.0, minU1, minV1); tessellator.draw(); } } There is a screenshot at https://cloud.githubusercontent.com/assets/6693944/4097725/b5ba9626-2fe0-11e4-91e3-952fcab11ca9.png Note the colored background of the items in the hotbar. Any idea how to fix this? It it caused by messing with the image vertices? -
ForgeSubscribe and Overriding Vanilla Systems
Eternaldoom replied to Morgrhim's topic in Modder Support
Yes, use SubscribeEvent. It should be pretty similar with mobs. -
That worked thanks!
-
Why does my custom mob move so slowly?
Eternaldoom replied to UntouchedWagons's topic in Modder Support
You need to override applyEntityAttributes(). In that method, add this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(some speed); -
[1.7.10] Error when loading new modeled blocks. [SOLVED]
Eternaldoom replied to ThePhysician2000's topic in Modder Support
Get rid of the first Shape5.mirror=true in your model. Btw, does your mod have a github repo? I'd love to contribute -
Generating custom crops in Villager Farms
Eternaldoom replied to Glorfindel22's topic in Modder Support
I think you have to use some kind of terrain generation event. -
Use EnumChatFormatting.YOURCOLOR + "your string"
-
https://github.com/Eternaldoom/Realms-of-Chaos/blob/master/com/eternaldoom/realmsofchaos/entity/projectile/EntityHeliotropeArrow.java. Basically I just copied and pasted the vanilla one and changed a few methods.
-
Use src/main/java as a source folder instead of src.
-
You mean right when you put on armor? I don't think there is an event for that, but it would be easy to detect.
-
[1.7.2] Rebind texture from a different class
Eternaldoom replied to Bugzoo's topic in Modder Support
What part do you not understand? Also, post your code. -
Mac Installation Issues (Disclaimer: First Post!)
Eternaldoom replied to bbqd's topic in Modder Support
After gradlew setupDecompWorkspace run gradlew eclipse. That generates the eclipse project files. That bootstrap class path warning is harmless, I get it all the time. -
[1.7.10]How do I use the new skin format with my custom mob?
Eternaldoom replied to UntouchedWagons's topic in Modder Support
Look at ModelBiped and the other Model classes. You can use Techne to model it and generate the code. The main problem would be making all of the texture offsets match the new skin layout. -
[1.7.10] custom flowers are not spawning in custom biome
Eternaldoom replied to slugslug's topic in Modder Support
Make your own WorldGenFlowers class that accepts metadata as a parameter. Here is one you can copy and paste: public class ModWorldGenFlowers extends WorldGenerator { private Block flower; private int meta; public ModWorldGenFlowers(Block flower, int metadata) { this.flower = flower; this.meta = metadata; } public boolean generate(World world, Random rand, int i, int j, int k) { for (int var6 = 0; var6 < 64; ++var6) { int var7 = i + rand.nextInt( - rand.nextInt(; int var8 = j + rand.nextInt(4) - rand.nextInt(4); int var9 = k + rand.nextInt( - rand.nextInt(; if (world.isAirBlock(var7, var8, var9) && (!world.provider.hasNoSky || var8 < 255) && this.flower.canBlockStay(world, var7, var8, var9)) { world.setBlock(var7, var8, var9, this.flower, this.meta, 2); } } return true; } } -
[1.7.10]How can I get a certain metadata item use bFull3D?
Eternaldoom replied to MrProg's topic in Modder Support
I don't think that's possible since the Item's damage is actually stored in the ItemStack. -
Sorry, I can't seem to make the item stay still. There is probably a way to make the boat drop 5 planks, but I'm not sure how.
-
[1.7.10] custom flowers are not spawning in custom biome
Eternaldoom replied to slugslug's topic in Modder Support
Change y in your decorate method to world.getHeightValue(x, z) add the following to your decorate method: new WorldGenFlowers(ModBlocks.plasticFlower).generate(world, random, x, y, z); -
[1.7.10]How do I use the new skin format with my custom mob?
Eternaldoom replied to UntouchedWagons's topic in Modder Support
Make a new model. -
get rid of if(type == IItemRenderer.ItemRenderType.ENTITY)
-
[1.7.10] custom flowers are not spawning in custom biome
Eternaldoom replied to slugslug's topic in Modder Support
What are the addFlower and plantFlower functions? Are they in BiomeGenBase? If so, just use WorldGenFlowers to generate your flowers. And maybe move your world gen code to a class that implements IWorldGenerator. -
[1.7.10] [Unsolved] How to add Wavefront Armor?
Eternaldoom replied to SuperHB's topic in Modder Support
Try using a RenderPlayerEvent that checks to see what items are in the player's armor slots. It's probably event.renderer.modelArmor. -
Look at https://github.com/Eternaldoom/ChaosBeasts/blob/master/com/chaosmodders/chaosbeasts/items/rendering/ItemRendererLobsterStatue.java
-
Use NBT data, sort of like a chest but on your item.
-
[1.7.10] Checking if player is Opped (Solved)
Eternaldoom replied to Aspiring-Mod-Maker's topic in Modder Support
Im pretty sure it's a searge name. Maybe look at CommandOp?