Skip to content

Commit

Permalink
Finished God Lanterns
Browse files Browse the repository at this point in the history
Added Godshards
Added recipes
  • Loading branch information
GirafiStudios committed Nov 28, 2020
1 parent 63ee5e7 commit 28771c9
Show file tree
Hide file tree
Showing 134 changed files with 1,250 additions and 25 deletions.
63 changes: 40 additions & 23 deletions src/main/java/com/teammetallurgy/atum/client/ClientHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.teammetallurgy.atum.misc.AtumRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScreenManager;
import net.minecraft.client.renderer.Atlases;
Expand Down Expand Up @@ -106,16 +107,16 @@ public static void init() {

@SubscribeEvent
public static void registerModels(ModelRegistryEvent event) {
RenderType cutoutMipped = RenderType.getCutoutMipped();
RenderType cutout = RenderType.getCutout();
RenderType translucent = RenderType.getTranslucent();
RenderTypeLookup.setRenderLayer(AtumBlocks.ANPUTS_FINGERS, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.OASIS_GRASS, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.DRY_GRASS, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.TALL_DRY_GRASS, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.SHRUB, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.WEED, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.OPHIDIAN_TONGUE, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.BONE_LADDER, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.ANPUTS_FINGERS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.OASIS_GRASS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.DRY_GRASS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.TALL_DRY_GRASS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.SHRUB, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.WEED, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.OPHIDIAN_TONGUE, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.BONE_LADDER, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.CRYSTAL_GLASS, translucent);
RenderTypeLookup.setRenderLayer(AtumBlocks.WHITE_STAINED_CRYSTAL_GLASS, translucent);
RenderTypeLookup.setRenderLayer(AtumBlocks.ORANGE_STAINED_CRYSTAL_GLASS, translucent);
Expand Down Expand Up @@ -218,22 +219,38 @@ public static void registerModels(ModelRegistryEvent event) {
RenderTypeLookup.setRenderLayer(AtumBlocks.GREEN_STAINED_DEADWOOD_FRAMED_CRYSTAL_GLASS_PANE, translucent);
RenderTypeLookup.setRenderLayer(AtumBlocks.RED_STAINED_DEADWOOD_FRAMED_CRYSTAL_GLASS_PANE, translucent);
RenderTypeLookup.setRenderLayer(AtumBlocks.BLACK_STAINED_DEADWOOD_FRAMED_CRYSTAL_GLASS_PANE, translucent);
RenderTypeLookup.setRenderLayer(AtumBlocks.PALM_SAPLING, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.POTTED_PALM_SAPLING, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.PALM_LEAVES, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.DRY_LEAVES, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.PALM_LADDER, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.DEADWOOD_LADDER, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.DEADWOOD_HATCH, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.DEADWOOD_DOOR, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.PAPYRUS, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.FLAX, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.EMMER_WHEAT, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.PALM_SCAFFOLDING, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.DEADWOOD_SCAFFOLDING, cutoutMipped);
RenderTypeLookup.setRenderLayer(AtumBlocks.PALM_SAPLING, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.POTTED_PALM_SAPLING, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.PALM_LEAVES, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.DRY_LEAVES, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.PALM_LADDER, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.DEADWOOD_LADDER, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.DEADWOOD_HATCH, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.DEADWOOD_DOOR, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.PAPYRUS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.FLAX, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.EMMER_WHEAT, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.PALM_SCAFFOLDING, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.DEADWOOD_SCAFFOLDING, cutout);
for (Block torch : AtumTorchUnlitBlock.ALL_TORCHES) {
RenderTypeLookup.setRenderLayer(torch, cutoutMipped);
RenderTypeLookup.setRenderLayer(torch, cutout);
}
RenderTypeLookup.setRenderLayer(AtumBlocks.NEBU_LANTERN, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_ANPUT, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_ANUBIS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_ATEM, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_GEB, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_HORUS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_ISIS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_MONTU, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_NEPTHYS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_NUIT, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_OSIRIS, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_PTAH, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_RA, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_SETH, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_SHU, cutout);
RenderTypeLookup.setRenderLayer(AtumBlocks.LANTERN_OF_TEFNUT, cutout);

ClientRegistry.bindTileEntityRenderer(AtumTileEntities.CHEST_SPAWNER, TileChestRender::new);
ClientRegistry.bindTileEntityRenderer(AtumTileEntities.LIMESTONE_CHEST, TileChestRender::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ public enum God {
HORUS("horus", TextFormatting.AQUA),
ISIS("isis", TextFormatting.LIGHT_PURPLE),
MONTU("montu", TextFormatting.DARK_RED),
NEPTHYS("osiris", TextFormatting.DARK_PURPLE),
NEPTHYS("nepthys", TextFormatting.DARK_PURPLE),
NUIT("nuit", TextFormatting.GRAY),
OSIRIS("osiris", TextFormatting.DARK_GREEN),
PTAH("ptah", TextFormatting.YELLOW),
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/teammetallurgy/atum/init/AtumItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,21 @@ public class AtumItems {
public static final RelicItem IDOL_BRACELETS = registerRelic(RelicItem.Type.BRACELET);
public static final Item EFREET_HEART = registerItem(new SimpleItem(), "efreet_heart");
public static final Item SCARAB = registerItem(new ScarabItem(), "scarab");
public static final Item ANPUT_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.ANPUT), "anput_godshard");
public static final Item ANUBIS_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.ANUBIS), "anubis_godshard");
public static final Item ATEM_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.ATEM), "atem_godshard");
public static final Item GEB_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.GEB), "geb_godshard");
public static final Item HORUS_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.HORUS), "horus_godshard");
public static final Item ISIS_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.ISIS), "isis_godshard");
public static final Item MONTU_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.MONTU), "montu_godshard");
public static final Item NEPTHYS_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.NEPTHYS), "nepthys_godshard");
public static final Item NUIT_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.NUIT), "nuit_godshard");
public static final Item OSIRIS_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.OSIRIS), "osiris_godshard");
public static final Item PTAH_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.PTAH), "ptah_godshard");
public static final Item RA_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.RA), "ra_godshard");
public static final Item SETH_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.SETH), "seth_godshard");
public static final Item SHU_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.SHU), "shu_godshard");
public static final Item TEFNUT_GODSHARD = registerItem(new GodshardItem(PharaohEntity.God.TEFNUT), "tefnut_godshard");
public static final Item IDOL_OF_LABOR = registerItem(new IdolOfLaborItem(), "idol_of_labor");
static final Block HEART_OF_RA = AtumRegistry.registerBlock(new HeartOfRaBlock(), "heart_of_ra");
public static final BaseBowItem SHORT_BOW = (BaseBowItem) registerItem(new BaseBowItem(new Item.Properties().maxDamage(384)), "short_bow");
Expand Down
15 changes: 15 additions & 0 deletions src/main/java/com/teammetallurgy/atum/items/GodshardItem.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package com.teammetallurgy.atum.items;

