Ported ISTERs

- Removed temporary lang partial with entity names
- Fixed and Refactored the item renderers of the Wrench, Blockzappers, Worldshapers, Symmetry Wand and Deforester
- Tweaked blockzapper beam rendering to look less clunky
- Fixed selection of zapper tools not showing after they had been dual-wielded
This commit is contained in:
simibubi 2020-06-04 15:04:49 +02:00
parent 77835c3a65
commit 82a2d128f1
38 changed files with 542 additions and 462 deletions

View file

@ -272,7 +272,7 @@ b7829c2ef2c47188713f8cab21b2c9bc7f9c5b79 assets\create\blockstates\portable_stor
e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets\create\blockstates\powered_toggle_latch.json e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets\create\blockstates\powered_toggle_latch.json
3a739f9d4276828d83f2d2750bf3227c87bcd438 assets\create\blockstates\pulley_magnet.json 3a739f9d4276828d83f2d2750bf3227c87bcd438 assets\create\blockstates\pulley_magnet.json
469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets\create\blockstates\pulse_repeater.json 469e430d96cb0a5e1aaf6b7cc5d401d488c9e600 assets\create\blockstates\pulse_repeater.json
5c1df061eb5efe49beee7219e113206fc31a4733 assets\create\blockstates\radial_chassis.json 4e1fb033316e9230d2f024d67c27940ea731643a assets\create\blockstates\radial_chassis.json
8929677f2cc5354aa19ef182af69f9f0b41eb242 assets\create\blockstates\redstone_contact.json 8929677f2cc5354aa19ef182af69f9f0b41eb242 assets\create\blockstates\redstone_contact.json
c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets\create\blockstates\redstone_link.json c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets\create\blockstates\redstone_link.json
e2990fe70ad5d10437a376e70e167d1856277cc1 assets\create\blockstates\rope.json e2990fe70ad5d10437a376e70e167d1856277cc1 assets\create\blockstates\rope.json
@ -323,8 +323,8 @@ c60c3115fd6eeaa3a696428a87a74d184ab7d62d assets\create\blockstates\weathered_lim
c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets\create\blockstates\weathered_limestone_pillar.json c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets\create\blockstates\weathered_limestone_pillar.json
7f39521b211441f5c3e06d60c5978cebe16cacfb assets\create\blockstates\zinc_block.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets\create\blockstates\zinc_block.json
b7181bcd8182b2f17088e5aa881f374c9c65470c assets\create\blockstates\zinc_ore.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets\create\blockstates\zinc_ore.json
c47cfc7aae111eb9136f9cd3b6240669f920550d assets\create\lang\en_ud.json bf385ee965d828085374a6a31614cf0fc04c0c0c assets\create\lang\en_ud.json
9691b16416906b5f42f30420210d9f3937defed0 assets\create\lang\en_us.json 4524b8b3180676a54234d5c97c2bbda0f239b1d1 assets\create\lang\en_us.json
846200eb548d3bfa2e77b41039de159b4b6cfb45 assets\create\models\block\acacia_window.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets\create\models\block\acacia_window.json
1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets\create\models\block\acacia_window_pane_noside.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets\create\models\block\acacia_window_pane_noside.json
1763ea2c9b981d187f5031ba608f3d5d3be3986a assets\create\models\block\acacia_window_pane_noside_alt.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets\create\models\block\acacia_window_pane_noside_alt.json
@ -1280,7 +1280,6 @@ a135eec618e448f440d9f42cc7a3e6c63fc45a71 data\create\advancements\overstressed.j
1e3cd82e36fd4bcd053d652a0eead4458ed7f315 data\create\advancements\press.json 1e3cd82e36fd4bcd053d652a0eead4458ed7f315 data\create\advancements\press.json
b2782692d27ffb105e3167174cebe1ebdd4a9867 data\create\advancements\recipes\create.base\brass_block.json b2782692d27ffb105e3167174cebe1ebdd4a9867 data\create\advancements\recipes\create.base\brass_block.json
df6f220e693f5256bb3df8d6c7769bc931820ae5 data\create\advancements\recipes\create.base\copper_block.json df6f220e693f5256bb3df8d6c7769bc931820ae5 data\create\advancements\recipes\create.base\copper_block.json
22e0798a182df482aa6e7b3da5312ea2e21b9e7d data\create\advancements\recipes\create.base\copper_shingles.json
82280c50b78dd7e8c179cb8e8f0c074b26ec9586 data\create\advancements\recipes\create.base\zinc_block.json 82280c50b78dd7e8c179cb8e8f0c074b26ec9586 data\create\advancements\recipes\create.base\zinc_block.json
909345eb2f5541a2be592a52800319a8765ca345 data\create\advancements\recipes\create.palettes\acacia_window.json 909345eb2f5541a2be592a52800319a8765ca345 data\create\advancements\recipes\create.palettes\acacia_window.json
73f99cd857b056da5e19ff8304a4f5eeacc4f8cd data\create\advancements\recipes\create.palettes\acacia_window_pane.json 73f99cd857b056da5e19ff8304a4f5eeacc4f8cd data\create\advancements\recipes\create.palettes\acacia_window_pane.json
@ -2021,7 +2020,6 @@ c323b106e88b7de77fea71ff12494abdbb818d15 data\create\recipes\chiseled_limestone_
da9a919b476954c1de34826aa7706bf6056a8f12 data\create\recipes\chiseled_scoria_from_scoria_stonecutting.json da9a919b476954c1de34826aa7706bf6056a8f12 data\create\recipes\chiseled_scoria_from_scoria_stonecutting.json
09faa4ddcf9f3907dcdb3ab3e8b68c1deb2486e5 data\create\recipes\chiseled_weathered_limestone_from_weathered_limestone_stonecutting.json 09faa4ddcf9f3907dcdb3ab3e8b68c1deb2486e5 data\create\recipes\chiseled_weathered_limestone_from_weathered_limestone_stonecutting.json
386c52f0aad6e2239f31dc85f7e745b47230846b data\create\recipes\copper_block.json 386c52f0aad6e2239f31dc85f7e745b47230846b data\create\recipes\copper_block.json
f863c101808434316da5261b0274f09d80065ea5 data\create\recipes\copper_shingles.json
f2c317e03ac4d42fb631e1625607061e10c480fe data\create\recipes\dark_oak_window.json f2c317e03ac4d42fb631e1625607061e10c480fe data\create\recipes\dark_oak_window.json
d9dbae6e237eb38e53a619a0f1b339fca7c59b4d data\create\recipes\dark_oak_window_pane.json d9dbae6e237eb38e53a619a0f1b339fca7c59b4d data\create\recipes\dark_oak_window_pane.json
55596a590962e3ddd40949917661f0bd94408274 data\create\recipes\dark_scoria_bricks_from_dark_scoria_stonecutting.json 55596a590962e3ddd40949917661f0bd94408274 data\create\recipes\dark_scoria_bricks_from_dark_scoria_stonecutting.json

View file

