Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ingot/block/nuggets for copper and aluminum, add tinkers as dep…
…endency, bump forge and mantle versions up (1.10.2)
- Loading branch information
Showing
22 changed files
with
296 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
mod_version=2.0 | ||
minecraft_version=1.10 | ||
forge_version=12.18.0.2000-1.10.0 | ||
minecraft_version=1.10.2 | ||
forge_version=12.18.1.2011 | ||
mappings=snapshot_20160705 | ||
mantle_version=0.10.3.jenkins157 | ||
mantle_version=0.10.3.jenkins161 | ||
tinkers_version=2.3.3a.jenkins296 | ||
jei_version=3.7.+ | ||
waila_version=1.7.0-B3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"forge_marker": 1, | ||
"defaults": { | ||
"transform": "forge:default-item", | ||
"model": "forge:item-layer" | ||
}, | ||
"variants": { | ||
"aluminum": [ | ||
{ | ||
"textures": { | ||
"layer0": "tmechworks:items/materials/ingot_aluminum" | ||
} | ||
} | ||
], | ||
"copper": [ | ||
{ | ||
"textures": { | ||
"layer0": "tmechworks:items/materials/ingot_copper" | ||
} | ||
} | ||
] | ||
} | ||
} |
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,21 @@ | ||
{ | ||
"forge_marker": 1, | ||
"defaults": { | ||
"transform": "forge:default-block", | ||
"model": "cube_all" | ||
}, | ||
"variants": { | ||
"type": { | ||
"aluminum": { | ||
"textures": { | ||
"all": "tmechworks:blocks/block_aluminum" | ||
} | ||
}, | ||
"copper": { | ||
"textures": { | ||
"all": "tmechworks:blocks/block_copper" | ||
} | ||
} | ||
} | ||
} | ||
} |
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 @@ | ||
{ | ||
"forge_marker": 1, | ||
"defaults": { | ||
"transform": "forge:default-item", | ||
"model": "forge:item-layer" | ||
}, | ||
"variants": { | ||
"aluminum": [ | ||
{ | ||
"textures": { | ||
"layer0": "tmechworks:items/materials/nugget_aluminum" | ||
} | ||
} | ||
], | ||
"copper": [ | ||
{ | ||
"textures": { | ||
"layer0": "tmechworks:items/materials/nugget_copper" | ||
} | ||
} | ||
] | ||
} | ||
} |
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
19 changes: 0 additions & 19 deletions
19
resources/assets/tmechworks/models/block/machine_base.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"parent": "block/cube_all", | ||
"textures": { | ||
"all": "tmechworks:blocks/machines/drawbridge_face" | ||
} | ||
} |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.5 KB
resources/assets/tmechworks/textures/items/materials/ingot_aluminum.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.6 KB
resources/assets/tmechworks/textures/items/materials/ingot_copper.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.4 KB
resources/assets/tmechworks/textures/items/materials/nugget_aluminum.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17.4 KB
resources/assets/tmechworks/textures/items/materials/nugget_copper.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package slimeknights.tmechworks.blocks; | ||
|
||
import net.minecraft.block.material.Material; | ||
import net.minecraft.block.properties.PropertyEnum; | ||
import net.minecraft.util.IStringSerializable; | ||
import slimeknights.mantle.block.EnumBlock; | ||
import slimeknights.tmechworks.common.MechworksContent; | ||
|
||
import java.util.Locale; | ||
|
||
public class Metal extends EnumBlock<Metal.MetalTypes> | ||
{ | ||
public static final PropertyEnum<MetalTypes> TYPE = PropertyEnum.create("type", MetalTypes.class); | ||
|
||
public Metal () | ||
{ | ||
super(Material.IRON, TYPE, MetalTypes.class); | ||
|
||
setHardness(5F); | ||
setResistance(10F); | ||
setHarvestLevel("pickaxe", -1); | ||
setCreativeTab(MechworksContent.tabMechworks); | ||
} | ||
|
||
public enum MetalTypes implements IStringSerializable, EnumBlock.IEnumMeta | ||
{ | ||
ALUMINUM, COPPER; | ||
|
||
@Override public String getName () | ||
{ | ||
return this.toString().toLowerCase(Locale.US); | ||
} | ||
|
||
@Override public int getMeta () | ||
{ | ||
return ordinal(); | ||
} | ||
} | ||
} |
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
83 changes: 83 additions & 0 deletions
83
src/main/java/slimeknights/tmechworks/common/MechRecipes.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,83 @@ | ||
package slimeknights.tmechworks.common; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.item.Item; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraftforge.fml.common.registry.GameRegistry; | ||
import net.minecraftforge.oredict.OreDictionary; | ||
import net.minecraftforge.oredict.ShapedOreRecipe; | ||
import net.minecraftforge.oredict.ShapelessOreRecipe; | ||
|
||
public class MechRecipes | ||
{ | ||
protected static void register () | ||
{ | ||
registerMetalRecipes("Aluminum", MechworksContent.ingotAluminum, MechworksContent.nuggetAluminum, MechworksContent.blockAluminum); | ||
registerMetalRecipes("Copper", MechworksContent.ingotCopper, MechworksContent.nuggetCopper, MechworksContent.blockCopper); | ||
} | ||
|
||
private static void registerMetalRecipes (String oreString, ItemStack ingot, ItemStack nugget, ItemStack block) | ||
{ | ||
if (ingot == null) | ||
return; | ||
|
||
oredict(ingot, "ingot" + oreString); | ||
|
||
if (nugget != null) | ||
{ | ||
oredict(nugget, "nugget" + oreString); | ||
|
||
registerCompressionRecipe(nugget, ingot, "nugget" + oreString, "ingot" + oreString); | ||
} | ||
|
||
if (block != null) | ||
{ | ||
oredict(block, "block" + oreString); | ||
|
||
registerCompressionRecipe(ingot, block, "ingot" + oreString, "block" + oreString); | ||
} | ||
} | ||
|
||
private static void registerCompressionRecipe (ItemStack small, ItemStack big, String oreSmall, String oreBig) | ||
{ | ||
// Small -> Big | ||
GameRegistry.addRecipe(new ShapedOreRecipe(big, "###", "###", "###", '#', oreSmall)); | ||
|
||
small = small.copy(); | ||
small.stackSize = 9; | ||
|
||
// Big -> Small | ||
GameRegistry.addRecipe(new ShapelessOreRecipe(small, oreBig)); | ||
} | ||
|
||
public static void oredict (Item item, String... name) | ||
{ | ||
oredict(item, OreDictionary.WILDCARD_VALUE, name); | ||
} | ||
|
||
public static void oredict (Block block, String... name) | ||
{ | ||
oredict(block, OreDictionary.WILDCARD_VALUE, name); | ||
} | ||
|
||
public static void oredict (Item item, int meta, String... name) | ||
{ | ||
oredict(new ItemStack(item, 1, meta), name); | ||
} | ||
|
||
public static void oredict (Block block, int meta, String... name) | ||
{ | ||
oredict(new ItemStack(block, 1, meta), name); | ||
} | ||
|
||
public static void oredict (ItemStack stack, String... names) | ||
{ | ||
if (stack != null && stack.getItem() != null) | ||
{ | ||
for (String name : names) | ||
{ | ||
OreDictionary.registerOre(name, stack); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.