Jump to content

Recommended Posts

Posted

After changing the 75 to a 25 (which still generates very much ores), there are much less lag spikes. Thank you! ^^

 

Now, there is only 1 thing left:

Is there a way, that the TESR renders the ItemStack, too?

I saw a method ForgeHooksClient#registerTESRItemStack, but I can't get it working (and it's deprecated and should have been removed in 1.9?) :(

Bringing the best mod back alive! Our mod REFORGED!

Balkon's Weapons for 1.8: https://github.com/TheOnlySilverClaw/Reforged/releases

Posted

You should use custom IBakedModels for your items if you need something complex, and forge's animation api if you need your items animated. That method only exists to allow rendering of tile entities as items (vanilla examples - chests, mob skulls, banners, etc.). And as you've pointed out yourself it is clearly marked for deletion.

Posted

I tried to figure out, how Chests are rendered and saw, that the chest has got an item-model-file, whose parent is "builtin/entity".

I did that for the black ore, too, but then the item is just invisible.

Then I saw the function TileEntityItemStackRenderer#renderByItem.

The interesting part there, is this line:

net.minecraftforge.client.ForgeHooksClient.renderTileItem(itemStackIn.getItem(), itemStackIn.getMetadata());

Well, then i looked into ForgeHooksClient#renderTileItem, but then I saw, that I should register my item with the function, which is very deprecated...

Should I use this one then? it would work though

Bringing the best mod back alive! Our mod REFORGED!

Balkon's Weapons for 1.8: https://github.com/TheOnlySilverClaw/Reforged/releases

Posted

What exactly are you trying to achieve? Most likely you can just create a standart json model, bind it in your blockstates file and let standart model rendering take things from there.

Posted
21 hours ago, V0idWa1k3r said:

WorldGenMinable already offsets the positions for you so no need to do the +rand.nextInt(16).

Minable's offset is a fixed +8 +8 to move away from the problematic north and west edges (south and east always have neighbors already, so it's ok for ores to push into them). Minable does not randomize, so a mod still needs to do that.

 

Some mods don't use WorldGenMinable (perhaps because they must do other work or make other decisions) . Those are the mods that must beware of runaway worldgen and produce their own offset to avoid generating anything along the north or west edge of the given chunk (which would trigger neighbor updates into unloaded chunks, which would trigger more worldgen).

  • Like 1

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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