@ -29,8 +29,8 @@
}, },
{ {
"when": { "when": {
"sticky_south": "true", "axis": "x",
"axis": "x" "sticky_south": "true"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -39,8 +39,8 @@
}, },
{ {
"when": { "when": {
"sticky_south": "true", "axis": "y",
"axis": "y" "sticky_south": "true"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y_sticky" "model": "create:block/radial_chassis_side_y_sticky"
@ -48,8 +48,8 @@
}, },
{ {
"when": { "when": {
"sticky_south": "true", "axis": "z",
"axis": "z" "sticky_south": "true"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x_sticky", "model": "create:block/radial_chassis_side_x_sticky",
@ -59,8 +59,8 @@
}, },
{ {
"when": { "when": {
"sticky_south": "false", "axis": "x",
"axis": "x" "sticky_south": "false"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",
@ -69,8 +69,8 @@
}, },
{ {
"when": { "when": {
"sticky_south": "false", "axis": "y",
"axis": "y" "sticky_south": "false"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_y" "model": "create:block/radial_chassis_side_y"
@ -78,8 +78,8 @@
}, },
{ {
"when": { "when": {
"sticky_south": "false", "axis": "z",
"axis": "z" "sticky_south": "false"
}, },
"apply": { "apply": {
"model": "create:block/radial_chassis_side_x", "model": "create:block/radial_chassis_side_x",

View file

@ -324,6 +324,9 @@
"block.create.weathered_limestone_pillar": "\u0279\u0250\u05DF\u05DF\u0131\u0500 \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM", "block.create.weathered_limestone_pillar": "\u0279\u0250\u05DF\u05DF\u0131\u0500 \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM",
"block.create.zinc_block": "\u029E\u0254o\u05DF\u15FA \u0254u\u0131Z", "block.create.zinc_block": "\u029E\u0254o\u05DF\u15FA \u0254u\u0131Z",
"block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z", "block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z",
"entity.create.contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186",
"entity.create.stationary_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u028E\u0279\u0250uo\u0131\u0287\u0250\u0287S",
"entity.create.super_glue": "\u01DDn\u05DF\u2141 \u0279\u01DDdnS",
"item.create.andesite_alloy": "\u028Eo\u05DF\u05DF\u2C6F \u01DD\u0287\u0131s\u01DDpu\u2C6F", "item.create.andesite_alloy": "\u028Eo\u05DF\u05DF\u2C6F \u01DD\u0287\u0131s\u01DDpu\u2C6F",
"item.create.attribute_filter": "\u0279\u01DD\u0287\u05DF\u0131\u2132 \u01DD\u0287nq\u0131\u0279\u0287\u0287\u2C6F", "item.create.attribute_filter": "\u0279\u01DD\u0287\u05DF\u0131\u2132 \u01DD\u0287nq\u0131\u0279\u0287\u0287\u2C6F",
"item.create.belt_connector": "\u0287\u05DF\u01DD\u15FA \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW", "item.create.belt_connector": "\u0287\u05DF\u01DD\u15FA \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW",

View file

@ -328,6 +328,10 @@
"block.create.zinc_block": "Zinc Block", "block.create.zinc_block": "Zinc Block",
"block.create.zinc_ore": "Zinc Ore", "block.create.zinc_ore": "Zinc Ore",
"entity.create.contraption": "Contraption",
"entity.create.stationary_contraption": "Stationary Contraption",
"entity.create.super_glue": "Super Glue",
"item.create.andesite_alloy": "Andesite Alloy", "item.create.andesite_alloy": "Andesite Alloy",
"item.create.attribute_filter": "Attribute Filter", "item.create.attribute_filter": "Attribute Filter",
"item.create.belt_connector": "Mechanical Belt", "item.create.belt_connector": "Mechanical Belt",
@ -380,13 +384,6 @@
"item.create.zinc_nugget": "Zinc Nugget", "item.create.zinc_nugget": "Zinc Nugget",
"_": "->------------------------] We aren't in Registrate yet [------------------------<-",
"entity.create.contraption": "Moving Contraption",
"entity.create.stationary_contraption": "Stationary Contraption",
"entity.create.super_glue": "Superglue",
"_": "->------------------------] Advancements [------------------------<-", "_": "->------------------------] Advancements [------------------------<-",
"advancement.create.root": "Welcome to Create", "advancement.create.root": "Welcome to Create",

View file

@ -1,32 +0,0 @@
{
"parent": "minecraft:recipes/root",
"rewards": {
"recipes": [
"create:copper_shingles"
]
},
"criteria": {
"has_plates_copper": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"tag": "forge:plates/copper"
}
]
}
},
"has_the_recipe": {
"trigger": "minecraft:recipe_unlocked",
"conditions": {
"recipe": "create:copper_shingles"
}
}
},
"requirements": [
[
"has_plates_copper",
"has_the_recipe"
]
]
}

View file

@ -1,15 +0,0 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
"XX",
"XX"
],
"key": {
"X": {
"tag": "forge:plates/copper"
}
},
"result": {
"item": "create:copper_shingles"
}
}

View file

@ -1,40 +1,29 @@
package com.simibubi.create.content.contraptions.wrench; package com.simibubi.create.content.contraptions.wrench;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.block.render.CustomRenderedItemModelRenderer;
import com.simibubi.create.foundation.item.PartialItemModelRenderer;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Vector3f; import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class WrenchItemRenderer extends ItemStackTileEntityRenderer { public class WrenchItemRenderer extends CustomRenderedItemModelRenderer<WrenchModel> {
@Override @Override
public void render(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { protected void render(ItemStack stack, WrenchModel model, PartialItemModelRenderer renderer, MatrixStack ms,
IRenderTypeBuffer buffer, int light, int overlay) {
renderer.render(model.getBakedModel(), light);
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer();
WrenchModel mainModel = (WrenchModel) itemRenderer.getItemModelWithOverrides(stack, Minecraft.getInstance().world, Minecraft.getInstance().player);
float worldTime = AnimationTickHolder.getRenderTick(); float worldTime = AnimationTickHolder.getRenderTick();
ms.push();
ms.translate(0.5F, 0.5F, 0.5F);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, mainModel.getBakedModel());
float angle = worldTime * -.5f % 360; float angle = worldTime * -.5f % 360;
float xOffset = -1/32f; float xOffset = -1/32f;
float zOffset = 0; ms.translate(-xOffset, 0, 0);
ms.translate(-xOffset, 0, -zOffset);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle)); ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle));
ms.translate(xOffset, 0, zOffset); ms.translate(xOffset, 0, 0);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, mainModel.getPartial("gear")); renderer.render(model.getPartial("gear"), light);
ms.pop();
} }
} }

View file

@ -1,38 +1,34 @@
package com.simibubi.create.content.curiosities.symmetry.client; package com.simibubi.create.content.curiosities.symmetry.client;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.block.render.CustomRenderedItemModelRenderer;
import com.simibubi.create.foundation.item.PartialItemModelRenderer;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.Vector3f; import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
public class SymmetryWandItemRenderer extends ItemStackTileEntityRenderer { public class SymmetryWandItemRenderer extends CustomRenderedItemModelRenderer<SymmetryWandModel> {
@Override @Override
public void render(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { protected void render(ItemStack stack, SymmetryWandModel model, PartialItemModelRenderer renderer, MatrixStack ms,
IRenderTypeBuffer buffer, int light, int overlay) {
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer();
SymmetryWandModel mainModel = (SymmetryWandModel) itemRenderer.getItemModelWithOverrides(stack, null, null);
float worldTime = AnimationTickHolder.getRenderTick() / 20; float worldTime = AnimationTickHolder.getRenderTick() / 20;
int maxLight = 0xF000F0;
ms.push(); renderer.render(model.getBakedModel(), light);
ms.translate(0.5F, 0.5F, 0.5F); renderer.renderSolidGlowing(model.getPartial("core"), maxLight);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, mainModel.getBakedModel()); renderer.renderGlowing(model.getPartial("core_glow"), maxLight);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, 0xF000F0, overlay, mainModel.getPartial("core"));
float floating = MathHelper.sin(worldTime) * .05f; float floating = MathHelper.sin(worldTime) * .05f;
ms.translate(0, floating, 0);
float angle = worldTime * -10 % 360; float angle = worldTime * -10 % 360;
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle));
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, 0xF000F0, overlay, mainModel.getPartial("bits"));
ms.pop(); ms.translate(0, floating, 0);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle));
renderer.renderGlowing(model.getPartial("bits"), maxLight);
} }
} }

View file

@ -9,7 +9,7 @@ public class SymmetryWandModel extends CustomRenderedItemModel {
public SymmetryWandModel(IBakedModel template) { public SymmetryWandModel(IBakedModel template) {
super(template, "wand_of_symmetry"); super(template, "wand_of_symmetry");
addPartials("bits", "core"); addPartials("bits", "core", "core_glow");
} }
@Override @Override

View file

@ -1,45 +1,30 @@
package com.simibubi.create.content.curiosities.tools; package com.simibubi.create.content.curiosities.tools;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.block.render.CustomRenderedItemModelRenderer;
import com.simibubi.create.foundation.item.PartialItemModelRenderer;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.Vector3f; import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class DeforesterItemRenderer extends ItemStackTileEntityRenderer { public class DeforesterItemRenderer extends CustomRenderedItemModelRenderer<DeforesterModel> {
@Override @Override
public void render(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { protected void render(ItemStack stack, DeforesterModel model, PartialItemModelRenderer renderer,
MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); int maxLight = 0xF000F0;
DeforesterModel mainModel = (DeforesterModel) itemRenderer.getItemModelWithOverrides(stack, Minecraft.getInstance().world, Minecraft.getInstance().player);
float worldTime = AnimationTickHolder.getRenderTick(); float worldTime = AnimationTickHolder.getRenderTick();
ms.push(); renderer.renderSolid(model.getBakedModel(), light);
ms.translate(0.5F, 0.5F, 0.5F); renderer.renderSolidGlowing(model.getPartial("core"), maxLight);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, mainModel.getBakedModel()); renderer.renderGlowing(model.getPartial("core_glow"), maxLight);
int brightLight = LightTexture.pack(15, 7);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, brightLight, overlay, mainModel.getPartial("light"));
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, brightLight, overlay, mainModel.getPartial("blade"));
float angle = worldTime * -.5f % 360; float angle = worldTime * -.5f % 360;
float xOffset = 0;
float zOffset = 0;
ms.translate(-xOffset, 0, -zOffset);
ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle)); ms.multiply(Vector3f.POSITIVE_Y.getDegreesQuaternion(angle));
ms.translate(xOffset, 0, zOffset); renderer.renderSolid(model.getPartial("gear"), light);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, brightLight, overlay, mainModel.getPartial("gear"));
ms.pop();
} }
} }

View file

@ -9,7 +9,7 @@ public class DeforesterModel extends CustomRenderedItemModel {
public DeforesterModel(IBakedModel template) { public DeforesterModel(IBakedModel template) {
super(template, "deforester"); super(template, "deforester");
addPartials("gear", "light", "blade"); addPartials("gear", "core", "core_glow");
} }
@Override @Override

View file

@ -1,35 +1,61 @@
package com.simibubi.create.content.curiosities.zapper; package com.simibubi.create.content.curiosities.zapper;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.block.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.block.render.CustomRenderedItemModelRenderer;
import com.simibubi.create.foundation.item.PartialItemModelRenderer;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.FourWayBlock; import net.minecraft.block.FourWayBlock;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType; import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTUtil; import net.minecraft.nbt.NBTUtil;
import net.minecraft.util.math.MathHelper;
public abstract class ZapperItemRenderer extends ItemStackTileEntityRenderer { public abstract class ZapperItemRenderer<M extends CustomRenderedItemModel> extends CustomRenderedItemModelRenderer<M> {
protected void renderBlockUsed(ItemStack stack, ItemRenderer itemRenderer, MatrixStack ms, IRenderTypeBuffer buffer, @Override
int light, int overlay) { protected void render(ItemStack stack, M model, PartialItemModelRenderer renderer, MatrixStack ms,
BlockState state = NBTUtil.readBlockState(stack.getTag().getCompound("BlockUsed")); IRenderTypeBuffer buffer, int light, int overlay) {
// Block indicator
if (model.getCurrentPerspective() == TransformType.GUI && stack.hasTag() && stack.getTag()
.contains("BlockUsed"))
renderBlockUsed(stack, ms, buffer, light, overlay);
}
private void renderBlockUsed(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
BlockState state = NBTUtil.readBlockState(stack.getTag()
.getCompound("BlockUsed"));
ms.push(); ms.push();
ms.translate(-0.3F, -0.45F, -0.0F); ms.translate(-0.3F, -0.45F, -0.0F);
ms.scale(0.25F, 0.25F, 0.25F); ms.scale(0.25F, 0.25F, 0.25F);
IBakedModel modelForState = Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(state); IBakedModel modelForState = Minecraft.getInstance()
.getBlockRendererDispatcher()
.getModelForState(state);
if (state.getBlock() instanceof FourWayBlock) if (state.getBlock() instanceof FourWayBlock)
modelForState = Minecraft.getInstance().getItemRenderer() modelForState = Minecraft.getInstance()
.getItemModelWithOverrides(new ItemStack(state.getBlock()), Minecraft.getInstance().world, null); .getItemRenderer()
.getItemModelWithOverrides(new ItemStack(state.getBlock()), Minecraft.getInstance().world, null);
itemRenderer.renderItem(new ItemStack(state.getBlock()), TransformType.NONE, false, ms, buffer, light, overlay, modelForState); Minecraft.getInstance()
.getItemRenderer()
.renderItem(new ItemStack(state.getBlock()), TransformType.NONE, false, ms, buffer, light, overlay,
modelForState);
ms.pop(); ms.pop();
} }
protected float getAnimationProgress(float pt, boolean leftHanded, boolean mainHand) {
float last = mainHand ^ leftHanded ? ZapperRenderHandler.lastRightHandAnimation
: ZapperRenderHandler.lastLeftHandAnimation;
float current =
mainHand ^ leftHanded ? ZapperRenderHandler.rightHandAnimation : ZapperRenderHandler.leftHandAnimation;
float animation = MathHelper.clamp(MathHelper.lerp(pt, last, current) * 5, 0, 1);
return animation;
}
} }

View file

@ -8,8 +8,6 @@ import java.util.function.Supplier;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.AllSoundEvents; import com.simibubi.create.AllSoundEvents;
import com.simibubi.create.CreateClient; import com.simibubi.create.CreateClient;
import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.ColorHelper;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.AbstractClientPlayerEntity; import net.minecraft.client.entity.player.AbstractClientPlayerEntity;
@ -62,12 +60,6 @@ public class ZapperRenderHandler {
this.mainHand = mainHand; this.mainHand = mainHand;
return this; return this;
} }
public Vec3d getStart() {
if (follow)
return getExactBarrelPos(mainHand);
return start;
}
} }
public static Vec3d getExactBarrelPos(boolean mainHand) { public static Vec3d getExactBarrelPos(boolean mainHand) {
@ -86,26 +78,26 @@ public class ZapperRenderHandler {
} }
public static void tick() { public static void tick() {
if (cachedBeams == null)
cachedBeams = new LinkedList<>();
cachedBeams.removeIf(b -> b.itensity < .1f);
cachedBeams.forEach(b -> b.itensity *= .4f);
lastLeftHandAnimation = leftHandAnimation; lastLeftHandAnimation = leftHandAnimation;
lastRightHandAnimation = rightHandAnimation; lastRightHandAnimation = rightHandAnimation;
leftHandAnimation *= 0.8f; leftHandAnimation *= 0.8f;
rightHandAnimation *= 0.8f; rightHandAnimation *= 0.8f;
if (cachedBeams == null || cachedBeams.isEmpty()) if (cachedBeams == null)
cachedBeams = new LinkedList<>();
cachedBeams.removeIf(b -> b.itensity < .1f);
if (cachedBeams.isEmpty())
return; return;
cachedBeams.forEach(beam -> { cachedBeams.forEach(beam -> {
CreateClient.outliner.showLine(beam, beam.getStart(), beam.end) CreateClient.outliner.endChasingLine(beam, beam.start, beam.end, 1 - beam.itensity)
.disableNormals() .disableNormals()
.colored(ColorHelper.mixColors(0xffffff, ColorHelper.rainbowColor(AnimationTickHolder.ticks), .colored(0xffffff)
MathHelper.clamp(beam.itensity * 3, 0, 1))) .lineWidth(beam.itensity * 1 / 8f);
.lineWidth(beam.itensity * 1 / 4f);
}); });
cachedBeams.forEach(b -> b.itensity *= .6f);
} }
public static void shoot(Hand hand) { public static void shoot(Hand hand) {

View file

@ -5,74 +5,63 @@ import static com.simibubi.create.content.curiosities.zapper.blockzapper.Blockza
import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Body; import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Body;
import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Retriever; import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Retriever;
import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Scope; import static com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components.Scope;
import static java.lang.Math.max;
import static net.minecraft.util.math.MathHelper.clamp;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.content.curiosities.zapper.ZapperItemRenderer; import com.simibubi.create.content.curiosities.zapper.ZapperItemRenderer;
import com.simibubi.create.content.curiosities.zapper.ZapperRenderHandler;
import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.ComponentTier; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.ComponentTier;
import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components;
import com.simibubi.create.foundation.item.PartialItemModelRenderer;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.Vector3f; import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.HandSide; import net.minecraft.util.HandSide;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
public class BlockzapperItemRenderer extends ZapperItemRenderer { public class BlockzapperItemRenderer extends ZapperItemRenderer<BlockzapperModel> {
@Override @Override
public void render(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { protected void render(ItemStack stack, BlockzapperModel model, PartialItemModelRenderer renderer, MatrixStack ms,
ItemRenderer itemRenderer = Minecraft.getInstance() IRenderTypeBuffer buffer, int light, int overlay) {
.getItemRenderer(); super.render(stack, model, renderer, ms, buffer, light, overlay);
BlockzapperModel mainModel =
(BlockzapperModel) itemRenderer.getItemModelWithOverrides(stack, Minecraft.getInstance().world, null);
float pt = Minecraft.getInstance() float pt = Minecraft.getInstance()
.getRenderPartialTicks(); .getRenderPartialTicks();
float worldTime = AnimationTickHolder.getRenderTick() / 20; float worldTime = AnimationTickHolder.getRenderTick() / 20;
ms.push(); renderer.render(model.getBakedModel(), light);
ms.translate(0.5F, 0.5F, 0.5F); renderComponent(stack, model, Body, renderer, light);
renderComponent(stack, model, Amplifier, renderer, light);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, renderComponent(stack, model, Retriever, renderer, light);
mainModel.getBakedModel()); renderComponent(stack, model, Scope, renderer, light);
renderComponent(stack, mainModel, Body, itemRenderer, ms, buffer, light, overlay);
renderComponent(stack, mainModel, Amplifier, itemRenderer, ms, buffer, light, overlay);
renderComponent(stack, mainModel, Retriever, itemRenderer, ms, buffer, light, overlay);
renderComponent(stack, mainModel, Scope, itemRenderer, ms, buffer, light, overlay);
// Block indicator
if (mainModel.getCurrentPerspective() == TransformType.GUI && stack.hasTag() && stack.getTag()
.contains("BlockUsed"))
renderBlockUsed(stack, itemRenderer, ms, buffer, light, overlay);
ClientPlayerEntity player = Minecraft.getInstance().player; ClientPlayerEntity player = Minecraft.getInstance().player;
boolean leftHanded = player.getPrimaryHand() == HandSide.LEFT; boolean leftHanded = player.getPrimaryHand() == HandSide.LEFT;
boolean mainHand = player.getHeldItemMainhand() == stack; boolean mainHand = player.getHeldItemMainhand() == stack;
boolean offHand = player.getHeldItemOffhand() == stack; boolean offHand = player.getHeldItemOffhand() == stack;
float last = mainHand ^ leftHanded ? ZapperRenderHandler.lastRightHandAnimation float animation = getAnimationProgress(pt, leftHanded, mainHand);
: ZapperRenderHandler.lastLeftHandAnimation;
float current =
mainHand ^ leftHanded ? ZapperRenderHandler.rightHandAnimation : ZapperRenderHandler.leftHandAnimation;
float animation = MathHelper.clamp(MathHelper.lerp(pt, last, current) * 5, 0, 1);
// Core glows // Core glows
float multiplier = MathHelper.sin(worldTime * 5); float multiplier = MathHelper.sin(worldTime * 5);
if (mainHand || offHand) { if (mainHand || offHand)
multiplier = animation; multiplier = animation;
int lightItensity = (int) (15 * clamp(multiplier, 0, 1));
int glowLight = LightTexture.pack(lightItensity, max(lightItensity, 4));
renderer.renderSolidGlowing(model.getPartial("core"), glowLight);
renderer.renderGlowing(model.getPartial("core_glow"), glowLight);
if (BlockzapperItem.getTier(Amplifier, stack) != ComponentTier.None) {
renderer.renderSolidGlowing(model.getPartial("amplifier_core"), glowLight);
renderer.renderGlowing(model.getPartial("amplifier_core_glow"), glowLight);
} }
int glowLight = LightTexture.pack(0, (int) (15 * multiplier));
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, glowLight, overlay,
mainModel.getPartial("core"));
if (BlockzapperItem.getTier(Amplifier, stack) != ComponentTier.None)
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, glowLight, overlay,
mainModel.getPartial("amplifier_core"));
// Accelerator spins // Accelerator spins
float angle = worldTime * -25; float angle = worldTime * -25;
@ -84,17 +73,15 @@ public class BlockzapperItemRenderer extends ZapperItemRenderer {
ms.translate(0, offset, 0); ms.translate(0, offset, 0);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(angle)); ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(angle));
ms.translate(0, -offset, 0); ms.translate(0, -offset, 0);
renderComponent(stack, mainModel, Accelerator, itemRenderer, ms, buffer, light, overlay); renderComponent(stack, model, Accelerator, renderer, light);
ms.pop();
} }
public void renderComponent(ItemStack stack, BlockzapperModel model, Components component, public void renderComponent(ItemStack stack, BlockzapperModel model, Components component,
ItemRenderer itemRenderer, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { PartialItemModelRenderer renderer, int light) {
ComponentTier tier = BlockzapperItem.getTier(component, stack); ComponentTier tier = BlockzapperItem.getTier(component, stack);
IBakedModel partial = model.getComponentPartial(tier, component); IBakedModel partial = model.getComponentPartial(tier, component);
if (partial != null) if (partial != null)
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, partial); renderer.render(partial, light);
} }
} }

