-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split Up TrailierTalesClient To Mirror Wilder Wild
- Loading branch information
1 parent
6aa0a17
commit 61ef698
Showing
11 changed files
with
121 additions
and
77 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
28 changes: 28 additions & 0 deletions
28
src/main/java/net/frozenblock/trailiertales/client/TTBlockRenderLayers.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,28 @@ | ||
package net.frozenblock.trailiertales.client; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; | ||
import net.frozenblock.lib.block.api.entity.BlockEntityWithoutLevelRendererRegistry; | ||
import net.frozenblock.trailiertales.registry.TTBlockEntityTypes; | ||
import net.frozenblock.trailiertales.registry.TTBlocks; | ||
import net.minecraft.client.renderer.RenderType; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class TTBlockRenderLayers { | ||
|
||
public static void init() { | ||
BlockEntityWithoutLevelRendererRegistry.register(TTBlocks.COFFIN, TTBlockEntityTypes.COFFIN); | ||
|
||
BlockRenderLayerMap renderLayerRegistry = BlockRenderLayerMap.INSTANCE; | ||
renderLayerRegistry.putBlock(TTBlocks.POTTED_CYAN_ROSE, RenderType.cutout()); | ||
renderLayerRegistry.putBlock(TTBlocks.CYAN_ROSE, RenderType.cutout()); | ||
renderLayerRegistry.putBlock(TTBlocks.CYAN_ROSE_CROP, RenderType.cutout()); | ||
|
||
renderLayerRegistry.putBlock(TTBlocks.MANEDROP, RenderType.cutout()); | ||
renderLayerRegistry.putBlock(TTBlocks.MANEDROP_CROP, RenderType.cutout()); | ||
|
||
renderLayerRegistry.putBlock(TTBlocks.DAWNTRAIL, RenderType.cutout()); | ||
renderLayerRegistry.putBlock(TTBlocks.DAWNTRAIL_CROP, RenderType.cutout()); | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
src/main/java/net/frozenblock/trailiertales/client/TTModelLayers.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,39 @@ | ||
package net.frozenblock.trailiertales.client; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry; | ||
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry; | ||
import net.frozenblock.trailiertales.TTConstants; | ||
import net.frozenblock.trailiertales.client.model.ApparitionModel; | ||
import net.frozenblock.trailiertales.client.model.BoatBannerModel; | ||
import net.frozenblock.trailiertales.client.renderer.blockentity.CoffinRenderer; | ||
import net.frozenblock.trailiertales.client.renderer.entity.ApparitionRenderer; | ||
import net.frozenblock.trailiertales.registry.TTBlockEntityTypes; | ||
import net.frozenblock.trailiertales.registry.TTEntityTypes; | ||
import net.minecraft.client.model.geom.ModelLayerLocation; | ||
import net.minecraft.client.renderer.blockentity.BlockEntityRenderers; | ||
import net.minecraft.client.renderer.entity.ThrownItemRenderer; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class TTModelLayers { | ||
public static final ModelLayerLocation COFFIN_HEAD = new ModelLayerLocation(TTConstants.id("coffin_head"), "main"); | ||
public static final ModelLayerLocation COFFIN_FOOT = new ModelLayerLocation(TTConstants.id("coffin_foot"), "main"); | ||
public static final ModelLayerLocation APPARITION = new ModelLayerLocation(TTConstants.id("apparition"), "main"); | ||
public static final ModelLayerLocation APPARITION_OVERLAY = new ModelLayerLocation(TTConstants.id("apparition"), "overlay"); | ||
public static final ModelLayerLocation BOAT_BANNER = new ModelLayerLocation(TTConstants.id("boat"), "banner"); | ||
|
||
public static void init() { | ||
BlockEntityRenderers.register(TTBlockEntityTypes.COFFIN, CoffinRenderer::new); | ||
EntityModelLayerRegistry.registerModelLayer(COFFIN_HEAD, CoffinRenderer::createHeadLayer); | ||
EntityModelLayerRegistry.registerModelLayer(COFFIN_FOOT, CoffinRenderer::createFootLayer); | ||
|
||
EntityRendererRegistry.register(TTEntityTypes.APPARITION, ApparitionRenderer::new); | ||
EntityModelLayerRegistry.registerModelLayer(APPARITION, ApparitionModel::createBodyLayer); | ||
EntityModelLayerRegistry.registerModelLayer(APPARITION_OVERLAY, ApparitionModel::createBodyLayer); | ||
|
||
EntityRendererRegistry.register(TTEntityTypes.THROWN_ITEM_PROJECTILE, ThrownItemRenderer::new); | ||
|
||
EntityModelLayerRegistry.registerModelLayer(BOAT_BANNER, BoatBannerModel::createBodyLayer); | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/net/frozenblock/trailiertales/client/TTParticleEngine.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,28 @@ | ||
package net.frozenblock.trailiertales.client; | ||
|
||
import net.fabricmc.api.EnvType; | ||
import net.fabricmc.api.Environment; | ||
import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry; | ||
import net.frozenblock.trailiertales.particle.GlowingColorBubbleParticle; | ||
import net.frozenblock.trailiertales.particle.GlowingColorTransitionParticle; | ||
import net.frozenblock.trailiertales.particle.GlowingSpellParticle; | ||
import net.frozenblock.trailiertales.particle.provider.TrailierParticleProviders; | ||
import net.frozenblock.trailiertales.registry.TTParticleTypes; | ||
import net.minecraft.client.particle.SoulParticle; | ||
|
||
@Environment(EnvType.CLIENT) | ||
public class TTParticleEngine { | ||
|
||
public static void init() { | ||
ParticleFactoryRegistry particleRegistry = ParticleFactoryRegistry.getInstance(); | ||
|
||
particleRegistry.register(TTParticleTypes.COFFIN_SOUL, SoulParticle.EmissiveProvider::new); | ||
particleRegistry.register(TTParticleTypes.COFFIN_SOUL_ENTER, SoulParticle.EmissiveProvider::new); | ||
particleRegistry.register(TTParticleTypes.GLOWING_BUBBLE, GlowingColorBubbleParticle.Provider::new); | ||
particleRegistry.register(TTParticleTypes.GLOWING_ENTITY_EFFECT, GlowingSpellParticle.MobEffectProvider::new); | ||
particleRegistry.register(TTParticleTypes.GLOWING_DUST_COLOR_TRANSITION, GlowingColorTransitionParticle.Provider::new); | ||
particleRegistry.register(TTParticleTypes.SUSPICIOUS_CONNECTION, TrailierParticleProviders.SuspiciousConnectionProvider::new); | ||
particleRegistry.register(TTParticleTypes.SIEGE_OMEN, GlowingSpellParticle.Provider::new); | ||
particleRegistry.register(TTParticleTypes.TRANSFIGURING, GlowingSpellParticle.Provider::new); | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
.../entity/render/model/ApparitionModel.java → ...ertales/client/model/ApparitionModel.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
2 changes: 1 addition & 1 deletion
2
.../entity/render/model/BoatBannerModel.java → ...ertales/client/model/BoatBannerModel.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
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
2 changes: 1 addition & 1 deletion
2
.../client/renderer/CoffinDebugRenderer.java → ...t/renderer/debug/CoffinDebugRenderer.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
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