import com.teammetallurgy.atum.entity.undead.PharaohEntity;

public class GodshardItem extends SimpleItem {
private final PharaohEntity.God god;

public GodshardItem(PharaohEntity.God god) {
this.god = god;
}

public PharaohEntity.God getGod() {
return this.god;
}
}
8 changes: 8 additions & 0 deletions src/main/java/com/teammetallurgy/atum/misc/StackHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ public static Block getBlockFromName(ResourceLocation location) {
return ForgeRegistries.BLOCKS.getValue(location);
}

public static Item getItemFromName(String name) {
return getItemFromName(new ResourceLocation(Atum.MOD_ID, name));
}

public static Item getItemFromName(ResourceLocation location) {
return ForgeRegistries.ITEMS.getValue(location);
}

/*
* Gives the specified ItemStack to the player
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package com.teammetallurgy.atum.misc.datagenerator;

import com.teammetallurgy.atum.Atum;
import com.teammetallurgy.atum.entity.undead.PharaohEntity;
import com.teammetallurgy.atum.init.AtumBlocks;
import com.teammetallurgy.atum.init.AtumItems;
import com.teammetallurgy.atum.misc.StackHelper;
import net.minecraft.block.Block;
import net.minecraft.data.*;
import net.minecraft.item.DyeColor;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.Ingredient;
import net.minecraft.tags.ItemTags;
import net.minecraft.util.ResourceLocation;
Expand All @@ -18,6 +20,7 @@
import java.util.function.Consumer;

import static com.teammetallurgy.atum.misc.StackHelper.getBlockFromName;
import static com.teammetallurgy.atum.misc.StackHelper.getItemFromName;

public class RecipeGenerator extends RecipeProvider {

Expand Down Expand Up @@ -58,5 +61,10 @@ protected void registerRecipes(@Nonnull Consumer<IFinishedRecipe> consumer) {
ShapelessRecipeBuilder.shapelessRecipe(StackHelper.getBlockFromName(new ResourceLocation(colorName + "_concrete_powder")), 8).addIngredient(dye).addIngredient(Ingredient.fromTag(ItemTags.SAND), 4).addIngredient(Ingredient.fromTag(Tags.Items.GRAVEL), 4).setGroup("concrete_powder").addCriterion("has_sand", this.hasItem(Tags.Items.SAND)).addCriterion("has_gravel", this.hasItem(Tags.Items.GRAVEL)).build(consumer);
}
}
for (PharaohEntity.God god : PharaohEntity.God.values()) {
String godName = god.getName();
ShapedRecipeBuilder.shapedRecipe(getBlockFromName("torch_of_" + godName), 4).key('S', getItemFromName(godName + "_godshard")).key('T', AtumBlocks.NEBU_TORCH).patternLine(" T ").patternLine("TST").patternLine(" T ").addCriterion("has_nebu_torch", this.hasItem(AtumBlocks.NEBU_TORCH)).build(consumer);
ShapelessRecipeBuilder.shapelessRecipe(getBlockFromName("lantern_of_" + godName)).addIngredient(AtumBlocks.NEBU_LANTERN).addIngredient(getItemFromName(godName + "_godshard")).addCriterion("has_nebu_lantern", this.hasItem(AtumBlocks.NEBU_LANTERN)).build(consumer);
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_anput.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_anput"
},
"hanging=true": {
"model": "atum:block/lantern_of_anput_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_anubis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_anubis"
},
"hanging=true": {
"model": "atum:block/lantern_of_anubis_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_atem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_atem"
},
"hanging=true": {
"model": "atum:block/lantern_of_atem_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_geb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_geb"
},
"hanging=true": {
"model": "atum:block/lantern_of_geb_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_horus.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_horus"
},
"hanging=true": {
"model": "atum:block/lantern_of_horus_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_isis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_isis"
},
"hanging=true": {
"model": "atum:block/lantern_of_isis_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_montu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_montu"
},
"hanging=true": {
"model": "atum:block/lantern_of_montu_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_nepthys.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_nepthys"
},
"hanging=true": {
"model": "atum:block/lantern_of_nepthys_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_nuit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_nuit"
},
"hanging=true": {
"model": "atum:block/lantern_of_nuit_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_osiris.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_osiris"
},
"hanging=true": {
"model": "atum:block/lantern_of_osiris_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_ptah.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_ptah"
},
"hanging=true": {
"model": "atum:block/lantern_of_ptah_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_ra.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_ra"
},
"hanging=true": {
"model": "atum:block/lantern_of_ra_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_seth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_seth"
},
"hanging=true": {
"model": "atum:block/lantern_of_seth_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_shu.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_shu"
},
"hanging=true": {
"model": "atum:block/lantern_of_shu_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/lantern_of_tefnut.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/lantern_of_tefnut"
},
"hanging=true": {
"model": "atum:block/lantern_of_tefnut_hanging"
}
}
}
10 changes: 10 additions & 0 deletions src/main/resources/assets/atum/blockstates/nebu_lantern.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"variants": {
"hanging=false": {
"model": "atum:block/nebu_lantern"
},
"hanging=true": {
"model": "atum:block/nebu_lantern_hanging"
}
}
}

0 comments on commit 28771c9

Please sign in to comment.