
MosquitoFRA
Members-
Posts
15 -
Joined
-
Last visited
Everything posted by MosquitoFRA
-
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
Sorry @Cadiboo, but I told that I haven't Discord presviously. But I found how to pm you on this forum. -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
Sorry, but I don't have Discord. @Override class collisionBox { public AxisAlignedBB addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean isActualState) { if(entityIn instanceof EntityPlayer) { class boundingBox { void getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return super.AxisAlignedBB[](0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); } } } } } I tried to correct the code as best as I could and search again on Google, but I can't figure it out. -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
@Override public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean isActualState) { if(entityIn instanceof EntityPlayer) { getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); } } } I tried this but it didn't work -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
@Override public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, Entity entityIn, boolean isActualState) { if(entityIn instanceof EntityPlayer) { public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos) { return new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); } } } I have this but it doesn't work -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
Huge thanks @JimiIT92. I will try. And finally decided to look at some videos. -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
I have to leave. Thank you for your help and patience. -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
Could you correct it, please ... I didn't find an answer anywhere on google and i tried javadoc but didn't know where to go to find the good method. -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
For the entity, it's entityLiving (I think it's for projectiles). And I don't know to do this null check { if(EntityLiving) super.addCollisionBoxToList(pos, entityBox, collidingBoxes, under); super.addCollisionBoxToList(pos, entityBox, collidingBoxes, middle); super.addCollisionBoxToList(pos, entityBox, collidingBoxes, top); } -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn) if(entity.projectiles) { super.addCollisionBoxToList(pos, entityBox, collidingBoxes, under); super.addCollisionBoxToList(pos, entityBox, collidingBoxes, middle); super.addCollisionBoxToList(pos, entityBox, collidingBoxes, top); } Is it like this? -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
Sorry, I was editing. I don't know why there is @Nullable Entity entityIn? -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn) if(entity.projectiles) -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
I replace "entityIn" by "tileEntity" or "entityProjectiles"? -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
In fact, I'm not used to this method. I found an example: public void addCollisionBoxToList(IBlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn) { super.addCollisionBoxToList(pos, entityBox, collidingBoxes, under); super.addCollisionBoxToList(pos, entityBox, collidingBoxes, middle); super.addCollisionBoxToList(pos, entityBox, collidingBoxes, top); } So what do I have to do with these information? -
Make a block only collidable for a specific entity
MosquitoFRA replied to MosquitoFRA's topic in Modder Support
Do you mean like this? @Override public void addCollisionBoxTo List(IBlockState state, World world, BlockPos pos, entity.projectiles) -
Hello everyone. Here is my issue: I don't know how to make a bloc only collidable for players. Arrows can cross it which is very annoying because I want to make a shield which stop projectiles and not players. Any help would be great.