Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scorched bricks and blocks, make the high oven using them
Also includes scorched faucets, drains, channels, and casting blocks
- Loading branch information
1 parent
36d0761
commit 88ee883
Showing
110 changed files
with
2,227 additions
and
76 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
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
74 changes: 72 additions & 2 deletions
74
src/main/java/knightminer/tcomplement/steelworks/SteelworksClientProxy.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,16 +1,86 @@ | ||
package knightminer.tcomplement.steelworks; | ||
|
||
import static knightminer.tcomplement.steelworks.SteelworksModule.highOvenController; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.highOvenIO; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedBlock; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedCasting; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedChannel; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedFaucet; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedSlab; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedSlab2; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsBrick; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsBrickCracked; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsBrickFancy; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsBrickSmall; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsBrickSquare; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsBrickTriangle; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsCobble; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsCreeper; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsPaver; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsRoad; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsStone; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.scorchedStairsTile; | ||
import static knightminer.tcomplement.steelworks.SteelworksModule.storage; | ||
import static slimeknights.tconstruct.common.ModelRegisterUtil.registerItemBlockMeta; | ||
import static slimeknights.tconstruct.common.ModelRegisterUtil.registerItemModel; | ||
|
||
import knightminer.tcomplement.common.ClientProxy; | ||
import knightminer.tcomplement.library.Util; | ||
import net.minecraft.client.renderer.block.model.ModelResourceLocation; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.client.event.ModelBakeEvent; | ||
import net.minecraftforge.client.event.ModelRegistryEvent; | ||
import net.minecraftforge.client.model.ModelLoader; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
import slimeknights.tconstruct.smeltery.block.BlockSmelteryIO; | ||
|
||
public class SteelworksClientProxy extends ClientProxy { | ||
@SubscribeEvent | ||
public void registerModels(ModelRegistryEvent event) { | ||
registerItemBlockMeta(SteelworksModule.storage); | ||
registerItemModel(SteelworksModule.highOvenController); | ||
registerItemBlockMeta(storage); | ||
|
||
// High Oven Blocks | ||
registerItemModel(highOvenController); | ||
registerItemModel(scorchedFaucet); | ||
registerItemModel(scorchedChannel); | ||
registerItemBlockMeta(scorchedCasting); | ||
|
||
// Scorched | ||
registerItemBlockMeta(scorchedBlock); | ||
registerItemBlockMeta(scorchedSlab); | ||
registerItemBlockMeta(scorchedSlab2); | ||
// Scorched Stairs | ||
registerItemModel(scorchedStairsStone); | ||
registerItemModel(scorchedStairsCobble); | ||
registerItemModel(scorchedStairsPaver); | ||
registerItemModel(scorchedStairsBrick); | ||
registerItemModel(scorchedStairsBrickCracked); | ||
registerItemModel(scorchedStairsBrickFancy); | ||
registerItemModel(scorchedStairsBrickSquare); | ||
registerItemModel(scorchedStairsBrickTriangle); | ||
registerItemModel(scorchedStairsBrickSmall); | ||
registerItemModel(scorchedStairsRoad); | ||
registerItemModel(scorchedStairsTile); | ||
registerItemModel(scorchedStairsCreeper); | ||
|
||
// High Oven IO | ||
// TODO: ducts | ||
Item io = Item.getItemFromBlock(highOvenIO); | ||
for(BlockSmelteryIO.IOType type : BlockSmelteryIO.IOType.values()) { | ||
String variant = String.format("facing=south,type=%s", type.getName()); | ||
ModelLoader.setCustomModelResourceLocation(io, type.meta, new ModelResourceLocation(io.getRegistryName(), variant)); | ||
} | ||
} | ||
|
||
private static final ResourceLocation SCORCHED_CASTING = Util.getResource("scorched_casting"); | ||
private static final ModelResourceLocation SCORCHED_CASTING_TABLE = new ModelResourceLocation(SCORCHED_CASTING, "type=table"); | ||
private static final ModelResourceLocation SCORCHED_CASTING_BASIN = new ModelResourceLocation(SCORCHED_CASTING, "type=basin"); | ||
|
||
@SubscribeEvent | ||
public void onModelBake(ModelBakeEvent event) { | ||
// convert casting table and basin to bakedTableModel for the item-rendering on/in them | ||
wrapTableModel(event, SCORCHED_CASTING_TABLE); | ||
wrapTableModel(event, SCORCHED_CASTING_BASIN); | ||
} | ||
} |
Oops, something went wrong.