-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. New Datagen System using DataSettings
2. Homes* -> SoH* 3. Recipe Fixes
- Loading branch information
1 parent
59df8eb
commit 6f52613
Showing
29 changed files
with
823 additions
and
434 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
14 changes: 6 additions & 8 deletions
14
src/client/java/net/rotgruengelb/sweetofhomes/SweetOfHomesClient.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 |
---|---|---|
@@ -1,17 +1,15 @@ | ||
package net.rotgruengelb.sweetofhomes; | ||
|
||
import net.fabricmc.api.ClientModInitializer; | ||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; | ||
import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry; | ||
import net.minecraft.client.render.RenderLayer; | ||
import net.rotgruengelb.sweetofhomes.block.SHomesBlocksCollections; | ||
import net.rotgruengelb.sweetofhomes.client.render.entity.ChairEntityRenderer; | ||
import net.rotgruengelb.sweetofhomes.entity.HomesEntities; | ||
import net.rotgruengelb.sweetofhomes.client.render.RenderLayerHandler; | ||
import net.rotgruengelb.sweetofhomes.client.render.entity.SeatEntityRenderer; | ||
import net.rotgruengelb.sweetofhomes.entity.SoHEntities; | ||
|
||
public class SweetOfHomesClient implements ClientModInitializer { | ||
@Override | ||
public void onInitializeClient() { | ||
|
||
SHomesBlocksCollections.CHAIR_BOCKS.forEach((block) -> BlockRenderLayerMap.INSTANCE.putBlock(block, RenderLayer.getCutout())); | ||
EntityRendererRegistry.register(HomesEntities.CHAIR_ENTITY, ChairEntityRenderer::new); } | ||
EntityRendererRegistry.register(SoHEntities.CHAIR_ENTITY, SeatEntityRenderer::new); | ||
RenderLayerHandler.handelRenderLayers(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/client/java/net/rotgruengelb/sweetofhomes/client/render/RenderLayerHandler.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,23 @@ | ||
package net.rotgruengelb.sweetofhomes.client.render; | ||
|
||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; | ||
import net.minecraft.client.render.RenderLayer; | ||
import net.rotgruengelb.sweetofhomes.datagen.SoHDataGenerator; | ||
import net.rotgruengelb.sweetofhomes.datagen.settings.BlockDataSettings; | ||
import net.rotgruengelb.sweetofhomes.datagen.settings.DataSettings; | ||
|
||
public class RenderLayerHandler { | ||
|
||
public static void handelRenderLayers() { | ||
for (DataSettings<?> dataSettings : SoHDataGenerator.dataSettings) { | ||
if (dataSettings instanceof BlockDataSettings<?> blockDataSettings) { | ||
switch (blockDataSettings.getRenderLayer()) { | ||
case CUTOUT -> | ||
BlockRenderLayerMap.INSTANCE.putBlock(blockDataSettings.getBlock(), RenderLayer.getCutout()); | ||
case TRANSLUCENT -> | ||
BlockRenderLayerMap.INSTANCE.putBlock(blockDataSettings.getBlock(), RenderLayer.getTranslucent()); | ||
} | ||
} | ||
} | ||
} | ||
} |
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
134 changes: 0 additions & 134 deletions
134
src/main/java/net/rotgruengelb/sweetofhomes/block/HomesBlocks.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.