Compare armor test #11

Closed
kitsu wants to merge 8 commits from armortest into master-1.12
8 changed files with 23 additions and 63 deletions
Showing only changes of commit 6286961649 - Show all commits

View File

@@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3G
mod_group=nmd.primal.forgecraft mod_group=nmd.primal.forgecraft
mod_name=ForgeCraft mod_name=ForgeCraft
mod_version=1.2.71 mod_version=1.2.72
forge_version=13.20.1.2388 forge_version=13.20.1.2388
mcp_mappings=snapshot_20170610 mcp_mappings=snapshot_20170610
mc_version=1.11.2 mc_version=1.11.2

View File

@@ -1,38 +0,0 @@
#Minecraft server properties
max-tick-time=60000
generator-settings=
force-gamemode=false
allow-nether=true
gamemode=1
enable-query=false
player-idle-timeout=0
difficulty=1
spawn-monsters=false
op-permission-level=4
announce-player-achievements=true
pvp=true
snooper-enabled=true
level-type=DEFAULT
hardcore=false
enable-command-block=false
max-players=20
network-compression-threshold=256
resource-pack-sha1=
max-world-size=29999984
server-port=25565
server-ip=
spawn-npcs=true
allow-flight=true
level-name=world
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
generate-structures=true
online-mode=false
max-build-height=256
level-seed=
prevent-proxy-connections=false
use-native-transport=true
enable-rcon=false
motd=A Minecraft Server

View File

@@ -17,7 +17,7 @@ public class ModInfo {
public static final String MOD_CONFIG = "primal/" + MOD_ID; public static final String MOD_CONFIG = "primal/" + MOD_ID;
//public static final String MOD_PREFIX = MOD_ID + ":"; //public static final String MOD_PREFIX = MOD_ID + ":";
public static final String MOD_CHANNEL = MOD_ID; public static final String MOD_CHANNEL = MOD_ID;
public static final String MOD_VERSION = "1.2.71"; public static final String MOD_VERSION = "1.2.72";
public static final String MC_VERSIONS = "[1.11.0, 1.12.0)"; public static final String MC_VERSIONS = "[1.11.0, 1.12.0)";
public static final String DEPENDENCIES = "required-after:forge@[13.20.1.2388,);" + "required-after:primal@[0.4,);"; public static final String DEPENDENCIES = "required-after:forge@[13.20.1.2388,);" + "required-after:primal@[0.4,);";

View File

@@ -13,6 +13,7 @@ import net.minecraft.world.World;
import nmd.primal.core.api.PrimalItems; import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.api.PrimalStates; import nmd.primal.core.api.PrimalStates;
import nmd.primal.core.common.helper.CommonUtils; import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.core.common.helper.RecipeHelper;
import nmd.primal.forgecraft.blocks.BloomeryBase; import nmd.primal.forgecraft.blocks.BloomeryBase;
import nmd.primal.forgecraft.blocks.Crucibles.Crucible; import nmd.primal.forgecraft.blocks.Crucibles.Crucible;
import nmd.primal.forgecraft.crafting.BloomeryCrafting; import nmd.primal.forgecraft.crafting.BloomeryCrafting;
@@ -102,7 +103,7 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
private void slotZeroManager(World world){ private void slotZeroManager(World world){
if(this.getSlotStack(0) != ItemStack.EMPTY) { if(this.getSlotStack(0) != ItemStack.EMPTY) {
Integer decrInt = (int) Math.floor(CommonUtils.getBurnTime(this.getSlotStack(0)) / 5); Integer decrInt = (int) Math.floor(RecipeHelper.getBurnTime(this.getSlotStack(0)) / 5);
if(decrInt == 0) { if(decrInt == 0) {
decrInt = 1; decrInt = 1;
} }

View File

@@ -14,6 +14,7 @@ import net.minecraft.world.World;
import nmd.primal.core.api.PrimalItems; import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.api.PrimalStates; import nmd.primal.core.api.PrimalStates;
import nmd.primal.core.common.helper.CommonUtils; import nmd.primal.core.common.helper.CommonUtils;
import nmd.primal.core.common.helper.RecipeHelper;
import nmd.primal.forgecraft.blocks.Forge; import nmd.primal.forgecraft.blocks.Forge;
import nmd.primal.forgecraft.crafting.ForgeCrafting; import nmd.primal.forgecraft.crafting.ForgeCrafting;
@@ -63,7 +64,7 @@ public class TileForge extends TileBaseSlot implements ITickable {
private void slotZeroManager(World world){ private void slotZeroManager(World world){
if(this.getSlotStack(0) != ItemStack.EMPTY) { if(this.getSlotStack(0) != ItemStack.EMPTY) {
Integer decrInt = (int) Math.floor(CommonUtils.getBurnTime(this.getSlotStack(0)) / 5); Integer decrInt = (int) Math.floor(RecipeHelper.getBurnTime(this.getSlotStack(0)) / 5);
if(decrInt == 0) { if(decrInt == 0) {
decrInt = 1; decrInt = 1;
} }

View File

@@ -11,9 +11,11 @@ import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import nmd.primal.core.api.PrimalItems; import nmd.primal.core.api.PrimalItems;
import nmd.primal.core.common.helper.PlayerHelper; import nmd.primal.core.common.helper.PlayerHelper;
import nmd.primal.core.common.helper.RecipeHelper;
import nmd.primal.forgecraft.blocks.CustomContainerFacing; import nmd.primal.forgecraft.blocks.CustomContainerFacing;
import nmd.primal.forgecraft.tiles.TileBreaker; import nmd.primal.forgecraft.tiles.TileBreaker;
import static nmd.primal.core.common.helper.CommonUtils.randomChanceReturn;
import static nmd.primal.core.common.helper.CommonUtils.randomCheck; import static nmd.primal.core.common.helper.CommonUtils.randomCheck;
//import nmd.primal.forgecraft.CommonUtils; //import nmd.primal.forgecraft.CommonUtils;
@@ -23,7 +25,7 @@ import static nmd.primal.core.common.helper.CommonUtils.randomCheck;
*/ */
public interface BreakerHandler { public interface BreakerHandler {
default boolean hasOreName(ItemStack itemStack, String oreName) /*default boolean hasOreName(ItemStack itemStack, String oreName)
{ {
int[] oreIds = OreDictionary.getOreIDs(itemStack); int[] oreIds = OreDictionary.getOreIDs(itemStack);
for(int oreId : oreIds) for(int oreId : oreIds)
@@ -35,7 +37,7 @@ public interface BreakerHandler {
} }
} }
return false; return false;
} }*/
default boolean doBreaking(World world, IBlockState state, BlockPos pos, TileBreaker tile) { default boolean doBreaking(World world, IBlockState state, BlockPos pos, TileBreaker tile) {
for (int i=0; i < EnumFacing.HORIZONTALS.length; i++) { for (int i=0; i < EnumFacing.HORIZONTALS.length; i++) {
@@ -45,7 +47,7 @@ public interface BreakerHandler {
IBlockState smashState = world.getBlockState(pos.offset(face)); IBlockState smashState = world.getBlockState(pos.offset(face));
if(!smashState.getBlock().equals(Blocks.AIR)) { if(!smashState.getBlock().equals(Blocks.AIR)) {
ItemStack smashStack = new ItemStack(Item.getItemFromBlock(smashState.getBlock()), 1, smashState.getBlock().getMetaFromState(smashState)); ItemStack smashStack = new ItemStack(Item.getItemFromBlock(smashState.getBlock()), 1, smashState.getBlock().getMetaFromState(smashState));
if (hasOreName(smashStack, "oreIron")) { if (RecipeHelper.isOreName(smashStack, "oreIron")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face)); world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.IRON_DUST, randomChanceReturn(9, 1, 2))); PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.IRON_DUST, randomChanceReturn(9, 1, 2)));
@@ -53,7 +55,7 @@ public interface BreakerHandler {
return true; return true;
} }
} }
if (hasOreName(smashStack, "oreCopper")) { if (RecipeHelper.isOreName(smashStack, "oreCopper")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face)); world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.COPPER_DUST, randomChanceReturn(9, 1, 2))); PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.COPPER_DUST, randomChanceReturn(9, 1, 2)));
@@ -61,7 +63,7 @@ public interface BreakerHandler {
return true; return true;
} }
} }
if (hasOreName(smashStack, "oreTin")) { if (RecipeHelper.isOreName(smashStack, "oreTin")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face)); world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.TIN_DUST, randomChanceReturn(9, 1, 2))); PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.TIN_DUST, randomChanceReturn(9, 1, 2)));
@@ -69,7 +71,7 @@ public interface BreakerHandler {
return true; return true;
} }
} }
if (hasOreName(smashStack, "oreZinc")) { if (RecipeHelper.isOreName(smashStack, "oreZinc")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face)); world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.ZINC_DUST, randomChanceReturn(9, 1, 2))); PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.ZINC_DUST, randomChanceReturn(9, 1, 2)));
@@ -77,7 +79,7 @@ public interface BreakerHandler {
return true; return true;
} }
} }
if (hasOreName(smashStack, "oreGold")) { if (RecipeHelper.isOreName(smashStack, "oreGold")) {
if (tile.getCharge() > getThreshold(world, pos.offset(face))) { if (tile.getCharge() > getThreshold(world, pos.offset(face))) {
world.setBlockToAir(pos.offset(face)); world.setBlockToAir(pos.offset(face));
PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.GOLD_DUST, randomChanceReturn(9, 1, 2))); PlayerHelper.spawnItemOnGround(world, pos.offset(face), new ItemStack(PrimalItems.GOLD_DUST, randomChanceReturn(9, 1, 2)));
@@ -102,10 +104,4 @@ public interface BreakerHandler {
} }
return threshold; return threshold;
} }
public static int randomChanceReturn(int bound, int output1, int output2)
{
return randomCheck(bound) ? output2 : output1;
}
} }

View File

@@ -11,7 +11,7 @@
package net.minecraft.src; package net.minecraft.src;
public class Modeltest extends ModelBase public class ModelPlateHelmet extends ModelBase
{ {
//fields //fields
ModelRenderer head; ModelRenderer head;
@@ -215,12 +215,12 @@ public class Modeltest extends ModelBase
{ {
super.render(entity, f, f1, f2, f3, f4, f5); super.render(entity, f, f1, f2, f3, f4, f5);
setRotationAngles(f, f1, f2, f3, f4, f5, entity); setRotationAngles(f, f1, f2, f3, f4, f5, entity);
head.render(f5); //head.render(f5);
body.render(f5); //body.render(f5);
rightarm.render(f5); //rightarm.render(f5);
leftarm.render(f5); //leftarm.render(f5);
rightleg.render(f5); //rightleg.render(f5);
leftleg.render(f5); //leftleg.render(f5);
Shape1.render(f5); Shape1.render(f5);
Shape1.render(f5); Shape1.render(f5);
Shape1.render(f5); Shape1.render(f5);

View File

@@ -2,7 +2,7 @@
"modid": "forgecraft", "modid": "forgecraft",
"name": "Kitsu's Forgecraft", "name": "Kitsu's Forgecraft",
"description": "Forged with sweat and blood", "description": "Forged with sweat and blood",
"version": "1.2.71", "version": "1.2.72",
"mcversion": "1.11.2", "mcversion": "1.11.2",
"url": "", "url": "",
"updateUrl": "", "updateUrl": "",