Conversation
Still need to handle spawning.
| } | ||
|
|
||
| @Override | ||
| public void render(CheeseSlimeEntity cheeseSlime, float f, float g, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) { |
There was a problem hiding this comment.
I think tickDelta, partialTick and partialTicks are used fairly interchangeably (which I might standardise at some point), but any of these should give people reading the code a better idea of what these numbers represent than just single letters.
| float h = cheeseSlime.getSize(); | ||
| float i = Mth.lerp(f, cheeseSlime.oSquish, cheeseSlime.squish) / (h * 0.5F + 1.0F); | ||
| float j = 1.0F / (i + 1.0F); | ||
| poseStack.scale(j * h, 1.0F / j * h, j * h); |
There was a problem hiding this comment.
h divided by j would be much clearer, if indeed that is what you intended.
| poseStack.scale(j * h, 1.0F / j * h, j * h); | |
| poseStack.scale(j * h, h / j, j * h); |
| } | ||
|
|
||
| @Override | ||
| protected void scale(CheeseSlimeEntity cheeseSlime, PoseStack poseStack, float f) { |
There was a problem hiding this comment.
I think the float f here is also the tickDelta/partialTick/partialTicks.
|
|
||
| import java.util.EnumSet; | ||
|
|
||
| public class CheeseSlimeEntity extends Mob implements Enemy { |
There was a problem hiding this comment.
Is there a reason you aren't extending Slime, which would remove the need for so much duplicated code?
| this.model = new SlimeModel<>(set.bakeLayer(ModelLayers.SLIME_OUTER)); | ||
| } | ||
|
|
||
| public void render(PoseStack poseStack, MultiBufferSource multiBufferSource, int i, T livingEntity, float f, float g, float h, float j, float k, float l) { |
There was a problem hiding this comment.
It is better to use more descriptive names rather than single characters, but I do appreciate that it can be hard to find what variables represent/should be called sometimes.

Adds a Cheese Slime to the game. Basically the same as a normal slime but with a new skin. Can adapt and make changes as code is completely separate to a Slime.
Plan is to use it on the moon in the cheese caves.
Could possibly do with a better texture. Can change the model to suit if necessary.