View file

@ -13,9 +13,9 @@ public class BlockzapperModel extends CustomRenderedItemModel {
public BlockzapperModel(IBakedModel template) { public BlockzapperModel(IBakedModel template) {
super(template, "handheld_blockzapper"); super(template, "handheld_blockzapper");
addPartials("core", "body", "amplifier_core", "accelerator", "gold_body", "gold_scope", "gold_amplifier", addPartials("core", "core_glow", "body", "amplifier_core", "amplifier_core_glow", "accelerator", "gold_body",
"gold_retriever", "gold_accelerator", "chorus_body", "chorus_scope", "chorus_amplifier", "chorus_retriever", "gold_scope", "gold_amplifier", "gold_retriever", "gold_accelerator", "chorus_body", "chorus_scope",
"chorus_accelerator"); "chorus_amplifier", "chorus_retriever", "chorus_accelerator");
} }
@Override @Override

View file

@ -23,8 +23,7 @@ public class BlockzapperRenderHandler {
return; return;
CreateClient.outliner.showCluster("blockzapper", renderedShape) CreateClient.outliner.showCluster("blockzapper", renderedShape)
.colored(0x999999) .colored(0xbfbfbf)
.disableNormals()
.lineWidth(1 / 32f) .lineWidth(1 / 32f)
.withFaceTexture(AllSpecialTextures.CHECKERED); .withFaceTexture(AllSpecialTextures.CHECKERED);
} }
@ -38,7 +37,7 @@ public class BlockzapperRenderHandler {
if (zapperInMain) { if (zapperInMain) {
CompoundNBT tag = heldMain.getOrCreateTag(); CompoundNBT tag = heldMain.getOrCreateTag();
if (!tag.contains("_Swap")) { if (!tag.contains("_Swap") || !zapperInOff) {
createOutline(player, heldMain); createOutline(player, heldMain);
return; return;
} }

View file

@ -1,61 +1,50 @@
package com.simibubi.create.content.curiosities.zapper.terrainzapper; package com.simibubi.create.content.curiosities.zapper.terrainzapper;
import static java.lang.Math.max;
import static net.minecraft.util.math.MathHelper.clamp;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.content.curiosities.zapper.ZapperItemRenderer; import com.simibubi.create.content.curiosities.zapper.ZapperItemRenderer;
import com.simibubi.create.content.curiosities.zapper.ZapperRenderHandler; import com.simibubi.create.foundation.item.PartialItemModelRenderer;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.entity.player.ClientPlayerEntity; import net.minecraft.client.entity.player.ClientPlayerEntity;
import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.LightTexture;
import net.minecraft.client.renderer.Vector3f; import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.HandSide; import net.minecraft.util.HandSide;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
public class WorldshaperItemRenderer extends ZapperItemRenderer { public class WorldshaperItemRenderer extends ZapperItemRenderer<WorldshaperModel> {
@Override @Override
public void render(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { protected void render(ItemStack stack, WorldshaperModel model, PartialItemModelRenderer renderer, MatrixStack ms,
ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); IRenderTypeBuffer buffer, int light, int overlay) {
WorldshaperModel mainModel = (WorldshaperModel) itemRenderer.getItemModelWithOverrides(stack, Minecraft.getInstance().world, null); super.render(stack, model, renderer, ms, buffer, light, overlay);
float pt = Minecraft.getInstance().getRenderPartialTicks();
float pt = Minecraft.getInstance()
.getRenderPartialTicks();
float worldTime = AnimationTickHolder.getRenderTick() / 20; float worldTime = AnimationTickHolder.getRenderTick() / 20;
ms.push(); renderer.renderSolid(model.getBakedModel(), light);
ms.translate(0.5F, 0.5F, 0.5F);
int lastBl = LightTexture.getBlockLightCoordinates(light);
int lastSl = LightTexture.getSkyLightCoordinates(light);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer,
LightTexture.pack(Math.min(lastBl + 4, 15), Math.min(lastSl + 7, 15)), overlay,
mainModel.getBakedModel());
// Block indicator
if (mainModel.getCurrentPerspective() == TransformType.GUI && stack.hasTag()
&& stack.getTag().contains("BlockUsed"))
renderBlockUsed(stack, itemRenderer, ms, buffer, light, overlay);
ClientPlayerEntity player = Minecraft.getInstance().player; ClientPlayerEntity player = Minecraft.getInstance().player;
boolean leftHanded = player.getPrimaryHand() == HandSide.LEFT; boolean leftHanded = player.getPrimaryHand() == HandSide.LEFT;
boolean mainHand = player.getHeldItemMainhand() == stack; boolean mainHand = player.getHeldItemMainhand() == stack;
boolean offHand = player.getHeldItemOffhand() == stack; boolean offHand = player.getHeldItemOffhand() == stack;
float last = mainHand ^ leftHanded ? ZapperRenderHandler.lastRightHandAnimation float animation = getAnimationProgress(pt, leftHanded, mainHand);
: ZapperRenderHandler.lastLeftHandAnimation;
float current = mainHand ^ leftHanded ? ZapperRenderHandler.rightHandAnimation
: ZapperRenderHandler.leftHandAnimation;
float animation = MathHelper.clamp(MathHelper.lerp(pt, last, current) * 5, 0, 1);
// Core glows // Core glows
float multiplier = MathHelper.sin(worldTime * 5); float multiplier = MathHelper.sin(worldTime * 5);
if (mainHand || offHand) { if (mainHand || offHand)
multiplier = animation; multiplier = animation;
}
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, int lightItensity = (int) (15 * clamp(multiplier, 0, 1));
LightTexture.pack((int) (15 * multiplier), 7), overlay, mainModel.getPartial("core")); int glowLight = LightTexture.pack(lightItensity, max(lightItensity, 4));
renderer.renderSolidGlowing(model.getPartial("core"), glowLight);
renderer.renderGlowing(model.getPartial("core_glow"), glowLight);
// Accelerator spins // Accelerator spins
float angle = worldTime * -25; float angle = worldTime * -25;
@ -67,10 +56,7 @@ public class WorldshaperItemRenderer extends ZapperItemRenderer {
ms.translate(0, offset, 0); ms.translate(0, offset, 0);
ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(angle)); ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(angle));
ms.translate(0, -offset, 0); ms.translate(0, -offset, 0);
itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, renderer.render(model.getPartial("accelerator"), light);
mainModel.getPartial("accelerator"));
ms.pop();
} }
} }

