Topic category: User side tutorials
version:
-Mcreator 2022.2
-1.16.5
requirements:
you need to have completed entity to dont edit code after added collision.
dont unlock entity code after completion or you have to do that again
STEPS:
1.lock your entity
2.now open your entity java class file (not rendered and egg)
3.import those under others imports:
import net.minecraft.entity.Entity;
import net.minecraft.entity.MoverType;
import net.minecraft.util.math.vector.Vector3d;
4.under this text: public CustomEntity(EntityType<CustomEntity> type, World world) {
super(type, world);
experienceValue = 0;
setNoAI(false);
enablePersistence();
}
.add:
@Override
public boolean func_241845_aY() {
return true;
}
@Override
public boolean canBePushed() {
return false;
}
@Override
protected boolean canTriggerWalking() {
return false;
}
func_241845 is canbecollide (if you want soild hitbox true this)
canbepushed useful for mechas or vehicle or bosses
canTriggerWalking set to true if entity have ai
after this you can test entity
ops mistake you have to delete this : @Override
protected boolean canTriggerWalking() {
return false;
}
and add this under canbepushed:
how would you do this
MCreator 2023.1
minecraft version 1.19.2
there is an easier way
First go into the entity mode elemenns and make entity immune to knockback
but do you know if that will allow you to walk on the entity
nevermind, there was an option to disable entity collision