-
Posts
16559 -
Joined
-
Last visited
-
Days Won
156
Everything posted by Draco18s
-
[Solved] How to properly add an Item for a Block that renders block-style?
Draco18s replied to Two's topic in Modder Support
Ah, rendering problem. You need a custom IItemRenderer Here's an example: public class ItemRenderPedestal implements IItemRenderer { TileEntitySpecialRenderer render; private TileEntity dummytile; public ItemRenderPedestal(TileEntitySpecialRenderer render, TileEntity dummy) { this.render = render; this.dummytile = dummy; } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return true; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return true; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { if (type == IItemRenderer.ItemRenderType.ENTITY) GL11.glTranslatef(-0.5F, 0.0F, -0.5F); this.render.renderTileEntityAt(this.dummytile, 0.0D, 0.0D, 0.0D, 0.0F); } } And client prox registration: TileEntitySpecialRenderer render = new PedestalRenderer(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayPedestal.class, render); MinecraftForgeClient.registerItemRenderer(BlockPedestal.instance.blockID, new ItemRenderPedestal(render, new TileEntityDisplayPedestal())); -
You would need to render in two passes and use a different color per pass. https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/item/ItemArtifact.java Look at getIcon and getColor
-
[Solved] How to properly add an Item for a Block that renders block-style?
Draco18s replied to Two's topic in Modder Support
Look at ItemRedstone and BlockRedstoneWire -
The run button has a dropdown. In it are two options: Client Server
-
public static boolean isLevigatorActivated; OH YES. OH BABY. STATIC ME.
-
The behavior you describe is exactly equivalent to the server not having your mod installed. In fact, you confirmed it when the server said that it loaded three mods: MCP, Forge, and FML. How do you fix it? Well, by putting your mod in the server's mod folder.
-
Pretty sure registerAllBiomesAndGenerateEvents isn't called at all. When it hits a null biome it WILL crash: it checks biome.theBiomeDecorator before it checks to see if biome is null. Either way, I have a workaround.
-
Because you're not rotating the model in the TileTotemRenderer class. double angle = Math.toRadians(entity.rotation); //entity here is my TileEntity. You can also reference block metadata. GL11.glPushMatrix(); GL11.glRotatef(-1*entity.rotation, 0, 1, 0); //negative because of an assumption made in my TE that was wrong and this was the easier fix (The angle value was being used for another part of the rendering, not related to the model)
-
You'll probably have to write a custom item renderer to get the "damage bar" back, though. On the other hand, simply HAVING nbt data might disqualify the item from being repaired.....and now that I've said that.... On moment. Ah, there's also setNoRepair();
-
Use NBT data instead of damage values. The anvil works in a very specific way where two items of the same ID will repair each other in this fashion. Just so you know, it isn't free. It does cost the player some experience. (And the majority of the bonus is actually from crafting two damaged items together: 10% Using an anvil and an experience level upgrades that to a whopping 12%)
-
Forge can't be installed to the mods folder like other mods because Forge is what causes mods to be loaded from the mods folder. Forge is a jar mod.
-
Yes, but it doesn't mean I wasn't remembering what I have correctly.
-
Know what it's not undefined for? ItemStack.getItem().getIcon()
-
See, that's why links help. Then us helpers don't have to ask stupid questions. Me, I never relied on anything posted on the web, mainly because Forge's wiki is slow and most of what I need I can find using Eclipse.
-
My apologies. You're working with Gradle. I didn't get that from the Forge version number you used. Might want to try the Gradle subforum.
-
Rather than getting the icon index, how about you getIcon() ?
-
Don't have 964 on this computer, but I do have 859: (I don't bother clearing out the assets directory when I move projects around, which is why you see so many)
-
That won't work. That's only for deferred decorated biomes (ie. almost none of them: not vanilla and not biomes o' plenty) and is called when a chunk is decorated not when the biome itself is registered.
-
[solved]Block Setting Hardness depending on metadata?
Draco18s replied to siiikooo0743's topic in Modder Support
You will need to override the block's getStrVsBlock function. -
There is an IRC. #minecraftforge on esper.net And what links to Javadoc are you talking about? Javadoc is in-source-documentation: /** * This is a javadoc for a static object */ //this is a comment /*This is a *multiline comment*/ public static String TRIGGER_HIT = "hitEntity";
-
Nope it hasn't changed. I've got a 964 install that works just fine, exactly the same as my 859 install.
-
You need to look at the item stack damages. "Consume" just makes the stack size go down by 1.
-
Uh Try ItemBoat, ItemLilypad, BlockFurnace. You can also highlight the function and hit ctrl-shift-g (search workspace for references) and have Eclipse find it for you.
-
Inside your onItemRightClick. And it's a non-static function (use your IDE and codehinting). Keep in mind that the function returns an object of type MovingObjectPosition which will have coordinates for you to use.