View file

@ -9,7 +9,7 @@ public class WorldshaperModel extends CustomRenderedItemModel {
public WorldshaperModel(IBakedModel template) { public WorldshaperModel(IBakedModel template) {
super(template, "handheld_worldshaper"); super(template, "handheld_worldshaper");
addPartials("core", "accelerator"); addPartials("core", "core_glow", "accelerator");
} }
@Override @Override

View file

@ -34,8 +34,7 @@ public class WorldshaperRenderHandler {
CreateClient.outliner.showCluster("terrainZapper", renderedShape.stream() CreateClient.outliner.showCluster("terrainZapper", renderedShape.stream()
.map(pos -> pos.add(renderedPosition)) .map(pos -> pos.add(renderedPosition))
.collect(Collectors.toList())) .collect(Collectors.toList()))
.colored(0x999999) .colored(0xbfbfbf)
.disableNormals()
.lineWidth(1 / 32f) .lineWidth(1 / 32f)
.withFaceTexture(AllSpecialTextures.CHECKERED); .withFaceTexture(AllSpecialTextures.CHECKERED);
} }
@ -49,7 +48,7 @@ public class WorldshaperRenderHandler {
if (zapperInMain) { if (zapperInMain) {
CompoundNBT tag = heldMain.getOrCreateTag(); CompoundNBT tag = heldMain.getOrCreateTag();
if (!tag.contains("_Swap")) { if (!tag.contains("_Swap") || !zapperInOff) {
createBrushOutline(tag, player, heldMain); createBrushOutline(tag, player, heldMain);
return; return;
} }

View file

@ -0,0 +1,32 @@
package com.simibubi.create.foundation.block.render;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.item.PartialItemModelRenderer;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer;
import net.minecraft.item.ItemStack;
public class CustomRenderedItemModelRenderer<M extends CustomRenderedItemModel> extends ItemStackTileEntityRenderer {
@Override
@SuppressWarnings("unchecked")
public void render(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {
M mainModel = ((M) Minecraft.getInstance()
.getItemRenderer()
.getItemModelWithOverrides(stack, null, null));
PartialItemModelRenderer renderer = PartialItemModelRenderer.of(stack, ms, buffer, overlay);
ms.push();
ms.translate(0.5F, 0.5F, 0.5F);
render(stack, mainModel, renderer, ms, buffer, light, overlay);
ms.pop();
}
protected void render(ItemStack stack, M model, PartialItemModelRenderer renderer, MatrixStack ms,
IRenderTypeBuffer buffer, int light, int overlay) {
}
}

View file

@ -2,7 +2,6 @@ package com.simibubi.create.foundation.data;
public enum AllLangPartials { public enum AllLangPartials {
TEMPORARY("We aren't in Registrate yet"),
ADVANCEMENTS("Advancements"), ADVANCEMENTS("Advancements"),
MESSAGES("UI & Messages"), MESSAGES("UI & Messages"),
TOOLTIPS("Item Descriptions"), TOOLTIPS("Item Descriptions"),

View file

@ -0,0 +1,97 @@
package com.simibubi.create.foundation.item;
import java.util.Random;
import com.mojang.blaze3d.matrix.MatrixStack;
import com.mojang.blaze3d.vertex.IVertexBuilder;
import com.simibubi.create.foundation.renderState.RenderTypes;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemCameraTransforms.TransformType;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraftforge.client.model.data.EmptyModelData;
import net.minecraftforge.client.model.data.IModelData;
public class PartialItemModelRenderer {
static PartialItemModelRenderer instance;
ItemStack stack;
int overlay;
MatrixStack ms;
IRenderTypeBuffer buffer;
static PartialItemModelRenderer get() {
if (instance == null)
instance = new PartialItemModelRenderer();
return instance;
}
public static PartialItemModelRenderer of(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int overlay) {
PartialItemModelRenderer instance = get();
instance.stack = stack;
instance.buffer = buffer;
instance.ms = ms;
instance.overlay = overlay;
return instance;
}
public void render(IBakedModel model, int light) {
render(model, RenderTypes.getItemPartialTranslucent(), light);
}
public void renderSolid(IBakedModel model, int light) {
render(model, RenderTypes.getItemPartialSolid(), light);
}
public void renderSolidGlowing(IBakedModel model, int light) {
render(model, RenderTypes.getGlowingSolid(), light);
}
public void renderGlowing(IBakedModel model, int light) {
render(model, RenderTypes.getGlowingTranslucent(), light);
}
public void render(IBakedModel model, RenderType type, int light) {
if (stack.isEmpty())
return;
ms.push();
model = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(ms, model, TransformType.NONE, false);
ms.translate(-0.5D, -0.5D, -0.5D);
if (!model.isBuiltInRenderer())
renderBakedItemModel(model, light, ms,
ItemRenderer.getArmorVertexConsumer(buffer, type, true, stack.hasEffect()));
else
stack.getItem()
.getItemStackTileEntityRenderer()
.render(stack, ms, buffer, light, overlay);
ms.pop();
}
private void renderBakedItemModel(IBakedModel model, int light, MatrixStack ms, IVertexBuilder p_229114_6_) {
ItemRenderer ir = Minecraft.getInstance()
.getItemRenderer();
Random random = new Random();
IModelData data = EmptyModelData.INSTANCE;
for (Direction direction : Direction.values()) {
random.setSeed(42L);
ir.renderBakedItemQuads(ms, p_229114_6_, model.getQuads((BlockState) null, direction, random, data), stack,
light, overlay);
}
random.setSeed(42L);
ir.renderBakedItemQuads(ms, p_229114_6_, model.getQuads((BlockState) null, (Direction) null, random, data),
stack, light, overlay);
}
}

View file

@ -6,13 +6,12 @@ import com.simibubi.create.AllSpecialTextures;
import net.minecraft.client.renderer.RenderState; import net.minecraft.client.renderer.RenderState;
import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.inventory.container.PlayerContainer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
public class RenderTypes extends RenderState { public class RenderTypes extends RenderState {
public static RenderType getOutlineSolid() { protected static final RenderState.CullState DISABLE_CULLING = new NoCullState();
return OUTLINE_SOLID;
}
public static RenderType getOutlineTranslucent(ResourceLocation texture, boolean cull) { public static RenderType getOutlineTranslucent(ResourceLocation texture, boolean cull) {
RenderType.State rendertype$state = RenderType.State.builder() RenderType.State rendertype$state = RenderType.State.builder()
@ -38,7 +37,76 @@ public class RenderTypes extends RenderState {
.overlay(ENABLE_OVERLAY_COLOR) .overlay(ENABLE_OVERLAY_COLOR)
.build(true)); .build(true));
protected static final RenderState.CullState DISABLE_CULLING = new NoCullState(); public static RenderType getGlowingSolid(ResourceLocation texture) {
RenderType.State rendertype$state = RenderType.State.builder()
.texture(new RenderState.TextureState(texture, false, false))
.transparency(NO_TRANSPARENCY)
.diffuseLighting(DISABLE_DIFFUSE_LIGHTING)
.lightmap(ENABLE_LIGHTMAP)
.overlay(ENABLE_OVERLAY_COLOR)
.build(true);
return RenderType.of("glowing_solid", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256,
true, false, rendertype$state);
}
public static RenderType getGlowingTranslucent(ResourceLocation texture) {
RenderType.State rendertype$state = RenderType.State.builder()
.texture(new RenderState.TextureState(texture, false, false))
.transparency(TRANSLUCENT_TRANSPARENCY)
.diffuseLighting(DISABLE_DIFFUSE_LIGHTING)
.alpha(ONE_TENTH_ALPHA)
.cull(DISABLE_CULLING)
.lightmap(ENABLE_LIGHTMAP)
.overlay(ENABLE_OVERLAY_COLOR)
.build(true);
return RenderType.of("glowing_translucent", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7,
256, true, true, rendertype$state);
}
private static final RenderType GLOWING_SOLID = RenderTypes.getGlowingSolid(PlayerContainer.BLOCK_ATLAS_TEXTURE);
private static final RenderType GLOWING_TRANSLUCENT =
RenderTypes.getGlowingTranslucent(PlayerContainer.BLOCK_ATLAS_TEXTURE);
private static final RenderType ITEM_PARTIAL_SOLID =
RenderType.of("item_solid", DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256, true,
false, RenderType.State.builder()
.texture(new RenderState.TextureState(PlayerContainer.BLOCK_ATLAS_TEXTURE, false, false))
.transparency(NO_TRANSPARENCY)
.diffuseLighting(ENABLE_DIFFUSE_LIGHTING)
.lightmap(ENABLE_LIGHTMAP)
.overlay(ENABLE_OVERLAY_COLOR)
.build(true));
private static final RenderType ITEM_PARTIAL_TRANSLUCENT = RenderType.of("entity_translucent",
DefaultVertexFormats.POSITION_COLOR_TEXTURE_OVERLAY_LIGHT_NORMAL, 7, 256, true, true, RenderType.State.builder()
.texture(new RenderState.TextureState(PlayerContainer.BLOCK_ATLAS_TEXTURE, false, false))
.transparency(TRANSLUCENT_TRANSPARENCY)
.diffuseLighting(ENABLE_DIFFUSE_LIGHTING)
.alpha(ONE_TENTH_ALPHA)
.cull(DISABLE_CULLING)
.lightmap(ENABLE_LIGHTMAP)
.overlay(ENABLE_OVERLAY_COLOR)
.build(true));
public static RenderType getItemPartialSolid() {
return ITEM_PARTIAL_SOLID;
}
public static RenderType getItemPartialTranslucent() {
return ITEM_PARTIAL_TRANSLUCENT;
}
public static RenderType getOutlineSolid() {
return OUTLINE_SOLID;
}
public static RenderType getGlowingSolid() {
return GLOWING_SOLID;
}
public static RenderType getGlowingTranslucent() {
return GLOWING_TRANSLUCENT;
}
protected static class NoCullState extends RenderState.CullState { protected static class NoCullState extends RenderState.CullState {
public NoCullState() { public NoCullState() {

View file

@ -68,6 +68,7 @@ public class SuperRenderTypeBuffer implements IRenderTypeBuffer {
static final SortedMap<RenderType, BufferBuilder> createEntityBuilders() { static final SortedMap<RenderType, BufferBuilder> createEntityBuilders() {
return Util.make(new Object2ObjectLinkedOpenHashMap<>(), (map) -> { return Util.make(new Object2ObjectLinkedOpenHashMap<>(), (map) -> {
map.put(Atlases.getEntitySolid(), blockBuilders.get(RenderType.getSolid())); map.put(Atlases.getEntitySolid(), blockBuilders.get(RenderType.getSolid()));
assign(map, RenderTypes.getOutlineSolid());
map.put(Atlases.getEntityCutout(), blockBuilders.get(RenderType.getCutout())); map.put(Atlases.getEntityCutout(), blockBuilders.get(RenderType.getCutout()));
map.put(Atlases.getBannerPatterns(), blockBuilders.get(RenderType.getCutoutMipped())); map.put(Atlases.getBannerPatterns(), blockBuilders.get(RenderType.getCutoutMipped()));
map.put(Atlases.getEntityTranslucent(), blockBuilders.get(RenderType.getTranslucent())); map.put(Atlases.getEntityTranslucent(), blockBuilders.get(RenderType.getTranslucent()));

View file

@ -3,12 +3,14 @@ package com.simibubi.create.foundation.utility.outliner;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
import net.minecraft.client.Minecraft;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.Vec3d;
public class LineOutline extends Outline { public class LineOutline extends Outline {
private Vec3d start = Vec3d.ZERO; protected Vec3d start = Vec3d.ZERO;
private Vec3d end = Vec3d.ZERO; protected Vec3d end = Vec3d.ZERO;
public LineOutline set(Vec3d start, Vec3d end) { public LineOutline set(Vec3d start, Vec3d end) {
this.start = start; this.start = start;
@ -21,4 +23,38 @@ public class LineOutline extends Outline {
renderAACuboidLine(ms, buffer, start, end); renderAACuboidLine(ms, buffer, start, end);
} }
public static class EndChasingLineOutline extends LineOutline {
float prevProgress = 0;
float progress = 0;
@Override
public void tick() {
}
public EndChasingLineOutline setProgress(float progress) {
prevProgress = this.progress;
this.progress = progress;
return this;
}
@Override
public LineOutline set(Vec3d start, Vec3d end) {
if (!end.equals(this.end))
super.set(start, end);
return this;
}
@Override
public void render(MatrixStack ms, SuperRenderTypeBuffer buffer) {
float pt = Minecraft.getInstance()
.getRenderPartialTicks();
float distanceToTarget = 1 - MathHelper.lerp(pt, prevProgress, progress);
Vec3d start = end.add(this.start.subtract(end)
.scale(distanceToTarget));
renderAACuboidLine(ms, buffer, start, end);
}
}
} }

View file

@ -9,6 +9,7 @@ import java.util.Set;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer; import com.simibubi.create.foundation.renderState.SuperRenderTypeBuffer;
import com.simibubi.create.foundation.tileEntity.behaviour.ValueBox; import com.simibubi.create.foundation.tileEntity.behaviour.ValueBox;
import com.simibubi.create.foundation.utility.outliner.LineOutline.EndChasingLineOutline;
import com.simibubi.create.foundation.utility.outliner.Outline.OutlineParams; import com.simibubi.create.foundation.utility.outliner.Outline.OutlineParams;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
@ -39,6 +40,18 @@ public class Outliner {
return entry.outline.getParams(); return entry.outline.getParams();
} }
public OutlineParams endChasingLine(Object slot, Vec3d start, Vec3d end, float chasingProgress) {
if (!outlines.containsKey(slot)) {
EndChasingLineOutline outline = new EndChasingLineOutline();
outlines.put(slot, new OutlineEntry(outline));
}
OutlineEntry entry = outlines.get(slot);
entry.ticksTillRemoval = 1;
((EndChasingLineOutline) entry.outline).setProgress(chasingProgress)
.set(start, end);
return entry.outline.getParams();
}
public OutlineParams showAABB(Object slot, AxisAlignedBB bb) { public OutlineParams showAABB(Object slot, AxisAlignedBB bb) {
createAABBOutlineIfMissing(slot, bb); createAABBOutlineIfMissing(slot, bb);
ChasingAABBOutline outline = getAndRefreshAABB(slot); ChasingAABBOutline outline = getAndRefreshAABB(slot);

View file

@ -1,5 +0,0 @@
{
"entity.create.contraption": "Moving Contraption",
"entity.create.stationary_contraption": "Stationary Contraption",
"entity.create.super_glue": "Superglue"
}

View file

@ -2,8 +2,7 @@
"credit": "Made with Blockbench", "credit": "Made with Blockbench",
"parent": "create:item/deforester/item", "parent": "create:item/deforester/item",
"textures": { "textures": {
"3": "block/white_concrete_powder", "3": "block/white_concrete_powder"
"4": "block/white_stained_glass"
}, },
"elements": [ "elements": [
{ {
@ -21,15 +20,17 @@
} }
}, },
{ {
"name": "light_outer", "name": "blade_inner",
"from": [5.75, 12, 7.5], "from": [10.5, 9.7, 7.75],
"to": [9.5, 14, 8.5], "to": [11.5, 15.7, 8.25],
"rotation": {"angle": 0, "axis": "y", "origin": [10, 16.5, 7.5]}, "rotation": {"angle": 0, "axis": "y", "origin": [8, 6.75, 8]},
"faces": { "faces": {
"north": {"uv": [7, 0, 10.75, 2], "texture": "#4"}, "north": {"uv": [0, 0, 1, 6], "texture": "#3"},
"east": {"uv": [7, 0, 8, 2], "texture": "#4"}, "east": {"uv": [0, 0, 1, 6], "texture": "#3"},
"south": {"uv": [7, 0, 10.75, 2], "texture": "#4"}, "south": {"uv": [0, 0, 1, 6], "texture": "#3"},
"west": {"uv": [7, 0, 8, 2], "texture": "#4"} "west": {"uv": [0, 0, 1, 6], "texture": "#3"},
"up": {"uv": [0, 0, 1, 1], "texture": "#3"},
"down": {"uv": [0, 0, 1, 1], "texture": "#3"}
} }
} }
] ]

View file

@ -2,26 +2,22 @@
"credit": "Made with Blockbench", "credit": "Made with Blockbench",
"parent": "create:item/deforester/item", "parent": "create:item/deforester/item",
"textures": { "textures": {
"3": "block/white_concrete_powder",
"4": "block/white_stained_glass" "4": "block/white_stained_glass"
}, },
"elements": [ "elements": [
{ {
"name": "blade2", "name": "light_outer",
"from": [10.5, 9.7, 7.75], "from": [5.75, 12, 7.5],
"to": [11.5, 15.7, 8.25], "to": [9.5, 14, 8.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6.75, 8]}, "rotation": {"angle": 0, "axis": "y", "origin": [10, 16.5, 7.5]},
"faces": { "faces": {
"north": {"uv": [0, 0, 1, 6], "texture": "#3"}, "north": {"uv": [7, 0, 10.75, 2], "texture": "#4"},
"east": {"uv": [0, 0, 1, 6], "texture": "#3"}, "south": {"uv": [7, 0, 10.75, 2], "texture": "#4"},
"south": {"uv": [0, 0, 1, 6], "texture": "#3"}, "west": {"uv": [7, 0, 8, 2], "texture": "#4"}
"west": {"uv": [0, 0, 1, 6], "texture": "#3"},
"up": {"uv": [0, 0, 1, 1], "texture": "#3"},
"down": {"uv": [0, 0, 1, 1], "texture": "#3"}
} }
}, },
{ {
"name": "blade3", "name": "blade_outer",
"from": [10.25, 9.45, 7.5], "from": [10.25, 9.45, 7.5],
"to": [11.75, 15.95, 8.5], "to": [11.75, 15.95, 8.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6.75, 8]}, "rotation": {"angle": 0, "axis": "y", "origin": [8, 6.75, 8]},

View file

@ -1,9 +1,7 @@
{ {
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"parent": "create:item/handheld_blockzapper/item", "parent": "create:item/handheld_blockzapper/item",
"textures": { "textures": {
"2": "block/white_concrete_powder", "2": "block/white_concrete_powder"
"3": "block/white_stained_glass"
}, },
"elements": [ "elements": [
{ {
@ -15,19 +13,6 @@
"east": { "texture": "#2", "uv": [ 3, 5, 7, 6 ] }, "east": { "texture": "#2", "uv": [ 3, 5, 7, 6 ] },
"west": { "texture": "#2", "uv": [ 3, 7, 7, 8 ] } "west": { "texture": "#2", "uv": [ 3, 7, 7, 8 ] }
} }
},
{
"name": "Amplifier Core Glow",
"from": [ 7.1, 2.6, 3.5 ],
"to": [ 8.9, 4.4, 7.4 ],
"faces": {
"north": { "texture": "#3", "uv": [ 6, 7, 7.8, 8.8 ] },
"east": { "texture": "#3", "uv": [ 3, 7, 6.9, 8.8 ] },
"south": { "texture": "#3", "uv": [ 5, 7, 6.8, 8.8 ] },
"west": { "texture": "#3", "uv": [ 4, 7, 7.9, 8.8 ] },
"up": { "texture": "#3", "uv": [ 7, 3, 8.8, 6.9 ] },
"down": { "texture": "#3", "uv": [ 7, 4, 8.8, 7.9 ] }
}
} }
] ]
} }

View file

@ -0,0 +1,21 @@
{
"parent": "create:item/handheld_blockzapper/item",
"textures": {
"3": "block/white_stained_glass"
},
"elements": [
{
"name": "Amplifier Core Glow",
"from": [ 7.1, 2.6, 3.5 ],
"to": [ 8.9, 4.4, 7.4 ],
"faces": {
"north": { "texture": "#3", "uv": [ 6, 7, 7.8, 8.8 ] },
"east": { "texture": "#3", "uv": [ 3, 7, 6.9, 8.8 ] },
"south": { "texture": "#3", "uv": [ 5, 7, 6.8, 8.8 ] },
"west": { "texture": "#3", "uv": [ 4, 7, 7.9, 8.8 ] },
"up": { "texture": "#3", "uv": [ 7, 3, 8.8, 6.9 ] },
"down": { "texture": "#3", "uv": [ 7, 4, 8.8, 7.9 ] }
}
}
]
}

View file

@ -1,9 +1,7 @@
{ {
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"parent": "create:item/handheld_blockzapper/item", "parent": "create:item/handheld_blockzapper/item",
"textures": { "textures": {
"2": "block/white_concrete_powder", "2": "block/white_concrete_powder"
"3": "block/white_stained_glass"
}, },
"elements": [ "elements": [
{ {
@ -15,19 +13,6 @@
"east": { "texture": "#2", "uv": [ 3, 5, 12, 6 ] }, "east": { "texture": "#2", "uv": [ 3, 5, 12, 6 ] },
"west": { "texture": "#2", "uv": [ 3, 7, 12, 8 ] } "west": { "texture": "#2", "uv": [ 3, 7, 12, 8 ] }
} }
},
{
"name": "Core Glow",
"from": [ 7.1, 4.6, 2.5 ],
"to": [ 8.9, 6.4, 11.4 ],
"faces": {
"north": { "texture": "#3", "uv": [ 6, 7, 7.8, 8.8 ] },
"east": { "texture": "#3", "uv": [ 3, 7, 11.9, 8.8 ] },
"south": { "texture": "#3", "uv": [ 5, 7, 6.8, 8.8 ] },
"west": { "texture": "#3", "uv": [ 4, 7, 12.9, 8.8 ] },
"up": { "texture": "#3", "uv": [ 7, 3, 8.8, 11.9 ] },
"down": { "texture": "#3", "uv": [ 7, 4, 8.8, 12.9 ] }
}
} }
] ]
} }

View file

@ -0,0 +1,21 @@
{
"parent": "create:item/handheld_blockzapper/item",
"textures": {
"3": "block/white_stained_glass"
},
"elements": [
{
"name": "Core Glow",
"from": [ 7.1, 4.6, 2.5 ],
"to": [ 8.9, 6.4, 11.4 ],
"faces": {
"north": { "texture": "#3", "uv": [ 6, 7, 7.8, 8.8 ] },
"east": { "texture": "#3", "uv": [ 3, 7, 11.9, 8.8 ] },
"south": { "texture": "#3", "uv": [ 5, 7, 6.8, 8.8 ] },
"west": { "texture": "#3", "uv": [ 4, 7, 12.9, 8.8 ] },
"up": { "texture": "#3", "uv": [ 7, 3, 8.8, 11.9 ] },
"down": { "texture": "#3", "uv": [ 7, 4, 8.8, 12.9 ] }
}
}
]
}

View file

@ -60,45 +60,5 @@
"down": {"uv": [5, 6, 10, 9], "texture": "#cog"} "down": {"uv": [5, 6, 10, 9], "texture": "#cog"}
} }
} }
],
"display": {
"thirdperson_righthand": {
"rotation": [1, 0, 0],
"translation": [0, 4, -2.5],
"scale": [0.8, 0.8, 0.8]
},
"thirdperson_lefthand": {
"rotation": [1, 0, 0],
"translation": [0, 4, -2.5],
"scale": [0.8, 0.8, 0.8]
},
"firstperson_righthand": {
"rotation": [10, 0, 10],
"translation": [1, 4, 1]
},
"firstperson_lefthand": {
"rotation": [10, 0, 10],
"translation": [1, 4, 1]
},
"ground": {
"rotation": [0, 0, 90],
"translation": [-2.25, -1, -0.75],
"scale": [0.75, 0.75, 0.75]
},
"gui": {
"rotation": [30, 45, 0],
"translation": [-0.5, 3.5, 0]
},
"fixed": {
"rotation": [0, 90, 0],
"translation": [-1.25, 4.25, -1]
}
},
"groups": [
{
"name": "accelerator",
"origin": [8, 8, 8],
"children": [0, 1, 2, 3]
}
] ]
} }

View file

@ -2,9 +2,7 @@
"credit": "Made with Blockbench", "credit": "Made with Blockbench",
"parent": "create:item/handheld_blockzapper/item", "parent": "create:item/handheld_blockzapper/item",
"textures": { "textures": {
"2": "block/white_concrete_powder", "2": "block/white_concrete_powder"
"3": "block/white_stained_glass",
"particle": "block/obsidian"
}, },
"elements": [ "elements": [
{ {
@ -18,20 +16,6 @@
"west": {"uv": [3, 7, 13, 8], "texture": "#2"} "west": {"uv": [3, 7, 13, 8], "texture": "#2"}
} }
}, },
{
"name": "Core Glow",
"from": [6.6, 4.6, 0.5],
"to": [9.4, 6.4, 10.4],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 8, 8]},
"faces": {
"north": {"uv": [6, 7, 8.8, 8.8], "texture": "#3"},
"east": {"uv": [3, 7, 12.9, 8.8], "texture": "#3"},
"south": {"uv": [5, 7, 7.8, 8.8], "texture": "#3"},
"west": {"uv": [4, 7, 13.9, 8.8], "texture": "#3"},
"up": {"uv": [7, 3, 9.8, 12.9], "texture": "#3"},
"down": {"uv": [7, 4, 9.8, 13.9], "texture": "#3"}
}
},
{ {
"name": "Amplifier Core", "name": "Amplifier Core",
"from": [6.8, 3, 2.7], "from": [6.8, 3, 2.7],
@ -45,70 +29,6 @@
"up": {"uv": [0, 0, 2.4, 5], "texture": "#2"}, "up": {"uv": [0, 0, 2.4, 5], "texture": "#2"},
"down": {"uv": [0, 0, 2.4, 5], "texture": "#2"} "down": {"uv": [0, 0, 2.4, 5], "texture": "#2"}
} }
},
{
"name": "Amplifier Core Glow",
"from": [6.6, 2.6, 2.5],
"to": [9.4, 4.4, 7.4],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 8, 8]},
"faces": {
"north": {"uv": [6, 7, 8.8, 8.8], "texture": "#3"},
"east": {"uv": [3, 7, 7.9, 8.8], "texture": "#3"},
"south": {"uv": [5, 7, 7.8, 8.8], "texture": "#3"},
"west": {"uv": [4, 7, 8.9, 8.8], "texture": "#3"},
"up": {"uv": [7, 3, 9.8, 7.9], "texture": "#3"},
"down": {"uv": [7, 4, 9.8, 8.9], "texture": "#3"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [1, 0, 0],
"translation": [0, 4, -2.5],
"scale": [0.8, 0.8, 0.8]
},
"thirdperson_lefthand": {
"rotation": [1, 0, 0],
"translation": [0, 4, -2.5],
"scale": [0.8, 0.8, 0.8]
},
"firstperson_righthand": {
"rotation": [10, 0, 10],
"translation": [1, 4, 1]
},
"firstperson_lefthand": {
"rotation": [10, 0, 10],
"translation": [1, 4, 1]
},
"ground": {
"rotation": [0, 0, 90],
"translation": [-2.25, -1, -0.75],
"scale": [0.75, 0.75, 0.75]
},
"gui": {
"rotation": [30, 45, 0],
"translation": [-0.5, 3.5, 0]
},
"fixed": {
"rotation": [0, 90, 0],
"translation": [-1.25, 4.25, -1]
}
},
"groups": [
{
"name": "core",
"origin": [8, 8, 8],
"children": [0, 1]
},
{
"name": "core",
"origin": [8, 8, 8],
"children": []
},
{
"name": "amplifier_core",
"origin": [8, 8, 8],
"children": [2, 3]
} }
] ]
} }

View file

@ -0,0 +1,37 @@
{
"credit": "Made with Blockbench",
"parent": "create:item/handheld_blockzapper/item",
"textures": {
"3": "block/white_stained_glass"
},
"elements": [
{
"name": "Core Glow",
"from": [6.6, 4.6, 0.5],
"to": [9.4, 6.4, 10.4],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 8, 8]},
"faces": {
"north": {"uv": [6, 7, 8.8, 8.8], "texture": "#3"},
"east": {"uv": [3, 7, 12.9, 8.8], "texture": "#3"},
"south": {"uv": [5, 7, 7.8, 8.8], "texture": "#3"},
"west": {"uv": [4, 7, 13.9, 8.8], "texture": "#3"},
"up": {"uv": [7, 3, 9.8, 12.9], "texture": "#3"},
"down": {"uv": [7, 4, 9.8, 13.9], "texture": "#3"}
}
},
{
"name": "Amplifier Core Glow",
"from": [6.6, 2.6, 2.5],
"to": [9.4, 4.4, 7.4],
"rotation": {"angle": 0, "axis": "y", "origin": [8.5, 8, 8]},
"faces": {
"north": {"uv": [6, 7, 8.8, 8.8], "texture": "#3"},
"east": {"uv": [3, 7, 7.9, 8.8], "texture": "#3"},
"south": {"uv": [5, 7, 7.8, 8.8], "texture": "#3"},
"west": {"uv": [4, 7, 8.9, 8.8], "texture": "#3"},
"up": {"uv": [7, 3, 9.8, 7.9], "texture": "#3"},
"down": {"uv": [7, 4, 9.8, 8.9], "texture": "#3"}
}
}
]
}

