Jump to content

Recommended Posts

Posted (edited)

I'm trying to make a block that changes its model depending on some data in its tile entity, and for the most part I've got it working.

except when i place 2 or more instances of the block they all have the same model, I have it set up that when i click on the block with redstone or glowstone it changes the data in the tile entity, but whenever i click on one all the instances change also.

I followed this tutorial by TheGreyGhost https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe05_block_dynamic_block_model2.

is this how baked models normally work, or am I missing something obvious?

here is my code,  https://github.com/Ambrosse/properties-test, is it a bug or am i going about it the wrong way?

Edited by Ambrosse
Posted

Your GitHub is not set up correctly. It doesn’t include your gradle scripts or any of the files needed to setup your mod. It looks like you have prior Java/C programming knowledge. With modding there are a bunch of conventions and best practices you should follow. A few of them are

- not naming your packages “core” or “ASM”. These package names are conventionally used by coremods, and using them in a non-coremod context can lead to confusion.

- pls pls space out your code!

- using block base/tile base etc. is discouraged

- your package naming is against conventions for a few reasons

More at https://gist.github.com/Cadiboo/fbea89dc95ebbdc58d118f5350b7ba93

I can’t see what the issue with your models is (I find it hard to read your code) but it sounds like you have a static field that should be an instance field. You can view my custom baked model code (I don’t exactly recommend it 100%, but it works) at https://github.com/Cadiboo/WIPTech/tree/WIPTechAlpha/src/main/java/cadiboo/wiptech/client

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

hmm ill sift through my code and clean it up while I'm at it, I'll also work on the coding conventions. If it persists I'll let you know. ill fix my GitHub too. Thanks for replying!! I really appreciate it!

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.