-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
162 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"meta":{"format_version":"4.0","creation_time":1651947086,"model_format":"modded_entity","box_uv":true},"name":"BackpackCrafting","geometry_name":"","modded_entity_version":"1.15_mojmaps","visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"resolution":{"width":32,"height":32},"elements":[{"name":"table","rescale":false,"locked":false,"from":[-4,-4,-4],"to":[4,4,4],"autouv":0,"color":0,"origin":[0,0,0],"faces":{"north":{"uv":[8,8,16,16],"texture":0},"east":{"uv":[0,8,8,16],"texture":0},"south":{"uv":[24,8,32,16],"texture":0},"west":{"uv":[16,8,24,16],"texture":0},"up":{"uv":[16,8,8,0],"texture":0},"down":{"uv":[24,0,16,8],"texture":0}},"type":"cube","uuid":"55203d27-0b71-1cef-1b4c-a7995d3b3b20"}],"outliner":[{"name":"table","origin":[0,0,0],"color":0,"uuid":"e15e2c02-2573-f919-6f81-55536df2b501","export":true,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["55203d27-0b71-1cef-1b4c-a7995d3b3b20"]}],"textures":[{"path":"C:\\Users\\hammy3502\\Desktop\\Forge\\immersive-mc\\src\\main\\resources\\assets\\immersivemc\\crafting.png","name":"crafting.png","folder":"block","namespace":"","id":"0","particle":false,"render_mode":"default","visible":true,"mode":"bitmap","saved":true,"uuid":"c8c866b2-f2e8-9229-266e-60f81c6e90ec","relative_path":"../../src/main/resources/assets/immersivemc/crafting.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAYxJREFUWEdjZCAAtlx5+B+fkvm9k/GasHZ+DyM+BXglQRpBDrBQkWEQ4WBmePPjL4pZJ+48YQA5QFpcAqsdT1++YKCLA9bO78HqgODEEuo6ANkWUGjAQgDkgLwKiCMmdZSA2SB6+DkAVxqgWxQMWCKkaTZ0ftGLN59LXEnHm89nnpqEV54l/A1eeUaQAyzExRhaGWNRFFb/X8xw4uUrBpADFCS44XKtOpCio/rKf4YHL74ygBzArSgHFmOMjIGr+798CcPX+48YQA7gUO7DcMT/HzMZfj69yYDiAJClyACXA0CWgwCyA0CWgyxFBsgOAFmIDjAcAPYZkiNIdQBIP7IjYA5gl1ZnYORIZ0B3BIoDYK4DRQXMEeRGAcwRyA4ARxEHJD3BHAJ3wF6JYoz4BwlgcwBIHJQOkNMAT1UVin50B8DSAMhi5JDAGgLoaQDdcTB5bIkQPY7RowAmjxEC+PIJKBcsdeFhiN7zBasyirMhPsvpIUewPUBrR4w6YDQERkNgNARGQ2A0BEZDAAAY10NgBpvC7AAAAABJRU5ErkJggg=="}]} |
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
41 changes: 41 additions & 0 deletions
41
src/main/java/net/blf02/immersivemc/client/model/BackpackCraftingModel.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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package net.blf02.immersivemc.client.model; | ||
|
||
import com.mojang.blaze3d.matrix.MatrixStack; | ||
import com.mojang.blaze3d.vertex.IVertexBuilder; | ||
import net.blf02.immersivemc.ImmersiveMC; | ||
import net.minecraft.client.renderer.entity.model.EntityModel; | ||
import net.minecraft.client.renderer.model.ModelRenderer; | ||
import net.minecraft.entity.Entity; | ||
import net.minecraft.util.ResourceLocation; | ||
|
||
// 99% exported from BlockBench | ||
public class BackpackCraftingModel extends EntityModel<Entity> { | ||
|
||
public static final ResourceLocation textureLocation = new ResourceLocation(ImmersiveMC.MOD_ID, "crafting.png"); | ||
private final ModelRenderer table; | ||
|
||
public BackpackCraftingModel() { | ||
texWidth = 32; | ||
texHeight = 32; | ||
|
||
table = new ModelRenderer(this); | ||
table.setPos(0.0F, 24.0F, 0.0F); | ||
table.texOffs(0, 0).addBox(-4.0F, -4.0F, -4.0F, 8.0F, 8.0F, 8.0F, 0.0F, false); | ||
} | ||
|
||
@Override | ||
public void setupAnim(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch){ | ||
//previously the render function, render code was moved to a method below | ||
} | ||
|
||
@Override | ||
public void renderToBuffer(MatrixStack matrixStack, IVertexBuilder buffer, int packedLight, int packedOverlay, float red, float green, float blue, float alpha){ | ||
table.render(matrixStack, buffer, packedLight, packedOverlay, red, green, blue, alpha); | ||
} | ||
|
||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) { | ||
modelRenderer.xRot = x; | ||
modelRenderer.yRot = y; | ||
modelRenderer.zRot = z; | ||
} | ||
} |
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
Oops, something went wrong.