update ReadME

This commit is contained in:
Halbear
2026-05-25 23:45:06 +01:00
parent 41504fc1f9
commit 613809fd15
+3 -3
View File
@@ -60,8 +60,8 @@ you register the entity as if it were any other entity
public class ModEntities { public class ModEntities {
public static DeferredRegister<EntityType<?>> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITIES, Halsvehicleframework.MOD_ID); public static DeferredRegister<EntityType<?>> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITIES, Halsvehicleframework.MOD_ID);
public static final RegistryObject<EntityType<Aeroplane>> AEROPLANE = public static final RegistryObject<EntityType<AeroplaneExample>> AEROPLANE =
ENTITY_TYPES.register("aeroplane", ()-> EntityType.Builder.create(Aeroplane::new, ENTITY_TYPES.register("aeroplane", ()-> EntityType.Builder.create(AeroplaneExample::new,
EntityClassification.MISC ).size(3f,2f).build(new ResourceLocation(Halsvehicleframework.MOD_ID, "aeroplane").toString())); EntityClassification.MISC ).size(3f,2f).build(new ResourceLocation(Halsvehicleframework.MOD_ID, "aeroplane").toString()));
} }
``` ```
@@ -102,7 +102,7 @@ then you add whatever animations you want in the `setRotationAngles` function us
``` ```
@Override @Override
public void setRotationAngles(VehicleBaseEntity entity, float f, float f1, float f2, float f3, float f4) { public void setRotationAngles(VehicleBaseEntity entity, float f, float f1, float f2, float f3, float f4) {
Aeroplane aeroplane = (Aeroplane)entity; AeroplaneExample aeroplane = (AeroplaneExample)entity;
aeroplane.GetAnimationManager().PropellerAnimation(propeller, aeroplane, AnimationAxis.Z_AXIS, false); //propeller is the name of the ModelRenderer which has the 3d models propeller in it aeroplane.GetAnimationManager().PropellerAnimation(propeller, aeroplane, AnimationAxis.Z_AXIS, false); //propeller is the name of the ModelRenderer which has the 3d models propeller in it
} }
``` ```