Jump to content

Recommended Posts

Posted

Hello, I had made a pipe block that worked fine and I just had one thing left to do, convert it to a Forge Multipart. I got the block code to convert just fine, but I have been having issues with the Tile Entity code. My problem is that I can't seem to find a way to access the multi part itself when in the world. What I mean by accessing the multi part, I mean that I have code in other Tile Entities and in non converted Tile Entities of the pipe block that check to see if one of the adjacent blocks around them are instances of the Pipe Tile Entity. I use this information for rendering a transferring data. The issue that I am facing is that I can check if the adjacent blocks are instances of TileMultipart, but I cannot seem to figure out how to check if there is a pipe part in the block space. All help is appreciated, Thank You.

Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!

Posted

What you are trying to do sounds very possible. However we are going to need some code to glance at to fully understand the situation. I'll be honest, I probably won't be a ton of help but the others will need code.

An average guy who mods Minecraft. If you need help and are willing to use your brain, don't be afraid to ask.

 

Also, check out the Unofficial Minecraft Coder Pack (MCP) Prerelease Center for the latest from the MCP Team!

 

Was I helpful? Leave some karma/thanks! :)

Posted

In the TileMultipart, there's a List/Seq (

partList

for Scala,

jPartList()

for Java). You can iterate through it and check if the TMultipart is an instance of your pipe.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Does any one know of any open source mod that has a tile entity implemented with a forge multi part, so I can have a better understanding of how to efficiently do stuff.

Don't be afraid to ask question when modding, there are no stupid question! Unless you don't know java then all your questions are stupid!

Posted
  On 10/25/2014 at 11:59 PM, Mecblader said:

Does any one know of any open source mod that has a tile entity implemented with a forge multi part, so I can have a better understanding of how to efficiently do stuff.

Project Red makes extensive use of multiparts.

 

Also Forge Multipart itself includes multipart versions of some vanilla items such as torches and levers.

 

Finally, for what it's worth, here's some code of my own (incomplete) implementing a pipe part. The canConnectToTube() method contains an example of looking at a tile entity to see whether it contains another pipe part. It's a bit specialised, because my pipes are always centre parts and therefore can only appear in slot 6 of the part list. In the general case you would have to iterate over partMap.

 

 

  Reveal hidden contents

 

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.