Skip to content

Commit aef2c3f

Browse files
committed
[fix] Directly reference Blaze Burner's item model for custom render
1 parent 5cf66d2 commit aef2c3f

File tree

5 files changed

+5
-6
lines changed

5 files changed

+5
-6
lines changed

Diff for: src/main/java/plus/dragons/createenchantmentindustry/client/CEIClient.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
@Mod(value = CEICommon.ID, dist = Dist.CLIENT)
3232
public class CEIClient {
3333
public CEIClient(IEventBus modBus) {
34-
CEIPartialModels.register();
3534
modBus.register(this);
3635
}
3736

3837
@SubscribeEvent
3938
public void setup(final FMLClientSetupEvent event) {
39+
CEIPartialModels.register();
4040
PonderIndex.addPlugin(new CEIPonderPlugin());
4141
}
4242
}

Diff for: src/main/java/plus/dragons/createenchantmentindustry/client/model/CEIPartialModels.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
package plus.dragons.createenchantmentindustry.client.model;
2020

21+
import com.simibubi.create.Create;
2122
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
2223
import plus.dragons.createenchantmentindustry.common.CEICommon;
2324

@@ -26,6 +27,7 @@ public class CEIPartialModels {
2627
public static final PartialModel PRINTER_NOZZLE_TOP = block("printer/nozzle_top");
2728
public static final PartialModel PRINTER_NOZZLE_BOTTOM = block("printer/nozzle_bottom");
2829
public static final PartialModel PRINTER_PISTON = block("printer/piston");
30+
public static final PartialModel BLAZE_ITEM = PartialModel.of(Create.asResource("block/blaze_burner/block_with_blaze"));
2931
public static final PartialModel BLAZE_ENCHANTER_HAT = block("blaze/enchanter_hat");
3032
public static final PartialModel BLAZE_ENCHANTER_HAT_SMALL = block("blaze/enchanter_hat_small");
3133
public static final PartialModel BLAZE_FORGER_HAT = block("blaze/forger_hat");

Diff for: src/main/java/plus/dragons/createenchantmentindustry/common/processing/enchanter/BlazeEnchanterItemRenderer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static void register(RegisterClientExtensionsEvent event) {
4646

4747
@Override
4848
protected void render(ItemStack stack, CustomRenderedItemModel model, PartialItemModelRenderer renderer, ItemDisplayContext transformType, PoseStack poseStack, MultiBufferSource bufferSource, int light, int overlay) {
49-
renderer.render(model.getOriginalModel(), light);
49+
renderer.render(CEIPartialModels.BLAZE_ITEM.get(), light);
5050
poseStack.pushPose();
5151
poseStack.translate(.5f, .75f, .5f);
5252
renderer.render(CEIPartialModels.BLAZE_ENCHANTER_HAT.get(), light);

Diff for: src/main/java/plus/dragons/createenchantmentindustry/common/processing/forger/BlazeForgerItemRenderer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static void register(RegisterClientExtensionsEvent event) {
4646

4747
@Override
4848
protected void render(ItemStack stack, CustomRenderedItemModel model, PartialItemModelRenderer renderer, ItemDisplayContext transformType, PoseStack poseStack, MultiBufferSource bufferSource, int light, int overlay) {
49-
renderer.render(model.getOriginalModel(), light);
49+
renderer.render(CEIPartialModels.BLAZE_ITEM.get(), light);
5050
poseStack.pushPose();
5151
poseStack.translate(.5f, .75f, .5f);
5252
renderer.render(CEIPartialModels.BLAZE_FORGER_HAT.get(), light);

Diff for: src/main/java/plus/dragons/createenchantmentindustry/common/registry/CEIBlocks.java

-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import com.simibubi.create.foundation.data.AssetLookup;
3131
import com.simibubi.create.foundation.data.BlockStateGen;
3232
import com.simibubi.create.foundation.data.SharedProperties;
33-
import com.simibubi.create.foundation.item.render.CustomRenderedItems;
3433
import com.tterrag.registrate.util.entry.BlockEntry;
3534
import net.minecraft.client.renderer.RenderType;
3635
import net.minecraft.sounds.SoundEvents;
@@ -110,7 +109,6 @@ public class CEIBlocks {
110109
.item()
111110
.model((ctx, prov) -> prov.withExistingParent(ctx.getName(),
112111
Create.asResource("block/blaze_burner/block_with_blaze")))
113-
.onRegister(CustomRenderedItems::register)
114112
.build()
115113
.register();
116114
public static final BlockEntry<BlazeForgerBlock> BLAZE_FORGER = REGISTRATE
@@ -126,7 +124,6 @@ public class CEIBlocks {
126124
.item()
127125
.model((ctx, prov) -> prov.withExistingParent(ctx.getName(),
128126
Create.asResource("block/blaze_burner/block_with_blaze")))
129-
.onRegister(CustomRenderedItems::register)
130127
.build()
131128
.register();
132129
public static final BlockEntry<ExperienceBlock> SUPER_EXPERIENCE_BLOCK = REGISTRATE

0 commit comments

Comments
 (0)