1

[Help] Creating a 2x1 block

Hoodiniator 5/13/16 5:36 pm
795
5/30/2016 8:51 pm
Hello! I've created two blocks for my mod which are supposed to be connected to each other to create a 2x1, like a door or a bed. However, if I create a 2x1 model, the hitbox is only at the top of the block. I know I can create a multiblock structure, but I have absolutely no idea of how to do that. I've tried searching for tutorials on multiblock structures, but all I get is a video on another language, and Lomeli's tutorial but his guide is very confusing. I plan on using the block as a portal to another dimension.
Posted by
Hoodiniator
Level 2 : Apprentice Crafter
1

  Have something to say?

JoinSign in

8

that2guy
05/30/2016 8:51 pm
Level 48 : Master Nerd
When you place the block, have it setblock a seperate one above it. It's messy, but it works.
1
Aeronica
05/30/2016 9:43 am
Level 35 : Artisan Modder
What version of Minecraft and Forge are you using for your mod?
1
Hoodiniator
05/14/2016 3:17 pm
Level 2 : Apprentice Crafter
I've already got 2 separate blocks as I previously tried to create a multiblock. However, for some reason xCoord, yCoord, and zCoord don't work with my tile entity. The code is above, I'll just highlight the problems that pop up on Eclipse.
1
guestds
05/13/2016 9:47 pm
Level 20 : Expert Modder
maybe try making it into a 1x1x1 block? or try asking the creator of pixelmon for help to make it solid 1x2x1 instead of the bottom being non solid? or you have 2 items added as that block and youre placing the one that only makes part of it solid (sortof like id 64 given as an item aka bottom half of a door) so try finding a 2nd item of it and placing that and if not pm the creator of Pixelmon for help with this k
1
Hoodiniator
05/13/2016 7:36 pm
Level 2 : Apprentice Crafter
ModTileEntity -Problemimport net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;

public class ModTileEntity extends TileEntity {

private boolean hasMaster, isMaster;
private int masterX, masterY, masterZ;

public boolean checkMultiBlockForm() {
int i = 0;
for (int x = xCoord; x < xCoord; x++)
for (int y = yCoord; y < yCoord; y++)
for (int z = zCoord ; z > zCoord -1; z--) {
TileEntity tile = worldObj.getTileEntity(x, y, z);
if (tile != null && (tile instanceof ModTileEntity)) {
if (this.isMaster()) {
if (((ModTileEntity)tile).hasMaster())
i++;
} else if (!((ModTileEntity)tile).hasMaster())
i++;
}
}
return i > 1 && worldObj.isAirBlock(xCoord, yCoord, zCoord);
}
1
Hoodiniator
05/13/2016 7:31 pm
Level 2 : Apprentice Crafter
guestds
HoodiniatorWHY xCoord, zCoord and yCoord don't work at all.


i think since you ordered it here as x z y you put it in the code as x coord z coord y coord but it shouldve been x y z instead of x z y? also if youd like i could try and figure out the other language video if you pm it to me but if you watch the screen usually they say what theyre doing so if you dont understand aka its wrong language of what you understand then following onscreen instructions might work still (example is that i didnt follow the screen instruction for modloader i followed the voice which tends to at points not say what theyre doing so i never had tmi with modloader and i even crashed with only tmi fresh .jar cause... me and my friend suck at that... and no installers... and internet was too nice at the time for things to be correct... lol) but if you cant figure out by following the screen only ill try to figure out what theyre saying for you... maybe let it play and google translate listens to it and types it lol

Yeah, I meant to order it as X, Y, Z. Doesn't seem to be the problem though.
1
guestds
05/13/2016 7:25 pm
Level 20 : Expert Modder
HoodiniatorWHY xCoord, zCoord and yCoord don't work at all.


i think since you ordered it here as x z y you put it in the code as x coord z coord y coord but it shouldve been x y z instead of x z y? also if youd like i could try and figure out the other language video if you pm it to me but if you watch the screen usually they say what theyre doing so if you dont understand aka its wrong language of what you understand then following onscreen instructions might work still (example is that i didnt follow the screen instruction for modloader i followed the voice which tends to at points not say what theyre doing so i never had tmi with modloader and i even crashed with only tmi fresh .jar cause... me and my friend suck at that... and no installers... and internet was too nice at the time for things to be correct... lol) but if you cant figure out by following the screen only ill try to figure out what theyre saying for you... maybe let it play and google translate listens to it and types it lol
1
Hoodiniator
05/13/2016 7:05 pm
Level 2 : Apprentice Crafter
To be more precise with my Multiblock problem, I followed the steps on Lomeli's tutorial, but what doesn't make sense to me is as to WHY xCoord, zCoord and yCoord don't work at all. I've registered the tileentity, and the class extends to tileentity, and I'm sure that I put the code in the right place.
1

Welcome