Started by
AshtionoPropowerup
on
Topic category: Help with Minecraft modding (Java Edition)
I have found out how to make a mob climb walls. All you have to do is make an "On entity tick update" trigger on the mob settings.
Since I don't have an image of the block code, here is the type code of the procedure.
package net.mcreator.mod_name.procedures;
/* imports omitted */
public class procedurenameProcedure {
public static void execute(LevelAccessor world, double x, double y, double z, Entity entity) {
if (entity == null)
return;
if ((world.getBlockState(BlockPos.containing(x - 1, y, z))).is(BlockTags.create(ResourceLocation.parse("minecraft:tag_name")))) {
entity.setDeltaMovement(new Vec3(0, 0.1, 0));
}
if ((world.getBlockState(BlockPos.containing(x + 1, y, z))).is(BlockTags.create(ResourceLocation.parse("minecraft:tag_name")))) {
entity.setDeltaMovement(new Vec3(0, 0.1, 0));
}
if ((world.getBlockState(BlockPos.containing(x, y, z - 1))).is(BlockTags.create(ResourceLocation.parse("minecraft:tag_name")))) {
entity.setDeltaMovement(new Vec3(0, 0.1, 0));
}
if ((world.getBlockState(BlockPos.containing(x, y, z + 1))).is(BlockTags.create(ResourceLocation.parse("minecraft:tag_name")))) {
entity.setDeltaMovement(new Vec3(0, 0.1, 0));
}
if ((world.getBlockState(BlockPos.containing(x, y + 1, z))).is(BlockTags.create(ResourceLocation.parse("minecraft:tag_name")))) {
entity.setDeltaMovement(new Vec3(0, 0.1, 0));
}
}
}
Replace all the bolded text.
Edited by AshtionoPropowerup on Mon, 09/15/2025 - 21:35