Block Bounding Box

Started by gustavowizard123 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Block Bounding Box

when i create a block on Mcreator, you set the Block Bounding Boxes for X,Y,Z, however it only sets min/max, so how could i do a block like the vanilla Composter here?

i would need a pair of X and Z coordinates for this; like X min=0 max=0,3 and X min = 0,7 max = 1

as

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
with this i would be able to…
Wed, 07/08/2020 - 05:31

with this i would be able to do pet cages and boxes with only 1 block size :)

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thats great, but since the…
Wed, 07/08/2020 - 22:47

thats great, but since the block exists, i can change the code to make it so, anybody know how?

i think its this part here:

@Override
		public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) {
			switch ((Direction) state.get(FACING)) {
				case SOUTH :
				default :
					return VoxelShapes.create(1D, 0D, 0.1D, 0D, 1D, 0D);
				case NORTH :
					return VoxelShapes.create(0D, 0D, 0.9D, 1D, 1D, 1D);
				case WEST :
					return VoxelShapes.create(0.9D, 0D, 1D, 1D, 1D, 0D);
				case EAST :
					return VoxelShapes.create(0.1D, 0D, 0D, 0D, 1D, 1D);
				case UP :
					return VoxelShapes.create(0D, 0.1D, 0D, 1D, 0D, 1D);
				case DOWN :
					return VoxelShapes.create(0D, 0.9D, 1D, 1D, 1D, 0D);
			}
		}

this is a pane, a block with 0,1 square on Z axis, and 1 on Y and X axis.

i wonder if would be possible to edit here to something like:

return VoxelShapes.create(0D, 0D, 0.9D, 1D, 1D, 1D..... , ....0D, 0D, 0.9D, 1D, 1D, 1D);

 

 

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh nvm the code above is…
Wed, 07/08/2020 - 23:01

oh nvm the code above is rotation not bounding box

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
any news on this? i know the…
Mon, 08/31/2020 - 08:35

any news on this? i know the feature dont exist yet but maybe someone know a way to do this manually?

code edit?

thanks!

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i dont know much java but i…
Sat, 10/03/2020 - 23:53

i dont know much java but i can edit the code of the block on Mcreator, if i knew where to mess around ... can you help?

thanks!

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hey is this feature on 2020…
Tue, 11/17/2020 - 22:55

hey is this feature on 2020.5?