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 net.minecraft.world.World;
|
||||||
import ru.betterend.registry.EndBiomes;
|
import ru.betterend.registry.EndBiomes;
|
||||||
|
|
||||||
public class EntityJello extends WaterCreatureEntity {
|
public class EntityCubozoa extends WaterCreatureEntity {
|
||||||
public static final int VARIANTS = 2;
|
public static final int VARIANTS = 2;
|
||||||
private static final TrackedData<Byte> VARIANT = 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(EntityJello.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);
|
super(entityType, world);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,9 +85,9 @@ public class EntityJello extends WaterCreatureEntity {
|
||||||
return this.dataTracker.get(SCALE) / 32F + 0.75F;
|
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);
|
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 true;
|
||||||
});
|
});
|
||||||
return list.size() < 9;
|
return list.size() < 9;
|
|
@ -6,9 +6,9 @@ import net.minecraft.client.render.VertexConsumer;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import ru.betterend.entity.BlockBenchModel;
|
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 model;
|
||||||
private final ModelPart main_cube_r1;
|
private final ModelPart main_cube_r1;
|
||||||
private final ModelPart tentacle_center_1;
|
private final ModelPart tentacle_center_1;
|
||||||
|
@ -22,7 +22,7 @@ public class ModelEntityJello extends BlockBenchModel<EntityJello> {
|
||||||
private float scaleY;
|
private float scaleY;
|
||||||
private float scaleXZ;
|
private float scaleXZ;
|
||||||
|
|
||||||
public ModelEntityJello() {
|
public ModelEntityCubozoa() {
|
||||||
super(RenderLayer::getEntityTranslucent);
|
super(RenderLayer::getEntityTranslucent);
|
||||||
|
|
||||||
textureWidth = 48;
|
textureWidth = 48;
|
||||||
|
@ -83,7 +83,7 @@ public class ModelEntityJello extends BlockBenchModel<EntityJello> {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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);
|
float sin = MathHelper.sin(animationProgress * 0.13F);
|
||||||
scaleY = sin * 0.1F + 0.9F;
|
scaleY = sin * 0.1F + 0.9F;
|
||||||
scaleXZ = MathHelper.sin(animationProgress * 0.13F + 3.14F) * 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.client.util.math.MatrixStack;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import ru.betterend.BetterEnd;
|
import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.entity.EntityJello;
|
import ru.betterend.entity.EntityCubozoa;
|
||||||
import ru.betterend.entity.model.ModelEntityJello;
|
import ru.betterend.entity.model.ModelEntityCubozoa;
|
||||||
|
|
||||||
public class RendererEntityJello extends MobEntityRenderer<EntityJello, ModelEntityJello> {
|
public class RendererEntityCubozoa extends MobEntityRenderer<EntityCubozoa, ModelEntityCubozoa> {
|
||||||
private static final Identifier TEXTURE = BetterEnd.makeID("textures/entity/jello.png");
|
private static final Identifier TEXTURE = BetterEnd.makeID("textures/entity/cubozoa/cubozoa.png");
|
||||||
private static final RenderLayer GLOW = RenderLayer.getEyes(BetterEnd.makeID("textures/entity/jello_glow.png"));
|
private static final RenderLayer GLOW = RenderLayer.getEyes(BetterEnd.makeID("textures/entity/cubozoa/cubozoa_glow.png"));
|
||||||
|
|
||||||
public RendererEntityJello(EntityRenderDispatcher entityRenderDispatcher) {
|
public RendererEntityCubozoa(EntityRenderDispatcher entityRenderDispatcher) {
|
||||||
super(entityRenderDispatcher, new ModelEntityJello(), 0.5f);
|
super(entityRenderDispatcher, new ModelEntityCubozoa(), 0.5f);
|
||||||
this.addFeature(new EyesFeatureRenderer<EntityJello, ModelEntityJello>(this) {
|
this.addFeature(new EyesFeatureRenderer<EntityCubozoa, ModelEntityCubozoa>(this) {
|
||||||
@Override
|
@Override
|
||||||
public RenderLayer getEyesTexture() {
|
public RenderLayer getEyesTexture() {
|
||||||
return GLOW;
|
return GLOW;
|
||||||
|
@ -25,13 +25,13 @@ public class RendererEntityJello extends MobEntityRenderer<EntityJello, ModelEnt
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void scale(EntityJello entity, MatrixStack matrixStack, float f) {
|
protected void scale(EntityCubozoa entity, MatrixStack matrixStack, float f) {
|
||||||
float scale = entity.getScale();
|
float scale = entity.getScale();
|
||||||
matrixStack.scale(scale, scale, scale);
|
matrixStack.scale(scale, scale, scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Identifier getTexture(EntityJello entity) {
|
public Identifier getTexture(EntityCubozoa entity) {
|
||||||
return TEXTURE;
|
return TEXTURE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ import ru.betterend.BetterEnd;
|
||||||
import ru.betterend.entity.EntityDragonfly;
|
import ru.betterend.entity.EntityDragonfly;
|
||||||
import ru.betterend.entity.EntityEndFish;
|
import ru.betterend.entity.EntityEndFish;
|
||||||
import ru.betterend.entity.EntityEndSlime;
|
import ru.betterend.entity.EntityEndSlime;
|
||||||
import ru.betterend.entity.EntityJello;
|
import ru.betterend.entity.EntityCubozoa;
|
||||||
import ru.betterend.entity.EntityShadowWalker;
|
import ru.betterend.entity.EntityShadowWalker;
|
||||||
import ru.betterend.util.MHelper;
|
import ru.betterend.util.MHelper;
|
||||||
import ru.betterend.util.SpawnHelper;
|
import ru.betterend.util.SpawnHelper;
|
||||||
|
@ -25,13 +25,13 @@ public class EndEntities {
|
||||||
public static final EntityType<EntityEndSlime> END_SLIME = register("end_slime", SpawnGroup.MONSTER, 2F, 2F, EntityEndSlime::new, EntityEndSlime.createMobAttributes(), false, MHelper.color(28, 28, 28), MHelper.color(99, 11, 99));
|
public static final EntityType<EntityEndSlime> END_SLIME = register("end_slime", SpawnGroup.MONSTER, 2F, 2F, EntityEndSlime::new, EntityEndSlime.createMobAttributes(), false, MHelper.color(28, 28, 28), MHelper.color(99, 11, 99));
|
||||||
public static final EntityType<EntityEndFish> END_FISH = register("end_fish", SpawnGroup.WATER_AMBIENT, 0.5F, 0.5F, EntityEndFish::new, EntityEndFish.createMobAttributes(), true, MHelper.color(3, 50, 76), MHelper.color(120, 206, 255));
|
public static final EntityType<EntityEndFish> END_FISH = register("end_fish", SpawnGroup.WATER_AMBIENT, 0.5F, 0.5F, EntityEndFish::new, EntityEndFish.createMobAttributes(), true, MHelper.color(3, 50, 76), MHelper.color(120, 206, 255));
|
||||||
public static final EntityType<EntityShadowWalker> SHADOW_WALKER = register("shadow_walker", SpawnGroup.MONSTER, 0.6F, 1.95F, EntityShadowWalker::new, EntityShadowWalker.createMobAttributes(), true, MHelper.color(30, 30, 30), MHelper.color(5, 5, 5));
|
public static final EntityType<EntityShadowWalker> SHADOW_WALKER = register("shadow_walker", SpawnGroup.MONSTER, 0.6F, 1.95F, EntityShadowWalker::new, EntityShadowWalker.createMobAttributes(), true, MHelper.color(30, 30, 30), MHelper.color(5, 5, 5));
|
||||||
public static final EntityType<EntityJello> JELLO = register("jello", SpawnGroup.WATER_AMBIENT, 0.6F, 1F, EntityJello::new, EntityJello.createMobAttributes(), true, MHelper.color(151, 77, 181), MHelper.color(93, 176, 238));
|
public static final EntityType<EntityCubozoa> CUBOZOA = register("cubozoa", SpawnGroup.WATER_AMBIENT, 0.6F, 1F, EntityCubozoa::new, EntityCubozoa.createMobAttributes(), true, MHelper.color(151, 77, 181), MHelper.color(93, 176, 238));
|
||||||
|
|
||||||
public static void register() {
|
public static void register() {
|
||||||
SpawnHelper.restrictionLand(END_SLIME, EntityEndSlime::canSpawn);
|
SpawnHelper.restrictionLand(END_SLIME, EntityEndSlime::canSpawn);
|
||||||
SpawnHelper.restrictionWater(END_FISH, EntityEndFish::canSpawn);
|
SpawnHelper.restrictionWater(END_FISH, EntityEndFish::canSpawn);
|
||||||
SpawnHelper.restrictionLand(SHADOW_WALKER, HostileEntity::canSpawnInDark);
|
SpawnHelper.restrictionLand(SHADOW_WALKER, HostileEntity::canSpawnInDark);
|
||||||
SpawnHelper.restrictionWater(JELLO, EntityJello::canSpawn);
|
SpawnHelper.restrictionWater(CUBOZOA, EntityCubozoa::canSpawn);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static <T extends Entity> EntityType<T> register(String name, SpawnGroup group, float width, float height, EntityFactory<T> entity) {
|
protected static <T extends Entity> EntityType<T> register(String name, SpawnGroup group, float width, float height, EntityFactory<T> entity) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import net.minecraft.entity.EntityType;
|
||||||
import ru.betterend.entity.render.RendererEntityDragonfly;
|
import ru.betterend.entity.render.RendererEntityDragonfly;
|
||||||
import ru.betterend.entity.render.RendererEntityEndFish;
|
import ru.betterend.entity.render.RendererEntityEndFish;
|
||||||
import ru.betterend.entity.render.RendererEntityEndSlime;
|
import ru.betterend.entity.render.RendererEntityEndSlime;
|
||||||
import ru.betterend.entity.render.RendererEntityJello;
|
import ru.betterend.entity.render.RendererEntityCubozoa;
|
||||||
import ru.betterend.entity.render.RendererEntityShadowWalker;
|
import ru.betterend.entity.render.RendererEntityShadowWalker;
|
||||||
|
|
||||||
public class EndEntitiesRenders {
|
public class EndEntitiesRenders {
|
||||||
|
@ -19,7 +19,7 @@ public class EndEntitiesRenders {
|
||||||
register(EndEntities.END_SLIME, RendererEntityEndSlime::new);
|
register(EndEntities.END_SLIME, RendererEntityEndSlime::new);
|
||||||
register(EndEntities.END_FISH, RendererEntityEndFish::new);
|
register(EndEntities.END_FISH, RendererEntityEndFish::new);
|
||||||
register(EndEntities.SHADOW_WALKER, RendererEntityShadowWalker::new);
|
register(EndEntities.SHADOW_WALKER, RendererEntityShadowWalker::new);
|
||||||
register(EndEntities.JELLO, RendererEntityJello::new);
|
register(EndEntities.CUBOZOA, RendererEntityCubozoa::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void register(EntityType<?> type, Function<EntityRenderDispatcher, MobEntityRenderer<?, ?>> render) {
|
private static void register(EntityType<?> type, Function<EntityRenderDispatcher, MobEntityRenderer<?, ?>> render) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class BiomeFoggyMushroomland extends EndBiome {
|
||||||
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
.addStructureFeature(ConfiguredStructureFeatures.END_CITY)
|
||||||
.addMobSpawn(EndEntities.DRAGONFLY, 80, 2, 5)
|
.addMobSpawn(EndEntities.DRAGONFLY, 80, 2, 5)
|
||||||
.addMobSpawn(EndEntities.END_FISH, 20, 2, 5)
|
.addMobSpawn(EndEntities.END_FISH, 20, 2, 5)
|
||||||
.addMobSpawn(EndEntities.JELLO, 10, 3, 8)
|
.addMobSpawn(EndEntities.CUBOZOA, 10, 3, 8)
|
||||||
.addMobSpawn(EndEntities.END_SLIME, 10, 1, 2)
|
.addMobSpawn(EndEntities.END_SLIME, 10, 1, 2)
|
||||||
.addMobSpawn(EntityType.ENDERMAN, 10, 1, 2));
|
.addMobSpawn(EntityType.ENDERMAN, 10, 1, 2));
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ public class BiomeMegalake extends EndBiome {
|
||||||
.addFeature(EndFeatures.MENGER_SPONGE)
|
.addFeature(EndFeatures.MENGER_SPONGE)
|
||||||
.addMobSpawn(EndEntities.DRAGONFLY, 50, 1, 3)
|
.addMobSpawn(EndEntities.DRAGONFLY, 50, 1, 3)
|
||||||
.addMobSpawn(EndEntities.END_FISH, 50, 3, 8)
|
.addMobSpawn(EndEntities.END_FISH, 50, 3, 8)
|
||||||
.addMobSpawn(EndEntities.JELLO, 50, 3, 8)
|
.addMobSpawn(EndEntities.CUBOZOA, 50, 3, 8)
|
||||||
.addMobSpawn(EntityType.ENDERMAN, 10, 1, 2));
|
.addMobSpawn(EntityType.ENDERMAN, 10, 1, 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class BiomeMegalakeGrove extends EndBiome {
|
||||||
.addFeature(EndFeatures.MENGER_SPONGE)
|
.addFeature(EndFeatures.MENGER_SPONGE)
|
||||||
.addMobSpawn(EndEntities.DRAGONFLY, 20, 1, 3)
|
.addMobSpawn(EndEntities.DRAGONFLY, 20, 1, 3)
|
||||||
.addMobSpawn(EndEntities.END_FISH, 20, 3, 8)
|
.addMobSpawn(EndEntities.END_FISH, 20, 3, 8)
|
||||||
.addMobSpawn(EndEntities.JELLO, 50, 3, 8)
|
.addMobSpawn(EndEntities.CUBOZOA, 50, 3, 8)
|
||||||
.addMobSpawn(EntityType.ENDERMAN, 10, 1, 2));
|
.addMobSpawn(EntityType.ENDERMAN, 10, 1, 2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -423,6 +423,6 @@
|
||||||
"block.betterend.charnia_purple": "Purple Charnia",
|
"block.betterend.charnia_purple": "Purple Charnia",
|
||||||
"block.betterend.charnia_red": "Red Charnia",
|
"block.betterend.charnia_red": "Red Charnia",
|
||||||
|
|
||||||
"entity.betterend.jello": "Jello",
|
"entity.betterend.cubozoa": "Cubozoa",
|
||||||
"item.betterend.spawn_egg_jello": "Jello Spawn Egg"
|
"item.betterend.spawn_egg_cubozoa": "Cubozoa Spawn Egg"
|
||||||
}
|
}
|
|
@ -425,6 +425,6 @@
|
||||||
"block.betterend.charnia_purple": "Пурпурная чарния",
|
"block.betterend.charnia_purple": "Пурпурная чарния",
|
||||||
"block.betterend.charnia_red": "Красная чарния",
|
"block.betterend.charnia_red": "Красная чарния",
|
||||||
|
|
||||||
"entity.betterend.jello": "Желе",
|
"entity.betterend.cubozoa": "Кубомедуза",
|
||||||
"item.betterend.spawn_egg_jello": "Яйцо призыва желе"
|
"item.betterend.spawn_egg_cubozoa": "Яйцо призыва кубомедузы"
|
||||||
}
|
}
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Loading…
Add table
Add a link
Reference in a new issue