View file

@ -1,13 +1,7 @@
{ {
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"ambientocclusion": false, "ambientocclusion": false,
"parent": "create:item/wand_of_symmetry/item", "parent": "create:item/wand_of_symmetry/item",
"textures": { "textures": {
"0": "block/obsidian",
"1": "block/light_blue_concrete_powder",
"2": "block/dark_oak_log",
"3": "block/white_stained_glass",
"4": "block/light_blue_stained_glass",
"5": "block/white_concrete_powder" "5": "block/white_concrete_powder"
}, },
"elements": [ "elements": [
@ -23,19 +17,6 @@
"up": { "texture": "#5", "uv": [ 14.0, 0.0, 16.0, 2.0 ] }, "up": { "texture": "#5", "uv": [ 14.0, 0.0, 16.0, 2.0 ] },
"down": { "texture": "#5", "uv": [ 14.0, 6.0, 16.0, 8.0 ] } "down": { "texture": "#5", "uv": [ 14.0, 6.0, 16.0, 8.0 ] }
} }
},
{
"name": "Cube",
"from": [ 6.5, 17.5, 6.5 ],
"to": [ 9.5, 26.5, 9.5 ],
"faces": {
"north": { "texture": "#3", "uv": [ 10.0, 5.0, 13.0, 13.0 ] },
"east": { "texture": "#3", "uv": [ 5.0, 3.0, 8.0, 12.0 ] },
"south": { "texture": "#3", "uv": [ 7.0, 6.0, 10.0, 14.0 ] },
"west": { "texture": "#3", "uv": [ 7.0, 4.0, 4.0, 12.0 ] },
"up": { "texture": "#3", "uv": [ 7.0, 5.0, 10.0, 8.0 ] },
"down": { "texture": "#3", "uv": [ 9.0, 3.0, 12.0, 6.0 ] }
}
} }
] ]
} }

View file

@ -0,0 +1,22 @@
{
"ambientocclusion": false,
"parent": "create:item/wand_of_symmetry/item",
"textures": {
"3": "block/white_stained_glass"
},
"elements": [
{
"name": "Cube",
"from": [ 6.5, 17.5, 6.5 ],
"to": [ 9.5, 26.5, 9.5 ],
"faces": {
"north": { "texture": "#3", "uv": [ 10.0, 5.0, 13.0, 13.0 ] },
"east": { "texture": "#3", "uv": [ 5.0, 3.0, 8.0, 12.0 ] },
"south": { "texture": "#3", "uv": [ 7.0, 6.0, 10.0, 14.0 ] },
"west": { "texture": "#3", "uv": [ 7.0, 4.0, 4.0, 12.0 ] },
"up": { "texture": "#3", "uv": [ 7.0, 5.0, 10.0, 8.0 ] },
"down": { "texture": "#3", "uv": [ 9.0, 3.0, 12.0, 6.0 ] }
}
}
]
}