Jump to content

Recommended Posts

Posted

Hi everyone, right now I'm in middle of converting my 1.7.10 code to 1.12.2. One of the blocks I had in before was a glass pane that changed its texture based on the position of where the pane was in relative to other blocks around it. Before i only used a 2D plane, but I was able to determine what axis the block was placed on using a combo of  "canPaneConnectToBlock" and "world.isSideSolid". Now that those methods are gone, I'm trying a to use a 3D plane where North(-Z) , East(-X)  and South(+Z), West(+X) are interchangeable. Up and down will be the Y axis. For now, all of my panes, no matter what position i put them in, are calculated as a bottom pane. Can anyone point me in the direction of what I should do for this?

  Reveal hidden contents

 

Posted

Have a look at MBE05 in Minecraft by example, I think it’s exactly what you want

About Me

  Reveal hidden contents

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
  On 8/6/2018 at 2:30 AM, Cadiboo said:

Have a look at MBE05 in Minecraft by example, I think it’s exactly what you want

Expand  

I looked at the example, and there isn't really much i can go off of given what I was trying to do. In the Block3DWeb it only seems to care about what next to the block first. Say if there were two blocks on the bottom and the left side, if the block saw the left block first, It would only care about the left block, not noticing the bottom block. What I need to determine is how block is facing in the world so i know which neighbors to use. It's a good example, but a bit over complicated for what I'm trying to do now ^^".

  • 1 year later...
Posted

Post from the dead here. I finally got around to implementing the glass pane frames for my mod. Code wise I think I got the blockstate thing down. There are 16 states that these glass pane frames can be in along with the 4 states that I'm inheriting (North, South, East, West). I took a look at how the blockstate json handles its 4 states. Example here for Cyan Stained Glass Pane:

  Reveal hidden contents

Now the 16 blockstates I've created are to go with the original 4 from BlockPane. If I do what I am thinking of doing, I will have to have 128 models just for 1 glass pane frame. Here is the question, is there a less painful way to create the blockstate and models?

Posted
  On 10/17/2019 at 3:52 AM, Cilka said:

If I do what I am thinking of doing, I will have to have 128 models just for 1 glass pane frame.

Expand  

I believe that is wrong...cant you just have two models per color/whatever(16). And then an extra one that's empty. Then an extra one that is empty to apply when it is false. Which comes to 16x2+1=33 which is a lot, but you can just parent the glass pane model and change the texture.

 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  Quote

I believe that is wrong...cant you just have two models per color/whatever(16). And then an extra one that's empty. Then an extra one that is empty to apply when it is false. Which comes to 16x2+1=33 which is a lot, but you can just parent the glass pane model and change the texture.

Expand  

I see what you are saying. My concern would be if leave the false sides without a model, the model would not look as intended. I'll try what you are suggesting. It will be a good starting point at least. 

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.