Jump to content

[1.14.4] (Solved) Custom torch blocks have solid hitboxes.


DJKnarnia

Recommended Posts

I have built a custom torch type by extending the vanilla TorchBlock class (I am aware I will also need to handle the WallTorchBlock class at some point),  The issue I am quite literally running into is that the torch blocks are solid.  They are not full blocks, rather their hitbox matches their model.  I am just confused why the blocks seem to have taken on a new property when I haven't made any changes to their base class as far as I can tell.  Is there an additional step I am not seeing here?

 

I pulled the getCollisonBoundingBoxFromPool() method from an old forum post here, but I doubt it is still viable given the age of that post.

 

package djknarnia.abyssal.block;

import net.minecraft.block.TorchBlock;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.world.World;


public class FlareBlock extends TorchBlock {

	public FlareBlock(Properties properties) {
		super(properties);
	}
	
  /*
	public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int wx, int wy, int wz) {
		return null;
	}
	*/
}

 

https://github.com/DJKnarnia/Abyssal-Minecraft-Mod

 

Edited by DJKnarnia
Problem was solved.
Link to comment
Share on other sites

I actually appear to have solved the problem.  The issue was the material I had set on the block when registering them.  I copied over the properties of the torch block directly and the block began behaving properly.

 

BlockList.flare = (FlareBlock) new FlareBlock(TorchBlock.Properties.from(Blocks.TORCH)).setRegistryName(location("flare")),

 

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.