Made triffid take reduced projectile damage

Fixed fallen king crown
New basilisk texture
Overhaul nightmare AI
This commit is contained in:
craisinlord committed 2026-06-22 16:47:21 -05:00
1 parent 8bb2720a11
commit bd09c6ec7f
16 files changed
+1798 -2334

No files matched your search

@@ -2,7 +2,12 @@ package com.craisinlord.antarchy.content.client.renderer;
import com.craisinlord.antarchy.content.client.model.BasiliskModel; import com.craisinlord.antarchy.content.client.model.BasiliskModel;
import com.craisinlord.antarchy.content.entity.basilisk.BasiliskEntity; import com.craisinlord.antarchy.content.entity.basilisk.BasiliskEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.entity.EntityRendererProvider;
import org.jetbrains.annotations.Nullable;
import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.renderer.GeoEntityRenderer; import software.bernie.geckolib.renderer.GeoEntityRenderer;
public class BasiliskRenderer extends GeoEntityRenderer<BasiliskEntity> { public class BasiliskRenderer extends GeoEntityRenderer<BasiliskEntity> {
@@ -11,4 +16,19 @@ public class BasiliskRenderer extends GeoEntityRenderer<BasiliskEntity> {
super(context, new BasiliskModel()); super(context, new BasiliskModel());
this.shadowRadius = 1.0F; this.shadowRadius = 1.0F;
} }
@Override
public void preRender(PoseStack poseStack, BasiliskEntity 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.isDeadOrDying()) {
poseStack.translate(0.0D, -0.35D, 0.0D);
}
}
@Override
protected float getDeathMaxRotation(BasiliskEntity animatable) {
return 0.0F;
}
} }
@@ -17,6 +17,7 @@ import net.minecraft.server.level.ServerLevel;
import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvent;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
import net.minecraft.util.RandomSource; import net.minecraft.util.RandomSource;
import net.minecraft.tags.DamageTypeTags;
import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.EntityType;
@@ -226,6 +227,9 @@ public class TriffidEntity extends Monster implements GeoEntity {
if (this.isInvulnerableTo(source)) { if (this.isInvulnerableTo(source)) {
return false; return false;
} }
if (source.is(DamageTypeTags.IS_PROJECTILE)) {
amount *= 0.33333334F;
}
return super.hurt(source, amount); return super.hurt(source, amount);
} }
@@ -44,17 +44,29 @@ import software.bernie.geckolib.animation.PlayState;
import software.bernie.geckolib.animation.RawAnimation; import software.bernie.geckolib.animation.RawAnimation;
import software.bernie.geckolib.animation.keyframe.event.builtin.AutoPlayingSoundKeyframeHandler; import software.bernie.geckolib.animation.keyframe.event.builtin.AutoPlayingSoundKeyframeHandler;
import software.bernie.geckolib.util.GeckoLibUtil; import software.bernie.geckolib.util.GeckoLibUtil;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.network.syncher.EntityDataSerializers;
import net.minecraft.network.syncher.SynchedEntityData;
import java.util.UUID; import java.util.UUID;
import java.util.function.Predicate; import java.util.function.Predicate;
public class BasiliskEntity extends Monster implements GeoEntity { public class BasiliskEntity extends Monster implements GeoEntity {
private static final EntityDataAccessor<Integer> ANIMATION_STATE =
SynchedEntityData.defineId(BasiliskEntity.class, EntityDataSerializers.INT);
private static final byte ATTACK_ENTITY_EVENT = 4; private static final byte ATTACK_ENTITY_EVENT = 4;
private static final int ATTACK_ANIM_TICKS = 18; private static final int ATTACK_ANIM_TICKS = 18;
private static final int DEATH_TICKS = 25;
private static final int ANIM_IDLE = 0;
private static final int ANIM_WALK = 1;
private static final int ANIM_ATTACK = 2;
private static final int ANIM_DEATH = 3;
private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle"); private static final RawAnimation IDLE_ANIM = RawAnimation.begin().thenLoop("idle");
private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk"); private static final RawAnimation WALK_ANIM = RawAnimation.begin().thenLoop("walk");
private static final RawAnimation ATTACK_ANIM = RawAnimation.begin().thenPlay("attack"); private static final RawAnimation ATTACK_ANIM = RawAnimation.begin().thenPlay("attack");
private static final RawAnimation DEATH_ANIM = RawAnimation.begin().thenPlay("death");
private static final int HISS_COOLDOWN_TICKS = 600; private static final int HISS_COOLDOWN_TICKS = 600;
private static final double GAZE_RANGE = 12.0D; private static final double GAZE_RANGE = 12.0D;
@@ -82,6 +94,12 @@ public class BasiliskEntity extends Monster implements GeoEntity {
this.xpReward = 50; this.xpReward = 50;
} }
@Override
protected void defineSynchedData(SynchedEntityData.Builder builder) {
super.defineSynchedData(builder);
builder.define(ANIMATION_STATE, ANIM_IDLE);
}
public static AttributeSupplier.Builder createAttributes() { public static AttributeSupplier.Builder createAttributes() {
return Monster.createMonsterAttributes() return Monster.createMonsterAttributes()
.add(Attributes.MAX_HEALTH, 150.0D) .add(Attributes.MAX_HEALTH, 150.0D)
@@ -149,12 +167,18 @@ public class BasiliskEntity extends Monster implements GeoEntity {
this.attackAnimTicks--; this.attackAnimTicks--;
} }
if (this.isDeadOrDying()) {
this.updateAnimationState();
return;
}
if (this.level().isClientSide) { if (this.level().isClientSide) {
return; return;
} }
this.tickPlayerPetrification(); this.tickPlayerPetrification();
this.tickPreyPetrification(); this.tickPreyPetrification();
this.updateAnimationState();
} }
private void tickPlayerPetrification() { private void tickPlayerPetrification() {
@@ -346,9 +370,15 @@ public class BasiliskEntity extends Monster implements GeoEntity {
} }
private PlayState mainController(AnimationState<BasiliskEntity> state) { private PlayState mainController(AnimationState<BasiliskEntity> state) {
if (this.attackAnimTicks > 0) { if (this.getAnimationState() == ANIM_DEATH) {
return state.setAndContinue(DEATH_ANIM);
}
if (this.getAnimationState() == ANIM_ATTACK) {
return state.setAndContinue(ATTACK_ANIM); return state.setAndContinue(ATTACK_ANIM);
} }
if (this.getAnimationState() == ANIM_WALK) {
return state.setAndContinue(WALK_ANIM);
}
if (this.getTarget() != null || this.hissChargeTimer > 0 || this.pendingTargetId != null) { if (this.getTarget() != null || this.hissChargeTimer > 0 || this.pendingTargetId != null) {
return state.setAndContinue(WALK_ANIM); return state.setAndContinue(WALK_ANIM);
} }
@@ -367,11 +397,64 @@ public class BasiliskEntity extends Monster implements GeoEntity {
public void handleEntityEvent(byte id) { public void handleEntityEvent(byte id) {
if (id == ATTACK_ENTITY_EVENT) { if (id == ATTACK_ENTITY_EVENT) {
this.attackAnimTicks = ATTACK_ANIM_TICKS; this.attackAnimTicks = ATTACK_ANIM_TICKS;
this.setAnimationState(ANIM_ATTACK);
return; return;
} }
super.handleEntityEvent(id); super.handleEntityEvent(id);
} }
@Override
public void die(DamageSource damageSource) {
if (!this.level().isClientSide) {
this.setAnimationState(ANIM_DEATH);
this.attackAnimTicks = 0;
this.hissChargeTimer = 0;
this.pendingTargetId = null;
this.getNavigation().stop();
this.setDeltaMovement(Vec3.ZERO);
}
super.die(damageSource);
}
@Override
protected void tickDeath() {
this.deathTime++;
if (this.deathTime == 1) {
this.setAnimationState(ANIM_DEATH);
}
if (this.deathTime >= DEATH_TICKS) {
this.remove(RemovalReason.KILLED);
}
}
private void updateAnimationState() {
if (this.isDeadOrDying()) {
this.setAnimationState(ANIM_DEATH);
return;
}
if (this.attackAnimTicks > 0) {
this.setAnimationState(ANIM_ATTACK);
return;
}
if (this.getTarget() != null || this.hissChargeTimer > 0 || this.pendingTargetId != null) {
this.setAnimationState(ANIM_WALK);
return;
}
if (this.getDeltaMovement().horizontalDistanceSqr() > 1.0E-4D) {
this.setAnimationState(ANIM_WALK);
return;
}
this.setAnimationState(ANIM_IDLE);
}
private int getAnimationState() {
return this.entityData.get(ANIMATION_STATE);
}
private void setAnimationState(int state) {
this.entityData.set(ANIMATION_STATE, state);
}
@Override @Override
public boolean canAttack(LivingEntity target) { public boolean canAttack(LivingEntity target) {
if (target instanceof Player player) { if (target instanceof Player player) {
@@ -34,5 +34,6 @@ public abstract class SplashManagerMixin {
this.splashes.add("Ants Ants Revolution!"); this.splashes.add("Ants Ants Revolution!");
this.splashes.add("Rainbow sugar yummy"); this.splashes.add("Rainbow sugar yummy");
this.splashes.add("Now with inverted gravity!"); this.splashes.add("Now with inverted gravity!");
this.splashes.add("Everything we need is already here");
} }
} }
File diff suppressed because it is too large. Load diff
@@ -3,7 +3,7 @@
"minecraft:geometry": [ "minecraft:geometry": [
{ {
"description": { "description": {
"identifier": "geometry.unknown", "identifier": "geometry.basilisk",
"texture_width": 256, "texture_width": 256,
"texture_height": 256, "texture_height": 256,
"visible_bounds_width": 16, "visible_bounds_width": 16,
@@ -12,15 +12,15 @@
}, },
"bones": [ "bones": [
{ {
"name": "group2", "name": "Basilisk",
"pivot": [0, 41.02853, -41.86327] "pivot": [0, 41.02853, -41.86327]
}, },
{ {
"name": "upper_body", "name": "upper_body",
"parent": "group2", "parent": "Basilisk",
"pivot": [0, 5.22232, -10.59536], "pivot": [0, 5.22232, -10.59536],
"cubes": [ "cubes": [
{"origin": [0, 13.92239, -30.29457], "size": [0, 6, 20], "uv": [170, 187]}, {"origin": [0, 13.92239, -30.29457], "size": [0, 6, 20], "uv": [170, 155]},
{"origin": [-7.5, -0.07761, -30.29457], "size": [15, 14, 20], "inflate": 0.01, "uv": [98, 0]} {"origin": [-7.5, -0.07761, -30.29457], "size": [15, 14, 20], "inflate": 0.01, "uv": [98, 0]}
] ]
}, },
@@ -29,13 +29,13 @@
"parent": "upper_body", "parent": "upper_body",
"pivot": [0, 6.18002, -29.0602], "pivot": [0, 6.18002, -29.0602],
"cubes": [ "cubes": [
{"origin": [-7.5, 5.42239, -44.99457], "size": [15, 12, 19], "pivot": [0, 10.02239, -37.49457], "rotation": [-32.5, 0, 0], "uv": [64, 129]} {"origin": [-7.5, 5.42239, -44.99457], "size": [15, 12, 19], "pivot": [0, 10.02239, -37.49457], "rotation": [-32.5, 0, 0], "uv": [64, 97]}
] ]
}, },
{ {
"name": "neck_1", "name": "neck_1",
"parent": "neck", "parent": "neck",
"pivot": [0, 11.44289, -38.81135], "pivot": [0, 10.19289, -46.31135],
"cubes": [ "cubes": [
{"origin": [-7.5, 10.22239, -46.39457], "size": [15, 15, 12], "inflate": 0.01, "uv": [166, 34]} {"origin": [-7.5, 10.22239, -46.39457], "size": [15, 15, 12], "inflate": 0.01, "uv": [166, 34]}
] ]
@@ -43,9 +43,9 @@
{ {
"name": "neck_2", "name": "neck_2",
"parent": "neck_1", "parent": "neck_1",
"pivot": [0, 24.0164, -40.28362], "pivot": [0, 25.2664, -46.28362],
"cubes": [ "cubes": [
{"origin": [-7.5, 24.52239, -41.99457], "size": [15, 11, 15], "pivot": [0, 26.42239, -34.79457], "rotation": [57.5, 0, 0], "uv": [60, 160]} {"origin": [-7.5, 24.52239, -41.99457], "size": [15, 11, 15], "pivot": [0, 26.42239, -34.79457], "rotation": [57.5, 0, 0], "uv": [60, 128]}
] ]
}, },
{ {
@@ -53,31 +53,51 @@
"parent": "neck_2", "parent": "neck_2",
"pivot": [0, 31.71975, -33.59063], "pivot": [0, 31.71975, -33.59063],
"cubes": [ "cubes": [
{"origin": [-7.5, 32.83206, -46.75054], "size": [15, 13, 13], "inflate": 0.02, "pivot": [0, 41.23246, -37.34339], "rotation": [92.5, 0, 0], "uv": [0, 162]} {"origin": [-7.5, 32.83206, -46.75054], "size": [15, 13, 13], "inflate": 0.02, "pivot": [0, 41.23246, -37.34339], "rotation": [92.5, 0, 0], "uv": [0, 130]}
] ]
}, },
{ {
"name": "head", "name": "head",
"parent": "neck_3", "parent": "neck_3",
"pivot": [0, 41.02853, -41.86327], "pivot": [0, 45.02853, -30.86327],
"cubes": [ "cubes": [
{"origin": [-7.5, 36.52383, -48.06757], "size": [15, 12, 15], "pivot": [0, 41.23246, -37.34339], "rotation": [-32.5, 0, 0], "uv": [0, 135]}, {"origin": [-7.5, 36.52383, -48.06757], "size": [15, 12, 15], "pivot": [0, 41.23246, -37.34339], "rotation": [-32.5, 0, 0], "uv": [0, 103]},
{"origin": [-6.5, 41.52853, -63.61327], "size": [13, 10, 11], "inflate": 0.01, "uv": [170, 166]}, {"origin": [-7.5, 41.52853, -63.61327], "size": [15, 10, 11], "inflate": 0.01, "uv": [169, 134]},
{"origin": [-6.5, 39.52853, -60.61327], "size": [13, 2, 8], "inflate": 0.01, "uv": [194, 121]}, {"origin": [-6.5, 39.52853, -60.61327], "size": [13, 2, 8], "inflate": 0.01, "uv": [214, 111]},
{"origin": [-10.25, 51.52853, -49.61327], "size": [5, 4, 21], "inflate": 0.01, "pivot": [-7.75, 55.52853, -37.86327], "rotation": [0, -22.5, 0], "uv": [204, 72]},
{"origin": [-10.25, 55.52853, -32.61327], "size": [5, 4, 4], "inflate": 0.01, "pivot": [-7.75, 55.52853, -37.86327], "rotation": [0, -22.5, 0], "uv": [204, 97]},
{"origin": [5.25, 51.52853, -49.61327], "size": [5, 4, 21], "inflate": 0.01, "pivot": [7.75, 55.52853, -37.86327], "rotation": [0, 22.5, 0], "uv": [204, 72], "mirror": true},
{"origin": [5.25, 55.52853, -32.61327], "size": [5, 4, 4], "inflate": 0.01, "pivot": [7.75, 55.52853, -37.86327], "rotation": [0, 22.5, 0], "uv": [204, 97], "mirror": true},
{"origin": [-7.6, 47.07853, -49.36327], "size": [0, 2, 1], "inflate": 0.01, "uv": [217, 8]},
{"origin": [7.6, 47.07853, -49.36327], "size": [0, 2, 1], "inflate": 0.01, "uv": [217, 8], "mirror": true},
{"origin": [-7.5, 43.52853, -52.61327], "size": [15, 8, 11], "inflate": 0.01, "uv": [168, 0]}, {"origin": [-7.5, 43.52853, -52.61327], "size": [15, 8, 11], "inflate": 0.01, "uv": [168, 0]},
{"origin": [4.5, 50.52853, -52.71327], "size": [4, 2, 9], "inflate": 0.01, "uv": [140, 34]}, {"origin": [4.5, 34.92853, -62.61327], "size": [2, 7, 2], "inflate": -0.1, "uv": [76, 56]},
{"origin": [-8.5, 50.52853, -52.71327], "size": [4, 2, 9], "inflate": 0.01, "uv": [140, 34], "mirror": true}, {"origin": [-6.5, 34.92853, -62.61327], "size": [2, 7, 2], "inflate": -0.1, "uv": [76, 56], "mirror": true},
{"origin": [4.5, 34.92853, -62.61327], "size": [2, 7, 2], "inflate": -0.1, "uv": [80, 110]}, {"origin": [0, 51.52853, -63.61327], "size": [0, 10, 32], "uv": [0, 61]},
{"origin": [-6.5, 34.92853, -62.61327], "size": [2, 7, 2], "inflate": -0.1, "uv": [80, 110], "mirror": true}, {"origin": [-7.25, 49.52853, -64.61327], "size": [0, 10, 32], "pivot": [-7.25, 54.52853, -48.61327], "rotation": [0, -22.5, 0], "uv": [0, 61]},
{"origin": [0, 51.52853, -63.61327], "size": [0, 10, 32], "uv": [0, 93]}, {"origin": [7.25, 49.52853, -64.61327], "size": [0, 10, 32], "pivot": [7.25, 54.52853, -48.61327], "rotation": [0, 22.5, 0], "uv": [0, 61], "mirror": true},
{"origin": [-7.5, 43.52853, -44.11327], "size": [0, 10, 16], "pivot": [-7.5, 46.52853, -42.11327], "rotation": [0, -25, 0], "uv": [0, 188], "mirror": true}, {"origin": [-6.7, 38.52853, -46.11327], "size": [0, 14, 11], "pivot": [-6.7, 46.52853, -44.11327], "rotation": [0, -25, 0], "uv": [113, 90], "mirror": true},
{"origin": [-7.2, 43.52853, -42.11327], "size": [0, 10, 16], "pivot": [-7.5, 46.52853, -42.11327], "rotation": [57.5, -25, 0], "uv": [0, 188], "mirror": true}, {"origin": [-11.54484, 34.52853, -47.13192], "size": [0, 19, 28], "pivot": [-11.54484, 45.02853, -33.13192], "rotation": [0, -25, 0], "uv": [55, 142], "mirror": true},
{"origin": [-7.5, 38.52853, -42.11327], "size": [0, 6, 11], "pivot": [-7.5, 41.52853, -42.11327], "rotation": [0, -32.5, 0], "uv": [64, 93], "mirror": true}, {"origin": [11.54484, 34.52853, -47.13192], "size": [0, 19, 28], "pivot": [11.54484, 45.02853, -33.13192], "rotation": [0, 25, 0], "uv": [55, 142]},
{"origin": [-7.4, 38.52853, -42.11327], "size": [0, 6, 11], "pivot": [-7.5, 41.52853, -42.11327], "rotation": [-47, -32.5, 0], "uv": [64, 93], "mirror": true}, {"origin": [-8.67916, 37.77853, -46.94119], "size": [0, 9, 11], "pivot": [-7.67916, 43.27853, -41.44119], "rotation": [-12.5, -25, 0], "uv": [113, 90], "mirror": true},
{"origin": [7.2, 43.52853, -42.11327], "size": [0, 10, 16], "pivot": [7.5, 46.52853, -42.11327], "rotation": [57.5, 25, 0], "uv": [0, 188]}, {"origin": [8.67916, 37.77853, -46.94119], "size": [0, 9, 11], "pivot": [7.67916, 43.27853, -41.44119], "rotation": [-12.5, 25, 0], "uv": [113, 90]},
{"origin": [7.5, 43.52853, -44.11327], "size": [0, 10, 16], "pivot": [7.5, 46.52853, -42.11327], "rotation": [0, 25, 0], "uv": [0, 188]}, {"origin": [7.5, 38.52853, -44.11327], "size": [0, 14, 11], "pivot": [7.5, 46.52853, -42.11327], "rotation": [0, 25, 0], "uv": [113, 90]}
{"origin": [7.5, 38.52853, -42.11327], "size": [0, 6, 11], "pivot": [7.5, 41.52853, -42.11327], "rotation": [0, 32.5, 0], "uv": [64, 93]}, ]
{"origin": [7.4, 38.52853, -42.11327], "size": [0, 6, 11], "pivot": [7.5, 41.52853, -42.11327], "rotation": [-47, 32.5, 0], "uv": [64, 93]} },
{
"name": "eye_brow_r",
"parent": "head",
"pivot": [-6.5, 50.52853, -47.61327],
"cubes": [
{"origin": [-8.5, 48.52853, -52.61327], "size": [4, 4, 10], "uv": [211, 10]}
]
},
{
"name": "eye_brow_l",
"parent": "head",
"pivot": [6.5, 50.52853, -47.61327],
"cubes": [
{"origin": [4.5, 48.52853, -52.61327], "size": [4, 4, 10], "uv": [211, 10], "mirror": true}
] ]
}, },
{ {
@@ -85,7 +105,7 @@
"parent": "head", "parent": "head",
"pivot": [0, 41.02853, -41.86327], "pivot": [0, 41.02853, -41.86327],
"cubes": [ "cubes": [
{"origin": [-7.5, 38.52853, -52.61327], "size": [15, 5, 11], "inflate": 0.01, "uv": [56, 186]}, {"origin": [-7.5, 38.52853, -52.61327], "size": [15, 5, 11], "inflate": 0.01, "uv": [56, 154]},
{"origin": [-5.5, 38.52853, -62.61327], "size": [11, 5, 10], "inflate": 0.01, "uv": [98, 34]}, {"origin": [-5.5, 38.52853, -62.61327], "size": [11, 5, 10], "inflate": 0.01, "uv": [98, 34]},
{"origin": [-5.5, 43.52853, -62.61327], "size": [11, 2, 10], "inflate": 0.01, "uv": [168, 19]} {"origin": [-5.5, 43.52853, -62.61327], "size": [11, 2, 10], "inflate": 0.01, "uv": [168, 19]}
] ]
@@ -95,7 +115,7 @@
"parent": "jaw", "parent": "jaw",
"pivot": [0, 45.52853, -44.73827], "pivot": [0, 45.52853, -44.73827],
"cubes": [ "cubes": [
{"origin": [-3.5, 44.52853, -52.61327], "size": [7, 2, 11], "uv": [194, 131]} {"origin": [-3.5, 44.52853, -52.61327], "size": [7, 2, 11], "uv": [214, 121]}
] ]
}, },
{ {
@@ -103,7 +123,7 @@
"parent": "tongue", "parent": "tongue",
"pivot": [0, 45.52853, -52.11327], "pivot": [0, 45.52853, -52.11327],
"cubes": [ "cubes": [
{"origin": [-3, 45.02853, -60.61327], "size": [6, 1, 8], "uv": [140, 192]} {"origin": [-3, 45.02853, -60.61327], "size": [6, 1, 8], "uv": [140, 160]}
] ]
}, },
{ {
@@ -111,17 +131,17 @@
"parent": "tongue_2", "parent": "tongue_2",
"pivot": [0, 45.52853, -60.61327], "pivot": [0, 45.52853, -60.61327],
"cubes": [ "cubes": [
{"origin": [1, 45.02853, -66.61327], "size": [2, 1, 6], "uv": [64, 110]}, {"origin": [1, 45.02853, -66.61327], "size": [2, 1, 6], "uv": [60, 56]},
{"origin": [-3, 45.02853, -66.61327], "size": [2, 1, 6], "uv": [64, 110], "mirror": true} {"origin": [-3, 45.02853, -66.61327], "size": [2, 1, 6], "uv": [60, 56], "mirror": true}
] ]
}, },
{ {
"name": "tail", "name": "tail",
"parent": "group2", "parent": "Basilisk",
"pivot": [0.05556, 10.92239, -11.85013], "pivot": [0.05556, 10.92239, -11.85013],
"cubes": [ "cubes": [
{"origin": [-7, -0.07761, -10.29457], "size": [14, 14, 35], "uv": [0, 0]}, {"origin": [-7, -0.07761, -10.29457], "size": [14, 14, 35], "uv": [0, 0]},
{"origin": [0, 13.92239, -10.29457], "size": [0, 6, 35], "uv": [88, 88]} {"origin": [0, 13.92239, -10.29457], "size": [0, 6, 35], "uv": [88, 56]}
] ]
}, },
{ {
@@ -130,7 +150,7 @@
"pivot": [0.07143, 10.63668, 23.70543], "pivot": [0.07143, 10.63668, 23.70543],
"cubes": [ "cubes": [
{"origin": [-6.5, 0.42239, 24.70543], "size": [13, 13, 31], "uv": [0, 49]}, {"origin": [-6.5, 0.42239, 24.70543], "size": [13, 13, 31], "uv": [0, 49]},
{"origin": [0, 12.92239, 24.70543], "size": [0, 6, 31], "uv": [132, 129]} {"origin": [0, 12.92239, 24.70543], "size": [0, 6, 31], "uv": [132, 97]}
] ]
}, },
{ {
@@ -139,7 +159,7 @@
"pivot": [0.1, 10.32239, 55.70543], "pivot": [0.1, 10.32239, 55.70543],
"cubes": [ "cubes": [
{"origin": [-6, 0.92239, 55.70543], "size": [12, 12, 27], "uv": [88, 49]}, {"origin": [-6, 0.92239, 55.70543], "size": [12, 12, 27], "uv": [88, 49]},
{"origin": [0, 12.92239, 55.70543], "size": [0, 6, 27], "uv": [158, 88]} {"origin": [0, 12.92239, 55.70543], "size": [0, 6, 27], "uv": [178, 78]}
] ]
}, },
{ {
@@ -147,8 +167,7 @@
"parent": "tail_3", "parent": "tail_3",
"pivot": [0.16667, 9.58906, 82.70543], "pivot": [0.16667, 9.58906, 82.70543],
"cubes": [ "cubes": [
{"origin": [-5.5, 1.92239, 82.70543], "size": [11, 10, 16], "uv": [166, 61]}, {"origin": [-5.5, 1.92239, 82.70543], "size": [11, 10, 16], "uv": [166, 61]}
{"origin": [0, 11.92239, 82.70543], "size": [0, 6, 16], "uv": [108, 192]}
] ]
}, },
{ {
@@ -156,7 +175,7 @@
"parent": "tail_4", "parent": "tail_4",
"pivot": [0.5, 6.92239, 98.70543], "pivot": [0.5, 6.92239, 98.70543],
"cubes": [ "cubes": [
{"origin": [-2, 3.92239, 98.70543], "size": [5, 6, 20], "uv": [120, 166]} {"origin": [-2.5, 3.92239, 98.70543], "size": [5, 6, 20], "uv": [120, 134]}
] ]
} }
] ]
@@ -0,0 +1,103 @@
{
"format_version": "1.21.11",
"render_type": "cutout",
"credit": "Made with Blockbench",
"texture_size": [32, 32],
"textures": {
"0": "antarchy:block/fallen_king_crown",
"particle": "antarchy:block/fallen_king_crown"
},
"elements": [
{
"from": [3.5, 0, 12.5],
"to": [12.5, 9, 12.5],
"rotation": {"angle": 0, "axis": "y", "origin": [3.5, 0, 3.5]},
"faces": {
"north": {"uv": [9, 0, 4.5, 4.5], "texture": "#0"},
"east": {"uv": [4.5, 0, 9, 4.5], "texture": "#0"},
"south": {"uv": [4.5, 0, 9, 4.5], "texture": "#0"},
"west": {"uv": [4.5, 0, 9, 4.5], "texture": "#0"},
"up": {"uv": [4.5, 0, 9, 4.5], "texture": "#0"},
"down": {"uv": [4.5, 0, 9, 4.5], "texture": "#0"}
}
},
{
"from": [3.5, 0, 3.5],
"to": [3.5, 9, 12.5],
"rotation": {"angle": 0, "axis": "y", "origin": [3.5, 0, 3.5]},
"faces": {
"north": {"uv": [4.5, 4.5, 9, 9], "texture": "#0"},
"east": {"uv": [9, 4.5, 4.5, 9], "texture": "#0"},
"south": {"uv": [4.5, 4.5, 9, 9], "texture": "#0"},
"west": {"uv": [4.5, 4.5, 9, 9], "texture": "#0"},
"up": {"uv": [4.5, 4.5, 9, 9], "texture": "#0"},
"down": {"uv": [4.5, 4.5, 9, 9], "texture": "#0"}
}
},
{
"from": [12.5, 0, 3.5],
"to": [12.5, 9, 12.5],
"rotation": {"angle": 0, "axis": "y", "origin": [3.5, 0, 3.5]},
"faces": {
"north": {"uv": [0, 4.5, 4.5, 9], "texture": "#0"},
"east": {"uv": [0, 4.5, 4.5, 9], "texture": "#0"},
"south": {"uv": [0, 4.5, 4.5, 9], "texture": "#0"},
"west": {"uv": [4.5, 4.5, 0, 9], "texture": "#0"},
"up": {"uv": [0, 4.5, 4.5, 9], "texture": "#0"},
"down": {"uv": [0, 4.5, 4.5, 9], "texture": "#0"}
}
},
{
"from": [3.5, 0, 3.5],
"to": [12.5, 9, 3.5],
"rotation": {"angle": 0, "axis": "y", "origin": [3.5, 0, 3.5]},
"faces": {
"north": {"uv": [0, 0, 4.5, 4.5], "texture": "#0"},
"east": {"uv": [0, 0, 4.5, 4.5], "texture": "#0"},
"south": {"uv": [4.5, 0, 0, 4.5], "texture": "#0"},
"west": {"uv": [0, 0, 4.5, 4.5], "texture": "#0"},
"up": {"uv": [0, 0, 4.5, 4.5], "texture": "#0"},
"down": {"uv": [0, 0, 4.5, 4.5], "texture": "#0"}
}
},
{
"from": [7, 5.5, 3.4],
"to": [9, 8.5, 3.4],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 1.5, 3.4]},
"faces": {
"north": {"uv": [15, 14.5, 16, 16], "texture": "#0"},
"east": {"uv": [0, 7, 1, 8.5], "texture": "#0"},
"south": {"uv": [1, 7, 0, 8.5], "texture": "#0"},
"west": {"uv": [0, 7, 1, 8.5], "texture": "#0"},
"up": {"uv": [0, 7, 1, 8.5], "texture": "#0"},
"down": {"uv": [0, 7, 1, 8.5], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"thirdperson_lefthand": {
"rotation": [75, 45, 0],
"translation": [0, 2.5, 0],
"scale": [0.375, 0.375, 0.375]
},
"firstperson_righthand": {
"rotation": [0, 45, 0],
"translation": [0, 2, 0],
"scale": [0.4, 0.4, 0.4]
},
"firstperson_lefthand": {
"rotation": [0, -135, 0],
"translation": [0, 2, 0],
"scale": [0.4, 0.4, 0.4]
},
"head": {
"translation": [0, 9.5, 0],
"scale": [1.7, 1.7, 1.7]
}
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

+2 -2
View File
@@ -1,7 +1,7 @@
{ {
"pack": { "pack": {
"description": "Integrated Antarchy mod resources", "description": "Antarchy mod resources",
"pack_format": 15, "pack_format": 15,
"_comment": "BOOGALOO" "_comment": "ANTS"
} }
} }
@@ -39,7 +39,6 @@ import com.craisinlord.antarchy.content.effect.ShrinkMobEffect;
import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.AppleCow; import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.AppleCow;
import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.EnchantedGoldenAppleCow; import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.EnchantedGoldenAppleCow;
import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.GoldenAppleCow; import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.GoldenAppleCow;
import com.craisinlord.antarchy.content.entity.AppleCowEntityVariants.HoneyedAppleCow;
import com.craisinlord.antarchy.content.entity.cloud_shark.CloudSharkEntity; import com.craisinlord.antarchy.content.entity.cloud_shark.CloudSharkEntity;
import com.craisinlord.antarchy.content.entity.BedBugEntity; import com.craisinlord.antarchy.content.entity.BedBugEntity;
import com.craisinlord.antarchy.content.entity.ButterflyEntity; import com.craisinlord.antarchy.content.entity.ButterflyEntity;
@@ -217,11 +216,6 @@ import net.minecraft.world.level.block.Mirror;
import net.minecraft.world.level.block.Rotation; import net.minecraft.world.level.block.Rotation;
public final class AntarchyFabricContent { public final class AntarchyFabricContent {
public static final boolean CREATE_LOADED = isModLoaded("create");
private static final ResourceLocation THORAXIS_DIMENSION_ID = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "thoraxis");
private static final long THORAXIS_SPAWN_DEBUG_INTERVAL = 200L;
private static long lastThoraxisSpawnSummaryLogTick = Long.MIN_VALUE;
private static long lastThoraxisSpawnPlacementLogTick = Long.MIN_VALUE;
private static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(Antarchy.MODID); private static final DeferredRegister.Blocks BLOCKS = DeferredRegister.createBlocks(Antarchy.MODID);
private static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(Antarchy.MODID); private static final DeferredRegister.Items ITEMS = DeferredRegister.createItems(Antarchy.MODID);
private static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, Antarchy.MODID); private static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, Antarchy.MODID);
@@ -782,6 +776,13 @@ public final class AntarchyFabricContent {
() -> new com.craisinlord.antarchy.content.block.AntimetalScaffoldingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SCAFFOLDING))); () -> new com.craisinlord.antarchy.content.block.AntimetalScaffoldingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SCAFFOLDING)));
public static final DeferredBlock<CorneaStalkBlock> CORNEA_STALK = BLOCKS.register("cornea_stalk", public static final DeferredBlock<CorneaStalkBlock> CORNEA_STALK = BLOCKS.register("cornea_stalk",
() -> new CorneaStalkBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SWEET_BERRY_BUSH).randomTicks())); () -> new CorneaStalkBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SWEET_BERRY_BUSH).randomTicks()));
public static final DeferredBlock<Block> FALLEN_KING_CROWN_BLOCK = BLOCKS.register("fallen_king_crown",
() -> new Block(BlockBehaviour.Properties.of()
.strength(0.2F)
.sound(SoundType.METAL)
.noOcclusion()
.isSuffocating((state, level, pos) -> false)
.isViewBlocking((state, level, pos) -> false)));
public static final DeferredBlock<AmethystClusterBlock> SMALL_BLOOD_CRYSTAL_BUD = BLOCKS.register("small_blood_crystal_bud", public static final DeferredBlock<AmethystClusterBlock> SMALL_BLOOD_CRYSTAL_BUD = BLOCKS.register("small_blood_crystal_bud",
() -> new AmethystClusterBlock(3.0F, 4.0F, BlockBehaviour.Properties.ofFullCopy(Blocks.SMALL_AMETHYST_BUD))); () -> new AmethystClusterBlock(3.0F, 4.0F, BlockBehaviour.Properties.ofFullCopy(Blocks.SMALL_AMETHYST_BUD)));
public static final DeferredBlock<AmethystClusterBlock> MEDIUM_BLOOD_CRYSTAL_BUD = BLOCKS.register("medium_blood_crystal_bud", public static final DeferredBlock<AmethystClusterBlock> MEDIUM_BLOOD_CRYSTAL_BUD = BLOCKS.register("medium_blood_crystal_bud",
@@ -1364,9 +1365,6 @@ public final class AntarchyFabricContent {
() -> buildCowType(GoldenAppleCow::new, "golden_apple_cow")); () -> buildCowType(GoldenAppleCow::new, "golden_apple_cow"));
public static final DeferredHolder<EntityType<?>, EntityType<EnchantedGoldenAppleCow>> ENCHANTED_GOLDEN_APPLE_COW = ENTITY_TYPES.register("enchanted_golden_apple_cow", public static final DeferredHolder<EntityType<?>, EntityType<EnchantedGoldenAppleCow>> ENCHANTED_GOLDEN_APPLE_COW = ENTITY_TYPES.register("enchanted_golden_apple_cow",
() -> buildCowType(EnchantedGoldenAppleCow::new, "enchanted_golden_apple_cow")); () -> buildCowType(EnchantedGoldenAppleCow::new, "enchanted_golden_apple_cow"));
public static final DeferredHolder<EntityType<?>, EntityType<HoneyedAppleCow>> HONEYED_APPLE_COW = CREATE_LOADED
? ENTITY_TYPES.register("honeyed_apple_cow", () -> buildCowType(HoneyedAppleCow::new, "honeyed_apple_cow"))
: null;
public static final DeferredHolder<EntityType<?>, EntityType<DrTrayaurusEntity>> DR_TRAYAURUS = ENTITY_TYPES.register("dr_trayaurus", public static final DeferredHolder<EntityType<?>, EntityType<DrTrayaurusEntity>> DR_TRAYAURUS = ENTITY_TYPES.register("dr_trayaurus",
() -> EntityType.Builder.of(DrTrayaurusEntity::new, MobCategory.MISC) () -> EntityType.Builder.of(DrTrayaurusEntity::new, MobCategory.MISC)
.sized(0.6F, 1.95F) .sized(0.6F, 1.95F)
@@ -1476,9 +1474,6 @@ public final class AntarchyFabricContent {
() -> new DeferredSpawnEggItem(GOLDEN_APPLE_COW, 0xFFE14A, 0x32FF32, new Item.Properties())); () -> new DeferredSpawnEggItem(GOLDEN_APPLE_COW, 0xFFE14A, 0x32FF32, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> ENCHANTED_GOLDEN_APPLE_COW_SPAWN_EGG = ITEMS.register("enchanted_golden_apple_cow_spawn_egg", public static final DeferredItem<DeferredSpawnEggItem> ENCHANTED_GOLDEN_APPLE_COW_SPAWN_EGG = ITEMS.register("enchanted_golden_apple_cow_spawn_egg",
() -> new DeferredSpawnEggItem(ENCHANTED_GOLDEN_APPLE_COW, 0x7040B6, 0xFFE14A, new Item.Properties())); () -> new DeferredSpawnEggItem(ENCHANTED_GOLDEN_APPLE_COW, 0x7040B6, 0xFFE14A, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> HONEYED_APPLE_COW_SPAWN_EGG = CREATE_LOADED
? ITEMS.register("honeyed_apple_cow_spawn_egg", () -> new DeferredSpawnEggItem(HONEYED_APPLE_COW, 0xC07A23, 0xF0C75A, new Item.Properties()))
: null;
public static final DeferredItem<DeferredSpawnEggItem> DR_TRAYAURUS_SPAWN_EGG = ITEMS.register("dr_trayaurus_spawn_egg", public static final DeferredItem<DeferredSpawnEggItem> DR_TRAYAURUS_SPAWN_EGG = ITEMS.register("dr_trayaurus_spawn_egg",
() -> new DeferredSpawnEggItem(DR_TRAYAURUS, 0xB7A27B, 0x4A3D29, new Item.Properties())); () -> new DeferredSpawnEggItem(DR_TRAYAURUS, 0xB7A27B, 0x4A3D29, new Item.Properties()));
public static final DeferredItem<DeferredSpawnEggItem> WASP_SPAWN_EGG = ITEMS.register("wasp_spawn_egg", public static final DeferredItem<DeferredSpawnEggItem> WASP_SPAWN_EGG = ITEMS.register("wasp_spawn_egg",
@@ -1575,10 +1570,6 @@ public final class AntarchyFabricContent {
FabricDefaultAttributeRegistry.register(APPLE_COW.get(), cowAttributes); FabricDefaultAttributeRegistry.register(APPLE_COW.get(), cowAttributes);
FabricDefaultAttributeRegistry.register(GOLDEN_APPLE_COW.get(), cowAttributes); FabricDefaultAttributeRegistry.register(GOLDEN_APPLE_COW.get(), cowAttributes);
FabricDefaultAttributeRegistry.register(ENCHANTED_GOLDEN_APPLE_COW.get(), cowAttributes); FabricDefaultAttributeRegistry.register(ENCHANTED_GOLDEN_APPLE_COW.get(), cowAttributes);
if (CREATE_LOADED && HONEYED_APPLE_COW != null) {
FabricDefaultAttributeRegistry.register(HONEYED_APPLE_COW.get(), cowAttributes);
}
FabricDefaultAttributeRegistry.register(DR_TRAYAURUS.get(), Villager.createAttributes().build()); FabricDefaultAttributeRegistry.register(DR_TRAYAURUS.get(), Villager.createAttributes().build());
FabricDefaultAttributeRegistry.register(CLOUD_SHARK.get(), CloudSharkEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(CLOUD_SHARK.get(), CloudSharkEntity.createAttributes().build());
FabricDefaultAttributeRegistry.register(KRAKEN.get(), KrakenEntity.createAttributes().build()); FabricDefaultAttributeRegistry.register(KRAKEN.get(), KrakenEntity.createAttributes().build());
@@ -1622,9 +1613,6 @@ public final class AntarchyFabricContent {
SpawnPlacements.register(APPLE_COW.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules); SpawnPlacements.register(APPLE_COW.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules);
SpawnPlacements.register(GOLDEN_APPLE_COW.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules); SpawnPlacements.register(GOLDEN_APPLE_COW.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules);
SpawnPlacements.register(ENCHANTED_GOLDEN_APPLE_COW.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules); SpawnPlacements.register(ENCHANTED_GOLDEN_APPLE_COW.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules);
if (CREATE_LOADED && HONEYED_APPLE_COW != null) {
SpawnPlacements.register(HONEYED_APPLE_COW.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, Cow::checkAnimalSpawnRules);
}
SpawnPlacements.register(CLOUD_SHARK.get(), SpawnPlacementTypes.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CloudSharkEntity::canSpawn); SpawnPlacements.register(CLOUD_SHARK.get(), SpawnPlacementTypes.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, CloudSharkEntity::canSpawn);
SpawnPlacements.register(WASP.get(), SpawnPlacementTypes.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, WaspEntity::canSpawn); SpawnPlacements.register(WASP.get(), SpawnPlacementTypes.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, WaspEntity::canSpawn);
SpawnPlacements.register(BOMBER.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, BomberEntity::canSpawn); SpawnPlacements.register(BOMBER.get(), SpawnPlacementTypes.ON_GROUND, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, BomberEntity::canSpawn);
@@ -183,6 +183,7 @@ public final class AntarchyFabricClientBootstrap {
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.TORCHFLOWER_BUSH.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.TORCHFLOWER_BUSH.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.HUSHWEED.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.HUSHWEED.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.CORNEA_STALK.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.CORNEA_STALK.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.FALLEN_KING_CROWN_BLOCK.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.ANTIMETAL_SCAFFOLDING.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.ANTIMETAL_SCAFFOLDING.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.UMBRAL_MOSS_CARPET.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.UMBRAL_MOSS_CARPET.get(), RenderType.cutout());
BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.NYXITE_SPIKE.get(), RenderType.cutout()); BlockRenderLayerMap.INSTANCE.putBlock(AntarchyFabricContent.NYXITE_SPIKE.get(), RenderType.cutout());
@@ -2,28 +2,24 @@ package com.craisinlord.antarchy.fabric.client;
import com.craisinlord.antarchy.fabric.AntarchyFabricContent; import com.craisinlord.antarchy.fabric.AntarchyFabricContent;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.ItemRenderer;
import net.minecraft.client.model.PlayerModel; import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.player.AbstractClientPlayer; import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.RenderLayerParent;
import net.minecraft.client.renderer.entity.layers.RenderLayer; import net.minecraft.client.renderer.entity.layers.RenderLayer;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
public final class FallenKingCrownLayer extends RenderLayer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> { public final class FallenKingCrownLayer extends RenderLayer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> {
private static final ModelResourceLocation WORN_MODEL = ModelResourceLocation.inventory( private final BlockRenderDispatcher blockRenderer;
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("antarchy", "fallen_king_crown_worn")
);
private final ItemRenderer itemRenderer;
public FallenKingCrownLayer(RenderLayerParent<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> renderer) { public FallenKingCrownLayer(RenderLayerParent<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> renderer) {
super(renderer); super(renderer);
this.itemRenderer = Minecraft.getInstance().getItemRenderer(); this.blockRenderer = Minecraft.getInstance().getBlockRenderer();
} }
@Override @Override
@@ -46,15 +42,15 @@ public final class FallenKingCrownLayer extends RenderLayer<AbstractClientPlayer
poseStack.pushPose(); poseStack.pushPose();
this.getParentModel().head.translateAndRotate(poseStack); this.getParentModel().head.translateAndRotate(poseStack);
this.itemRenderer.render( poseStack.translate(0.5D, -0.125D, -0.5D);
headStack, poseStack.mulPose(Axis.XP.rotationDegrees(180.0F));
ItemDisplayContext.HEAD, poseStack.mulPose(Axis.YP.rotationDegrees(180.0F));
false, this.blockRenderer.renderSingleBlock(
AntarchyFabricContent.FALLEN_KING_CROWN_BLOCK.get().defaultBlockState(),
poseStack, poseStack,
buffer, buffer,
packedLight, packedLight,
LivingEntityRenderer.getOverlayCoords(player, 0.0F), LivingEntityRenderer.getOverlayCoords(player, 0.0F)
Minecraft.getInstance().getModelManager().getModel(WORN_MODEL)
); );
poseStack.popPose(); poseStack.popPose();
} }
@@ -1,29 +1,26 @@
package com.craisinlord.antarchy.neoforge.client; package com.craisinlord.antarchy.neoforge.client;
import com.craisinlord.antarchy.neoforge.registry.AntarchyNeoforgeBlocks;
import com.craisinlord.antarchy.neoforge.registry.AntarchyNeoforgeItems; import com.craisinlord.antarchy.neoforge.registry.AntarchyNeoforgeItems;
import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.math.Axis;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.entity.ItemRenderer;
import net.minecraft.client.model.PlayerModel; import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.player.AbstractClientPlayer; import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.client.renderer.block.BlockRenderDispatcher;
import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.LivingEntityRenderer; import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.client.renderer.entity.RenderLayerParent; import net.minecraft.client.renderer.entity.RenderLayerParent;
import net.minecraft.client.renderer.entity.layers.RenderLayer; import net.minecraft.client.renderer.entity.layers.RenderLayer;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ItemDisplayContext;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
public final class FallenKingCrownLayer extends RenderLayer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> { public final class FallenKingCrownLayer extends RenderLayer<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> {
private static final ModelResourceLocation WORN_MODEL = ModelResourceLocation.inventory( private final BlockRenderDispatcher blockRenderer;
net.minecraft.resources.ResourceLocation.fromNamespaceAndPath("antarchy", "fallen_king_crown_worn")
);
private final ItemRenderer itemRenderer;
public FallenKingCrownLayer(RenderLayerParent<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> renderer) { public FallenKingCrownLayer(RenderLayerParent<AbstractClientPlayer, PlayerModel<AbstractClientPlayer>> renderer) {
super(renderer); super(renderer);
this.itemRenderer = Minecraft.getInstance().getItemRenderer(); this.blockRenderer = Minecraft.getInstance().getBlockRenderer();
} }
@Override @Override
@@ -46,15 +43,15 @@ public final class FallenKingCrownLayer extends RenderLayer<AbstractClientPlayer
poseStack.pushPose(); poseStack.pushPose();
this.getParentModel().head.translateAndRotate(poseStack); this.getParentModel().head.translateAndRotate(poseStack);
this.itemRenderer.render( poseStack.translate(0.5D, -0.125D, -0.5D);
headStack, poseStack.mulPose(Axis.XP.rotationDegrees(180.0F));
ItemDisplayContext.HEAD, poseStack.mulPose(Axis.YP.rotationDegrees(180.0F));
false, this.blockRenderer.renderSingleBlock(
AntarchyNeoforgeBlocks.FALLEN_KING_CROWN.get().defaultBlockState(),
poseStack, poseStack,
buffer, buffer,
packedLight, packedLight,
LivingEntityRenderer.getOverlayCoords(player, 0.0F), LivingEntityRenderer.getOverlayCoords(player, 0.0F)
Minecraft.getInstance().getModelManager().getModel(WORN_MODEL)
); );
poseStack.popPose(); poseStack.popPose();
} }
@@ -241,6 +241,13 @@ public final class AntarchyNeoforgeBlocks {
() -> new com.craisinlord.antarchy.content.block.AntimetalScaffoldingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SCAFFOLDING))); () -> new com.craisinlord.antarchy.content.block.AntimetalScaffoldingBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SCAFFOLDING)));
public static final DeferredBlock<CorneaStalkBlock> CORNEA_STALK = BLOCKS.register("cornea_stalk", public static final DeferredBlock<CorneaStalkBlock> CORNEA_STALK = BLOCKS.register("cornea_stalk",
() -> new CorneaStalkBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SWEET_BERRY_BUSH).randomTicks())); () -> new CorneaStalkBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.SWEET_BERRY_BUSH).randomTicks()));
public static final DeferredBlock<Block> FALLEN_KING_CROWN = BLOCKS.register("fallen_king_crown",
() -> new Block(BlockBehaviour.Properties.of()
.strength(0.2F)
.sound(SoundType.METAL)
.noOcclusion()
.isSuffocating((state, level, pos) -> false)
.isViewBlocking((state, level, pos) -> false)));
public static final DeferredBlock<AmethystClusterBlock> SMALL_BLOOD_CRYSTAL_BUD = BLOCKS.register("small_blood_crystal_bud", public static final DeferredBlock<AmethystClusterBlock> SMALL_BLOOD_CRYSTAL_BUD = BLOCKS.register("small_blood_crystal_bud",
() -> new AmethystClusterBlock(3.0F, 4.0F, BlockBehaviour.Properties.ofFullCopy(Blocks.SMALL_AMETHYST_BUD))); () -> new AmethystClusterBlock(3.0F, 4.0F, BlockBehaviour.Properties.ofFullCopy(Blocks.SMALL_AMETHYST_BUD)));
public static final DeferredBlock<AmethystClusterBlock> MEDIUM_BLOOD_CRYSTAL_BUD = BLOCKS.register("medium_blood_crystal_bud", public static final DeferredBlock<AmethystClusterBlock> MEDIUM_BLOOD_CRYSTAL_BUD = BLOCKS.register("medium_blood_crystal_bud",