Jump to content

Recommended Posts

Posted

Hi.

 

I have been working on a multiblock system for my mod, this mod will have a lot of multiblocks in it in the future, so I want this system to be dynamic and easy to use. So I decided to use a 3D array of characters to represent blocks in the multiblock.

 

I have this working pretty smothely, but I am now stuck on actually comparing blocks in the world to the 3D char array.

 

These are the classes that handle the characters:

 

MultiblockHandler.java

 

  Reveal hidden contents

 

MultiblockPattern.java

 

  Reveal hidden contents

 

 

Here is the method that is currently called in the tileentity every 2 seconds to check the form: (This isn't working)

 

  Reveal hidden contents

 

 

Any help would be much appreciated.

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

Posted

console is being weird...

[15:51:27] [Client thread/INFO] [sTDOUT]: [net.modulartechnology.modtech.moduleModtech.common.tileentity.TileEntityDistillationChamber:checkMultiBlockForm:245]: 285 / 213 for master at 166, 81, 230
[15:51:27] [Client thread/INFO] [sTDOUT]: [net.modulartechnology.modtech.moduleModtech.common.tileentity.TileEntityDistillationChamber:checkMultiBlockForm:245]: 285 / 213 for master at 164, 81, 232
[15:51:27] [server thread/INFO] [sTDOUT]: [net.modulartechnology.modtech.moduleModtech.common.tileentity.TileEntityDistillationChamber:checkMultiBlockForm:245]: 282 / 213 for master at 164, 65, 232
[15:51:28] [Client thread/INFO] [sTDOUT]: [net.modulartechnology.modtech.moduleModtech.common.tileentity.TileEntityDistillationChamber:checkMultiBlockForm:245]: 282 / 213 for master at 164, 65, 232

 

its finding multiple masters, and 282 out of 213 blocks in the structure...

 

I feel like my method to check the pattern needs to be completely redone ;/

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

Posted

Okay, I just realised that int x, y, and z were being set wrong in the method. x was being set to xCoord + i whixh is the height, and y was yCoord + j which is the width.

I fixed this, and now its finding even more masters and has 426 out of 213 blocks... so its finding twice the number of blocks there are.

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

Posted

Again, that's because your

index

value is wrong. You are initially setting the

index

value to the number of blocks in the structure (213), loop through the structure and increment the

index

213 times, which results in a total of 628 blocks.

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

Oh... oops, that was just a stupid mistake :/

 

Now what about the multiple masters issue?

I ask complicated questions, and apparently like to write really long detailed posts. But I also help others when I can.

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.