Jello rename
This commit is contained in:
parent
7084e294d7
commit
e68a812e57
12 changed files with 32 additions and 32 deletions
|
@ -23,12 +23,12 @@ import net.minecraft.world.ServerWorldAccess;
|
|||
import net.minecraft.world.World;
|
||||
import ru.betterend.registry.EndBiomes;
|
||||
|
||||
public class EntityJello extends WaterCreatureEntity {
|
||||
public class EntityCubozoa extends WaterCreatureEntity {
|
||||
public static final int VARIANTS = 2;
|
||||
private static final TrackedData<Byte> VARIANT = DataTracker.registerData(EntityJello.class, TrackedDataHandlerRegistry.BYTE);
|
||||
private static final TrackedData<Byte> SCALE = DataTracker.registerData(EntityJello.class, TrackedDataHandlerRegistry.BYTE);
|
||||
private static final TrackedData<Byte> VARIANT = DataTracker.registerData(EntityCubozoa.class, TrackedDataHandlerRegistry.BYTE);
|
||||
private static final TrackedData<Byte> SCALE = DataTracker.registerData(EntityCubozoa.class, TrackedDataHandlerRegistry.BYTE);
|
||||
|
||||
public EntityJello(EntityType<EntityJello> entityType, World world) {
|
||||
public EntityCubozoa(EntityType<EntityCubozoa> entityType, World world) {
|
||||
super(entityType, world);
|
||||
}
|
||||
|
||||
|
@ -85,9 +85,9 @@ public class EntityJello extends WaterCreatureEntity {
|
|||
return this.dataTracker.get(SCALE) / 32F + 0.75F;
|
||||
}
|
||||
|
||||
public static boolean canSpawn(EntityType<EntityJello> type, ServerWorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) {
|
||||
public static boolean canSpawn(EntityType<EntityCubozoa> type, ServerWorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) {
|
||||
Box box = new Box(pos).expand(16);
|
||||
List<EntityJello> list = world.getEntitiesByClass(EntityJello.class, box, (entity) -> {
|
||||
List<EntityCubozoa> list = world.getEntitiesByClass(EntityCubozoa.class, box, (entity) -> {
|
||||
return true;
|
||||
});
|
||||
return list.size() < 9;
|
|
@ -6,9 +6,9 @@ import net.minecraft.client.render.VertexConsumer;
|
|||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import ru.betterend.entity.BlockBenchModel;
|
||||
import ru.betterend.entity.EntityJello;
|
||||
import ru.betterend.entity.EntityCubozoa;
|
||||
|
||||
public class ModelEntityJello extends BlockBenchModel<EntityJello> {
|
||||
public class ModelEntityCubozoa extends BlockBenchModel<EntityCubozoa> {
|
||||
private final ModelPart model;
|
||||
private final ModelPart main_cube_r1;
|
||||
private final ModelPart tentacle_center_1;
|
||||
|
@ -22,7 +22,7 @@ public class ModelEntityJello extends BlockBenchModel<EntityJello> {
|
|||
private float scaleY;
|
||||
private float scaleXZ;
|
||||
|
||||
public ModelEntityJello() {
|
||||
public ModelEntityCubozoa() {
|
||||
super(RenderLayer::getEntityTranslucent);
|
||||
|
||||
textureWidth = 48;
|
||||
|
@ -83,7 +83,7 @@ public class ModelEntityJello extends BlockBenchModel<EntityJello> {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void setAngles(EntityJello entity, float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch) {
|
||||
public void setAngles(EntityCubozoa entity, float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch) {
|
||||
float sin = MathHelper.sin(animationProgress * 0.13F);
|
||||
scaleY = sin * 0.1F + 0.9F;
|
||||
scaleXZ = MathHelper.sin(animationProgress * 0.13F + 3.14F) * 0.1F + 0.9F;
|
|
@ -7,16 +7,16 @@ import net.minecraft.client.render.entity.feature.EyesFeatureRenderer;
|
|||
import net.minecraft.client.util.math.MatrixStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.entity.EntityJello;
|
||||
import ru.betterend.entity.model.ModelEntityJello;
|
||||
import ru.betterend.entity.EntityCubozoa;
|
||||
import ru.betterend.entity.model.ModelEntityCubozoa;
|
||||
|
||||
public class RendererEntityJello extends MobEntityRenderer<EntityJello, ModelEntityJello> {
|
||||
private static final Identifier TEXTURE = BetterEnd.makeID("textures/entity/jello.png");
|
||||
private static final RenderLayer GLOW = RenderLayer.getEyes(BetterEnd.makeID("textures/entity/jello_glow.png"));
|
||||
public class RendererEntityCubozoa extends MobEntityRenderer<EntityCubozoa, ModelEntityCubozoa> {
|
||||
private static final Identifier TEXTURE = BetterEnd.makeID("textures/entity/cubozoa/cubozoa.png");
|
||||
private static final RenderLayer GLOW = RenderLayer.getEyes(BetterEnd.makeID("textures/entity/cubozoa/cubozoa_glow.png"));
|
||||
|
||||
public RendererEntityJello(EntityRenderDispatcher entityRenderDispatcher) {
|
||||
super(entityRenderDispatcher, new ModelEntityJello(), 0.5f);
|
||||
this.addFeature(new EyesFeatureRenderer<EntityJello, ModelEntityJello>(this) {
|
||||
public RendererEntityCubozoa(EntityRenderDispatcher entityRenderDispatcher) {
|
||||
super(entityRenderDispatcher, new ModelEntityCubozoa(), 0.5f);
|
||||
this.addFeature(new EyesFeatureRenderer<EntityCubozoa, ModelEntityCubozoa>(this) {
|
||||
@Override
|
||||
public RenderLayer getEyesTexture() {
|
||||
return GLOW;
|
||||
|
@ -25,13 +25,13 @@ public class RendererEntityJello extends MobEntityRenderer<EntityJello, ModelEnt
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void scale(EntityJello entity, MatrixStack matrixStack, float f) {
|
||||
protected void scale(EntityCubozoa entity, MatrixStack matrixStack, float f) {
|
||||
float scale = entity.getScale();
|
||||
matrixStack.scale(scale, scale, scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Identifier getTexture(EntityJello entity) {
|
||||
public Identifier getTexture(EntityCubozoa entity) {
|
||||
return TEXTURE;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue