Update to BCLib 0.3.0
This commit is contained in:
parent
1a52251af0
commit
b2431153dc
294 changed files with 7484 additions and 1440 deletions
|
@ -37,8 +37,14 @@ import java.util.Random;
|
|||
|
||||
public class CubozoaEntity extends AbstractSchoolingFish {
|
||||
public static final int VARIANTS = 2;
|
||||
private static final EntityDataAccessor<Byte> VARIANT = SynchedEntityData.defineId(CubozoaEntity.class, EntityDataSerializers.BYTE);
|
||||
private static final EntityDataAccessor<Byte> SCALE = SynchedEntityData.defineId(CubozoaEntity.class, EntityDataSerializers.BYTE);
|
||||
private static final EntityDataAccessor<Byte> VARIANT = SynchedEntityData.defineId(
|
||||
CubozoaEntity.class,
|
||||
EntityDataSerializers.BYTE
|
||||
);
|
||||
private static final EntityDataAccessor<Byte> SCALE = SynchedEntityData.defineId(
|
||||
CubozoaEntity.class,
|
||||
EntityDataSerializers.BYTE
|
||||
);
|
||||
|
||||
public CubozoaEntity(EntityType<CubozoaEntity> entityType, Level world) {
|
||||
super(entityType, world);
|
||||
|
@ -100,7 +106,10 @@ public class CubozoaEntity extends AbstractSchoolingFish {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes().add(Attributes.MAX_HEALTH, 2.0).add(Attributes.FOLLOW_RANGE, 16.0).add(Attributes.MOVEMENT_SPEED, 0.5);
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.5);
|
||||
}
|
||||
|
||||
public int getVariant() {
|
||||
|
@ -145,7 +154,10 @@ public class CubozoaEntity extends AbstractSchoolingFish {
|
|||
public void playerTouch(Player player) {
|
||||
if (player instanceof ServerPlayer && player.hurt(DamageSource.mobAttack(this), 0.5F)) {
|
||||
if (!this.isSilent()) {
|
||||
((ServerPlayer) player).connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.PUFFER_FISH_STING, 0.0F));
|
||||
((ServerPlayer) player).connection.send(new ClientboundGameEventPacket(
|
||||
ClientboundGameEventPacket.PUFFER_FISH_STING,
|
||||
0.0F
|
||||
));
|
||||
}
|
||||
if (random.nextBoolean()) {
|
||||
player.addEffect(new MobEffectInstance(MobEffects.POISON, 20, 0));
|
||||
|
|
|
@ -52,7 +52,11 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes().add(Attributes.MAX_HEALTH, 8.0D).add(Attributes.FOLLOW_RANGE, 16.0D).add(Attributes.FLYING_SPEED, 1.0D).add(Attributes.MOVEMENT_SPEED, 0.1D);
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 8.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.FLYING_SPEED, 1.0D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.1D);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -172,7 +176,16 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
if (airPos != null) {
|
||||
if (isInVoid(airPos)) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
airPos = HoverRandomPos.getPos(DragonflyEntity.this, 16, 7, rotation.x, rotation.z, MHelper.PI2, 3, 1);
|
||||
airPos = HoverRandomPos.getPos(
|
||||
DragonflyEntity.this,
|
||||
16,
|
||||
7,
|
||||
rotation.x,
|
||||
rotation.z,
|
||||
MHelper.PI2,
|
||||
3,
|
||||
1
|
||||
);
|
||||
if (airPos != null && !isInVoid(airPos)) {
|
||||
return airPos;
|
||||
}
|
||||
|
@ -184,7 +197,15 @@ public class DragonflyEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
return airPos;
|
||||
}
|
||||
return AirAndWaterRandomPos.getPos(DragonflyEntity.this, 8, 4, -2, rotation.x, rotation.z, 1.5707963705062866D);
|
||||
return AirAndWaterRandomPos.getPos(
|
||||
DragonflyEntity.this,
|
||||
8,
|
||||
4,
|
||||
-2,
|
||||
rotation.x,
|
||||
rotation.z,
|
||||
1.5707963705062866D
|
||||
);
|
||||
}
|
||||
|
||||
private boolean isInVoid(Vec3 pos) {
|
||||
|
|
|
@ -34,8 +34,14 @@ public class EndFishEntity extends AbstractSchoolingFish {
|
|||
public static final int VARIANTS_NORMAL = 5;
|
||||
public static final int VARIANTS_SULPHUR = 3;
|
||||
public static final int VARIANTS = VARIANTS_NORMAL + VARIANTS_SULPHUR;
|
||||
private static final EntityDataAccessor<Byte> VARIANT = SynchedEntityData.defineId(EndFishEntity.class, EntityDataSerializers.BYTE);
|
||||
private static final EntityDataAccessor<Byte> SCALE = SynchedEntityData.defineId(EndFishEntity.class, EntityDataSerializers.BYTE);
|
||||
private static final EntityDataAccessor<Byte> VARIANT = SynchedEntityData.defineId(
|
||||
EndFishEntity.class,
|
||||
EntityDataSerializers.BYTE
|
||||
);
|
||||
private static final EntityDataAccessor<Byte> SCALE = SynchedEntityData.defineId(
|
||||
EndFishEntity.class,
|
||||
EntityDataSerializers.BYTE
|
||||
);
|
||||
|
||||
public EndFishEntity(EntityType<EndFishEntity> entityType, Level world) {
|
||||
super(entityType, world);
|
||||
|
@ -128,7 +134,10 @@ public class EndFishEntity extends AbstractSchoolingFish {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes().add(Attributes.MAX_HEALTH, 2.0).add(Attributes.FOLLOW_RANGE, 16.0).add(Attributes.MOVEMENT_SPEED, 0.75);
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.75);
|
||||
}
|
||||
|
||||
public int getVariant() {
|
||||
|
|
|
@ -46,7 +46,10 @@ import java.util.List;
|
|||
import java.util.Random;
|
||||
|
||||
public class EndSlimeEntity extends Slime {
|
||||
private static final EntityDataAccessor<Byte> VARIANT = SynchedEntityData.defineId(EndSlimeEntity.class, EntityDataSerializers.BYTE);
|
||||
private static final EntityDataAccessor<Byte> VARIANT = SynchedEntityData.defineId(
|
||||
EndSlimeEntity.class,
|
||||
EntityDataSerializers.BYTE
|
||||
);
|
||||
private static final MutableBlockPos POS = new MutableBlockPos();
|
||||
|
||||
public EndSlimeEntity(EntityType<EndSlimeEntity> entityType, Level world) {
|
||||
|
@ -59,14 +62,21 @@ public class EndSlimeEntity extends Slime {
|
|||
this.goalSelector.addGoal(2, new FaceTowardTargetGoal());
|
||||
this.goalSelector.addGoal(3, new RandomLookGoal());
|
||||
this.goalSelector.addGoal(5, new MoveGoal());
|
||||
this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<Player>(this, Player.class, 10, true, false, (livingEntity) -> {
|
||||
return Math.abs(livingEntity.getY() - this.getY()) <= 4.0D;
|
||||
}));
|
||||
this.targetSelector.addGoal(
|
||||
1,
|
||||
new NearestAttackableTargetGoal<Player>(this, Player.class, 10, true, false, (livingEntity) -> {
|
||||
return Math.abs(livingEntity.getY() - this.getY()) <= 4.0D;
|
||||
})
|
||||
);
|
||||
this.targetSelector.addGoal(3, new NearestAttackableTargetGoal<IronGolem>(this, IronGolem.class, true));
|
||||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes().add(Attributes.MAX_HEALTH, 1.0D).add(Attributes.ATTACK_DAMAGE, 1.0D).add(Attributes.FOLLOW_RANGE, 16.0D).add(Attributes.MOVEMENT_SPEED, 0.15D);
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 1.0D)
|
||||
.add(Attributes.ATTACK_DAMAGE, 1.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.15D);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -136,7 +146,13 @@ public class EndSlimeEntity extends Slime {
|
|||
slimeEntity.setInvulnerable(this.isInvulnerable());
|
||||
((ISlime) slimeEntity).be_setSlimeSize(j, true);
|
||||
slimeEntity.refreshDimensions();
|
||||
slimeEntity.moveTo(this.getX() + (double) g, this.getY() + 0.5D, this.getZ() + (double) h, this.random.nextFloat() * 360.0F, 0.0F);
|
||||
slimeEntity.moveTo(
|
||||
this.getX() + (double) g,
|
||||
this.getY() + 0.5D,
|
||||
this.getZ() + (double) h,
|
||||
this.random.nextFloat() * 360.0F,
|
||||
0.0F
|
||||
);
|
||||
this.level.addFreshEntity(slimeEntity);
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +213,12 @@ public class EndSlimeEntity extends Slime {
|
|||
}
|
||||
|
||||
public static boolean canSpawn(EntityType<EndSlimeEntity> type, ServerLevelAccessor world, MobSpawnType spawnReason, BlockPos pos, Random random) {
|
||||
return random.nextInt(16) == 0 || isPermanentBiome(world, pos) || (notManyEntities(world, pos, 32, 3) && isWaterNear(world, pos, 32, 8));
|
||||
return random.nextInt(16) == 0 || isPermanentBiome(world, pos) || (notManyEntities(
|
||||
world,
|
||||
pos,
|
||||
32,
|
||||
3
|
||||
) && isWaterNear(world, pos, 32, 8));
|
||||
}
|
||||
|
||||
private static boolean isPermanentBiome(ServerLevelAccessor world, BlockPos pos) {
|
||||
|
@ -285,7 +306,8 @@ public class EndSlimeEntity extends Slime {
|
|||
}
|
||||
|
||||
public boolean canUse() {
|
||||
return EndSlimeEntity.this.getTarget() == null && (EndSlimeEntity.this.onGround || EndSlimeEntity.this.isInWater() || EndSlimeEntity.this.isInLava() || EndSlimeEntity.this.hasEffect(MobEffects.LEVITATION)) && EndSlimeEntity.this.getMoveControl() instanceof EndSlimeMoveControl;
|
||||
return EndSlimeEntity.this.getTarget() == null && (EndSlimeEntity.this.onGround || EndSlimeEntity.this.isInWater() || EndSlimeEntity.this
|
||||
.isInLava() || EndSlimeEntity.this.hasEffect(MobEffects.LEVITATION)) && EndSlimeEntity.this.getMoveControl() instanceof EndSlimeMoveControl;
|
||||
}
|
||||
|
||||
public void tick() {
|
||||
|
@ -314,7 +336,8 @@ public class EndSlimeEntity extends Slime {
|
|||
return false;
|
||||
}
|
||||
else {
|
||||
return livingEntity instanceof Player && ((Player) livingEntity).getAbilities().invulnerable ? false : EndSlimeEntity.this.getMoveControl() instanceof EndSlimeMoveControl;
|
||||
return livingEntity instanceof Player && ((Player) livingEntity).getAbilities().invulnerable ? false : EndSlimeEntity.this
|
||||
.getMoveControl() instanceof EndSlimeMoveControl;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -341,7 +364,10 @@ public class EndSlimeEntity extends Slime {
|
|||
|
||||
public void tick() {
|
||||
EndSlimeEntity.this.lookAt(EndSlimeEntity.this.getTarget(), 10.0F, 10.0F);
|
||||
((EndSlimeMoveControl) EndSlimeEntity.this.getMoveControl()).look(EndSlimeEntity.this.getYRot(), EndSlimeEntity.this.isDealsDamage());
|
||||
((EndSlimeMoveControl) EndSlimeEntity.this.getMoveControl()).look(
|
||||
EndSlimeEntity.this.getYRot(),
|
||||
EndSlimeEntity.this.isDealsDamage()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -384,7 +410,11 @@ public class EndSlimeEntity extends Slime {
|
|||
|
||||
EndSlimeEntity.this.getJumpControl().jump();
|
||||
if (EndSlimeEntity.this.doPlayJumpSound()) {
|
||||
EndSlimeEntity.this.playSound(EndSlimeEntity.this.getJumpSound(), EndSlimeEntity.this.getSoundVolume(), getJumpSoundPitch());
|
||||
EndSlimeEntity.this.playSound(
|
||||
EndSlimeEntity.this.getJumpSound(),
|
||||
EndSlimeEntity.this.getSoundVolume(),
|
||||
getJumpSoundPitch()
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -44,15 +44,44 @@ public class ShadowWalkerEntity extends Monster {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return Monster.createMonsterAttributes().add(Attributes.FOLLOW_RANGE, 35.0).add(Attributes.MOVEMENT_SPEED, 0.15).add(Attributes.ATTACK_DAMAGE, 4.5).add(Attributes.ARMOR, 2.0).add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
|
||||
return Monster.createMonsterAttributes()
|
||||
.add(Attributes.FOLLOW_RANGE, 35.0)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.15)
|
||||
.add(Attributes.ATTACK_DAMAGE, 4.5)
|
||||
.add(Attributes.ARMOR, 2.0)
|
||||
.add(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
super.tick();
|
||||
level.addParticle(ParticleTypes.ASH, getX() + random.nextGaussian() * 0.2, getY() + random.nextGaussian() * 0.5 + 1, getZ() + random.nextGaussian() * 0.2, 0, 0, 0);
|
||||
level.addParticle(ParticleTypes.SMOKE, getX() + random.nextGaussian() * 0.2, getY() + random.nextGaussian() * 0.5 + 1, getZ() + random.nextGaussian() * 0.2, 0, 0, 0);
|
||||
level.addParticle(ParticleTypes.ENTITY_EFFECT, getX() + random.nextGaussian() * 0.2, getY() + random.nextGaussian() * 0.5 + 1, getZ() + random.nextGaussian() * 0.2, 0, 0, 0);
|
||||
level.addParticle(
|
||||
ParticleTypes.ASH,
|
||||
getX() + random.nextGaussian() * 0.2,
|
||||
getY() + random.nextGaussian() * 0.5 + 1,
|
||||
getZ() + random.nextGaussian() * 0.2,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
);
|
||||
level.addParticle(
|
||||
ParticleTypes.SMOKE,
|
||||
getX() + random.nextGaussian() * 0.2,
|
||||
getY() + random.nextGaussian() * 0.5 + 1,
|
||||
getZ() + random.nextGaussian() * 0.2,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
);
|
||||
level.addParticle(
|
||||
ParticleTypes.ENTITY_EFFECT,
|
||||
getX() + random.nextGaussian() * 0.2,
|
||||
getY() + random.nextGaussian() * 0.5 + 1,
|
||||
getZ() + random.nextGaussian() * 0.2,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -70,7 +70,11 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
|
|||
}
|
||||
|
||||
public static AttributeSupplier.Builder createMobAttributes() {
|
||||
return LivingEntity.createLivingAttributes().add(Attributes.MAX_HEALTH, 2.0D).add(Attributes.FOLLOW_RANGE, 16.0D).add(Attributes.FLYING_SPEED, 0.4D).add(Attributes.MOVEMENT_SPEED, 0.1D);
|
||||
return LivingEntity.createLivingAttributes()
|
||||
.add(Attributes.MAX_HEALTH, 2.0D)
|
||||
.add(Attributes.FOLLOW_RANGE, 16.0D)
|
||||
.add(Attributes.FLYING_SPEED, 0.4D)
|
||||
.add(Attributes.MOVEMENT_SPEED, 0.1D);
|
||||
}
|
||||
|
||||
public void setHive(Level world, BlockPos hive) {
|
||||
|
@ -220,14 +224,21 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
|
|||
public void start() {
|
||||
Vec3 vec3d = null;
|
||||
if (SilkMothEntity.this.hivePos != null && SilkMothEntity.this.hiveWorld == SilkMothEntity.this.level) {
|
||||
if (SilkMothEntity.this.position().distanceToSqr(SilkMothEntity.this.hivePos.getX(), SilkMothEntity.this.hivePos.getY(), SilkMothEntity.this.hivePos.getZ()) > 16) {
|
||||
if (SilkMothEntity.this.position()
|
||||
.distanceToSqr(SilkMothEntity.this.hivePos.getX(),
|
||||
SilkMothEntity.this.hivePos.getY(),
|
||||
SilkMothEntity.this.hivePos.getZ()
|
||||
) > 16) {
|
||||
vec3d = SilkMothEntity.this.position().add(random.nextGaussian() * 2, 0, random.nextGaussian() * 2);
|
||||
}
|
||||
}
|
||||
vec3d = vec3d == null ? this.getRandomLocation() : vec3d;
|
||||
if (vec3d != null) {
|
||||
try {
|
||||
SilkMothEntity.this.navigation.moveTo(SilkMothEntity.this.navigation.createPath(new BlockPos(vec3d), 1), 1.0D);
|
||||
SilkMothEntity.this.navigation.moveTo(SilkMothEntity.this.navigation.createPath(
|
||||
new BlockPos(vec3d),
|
||||
1
|
||||
), 1.0D);
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
|
@ -238,7 +249,15 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
|
|||
private Vec3 getRandomLocation() {
|
||||
Vec3 vec3d3 = SilkMothEntity.this.getViewVector(0.0F);
|
||||
Vec3 vec3d4 = HoverRandomPos.getPos(SilkMothEntity.this, 8, 7, vec3d3.x, vec3d3.z, 1.5707964F, 3, 1);
|
||||
return vec3d4 != null ? vec3d4 : AirAndWaterRandomPos.getPos(SilkMothEntity.this, 8, 4, -2, vec3d3.x, vec3d3.z, 1.5707963705062866D);
|
||||
return vec3d4 != null ? vec3d4 : AirAndWaterRandomPos.getPos(
|
||||
SilkMothEntity.this,
|
||||
8,
|
||||
4,
|
||||
-2,
|
||||
vec3d3.x,
|
||||
vec3d3.z,
|
||||
1.5707963705062866D
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -249,12 +268,25 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
|
|||
|
||||
@Override
|
||||
public boolean canUse() {
|
||||
return SilkMothEntity.this.hivePos != null && SilkMothEntity.this.hiveWorld == SilkMothEntity.this.level && SilkMothEntity.this.navigation.isDone() && SilkMothEntity.this.random.nextInt(16) == 0 && SilkMothEntity.this.position().distanceToSqr(SilkMothEntity.this.hivePos.getX(), SilkMothEntity.this.hivePos.getY(), SilkMothEntity.this.hivePos.getZ()) < 64;
|
||||
return SilkMothEntity.this.hivePos != null && SilkMothEntity.this.hiveWorld == SilkMothEntity.this.level && SilkMothEntity.this.navigation
|
||||
.isDone() && SilkMothEntity.this.random.nextInt(16) == 0 && SilkMothEntity.this.position()
|
||||
.distanceToSqr(
|
||||
SilkMothEntity.this.hivePos
|
||||
.getX(),
|
||||
SilkMothEntity.this.hivePos
|
||||
.getY(),
|
||||
SilkMothEntity.this.hivePos
|
||||
.getZ()
|
||||
) < 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canContinueToUse() {
|
||||
return SilkMothEntity.this.navigation.isInProgress() && level.getBlockState(entrance).isAir() && (level.getBlockState(hivePos).is(EndBlocks.SILK_MOTH_NEST) || level.getBlockState(hivePos).is(EndBlocks.SILK_MOTH_HIVE));
|
||||
return SilkMothEntity.this.navigation.isInProgress() && level.getBlockState(entrance)
|
||||
.isAir() && (level.getBlockState(hivePos)
|
||||
.is(EndBlocks.SILK_MOTH_NEST) || level
|
||||
.getBlockState(hivePos)
|
||||
.is(EndBlocks.SILK_MOTH_HIVE));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -291,9 +323,20 @@ public class SilkMothEntity extends Animal implements FlyingAnimal {
|
|||
if (fullness > 3) {
|
||||
fullness = 3;
|
||||
}
|
||||
BlocksHelper.setWithUpdate(SilkMothEntity.this.hiveWorld, SilkMothEntity.this.hivePos, state.setValue(EndBlockProperties.FULLNESS, fullness));
|
||||
BlocksHelper.setWithUpdate(
|
||||
SilkMothEntity.this.hiveWorld,
|
||||
SilkMothEntity.this.hivePos,
|
||||
state.setValue(EndBlockProperties.FULLNESS, fullness)
|
||||
);
|
||||
}
|
||||
SilkMothEntity.this.level.playSound(null, SilkMothEntity.this.entrance, SoundEvents.BEEHIVE_ENTER, SoundSource.BLOCKS, 1, 1);
|
||||
SilkMothEntity.this.level.playSound(
|
||||
null,
|
||||
SilkMothEntity.this.entrance,
|
||||
SoundEvents.BEEHIVE_ENTER,
|
||||
SoundSource.BLOCKS,
|
||||
1,
|
||||
1
|
||||
);
|
||||
SilkMothEntity.this.discard();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -26,14 +26,30 @@ public class CubozoaEntityModel extends BlockBenchModel<CubozoaEntity> {
|
|||
MeshDefinition modelData = new MeshDefinition();
|
||||
PartDefinition modelPartData = modelData.getRoot();
|
||||
|
||||
PartDefinition bodyPart = modelPartData.addOrReplaceChild(PartNames.BODY, CubeListBuilder.create().texOffs(0, 17).addBox(-2.0F, -12.5F, -2.0F, 4.0F, 4.0F, 4.0F), PartPose.offset(0.0F, 24.0F, 0.0F));
|
||||
PartDefinition bodyPart = modelPartData.addOrReplaceChild(
|
||||
PartNames.BODY,
|
||||
CubeListBuilder.create().texOffs(0, 17).addBox(-2.0F, -12.5F, -2.0F, 4.0F, 4.0F, 4.0F),
|
||||
PartPose.offset(0.0F, 24.0F, 0.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild("main_cube_r1", CubeListBuilder.create().texOffs(0, 0).addBox(-5.0F, -7.0F, -5.0F, 10.0F, 7.0F, 10.0F), PartPose.offsetAndRotation(0.0F, -14.0F, 0.0F, 0.0F, 0.0F, -3.1416F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
"main_cube_r1",
|
||||
CubeListBuilder.create().texOffs(0, 0).addBox(-5.0F, -7.0F, -5.0F, 10.0F, 7.0F, 10.0F),
|
||||
PartPose.offsetAndRotation(0.0F, -14.0F, 0.0F, 0.0F, 0.0F, -3.1416F)
|
||||
);
|
||||
|
||||
for (int i = 1; i <= TENTACLE_COUNT; i++) {
|
||||
PartDefinition tentaclePart = bodyPart.addOrReplaceChild("tentacle_center_" + i, CubeListBuilder.create(), PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, i * 1.5708F, 0.0F));
|
||||
PartDefinition tentaclePart = bodyPart.addOrReplaceChild(
|
||||
"tentacle_center_" + i,
|
||||
CubeListBuilder.create(),
|
||||
PartPose.offsetAndRotation(0.0F, 0.0F, 0.0F, 0.0F, i * 1.5708F, 0.0F)
|
||||
);
|
||||
|
||||
tentaclePart.addOrReplaceChild("tentacle_" + i, CubeListBuilder.create().texOffs(16, 17).addBox(-4.0F, 0.0F, 0.0F, 8.0F, 7.0F, 0.0F), PartPose.offset(0.0F, -7.0F, 4.5F));
|
||||
tentaclePart.addOrReplaceChild(
|
||||
"tentacle_" + i,
|
||||
CubeListBuilder.create().texOffs(16, 17).addBox(-4.0F, 0.0F, 0.0F, 8.0F, 7.0F, 0.0F),
|
||||
PartPose.offset(0.0F, -7.0F, 4.5F)
|
||||
);
|
||||
}
|
||||
|
||||
return LayerDefinition.create(modelData, 48, 48);
|
||||
|
|
|
@ -28,25 +28,65 @@ public class DragonflyEntityModel extends BlockBenchModel<DragonflyEntity> {
|
|||
MeshDefinition modelData = new MeshDefinition();
|
||||
PartDefinition modelPartData = modelData.getRoot();
|
||||
|
||||
PartDefinition bodyPart = modelPartData.addOrReplaceChild(PartNames.BODY, CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -4.0F, 0.0F, 4.0F, 4.0F, 9.0F), PartPose.offset(2.0F, 21.5F, -4.0F));
|
||||
PartDefinition bodyPart = modelPartData.addOrReplaceChild(
|
||||
PartNames.BODY,
|
||||
CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, -4.0F, 0.0F, 4.0F, 4.0F, 9.0F),
|
||||
PartPose.offset(2.0F, 21.5F, -4.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.HEAD, CubeListBuilder.create().texOffs(17, 0).addBox(-1.5F, -1.5F, -2.5F, 3.0F, 3.0F, 3.0F), PartPose.offsetAndRotation(-2.0F, -2.0F, 0.0F, 0.3491F, 0.0F, 0.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.HEAD,
|
||||
CubeListBuilder.create().texOffs(17, 0).addBox(-1.5F, -1.5F, -2.5F, 3.0F, 3.0F, 3.0F),
|
||||
PartPose.offsetAndRotation(-2.0F, -2.0F, 0.0F, 0.3491F, 0.0F, 0.0F)
|
||||
);
|
||||
|
||||
PartDefinition tailPart = bodyPart.addOrReplaceChild(PartNames.TAIL, CubeListBuilder.create().texOffs(26, 0).addBox(-1.5F, -1.5F, 0.0F, 3.0F, 3.0F, 7.0F), PartPose.offset(-2.0F, -2.0F, 9.0F));
|
||||
PartDefinition tailPart = bodyPart.addOrReplaceChild(
|
||||
PartNames.TAIL,
|
||||
CubeListBuilder.create().texOffs(26, 0).addBox(-1.5F, -1.5F, 0.0F, 3.0F, 3.0F, 7.0F),
|
||||
PartPose.offset(-2.0F, -2.0F, 9.0F)
|
||||
);
|
||||
|
||||
tailPart.addOrReplaceChild(PartNames.TAIL_FIN, CubeListBuilder.create().texOffs(36, 0).addBox(-1.0F, -1.0F, 0.0F, 2.0F, 2.0F, 10.0F), PartPose.offset(0.0F, 0.0F, 7.0F));
|
||||
tailPart.addOrReplaceChild(
|
||||
PartNames.TAIL_FIN,
|
||||
CubeListBuilder.create().texOffs(36, 0).addBox(-1.0F, -1.0F, 0.0F, 2.0F, 2.0F, 10.0F),
|
||||
PartPose.offset(0.0F, 0.0F, 7.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.LEFT_WING, CubeListBuilder.create().texOffs(0, 13).addBox(-15.0F, 0.0F, -3.0F, 15.0F, 0.0F, 4.0F), PartPose.offset(-2.0F, -4.0F, 4.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.LEFT_WING,
|
||||
CubeListBuilder.create().texOffs(0, 13).addBox(-15.0F, 0.0F, -3.0F, 15.0F, 0.0F, 4.0F),
|
||||
PartPose.offset(-2.0F, -4.0F, 4.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.RIGHT_WING, CubeListBuilder.create().mirror().texOffs(0, 13).addBox(0.0F, 0.0F, -3.0F, 15.0F, 0.0F, 4.0F), PartPose.offset(-2.0F, -4.0F, 4.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.RIGHT_WING,
|
||||
CubeListBuilder.create().mirror().texOffs(0, 13).addBox(0.0F, 0.0F, -3.0F, 15.0F, 0.0F, 4.0F),
|
||||
PartPose.offset(-2.0F, -4.0F, 4.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.LEFT_WING_BASE, CubeListBuilder.create().texOffs(4, 17).addBox(-12.0F, 0.0F, -2.5F, 12.0F, 0.0F, 3.0F), PartPose.offset(-2.0F, -4.0F, 8.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.LEFT_WING_BASE,
|
||||
CubeListBuilder.create().texOffs(4, 17).addBox(-12.0F, 0.0F, -2.5F, 12.0F, 0.0F, 3.0F),
|
||||
PartPose.offset(-2.0F, -4.0F, 8.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.RIGHT_WING_BASE, CubeListBuilder.create().mirror().texOffs(4, 17).addBox(0.0F, 0.0F, -2.5F, 12.0F, 0.0F, 3.0F), PartPose.offset(-2.0F, -4.0F, 8.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.RIGHT_WING_BASE,
|
||||
CubeListBuilder.create().mirror().texOffs(4, 17).addBox(0.0F, 0.0F, -2.5F, 12.0F, 0.0F, 3.0F),
|
||||
PartPose.offset(-2.0F, -4.0F, 8.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.LEFT_LEG, CubeListBuilder.create().texOffs(50, 1).addBox(0.0F, 0.0F, 0.0F, 0.0F, 3.0F, 6.0F), PartPose.offsetAndRotation(-1.0F, 0.0F, 1.0F, 0.0F, 0.0F, -0.5236F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.LEFT_LEG,
|
||||
CubeListBuilder.create().texOffs(50, 1).addBox(0.0F, 0.0F, 0.0F, 0.0F, 3.0F, 6.0F),
|
||||
PartPose.offsetAndRotation(-1.0F, 0.0F, 1.0F, 0.0F, 0.0F, -0.5236F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.RIGHT_LEG, CubeListBuilder.create().texOffs(50, 1).addBox(0.0F, 0.0F, 0.0F, 0.0F, 3.0F, 6.0F), PartPose.offsetAndRotation(-3.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.5236F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.RIGHT_LEG,
|
||||
CubeListBuilder.create().texOffs(50, 1).addBox(0.0F, 0.0F, 0.0F, 0.0F, 3.0F, 6.0F),
|
||||
PartPose.offsetAndRotation(-3.0F, 0.0F, 1.0F, 0.0F, 0.0F, 0.5236F)
|
||||
);
|
||||
|
||||
return LayerDefinition.create(modelData, 64, 64);
|
||||
}
|
||||
|
|
|
@ -24,17 +24,41 @@ public class EndFishEntityModel extends BlockBenchModel<EndFishEntity> {
|
|||
MeshDefinition modelData = new MeshDefinition();
|
||||
PartDefinition modelPartData = modelData.getRoot();
|
||||
|
||||
PartDefinition bodyPart = modelPartData.addOrReplaceChild(PartNames.BODY, CubeListBuilder.create().texOffs(0, 0).addBox(-1.0F, -2.0F, -4.0F, 2.0F, 4.0F, 8.0F), PartPose.offset(0.0F, 20.0F, 0.0F));
|
||||
PartDefinition bodyPart = modelPartData.addOrReplaceChild(
|
||||
PartNames.BODY,
|
||||
CubeListBuilder.create().texOffs(0, 0).addBox(-1.0F, -2.0F, -4.0F, 2.0F, 4.0F, 8.0F),
|
||||
PartPose.offset(0.0F, 20.0F, 0.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.TOP_FIN, CubeListBuilder.create().texOffs(0, 6).addBox(0.0F, -8.0F, 0.0F, 0.0F, 8.0F, 6.0F), PartPose.offsetAndRotation(0.0F, -2.0F, -4.0F, -0.6981F, 0.0F, 0.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.TOP_FIN,
|
||||
CubeListBuilder.create().texOffs(0, 6).addBox(0.0F, -8.0F, 0.0F, 0.0F, 8.0F, 6.0F),
|
||||
PartPose.offsetAndRotation(0.0F, -2.0F, -4.0F, -0.6981F, 0.0F, 0.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.BOTTOM_FIN, CubeListBuilder.create().texOffs(0, 6).addBox(0.0F, 0.0F, 0.0F, 0.0F, 8.0F, 6.0F), PartPose.offsetAndRotation(0.0F, 2.0F, -4.0F, 0.6981F, 0.0F, 0.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.BOTTOM_FIN,
|
||||
CubeListBuilder.create().texOffs(0, 6).addBox(0.0F, 0.0F, 0.0F, 0.0F, 8.0F, 6.0F),
|
||||
PartPose.offsetAndRotation(0.0F, 2.0F, -4.0F, 0.6981F, 0.0F, 0.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.TAIL_FIN, CubeListBuilder.create().texOffs(0, 15).addBox(0.0F, -5.0F, 0.0F, 0.0F, 5.0F, 5.0F), PartPose.offsetAndRotation(0.0F, 0.0F, 2.0F, -0.7854F, 0.0F, 0.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.TAIL_FIN,
|
||||
CubeListBuilder.create().texOffs(0, 15).addBox(0.0F, -5.0F, 0.0F, 0.0F, 5.0F, 5.0F),
|
||||
PartPose.offsetAndRotation(0.0F, 0.0F, 2.0F, -0.7854F, 0.0F, 0.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.RIGHT_FIN, CubeListBuilder.create().texOffs(0, 25).addBox(-3.7071F, 0.7071F, -1.5F, 3.0F, 0.0F, 3.0F), PartPose.offsetAndRotation(-1.0F, 0.0F, -1.0F, 1.5708F, 0.7854F, 0.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.RIGHT_FIN,
|
||||
CubeListBuilder.create().texOffs(0, 25).addBox(-3.7071F, 0.7071F, -1.5F, 3.0F, 0.0F, 3.0F),
|
||||
PartPose.offsetAndRotation(-1.0F, 0.0F, -1.0F, 1.5708F, 0.7854F, 0.0F)
|
||||
);
|
||||
|
||||
bodyPart.addOrReplaceChild(PartNames.LEFT_FIN, CubeListBuilder.create().mirror().texOffs(0, 25).addBox(0.7071F, 0.7071F, -1.5F, 3.0F, 0.0F, 3.0F), PartPose.offsetAndRotation(-1.0F, 0.0F, -1.0F, 1.5708F, -0.7854F, 0.0F));
|
||||
bodyPart.addOrReplaceChild(
|
||||
PartNames.LEFT_FIN,
|
||||
CubeListBuilder.create().mirror().texOffs(0, 25).addBox(0.7071F, 0.7071F, -1.5F, 3.0F, 0.0F, 3.0F),
|
||||
PartPose.offsetAndRotation(-1.0F, 0.0F, -1.0F, 1.5708F, -0.7854F, 0.0F)
|
||||
);
|
||||
|
||||
return LayerDefinition.create(modelData, 32, 32);
|
||||
}
|
||||
|
|
|
@ -38,28 +38,60 @@ public class EndSlimeEntityModel<T extends EndSlimeEntity> extends ListModel<T>
|
|||
PartDefinition modelPartData = modelData.getRoot();
|
||||
|
||||
if (onlyShell) {
|
||||
modelPartData.addOrReplaceChild(PartNames.BODY, CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, 16.0F, -4.0F, 8.0F, 8.0F, 8.0F), PartPose.ZERO);
|
||||
modelPartData.addOrReplaceChild(
|
||||
PartNames.BODY,
|
||||
CubeListBuilder.create().texOffs(0, 0).addBox(-4.0F, 16.0F, -4.0F, 8.0F, 8.0F, 8.0F),
|
||||
PartPose.ZERO
|
||||
);
|
||||
}
|
||||
else {
|
||||
modelPartData.addOrReplaceChild(PartNames.BODY, CubeListBuilder.create().texOffs(0, 16).addBox(-3.0F, 17.0F, -3.0F, 6.0F, 6.0F, 6.0F), PartPose.ZERO);
|
||||
modelPartData.addOrReplaceChild(
|
||||
PartNames.BODY,
|
||||
CubeListBuilder.create().texOffs(0, 16).addBox(-3.0F, 17.0F, -3.0F, 6.0F, 6.0F, 6.0F),
|
||||
PartPose.ZERO
|
||||
);
|
||||
|
||||
modelPartData.addOrReplaceChild(PartNames.RIGHT_EYE, CubeListBuilder.create().texOffs(32, 0).addBox(-3.25F, 18.0F, -3.5F, 2.0F, 2.0F, 2.0F), PartPose.ZERO);
|
||||
modelPartData.addOrReplaceChild(
|
||||
PartNames.RIGHT_EYE,
|
||||
CubeListBuilder.create().texOffs(32, 0).addBox(-3.25F, 18.0F, -3.5F, 2.0F, 2.0F, 2.0F),
|
||||
PartPose.ZERO
|
||||
);
|
||||
|
||||
modelPartData.addOrReplaceChild(PartNames.LEFT_EYE, CubeListBuilder.create().texOffs(32, 4).addBox(1.25F, 18.0F, -3.5F, 2.0F, 2.0F, 2.0F), PartPose.ZERO);
|
||||
modelPartData.addOrReplaceChild(
|
||||
PartNames.LEFT_EYE,
|
||||
CubeListBuilder.create().texOffs(32, 4).addBox(1.25F, 18.0F, -3.5F, 2.0F, 2.0F, 2.0F),
|
||||
PartPose.ZERO
|
||||
);
|
||||
|
||||
modelPartData.addOrReplaceChild(PartNames.MOUTH, CubeListBuilder.create().texOffs(32, 8).addBox(0.0F, 21.0F, -3.5F, 1.0F, 1.0F, 1.0F), PartPose.ZERO);
|
||||
modelPartData.addOrReplaceChild(
|
||||
PartNames.MOUTH,
|
||||
CubeListBuilder.create().texOffs(32, 8).addBox(0.0F, 21.0F, -3.5F, 1.0F, 1.0F, 1.0F),
|
||||
PartPose.ZERO
|
||||
);
|
||||
|
||||
PartDefinition flowerPart = modelPartData.addOrReplaceChild("flower", CubeListBuilder.create(), PartPose.ZERO);
|
||||
PartDefinition flowerPart = modelPartData.addOrReplaceChild(
|
||||
"flower",
|
||||
CubeListBuilder.create(),
|
||||
PartPose.ZERO
|
||||
);
|
||||
PartDefinition cropPart = modelPartData.addOrReplaceChild("crop", CubeListBuilder.create(), PartPose.ZERO);
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
final PartDefinition parent = i < 4 ? flowerPart : cropPart;
|
||||
final float rot = MHelper.degreesToRadians(i < 4 ? (i * 45F) : ((i - 4) * 90F + 45F));
|
||||
|
||||
PartDefinition petalRotPart = parent.addOrReplaceChild("petalRot_" + i, CubeListBuilder.create(), PartPose.offsetAndRotation(0, 0, 0, 0, rot, 0));
|
||||
PartDefinition petalRotPart = parent.addOrReplaceChild(
|
||||
"petalRot_" + i,
|
||||
CubeListBuilder.create(),
|
||||
PartPose.offsetAndRotation(0, 0, 0, 0, rot, 0)
|
||||
);
|
||||
|
||||
|
||||
petalRotPart.addOrReplaceChild("petal_" + i, CubeListBuilder.create().texOffs(40, 0).addBox(0.0F, 0.0F, 0.0F, 8.0F, 8.0F, 0.0F), PartPose.offset(-4, 8, 0));
|
||||
petalRotPart.addOrReplaceChild(
|
||||
"petal_" + i,
|
||||
CubeListBuilder.create().texOffs(40, 0).addBox(0.0F, 0.0F, 0.0F, 8.0F, 8.0F, 0.0F),
|
||||
PartPose.offset(-4, 8, 0)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -34,35 +34,95 @@ public class SilkMothEntityModel extends BlockBenchModel<SilkMothEntity> {
|
|||
MeshDefinition modelData = new MeshDefinition();
|
||||
PartDefinition modelPartData = modelData.getRoot();
|
||||
|
||||
PartDefinition legsL = modelPartData.addOrReplaceChild(PartNames.LEFT_LEG, CubeListBuilder.create().texOffs(0, 0), PartPose.offsetAndRotation(1.5f, 19.9f, -0.45f, 0.0f, 0.0f, 0.6981f));
|
||||
PartDefinition legsL = modelPartData.addOrReplaceChild(
|
||||
PartNames.LEFT_LEG,
|
||||
CubeListBuilder.create().texOffs(0, 0),
|
||||
PartPose.offsetAndRotation(1.5f, 19.9f, -0.45f, 0.0f, 0.0f, 0.6981f)
|
||||
);
|
||||
|
||||
legsL.addOrReplaceChild("cube_r1", CubeListBuilder.create().texOffs(0, 13).addBox(0.0216f, 0.0f, -0.5976f, 3.0f, 0.0f, 1.0f), PartPose.offsetAndRotation(0.0f, 0.0f, -1.0f, 0.0f, 0.2182f, 0.3927f));
|
||||
legsL.addOrReplaceChild(
|
||||
"cube_r1",
|
||||
CubeListBuilder.create().texOffs(0, 13).addBox(0.0216f, 0.0f, -0.5976f, 3.0f, 0.0f, 1.0f),
|
||||
PartPose.offsetAndRotation(0.0f, 0.0f, -1.0f, 0.0f, 0.2182f, 0.3927f)
|
||||
);
|
||||
|
||||
legsL.addOrReplaceChild("cube_r2", CubeListBuilder.create().texOffs(0, 15).addBox(0.0f, 0.0f, -0.6f, 3.0f, 0.0f, 1.0f), PartPose.offsetAndRotation(0.5f, 0.1f, -0.05f, 0.0f, 0.0f, 0.3927f));
|
||||
legsL.addOrReplaceChild(
|
||||
"cube_r2",
|
||||
CubeListBuilder.create().texOffs(0, 15).addBox(0.0f, 0.0f, -0.6f, 3.0f, 0.0f, 1.0f),
|
||||
PartPose.offsetAndRotation(0.5f, 0.1f, -0.05f, 0.0f, 0.0f, 0.3927f)
|
||||
);
|
||||
|
||||
legsL.addOrReplaceChild("cube_r3", CubeListBuilder.create().texOffs(0, 14).addBox(0.0f, 0.0f, -0.5f, 3.0f, 0.0f, 1.0f), PartPose.offsetAndRotation(0.0f, 0.0f, 0.9f, 0.0f, -0.2182f, 0.3927f));
|
||||
legsL.addOrReplaceChild(
|
||||
"cube_r3",
|
||||
CubeListBuilder.create().texOffs(0, 14).addBox(0.0f, 0.0f, -0.5f, 3.0f, 0.0f, 1.0f),
|
||||
PartPose.offsetAndRotation(0.0f, 0.0f, 0.9f, 0.0f, -0.2182f, 0.3927f)
|
||||
);
|
||||
|
||||
PartDefinition legsR = modelPartData.addOrReplaceChild(PartNames.RIGHT_LEG, CubeListBuilder.create().texOffs(0, 0), PartPose.offsetAndRotation(-1.5f, 19.9f, -0.55f, 0.0f, 3.1416f, -0.6545f));
|
||||
PartDefinition legsR = modelPartData.addOrReplaceChild(
|
||||
PartNames.RIGHT_LEG,
|
||||
CubeListBuilder.create().texOffs(0, 0),
|
||||
PartPose.offsetAndRotation(-1.5f, 19.9f, -0.55f, 0.0f, 3.1416f, -0.6545f)
|
||||
);
|
||||
|
||||
legsR.addOrReplaceChild("cube_r4", CubeListBuilder.create().texOffs(0, 10).addBox(0.0f, 0.0f, -0.5f, 3.0f, 0.0f, 1.0f), PartPose.offsetAndRotation(0.0f, 0.0f, -1.0f, 0.0f, 0.2182f, 0.3927f));
|
||||
legsR.addOrReplaceChild(
|
||||
"cube_r4",
|
||||
CubeListBuilder.create().texOffs(0, 10).addBox(0.0f, 0.0f, -0.5f, 3.0f, 0.0f, 1.0f),
|
||||
PartPose.offsetAndRotation(0.0f, 0.0f, -1.0f, 0.0f, 0.2182f, 0.3927f)
|
||||
);
|
||||
|
||||
legsR.addOrReplaceChild("cube_r5", CubeListBuilder.create().texOffs(0, 11).addBox(0.0f, 0.0f, -0.4f, 3.0f, 0.0f, 1.0f), PartPose.offsetAndRotation(0.5f, 0.1f, -0.05f, 0.0f, 0.0f, 0.3927f));
|
||||
legsR.addOrReplaceChild(
|
||||
"cube_r5",
|
||||
CubeListBuilder.create().texOffs(0, 11).addBox(0.0f, 0.0f, -0.4f, 3.0f, 0.0f, 1.0f),
|
||||
PartPose.offsetAndRotation(0.5f, 0.1f, -0.05f, 0.0f, 0.0f, 0.3927f)
|
||||
);
|
||||
|
||||
legsR.addOrReplaceChild("cube_r6", CubeListBuilder.create().texOffs(0, 12).addBox(0.0216f, 0.0f, -0.4024f, 3.0f, 0.0f, 1.0f), PartPose.offsetAndRotation(0.0f, 0.0f, 0.9f, 0.0f, -0.2182f, 0.3927f));
|
||||
legsR.addOrReplaceChild(
|
||||
"cube_r6",
|
||||
CubeListBuilder.create().texOffs(0, 12).addBox(0.0216f, 0.0f, -0.4024f, 3.0f, 0.0f, 1.0f),
|
||||
PartPose.offsetAndRotation(0.0f, 0.0f, 0.9f, 0.0f, -0.2182f, 0.3927f)
|
||||
);
|
||||
|
||||
PartDefinition head_pivot = modelPartData.addOrReplaceChild(PartNames.HEAD, CubeListBuilder.create().texOffs(15, 10).addBox(-1.5f, -1.5f, -2.0f, 3.0f, 3.0f, 3.0f), PartPose.offset(0.0f, 18.0f, -3.0f));
|
||||
PartDefinition head_pivot = modelPartData.addOrReplaceChild(
|
||||
PartNames.HEAD,
|
||||
CubeListBuilder.create().texOffs(15, 10).addBox(-1.5f, -1.5f, -2.0f, 3.0f, 3.0f, 3.0f),
|
||||
PartPose.offset(0.0f, 18.0f, -3.0f)
|
||||
);
|
||||
|
||||
head_pivot.addOrReplaceChild("tendril_r_r1", CubeListBuilder.create().mirror().texOffs(23, 0).addBox(-1.5f, -5.0f, 0.0f, 3.0f, 5.0f, 0.0f), PartPose.offsetAndRotation(1.0f, -1.15f, -1.0f, 0.0f, 0.0f, 0.3927f));
|
||||
head_pivot.addOrReplaceChild(
|
||||
"tendril_r_r1",
|
||||
CubeListBuilder.create().mirror().texOffs(23, 0).addBox(-1.5f, -5.0f, 0.0f, 3.0f, 5.0f, 0.0f),
|
||||
PartPose.offsetAndRotation(1.0f, -1.15f, -1.0f, 0.0f, 0.0f, 0.3927f)
|
||||
);
|
||||
|
||||
head_pivot.addOrReplaceChild("tendril_r_r2", CubeListBuilder.create().texOffs(23, 0).addBox(-1.5f, -5.0f, 0.0f, 3.0f, 5.0f, 0.0f), PartPose.offsetAndRotation(-1.0f, -1.15f, -1.0f, 0.0f, 0.0f, -0.3927f));
|
||||
head_pivot.addOrReplaceChild(
|
||||
"tendril_r_r2",
|
||||
CubeListBuilder.create().texOffs(23, 0).addBox(-1.5f, -5.0f, 0.0f, 3.0f, 5.0f, 0.0f),
|
||||
PartPose.offsetAndRotation(-1.0f, -1.15f, -1.0f, 0.0f, 0.0f, -0.3927f)
|
||||
);
|
||||
|
||||
PartDefinition bb_main = modelPartData.addOrReplaceChild(PartNames.BODY, CubeListBuilder.create().texOffs(19, 19).addBox(-2.5f, -8.5f, -3.0f, 5.0f, 5.0f, 3.0f), PartPose.offset(0.0f, 24.0f, 0.0f));
|
||||
PartDefinition bb_main = modelPartData.addOrReplaceChild(
|
||||
PartNames.BODY,
|
||||
CubeListBuilder.create().texOffs(19, 19).addBox(-2.5f, -8.5f, -3.0f, 5.0f, 5.0f, 3.0f),
|
||||
PartPose.offset(0.0f, 24.0f, 0.0f)
|
||||
);
|
||||
|
||||
bb_main.addOrReplaceChild(PartNames.RIGHT_WING, CubeListBuilder.create().mirror().texOffs(0, 5).addBox(-7.0f, 0.0f, -3.0f, 9.0f, 0.0f, 5.0f), PartPose.offsetAndRotation(-1.5f, -6.5f, 0.5f, 0.0f, 0.0f, 0.3927f));
|
||||
bb_main.addOrReplaceChild(
|
||||
PartNames.RIGHT_WING,
|
||||
CubeListBuilder.create().mirror().texOffs(0, 5).addBox(-7.0f, 0.0f, -3.0f, 9.0f, 0.0f, 5.0f),
|
||||
PartPose.offsetAndRotation(-1.5f, -6.5f, 0.5f, 0.0f, 0.0f, 0.3927f)
|
||||
);
|
||||
|
||||
bb_main.addOrReplaceChild(PartNames.LEFT_WING, CubeListBuilder.create().texOffs(0, 5).addBox(-2.0f, 0.0f, -3.0f, 9.0f, 0.0f, 5.0f), PartPose.offsetAndRotation(1.5f, -6.5f, 0.5f, 0.0f, 0.0f, -0.3927f));
|
||||
bb_main.addOrReplaceChild(
|
||||
PartNames.LEFT_WING,
|
||||
CubeListBuilder.create().texOffs(0, 5).addBox(-2.0f, 0.0f, -3.0f, 9.0f, 0.0f, 5.0f),
|
||||
PartPose.offsetAndRotation(1.5f, -6.5f, 0.5f, 0.0f, 0.0f, -0.3927f)
|
||||
);
|
||||
|
||||
bb_main.addOrReplaceChild("abdomen_r1", CubeListBuilder.create().texOffs(0, 10).addBox(-3.0f, -4.0f, -1.0f, 4.0f, 4.0f, 7.0f), PartPose.offsetAndRotation(1.0f, -3.9f, 0.0f, -0.3927f, 0.0f, 0.0f));
|
||||
bb_main.addOrReplaceChild(
|
||||
"abdomen_r1",
|
||||
CubeListBuilder.create().texOffs(0, 10).addBox(-3.0f, -4.0f, -1.0f, 4.0f, 4.0f, 7.0f),
|
||||
PartPose.offsetAndRotation(1.0f, -3.9f, 0.0f, -0.3927f, 0.0f, 0.0f)
|
||||
);
|
||||
|
||||
return LayerDefinition.create(modelData, 64, 64);
|
||||
}
|
||||
|
|
|
@ -29,7 +29,16 @@ public class RendererEntityCubozoa extends MobRenderer<CubozoaEntity, CubozoaEnt
|
|||
@Override
|
||||
public void render(PoseStack matrices, MultiBufferSource vertexConsumers, int light, CubozoaEntity entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch) {
|
||||
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(GLOW[entity.getVariant()]);
|
||||
this.getParentModel().renderToBuffer(matrices, vertexConsumer, 15728640, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.getParentModel()
|
||||
.renderToBuffer(matrices,
|
||||
vertexConsumer,
|
||||
15728640,
|
||||
OverlayTexture.NO_OVERLAY,
|
||||
1.0F,
|
||||
1.0F,
|
||||
1.0F,
|
||||
1.0F
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -29,7 +29,16 @@ public class RendererEntityEndFish extends MobRenderer<EndFishEntity, EndFishEnt
|
|||
@Override
|
||||
public void render(PoseStack matrices, MultiBufferSource vertexConsumers, int light, EndFishEntity entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch) {
|
||||
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(GLOW[entity.getVariant()]);
|
||||
this.getParentModel().renderToBuffer(matrices, vertexConsumer, 15728640, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.getParentModel()
|
||||
.renderToBuffer(matrices,
|
||||
vertexConsumer,
|
||||
15728640,
|
||||
OverlayTexture.NO_OVERLAY,
|
||||
1.0F,
|
||||
1.0F,
|
||||
1.0F,
|
||||
1.0F
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,7 +33,16 @@ public class RendererEntityEndSlime extends MobRenderer<EndSlimeEntity, EndSlime
|
|||
@Override
|
||||
public void render(PoseStack matrices, MultiBufferSource vertexConsumers, int light, EndSlimeEntity entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch) {
|
||||
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(GLOW[entity.getSlimeType()]);
|
||||
this.getParentModel().renderToBuffer(matrices, vertexConsumer, 15728640, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.getParentModel()
|
||||
.renderToBuffer(matrices,
|
||||
vertexConsumer,
|
||||
15728640,
|
||||
OverlayTexture.NO_OVERLAY,
|
||||
1.0F,
|
||||
1.0F,
|
||||
1.0F,
|
||||
1.0F
|
||||
);
|
||||
if (entity.isLake()) {
|
||||
this.getParentModel().renderFlower(matrices, vertexConsumer, 15728640, OverlayTexture.NO_OVERLAY);
|
||||
}
|
||||
|
@ -75,20 +84,42 @@ public class RendererEntityEndSlime extends MobRenderer<EndSlimeEntity, EndSlime
|
|||
public void render(PoseStack matrixStack, MultiBufferSource vertexConsumerProvider, int i, T livingEntity, float f, float g, float h, float j, float k, float l) {
|
||||
if (!livingEntity.isInvisible()) {
|
||||
if (livingEntity.isLake()) {
|
||||
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderType.entityCutout(this.getTextureLocation(livingEntity)));
|
||||
this.getParentModel().renderFlower(matrixStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(livingEntity, 0.0F));
|
||||
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderType.entityCutout(this.getTextureLocation(
|
||||
livingEntity)));
|
||||
this.getParentModel()
|
||||
.renderFlower(matrixStack,
|
||||
vertexConsumer,
|
||||
i,
|
||||
LivingEntityRenderer.getOverlayCoords(livingEntity, 0.0F)
|
||||
);
|
||||
}
|
||||
else if (livingEntity.isAmber() || livingEntity.isChorus()) {
|
||||
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderType.entityCutout(this.getTextureLocation(livingEntity)));
|
||||
this.getParentModel().renderCrop(matrixStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(livingEntity, 0.0F));
|
||||
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderType.entityCutout(this.getTextureLocation(
|
||||
livingEntity)));
|
||||
this.getParentModel()
|
||||
.renderCrop(matrixStack,
|
||||
vertexConsumer,
|
||||
i,
|
||||
LivingEntityRenderer.getOverlayCoords(livingEntity, 0.0F)
|
||||
);
|
||||
}
|
||||
|
||||
EndSlimeEntityModel<T> model = livingEntity.getSlimeType() == 1 ? modelLake : modelOrdinal;
|
||||
this.getParentModel().copyPropertiesTo(model);
|
||||
model.prepareMobModel(livingEntity, f, g, h);
|
||||
model.setupAnim(livingEntity, f, g, j, k, l);
|
||||
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderType.entityTranslucent(this.getTextureLocation(livingEntity)));
|
||||
model.renderToBuffer(matrixStack, vertexConsumer, i, LivingEntityRenderer.getOverlayCoords(livingEntity, 0.0F), 1.0F, 1.0F, 1.0F, 1.0F);
|
||||
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderType.entityTranslucent(this.getTextureLocation(
|
||||
livingEntity)));
|
||||
model.renderToBuffer(
|
||||
matrixStack,
|
||||
vertexConsumer,
|
||||
i,
|
||||
LivingEntityRenderer.getOverlayCoords(livingEntity, 0.0F),
|
||||
1.0F,
|
||||
1.0F,
|
||||
1.0F,
|
||||
1.0F
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue