How to set a Blockhitbox to a Customblock (JSON)

Started by Sasky on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to set a Blockhitbox to a Customblock (JSON)

I created a Block with Blockbench imported it with Json but the Hitbox is not good so how i set a Hitbox to my Model

is this what you are looking…
Sat, 06/13/2020 - 13:00

is this what you are looking for?

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

 

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No i mean bounding box i…
Sat, 06/13/2020 - 13:03

No i mean bounding box i solved it !

 

 

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi Sasky i know this toppic…
Sat, 01/02/2021 - 14:58

Hi Sasky i know this toppic is a bit old but can you say me how do you set hitbox as costume json?