Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[1.7.10] How to Conditionally Change Block Model (Render extra Things)

Featured Replies

Posted

Hi Everyone,

 

I have a block model that appears in game properly. I want to add additional parts to this block model when a player interacts with it. How would you go about doing this. I know I would have to use the onBlockActivated method and most likely and alter stuff inside my model file but im not exactly sure how to structure this. Anyone know of a rough idea/outline how to accomplish this.

Do you use metadata? or how do you save the interact value?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

  • Author

Im  not sure how to save it, im just trying to figure this out conceptually so that I can begin to design how it will work. I want the block model to render extra things depending on how many party members the player has in his IEEP. (This value is stored as an int in the players IEEP)

1. So the block is bound (which needs TileEntity) or it displays different things to different players (by using Minecraft#thePlayer)?

2. How many party members there can be? And why do you still call it "party" (confusing), there are much better/cooler words to call your stuff.

3. How advanced will the rendering be?

1.7.10 is no longer supported by forge, you are on your own.

  • Author

1) The block has a tile entity, i want it to render sphericalish models on top of it when it is interacted with by the player using the table. -Only 1 player should be able to use table at a time. The sphericalish models will be different but Ill be able to control that once i set this up.

 

2) There can be anywhere from 0 to 6 party members. (party is the word I use to describe the group of characters your player travels with/can become in my mod

 

3) The rendering already is pretty advanced, the block is a custom rendered block, it has a model that has approx 45 cuboidal pieces (mostly cubes and cuboidal rectangles and such its a techne/tabula model)

 

- The sphericalish models I want to render on top of my block have over 100 pieces (theyre also techne models just like my block model is)

- I want to render between 0 and 6 of these models on various locations on my block, Basically If this is the block

 

//IF I HAVE 6 Party Members Render like so

___________

|                    |

|    O    O    |

|    O    O    |

|    O    O    |

|__________|

 

I want to render my models on the circles on the top face of the block.

 

//IF I HAVE 5 Party Members Render like so

___________

|                    |

|    O    O    |

|        O        |

|    O      O    |

|__________|

 

//IF I HAVE 4 Party Members Render like so

___________

|                    |

|    O    O    |

|                    |

|    O    O    |

|__________|

 

//IF I HAVE 3 Party Members Render like so

___________

|                    |

|              O    |

|        O        |

|    O            |

|__________|

 

//IF I HAVE 2 Party Members Render like so

___________

|                    |

|                    |

|    O    O    |

|                    |

|__________|

 

//IF I HAVE 5 Party Members Render like so

___________

|                    |

|                    |

|        O        |

|                    |

|__________|

 

My block currently appears in game and has a tile entity already associated with it, it has its own renderer, and it also has a custom model as mentioned above.

Then you would better use TileEntitySpecialRenderer.

As far as I know, one can render a block with Json model and TESR. (This can be wrong)

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.