tried to add primal version 0.2.26
This commit is contained in:
@@ -26,10 +26,10 @@ repositories {
|
||||
url "http://mobiusstrip.eu/maven"
|
||||
}
|
||||
|
||||
//maven {
|
||||
// name = "primal"
|
||||
// url "http://maven.nmd.so"
|
||||
//}
|
||||
maven {
|
||||
name = "primal"
|
||||
url "http://maven.nmd.so"
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
@@ -90,7 +90,7 @@ dependencies {
|
||||
//deobfCompile "mezz.jei:jei_${mc_version}:${jei_version}:api"
|
||||
//runtime "mezz.jei:jei_${mc_version}:${jei_version}"
|
||||
|
||||
//deobfCompile "nmd.primal.core:PrimalCore:${primal_version}:dev"
|
||||
deobfCompile "nmd.primal.core:PrimalCore:${primal_version}:dev"
|
||||
//runtime "nmd.primal.core:PrimalCore:${primal_version}"
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ forge_version=13.20.0.2226
|
||||
mcp_mappings=snapshot_20161220
|
||||
mc_version=1.11.2
|
||||
|
||||
primal_version=0.2.11
|
||||
primal_version=0.2.26
|
||||
jei_version=4.0+
|
||||
waila_version=1.7.0-B3
|
||||
apple_version=2.1+
|
||||
@@ -102,6 +102,7 @@ public class Forge extends CustomContainerFacing implements ITileEntityProvider/
|
||||
}
|
||||
if((pItem.getItem() == Items.FLINT_AND_STEEL) /*|| (pItem.getItem() == PrimalItems.FIRE_BOW)*/ || pItem.getItem() == Item.getItemFromBlock(Blocks.TORCH)) {
|
||||
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
|
||||
tile.setHeat(100);
|
||||
tile.markDirty();
|
||||
tile.updateBlock();
|
||||
return true;
|
||||
|
||||
@@ -98,6 +98,8 @@ public class ForgeCrafting {
|
||||
return this.input;
|
||||
}
|
||||
|
||||
public IBlockState getStartState() {return this.start_state;}
|
||||
|
||||
public IBlockState getOutput()
|
||||
{
|
||||
return this.end_state;
|
||||
|
||||
@@ -13,7 +13,9 @@ import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import nmd.primal.forgecraft.blocks.Forge;
|
||||
import nmd.primal.forgecraft.blocks.IngotBall;
|
||||
import nmd.primal.forgecraft.crafting.ForgeCrafting;
|
||||
import org.omg.PortableInterceptor.ACTIVE;
|
||||
|
||||
import static nmd.primal.forgecraft.CommonUtils.getVanillaItemBurnTime;
|
||||
|
||||
@@ -36,6 +38,7 @@ public class TileForge extends TileBaseSlot implements ITickable {
|
||||
this.iteration ++;
|
||||
IBlockState state = world.getBlockState(this.pos);
|
||||
BlockPos abovePos = new BlockPos(this.getPos().getX(), this.getPos().getY()+1, this.getPos().getZ());
|
||||
IBlockState aboveState = world.getBlockState(abovePos);
|
||||
Block block = world.getBlockState(abovePos).getBlock();
|
||||
if(this.iteration == 300 ) {
|
||||
this.iteration = 0;
|
||||
@@ -62,14 +65,10 @@ public class TileForge extends TileBaseSlot implements ITickable {
|
||||
}
|
||||
this.heatManager(this.getHeat(), state, this.getSlotStack(0), world, pos);
|
||||
}
|
||||
craftingManager(block, world, abovePos);
|
||||
craftingManager(block, world, abovePos, aboveState);
|
||||
}
|
||||
}
|
||||
|
||||
private void forgeRecipeManager(){
|
||||
|
||||
}
|
||||
|
||||
private void furnaceManager(BlockPos abovePos){
|
||||
if(world.getBlockState(abovePos).getBlock() instanceof BlockFurnace){
|
||||
TileEntityFurnace tileFurnace = (TileEntityFurnace) world.getTileEntity(abovePos);
|
||||
@@ -110,19 +109,25 @@ public class TileForge extends TileBaseSlot implements ITickable {
|
||||
}
|
||||
|
||||
|
||||
private void craftingManager(Block block, World world, BlockPos pos){
|
||||
private void craftingManager(Block block, World world, BlockPos pos, IBlockState state){
|
||||
ForgeCrafting recipe = ForgeCrafting.getRecipe(block);
|
||||
if(recipe != null){
|
||||
if(this.getHeat() >= recipe.getHeatThreshold()){
|
||||
if(this.getHeat() >= recipe.getHeatThreshold() && recipe.getStartState().equals(state) ){
|
||||
cookCounter++;
|
||||
}
|
||||
if(this.getHeat() < recipe.getHeatThreshold() && cookCounter > 0){
|
||||
cookCounter--;
|
||||
}
|
||||
if(cookCounter >= recipe.getIdealTime() ){
|
||||
world.setBlockState(pos, recipe.getCoolOutput(), 3);
|
||||
world.setBlockState(pos, recipe.getOutput(), 3);
|
||||
cookCounter = 0;
|
||||
}
|
||||
/*
|
||||
System.out.println(state.getValue(IngotBall.ACTIVE) + " : " + recipe.getStartState());
|
||||
System.out.println(cookCounter + " : " + recipe.getIdealTime());
|
||||
System.out.println(this.heat + " : " + recipe.getHeatThreshold());
|
||||
System.out.println("========");
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user