Skip to content

Commit

Permalink
Tweaked zotzpyre model and added new variant
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Dec 31, 2021
1 parent 4181170 commit 6d77c9f
Show file tree
Hide file tree
Showing 11 changed files with 354 additions and 312 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
import dev.itsmeow.whisperwoods.client.particle.WispParticle;
import dev.itsmeow.whisperwoods.client.renderer.entity.RenderHirschgeist;
import dev.itsmeow.whisperwoods.client.renderer.entity.RenderWisp;
import dev.itsmeow.whisperwoods.client.renderer.entity.layer.LayerEyes;
import dev.itsmeow.whisperwoods.client.renderer.entity.model.ModelHidebehind;
import dev.itsmeow.whisperwoods.client.renderer.entity.model.ModelMoth;
import dev.itsmeow.whisperwoods.client.renderer.entity.model.ModelZotzpyre;
import dev.itsmeow.whisperwoods.client.renderer.tile.RenderHGSkull;
import dev.itsmeow.whisperwoods.client.renderer.tile.RenderTileGhostLight;
import dev.itsmeow.whisperwoods.client.renderer.tile.RenderTileHandOfFate;
import dev.itsmeow.whisperwoods.entity.EntityHidebehind;
import dev.itsmeow.whisperwoods.entity.EntityZotzpyre;
import dev.itsmeow.whisperwoods.init.*;
import me.shedaniel.architectury.registry.BlockEntityRenderers;
import me.shedaniel.architectury.registry.RenderTypes;
Expand Down Expand Up @@ -66,7 +66,16 @@ public void render(PoseStack matrixStackIn, MultiBufferSource bufferIn, int pack
RenderFactory.addRender(ModEntities.WISP.getEntityType(), RenderWisp::new);
RenderFactory.addRender(ModEntities.HIRSCHGEIST.getEntityType(), RenderHirschgeist::new);

R.addRender(ModEntities.ZOTZPYRE.getEntityType(), 0.4F, r -> r.tVariant().mSingle(new ModelZotzpyre<>()).layer(t -> new LayerEyes<>(t, ModResources.ZOTZPYRE_EYES)));
R.addRender(ModEntities.ZOTZPYRE.getEntityType(), 0.4F, r -> r.tVariant().mSingle(new ModelZotzpyre<>()).layer(t -> new RenderLayer<EntityZotzpyre, EntityModel<EntityZotzpyre>>(t) {
protected final RenderType GLOW_STATE_MAIN = ClientLifecycleHandler.RenderTypeAddition.getEyesEntityCutoutNoCullDepthMaskOff(ModResources.ZOTZPYRE_EYES);
protected final RenderType GLOW_STATE_6 = ClientLifecycleHandler.RenderTypeAddition.getEyesEntityCutoutNoCullDepthMaskOff(ModResources.ZOTZPYRE_6_EYES);
@Override
public void render(PoseStack matrixStackIn, MultiBufferSource bufferIn, int packedLightIn, EntityZotzpyre entity, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch) {
if (!entity.isInvisible() && !entity.isBaby()) {
this.getParentModel().renderToBuffer(matrixStackIn, bufferIn.getBuffer(entity.getVariantNameOrEmpty().equals("6") ? GLOW_STATE_6 : GLOW_STATE_MAIN), 15728640, OverlayTexture.NO_OVERLAY, 1.0F, 1.0F, 1.0F, 1.0F);
}
}
}));

BlockEntityRenderers.registerRenderer(ModBlockEntities.GHOST_LIGHT.get(), RenderTileGhostLight::new);
BlockEntityRenderers.registerRenderer(ModBlockEntities.HG_SKULL.get(), RenderHGSkull::new);
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public class ModEntities {
.egg(0x321e13, 0x543a28).size(1F, 1F)
.despawn()
.biomesOverworld(BiomeTypes.FOREST, BiomeTypes.JUNGLE, BiomeTypes.BEACH, BiomeTypes.CONIFEROUS, BiomeTypes.LUSH, BiomeTypes.WASTELAND, BiomeTypes.SWAMP, BiomeTypes.HILL, BiomeTypes.MOUNTAIN)
.variants(5));
.variants(6));


public static LinkedHashMap<String, EntityTypeContainer<? extends Mob>> getEntities() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public class ModResources {
public static final ResourceLocation HIDEBEHIND_GLOW = t("hidebehind_glow");
public static final ResourceLocation HIDEBEHIND_OPEN_GLOW = t("hidebehind_open_glow");
public static final ResourceLocation ZOTZPYRE_EYES = t("zotzpyre_eyes");
public static final ResourceLocation ZOTZPYRE_6_EYES = t("zotzpyre_6_eyes");

private static ResourceLocation t(String tex) {
return new ResourceLocation(WhisperwoodsMod.MODID, "textures/entity/" + tex + ".png");
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6d77c9f

Please sign in to comment.