fixing bugs
This commit is contained in:
@@ -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.3.1
|
mod_version=1.3.2
|
||||||
|
|
||||||
forge_version=14.22.0.2463
|
forge_version=14.22.0.2463
|
||||||
mcp_mappings=snapshot_20170624
|
mcp_mappings=snapshot_20170624
|
||||||
|
|||||||
@@ -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.3.1";
|
public static final String MOD_VERSION = "1.3.2";
|
||||||
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
|
public static final String MC_VERSIONS = "[1.12.0, 1.13.0)";
|
||||||
public static final String DEPENDENCIES = "required-after:forge@[14.21.0,2344,);" + "required-after:primal@[0.5,);";
|
public static final String DEPENDENCIES = "required-after:forge@[14.21.0,2344,);" + "required-after:primal@[0.5,);";
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class AnvilStone extends AnvilBase {
|
|||||||
for (int i = 0; i < 25; i++) {
|
for (int i = 0; i < 25; i++) {
|
||||||
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
tempArray[i] = tile.getSlotStack(i).getItem().getRegistryName().toString();
|
||||||
}
|
}
|
||||||
for (int i = 0; i < 25; i++) {
|
/*for (int i = 0; i < 25; i++) {
|
||||||
if (tile.getSlotStack(i).getItem() instanceof BaseMultiItem) {
|
if (tile.getSlotStack(i).getItem() instanceof BaseMultiItem) {
|
||||||
if (((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_WROUGHT_IRON) {
|
if (((BaseMultiItem) tile.getSlotStack(i).getItem()).getMaterial(tile.getSlotStack(i).getItem()) != PrimalMaterials.TOOL_WROUGHT_IRON) {
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
world.setBlockState(pos, Blocks.AIR.getDefaultState(), 2);
|
||||||
@@ -52,7 +52,7 @@ public class AnvilStone extends AnvilBase {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
doAnvilRecipe(pItem, tempArray, world, tile, pos, player);
|
doAnvilRecipe(pItem, tempArray, world, tile, pos, player);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import net.minecraft.util.ITickable;
|
|||||||
import net.minecraft.util.NonNullList;
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
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;
|
||||||
@@ -41,6 +42,18 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
|||||||
this.setHeat(100);
|
this.setHeat(100);
|
||||||
}
|
}
|
||||||
this.iteration++;
|
this.iteration++;
|
||||||
|
if (this.iteration == 100) {
|
||||||
|
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||||
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
|
makeSmoke(world, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.iteration == 200) {
|
||||||
|
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||||
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
|
makeSmoke(world, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (this.iteration == 300) {
|
if (this.iteration == 300) {
|
||||||
this.iteration = 0;
|
this.iteration = 0;
|
||||||
//IBlockState state = world.getBlockState(this.pos);
|
//IBlockState state = world.getBlockState(this.pos);
|
||||||
@@ -51,9 +64,11 @@ public class TileBloomery extends TileBaseSlot implements ITickable {
|
|||||||
world.notifyBlockUpdate(pos, state, state, 2);
|
world.notifyBlockUpdate(pos, state, state, 2);
|
||||||
}
|
}
|
||||||
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
|
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
|
||||||
|
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||||
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
|
makeSmoke(world, pos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
slotZeroManager(world);
|
|
||||||
slotOneManager();
|
slotOneManager();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -103,10 +118,15 @@ 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(RecipeHelper.getBurnTime(this.getSlotStack(0)) / 5);
|
Integer decrInt = Math.round(RecipeHelper.getBurnTime(this.getSlotStack(0)) / 5);
|
||||||
if(decrInt == 0) {
|
if(decrInt == 0) {
|
||||||
decrInt = 1;
|
decrInt = 1;
|
||||||
}
|
}
|
||||||
|
//System.out.println(GameRegistry.getFuelValue(this.getSlotStack(0)));
|
||||||
|
//System.out.println( "Burn Time: " + RecipeHelper.getBurnTime(this.getSlotStack(0)));
|
||||||
|
//System.out.println("Burn Time / 5 :" + RecipeHelper.getBurnTime(this.getSlotStack(0))/5);
|
||||||
|
//System.out.println("Burn Time rounded: " + Math.round(RecipeHelper.getBurnTime(this.getSlotStack(0)) / 5));
|
||||||
|
//System.out.println(decrInt);
|
||||||
Integer size = this.getSlotStack(0).getCount();
|
Integer size = this.getSlotStack(0).getCount();
|
||||||
Integer burnModifier = 0;
|
Integer burnModifier = 0;
|
||||||
if(size / 16 <= 1){
|
if(size / 16 <= 1){
|
||||||
|
|||||||
@@ -46,6 +46,20 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
|
|||||||
IBlockState aboveState = world.getBlockState(abovePos);
|
IBlockState aboveState = world.getBlockState(abovePos);
|
||||||
Block block = world.getBlockState(abovePos).getBlock();
|
Block block = world.getBlockState(abovePos).getBlock();
|
||||||
if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) {
|
if (world.getBlockState(this.getPos()).getValue(PrimalStates.ACTIVE)) {
|
||||||
|
|
||||||
|
if (this.iteration == 100) {
|
||||||
|
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||||
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
|
makeSmoke(world, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (this.iteration == 200) {
|
||||||
|
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||||
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
|
makeSmoke(world, pos);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (this.iteration == 300) {
|
if (this.iteration == 300) {
|
||||||
this.iteration = 0;
|
this.iteration = 0;
|
||||||
|
|
||||||
@@ -55,11 +69,14 @@ public class TileForge extends TileBaseSlot implements ITickable, ToolNBT{
|
|||||||
this.markDirty();
|
this.markDirty();
|
||||||
world.notifyBlockUpdate(pos, state, state, 2);
|
world.notifyBlockUpdate(pos, state, state, 2);
|
||||||
}
|
}
|
||||||
|
RecipeHelper.fuelManger(world, this, this.getSlotStack(0));
|
||||||
|
if(CommonUtils.randomCheck(1000)) {
|
||||||
|
makeSmoke(world, pos);
|
||||||
|
}
|
||||||
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
|
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
slotZeroManager(world);
|
//slotZeroManager(world);
|
||||||
craftingManager();
|
craftingManager();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.3.1",
|
"version": "1.3.2",
|
||||||
"mcversion": "1.12.0",
|
"mcversion": "1.12.0",
|
||||||
"url": "",
|
"url": "",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user