-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from modmuss50/1.15
1.15
- Loading branch information
Showing
7 changed files
with
114 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
src/main/java/com/reddit/user/koppeh/flamingo/client/FlamingoClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package com.reddit.user.koppeh.flamingo.client; | ||
|
||
import com.reddit.user.koppeh.flamingo.FlamingoBlockEntity; | ||
import com.reddit.user.koppeh.flamingo.Flamingo; | ||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.client.render.BlockEntityRendererRegistry; | ||
import net.fabricmc.fabric.api.client.rendereregistry.v1.BlockEntityRendererRegistry; | ||
|
||
public class FlamingoClient implements ClientModInitializer { | ||
@Override | ||
public void onInitializeClient() { | ||
BlockEntityRendererRegistry.INSTANCE.register(FlamingoBlockEntity.class, new FlamingoBlockEntityRenderer()); | ||
BlockEntityRendererRegistry.INSTANCE.register(Flamingo.FLAMINGO_BLOCK_ENTITY, FlamingoBlockEntityRenderer::new); | ||
} | ||
} |
145 changes: 72 additions & 73 deletions
145
src/main/java/com/reddit/user/koppeh/flamingo/client/FlamingoModel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,115 +1,114 @@ | ||
package com.reddit.user.koppeh.flamingo.client; | ||
|
||
import net.minecraft.client.model.Cuboid; | ||
import net.minecraft.client.model.ModelPart; | ||
import net.minecraft.client.render.VertexConsumer; | ||
import net.minecraft.client.render.entity.model.EntityModel; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import net.minecraft.entity.Entity; | ||
|
||
public class FlamingoModel extends EntityModel { | ||
|
||
Cuboid beak; | ||
Cuboid beakBase; | ||
Cuboid head; | ||
Cuboid neck; | ||
Cuboid neckBase; | ||
Cuboid bodyWingsMain; | ||
Cuboid bodyWingsSecond; | ||
Cuboid bodyMain; | ||
Cuboid bodyTail; | ||
Cuboid legRight; | ||
Cuboid legLeft1; | ||
Cuboid legLeft2; | ||
Cuboid legLeft3; | ||
ModelPart beak; | ||
ModelPart beakBase; | ||
ModelPart head; | ||
ModelPart neck; | ||
ModelPart neckBase; | ||
ModelPart bodyWingsMain; | ||
ModelPart bodyWingsSecond; | ||
ModelPart bodyMain; | ||
ModelPart bodyTail; | ||
ModelPart legRight; | ||
ModelPart legLeft1; | ||
ModelPart legLeft2; | ||
ModelPart legLeft3; | ||
|
||
public FlamingoModel() { | ||
beak = new Cuboid(this, 0, 3).setTextureSize(64, 64); | ||
beak.addBox(-0.5F, 0F, 0F, 1, 2, 1); | ||
beak.setRotationPoint(0F, 8F, -5F); | ||
beak = new ModelPart(this, 0, 3).setTextureSize(64, 64); | ||
beak.addCuboid(-0.5F, 0F, 0F, 1, 2, 1); | ||
beak.setPivot(0F, 8F, -5F); | ||
beak.setTextureSize(64, 64); | ||
|
||
beakBase = new Cuboid(this, 4, 3).setTextureSize(64, 64); | ||
beakBase.addBox(-0.5F, 0F, 0F, 1, 1, 1); | ||
beakBase.setRotationPoint(0F, 8F, -4F); | ||
beakBase = new ModelPart(this, 4, 3).setTextureSize(64, 64); | ||
beakBase.addCuboid(-0.5F, 0F, 0F, 1, 1, 1); | ||
beakBase.setPivot(0F, 8F, -4F); | ||
beakBase.setTextureSize(64, 64); | ||
|
||
head = new Cuboid(this, 8, 0).setTextureSize(64, 64); | ||
head.addBox(-1F, 0F, 0F, 2, 2, 3); | ||
head.setRotationPoint(0F, 7F, -3F); | ||
head = new ModelPart(this, 8, 0).setTextureSize(64, 64); | ||
head.addCuboid(-1F, 0F, 0F, 2, 2, 3); | ||
head.setPivot(0F, 7F, -3F); | ||
head.setTextureSize(64, 64); | ||
|
||
neck = new Cuboid(this, 10, 5).setTextureSize(64, 64); | ||
neck.addBox(-1F, 0F, 0F, 2, 3, 2); | ||
neck.setRotationPoint(0F, 9F, -2F); | ||
neck = new ModelPart(this, 10, 5).setTextureSize(64, 64); | ||
neck.addCuboid(-1F, 0F, 0F, 2, 3, 2); | ||
neck.setPivot(0F, 9F, -2F); | ||
neck.setTextureSize(64, 64); | ||
|
||
neckBase = new Cuboid(this, 6, 10).setTextureSize(64, 64); | ||
neckBase.addBox(-1F, 0F, 0F, 2, 5, 2); | ||
neckBase.setRotationPoint(0F, 11F, -3F); | ||
neckBase = new ModelPart(this, 6, 10).setTextureSize(64, 64); | ||
neckBase.addCuboid(-1F, 0F, 0F, 2, 5, 2); | ||
neckBase.setPivot(0F, 11F, -3F); | ||
neckBase.setTextureSize(64, 64); | ||
|
||
bodyMain = new Cuboid(this, 26, 17).setTextureSize(64, 64); | ||
bodyMain.addBox(-2F, 0F, 0F, 4, 4, 6); | ||
bodyMain.setRotationPoint(0F, 14F, -2F); | ||
bodyMain = new ModelPart(this, 26, 17).setTextureSize(64, 64); | ||
bodyMain.addCuboid(-2F, 0F, 0F, 4, 4, 6); | ||
bodyMain.setPivot(0F, 14F, -2F); | ||
bodyMain.setTextureSize(64, 64); | ||
|
||
bodyWingsMain = new Cuboid(this, 6, 17).setTextureSize(64, 64); | ||
bodyWingsMain.addBox(-3F, 0F, 0F, 6, 3, 4); | ||
bodyWingsMain.setRotationPoint(0F, 14F, -2F); | ||
bodyWingsMain = new ModelPart(this, 6, 17).setTextureSize(64, 64); | ||
bodyWingsMain.addCuboid(-3F, 0F, 0F, 6, 3, 4); | ||
bodyWingsMain.setPivot(0F, 14F, -2F); | ||
bodyWingsMain.setTextureSize(64, 64); | ||
|
||
bodyWingsSecond = new Cuboid(this, 12, 24).setTextureSize(64, 64); | ||
bodyWingsSecond.addBox(-3F, 0F, 0F, 6, 1, 1); | ||
bodyWingsSecond.setRotationPoint(0F, 16F, 2F); | ||
bodyWingsSecond = new ModelPart(this, 12, 24).setTextureSize(64, 64); | ||
bodyWingsSecond.addCuboid(-3F, 0F, 0F, 6, 1, 1); | ||
bodyWingsSecond.setPivot(0F, 16F, 2F); | ||
bodyWingsSecond.setTextureSize(64, 64); | ||
|
||
bodyTail = new Cuboid(this, 46, 17).setTextureSize(64, 64); | ||
bodyTail.addBox(-2F, 0F, 0F, 4, 1, 2); | ||
bodyTail.setRotationPoint(0F, 14F, 4F); | ||
bodyTail = new ModelPart(this, 46, 17).setTextureSize(64, 64); | ||
bodyTail.addCuboid(-2F, 0F, 0F, 4, 1, 2); | ||
bodyTail.setPivot(0F, 14F, 4F); | ||
bodyTail.setTextureSize(64, 64); | ||
|
||
legRight = new Cuboid(this, 24, 27).setTextureSize(64, 64); | ||
legRight.addBox(-1F, 0F, 0F, 1, 6, 1); | ||
legRight.setRotationPoint(0F, 18F, 1F); | ||
legRight = new ModelPart(this, 24, 27).setTextureSize(64, 64); | ||
legRight.addCuboid(-1F, 0F, 0F, 1, 6, 1); | ||
legRight.setPivot(0F, 18F, 1F); | ||
legRight.setTextureSize(64, 64); | ||
|
||
legLeft1 = new Cuboid(this, 20, 27).setTextureSize(64, 64); | ||
legLeft1.addBox(0F, 0F, 0F, 1, 1, 1); | ||
legLeft1.setRotationPoint(0F, 18F, 0F); | ||
legLeft1 = new ModelPart(this, 20, 27).setTextureSize(64, 64); | ||
legLeft1.addCuboid(0F, 0F, 0F, 1, 1, 1); | ||
legLeft1.setPivot(0F, 18F, 0F); | ||
legLeft1.setTextureSize(64, 64); | ||
|
||
legLeft2 = new Cuboid(this, 16, 29).setTextureSize(64, 64); | ||
legLeft2.addBox(0F, 0F, 0F, 1, 1, 1); | ||
legLeft2.setRotationPoint(0F, 19F, -1F); | ||
legLeft2 = new ModelPart(this, 16, 29).setTextureSize(64, 64); | ||
legLeft2.addCuboid(0F, 0F, 0F, 1, 1, 1); | ||
legLeft2.setPivot(0F, 19F, -1F); | ||
legLeft2.setTextureSize(64, 64); | ||
|
||
legLeft3 = new Cuboid(this, 12, 31).setTextureSize(64, 64); | ||
legLeft3.addBox(0F, 0F, 0F, 1, 1, 5); | ||
legLeft3.setRotationPoint(0F, 20F, -2F); | ||
legLeft3 = new ModelPart(this, 12, 31).setTextureSize(64, 64); | ||
legLeft3.addCuboid(0F, 0F, 0F, 1, 1, 5); | ||
legLeft3.setPivot(0F, 20F, -2F); | ||
legLeft3.setTextureSize(64, 64); | ||
|
||
} | ||
|
||
@Override | ||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { | ||
super.render(entity, f, f1, f2, f3, f4, f5); | ||
|
||
// setRotationAngles(f, f1, f2, f3, f4, f5, null); | ||
beak.render(f5); | ||
beakBase.render(f5); | ||
head.render(f5); | ||
neck.render(f5); | ||
neckBase.render(f5); | ||
bodyWingsMain.render(f5); | ||
bodyWingsSecond.render(f5); | ||
bodyMain.render(f5); | ||
bodyTail.render(f5); | ||
legRight.render(f5); | ||
legLeft1.render(f5); | ||
legLeft2.render(f5); | ||
legLeft3.render(f5); | ||
public void setAngles(Entity entity, float limbAngle, float limbDistance, float age, float headYaw, float headPitch) { | ||
|
||
} | ||
|
||
public void renderAll() { | ||
render(null, 0, 0, 0, 0, 0, 1 / 16.0F); | ||
@Override | ||
public void render(MatrixStack matrixStack, VertexConsumer vertexConsumer, int i, int j, float r, float g, float b, float f) { | ||
beak.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
beakBase.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
head.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
neck.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
neckBase.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
bodyWingsMain.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
bodyWingsSecond.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
bodyMain.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
bodyTail.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
legRight.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
legLeft1.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
legLeft2.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
legLeft3.render(matrixStack, vertexConsumer, i, j, r, g, b, f); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters