Skip to content

Conversation

@ScottRox
Copy link
Contributor

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.

@Roelymole
Copy link
Contributor

I like the idea of cheese slimes! There are a few things I have spotted which will need to be addressed.

2025-10-18_10 58 32
  • The particles when they land are still the default green.
  • They should be able to breathe on the Moon if that's where they are going to be found.
  • The large/medium cheese slimes currently drop cheese curd when they die, which might be fine (Magma Cubes have this behaviour), but the drop chance should probably be lowered if this is the case.

}

@Override
public void render(CheeseSlimeEntity cheeseSlime, float f, float g, PoseStack poseStack, MultiBufferSource multiBufferSource, int i) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

public void render(BubbleEntity entity, float yaw, float tickDelta, PoseStack matrices, MultiBufferSource vertexConsumers, int light) {

public void render(RocketEntity entity, float yaw, float partialTick, PoseStack matrices, MultiBufferSource vertexConsumers, int light) {

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

h divided by j would be much clearer, if indeed that is what you intended.

Suggested change
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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the float f here is also the tickDelta/partialTick/partialTicks.


import java.util.EnumSet;

public class CheeseSlimeEntity extends Mob implements Enemy {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

public void render(PoseStack matrices, MultiBufferSource vertexConsumers, int light, T entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants