fixed various errors with rough draft of new stuff
This commit is contained in:
1 parent
fb8fd3c927
commit
cd2972a208
44 files changed
+162
-393
No files matched your search
+1
-1
@@ -20,7 +20,7 @@ public class CreepingHorrorRenderer extends GeoEntityRenderer<CreepingHorrorEnti
|
||||
@Override
|
||||
public void preRender(PoseStack poseStack, CreepingHorrorEntity animatable, BakedGeoModel model, @Nullable MultiBufferSource bufferSource, @Nullable VertexConsumer buffer, boolean isReRender, float partialTick, int packedLight, int packedOverlay, int colour) {
|
||||
super.preRender(poseStack, animatable, model, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, colour);
|
||||
if (animatable.isClimbing()) {
|
||||
if (animatable.isWallClimbing()) {
|
||||
poseStack.mulPose(Axis.XP.rotationDegrees(-90.0F));
|
||||
poseStack.translate(0, -0.5, 0.5);
|
||||
}
|
||||
|
||||
+9
-7
@@ -29,7 +29,7 @@ import software.bernie.geckolib.util.GeckoLibUtil;
|
||||
|
||||
public class CreepingHorrorEntity extends Monster implements GeoEntity {
|
||||
private static final EntityDataAccessor<Boolean> CLIMBING =
|
||||
SynchedEntityData.defineId(JumpyBugEntity.class, EntityDataSerializers.BOOLEAN);
|
||||
SynchedEntityData.defineId(CreepingHorrorEntity.class, EntityDataSerializers.BOOLEAN);
|
||||
|
||||
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
|
||||
private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk");
|
||||
@@ -75,7 +75,11 @@ public class CreepingHorrorEntity extends Monster implements GeoEntity {
|
||||
|
||||
@Override
|
||||
public boolean onClimbable() {
|
||||
return this.horizontalCollision;
|
||||
return this.entityData.get(CLIMBING);
|
||||
}
|
||||
|
||||
public boolean isWallClimbing() {
|
||||
return this.entityData.get(CLIMBING) && !this.onGround();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,11 +124,9 @@ public class CreepingHorrorEntity extends Monster implements GeoEntity {
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (!this.level().isClientSide()) {
|
||||
this.entityData.set(CLIMBING, this.horizontalCollision);
|
||||
}
|
||||
if (attackAnimTicks > 0) attackAnimTicks--;
|
||||
}
|
||||
|
||||
//TODO IT NEVER ACTUALLY SETS TO CLIMBING
|
||||
public boolean isClimbing() {
|
||||
return this.entityData.get(CLIMBING);
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -78,9 +78,9 @@ public class LurkingTerrorEntity extends Monster implements GeoEntity {
|
||||
|
||||
private PlayState mainAnimController(AnimationState<LurkingTerrorEntity> state) {
|
||||
if (attackAnimTicks > 0) {
|
||||
// if (!this.isOnGround()) {
|
||||
// return state.setAndContinue(ATTACK_AIR_ANIM);
|
||||
// }
|
||||
if (!this.onGround()) {
|
||||
return state.setAndContinue(ATTACK_AIR_ANIM);
|
||||
}
|
||||
return state.setAndContinue(ATTACK_LAND_ANIM);
|
||||
}
|
||||
if (state.isMoving()) {
|
||||
|
||||
Reference in new issue
Block a user