Fix offsets, implement some of @tterrag1098's changes

This commit is contained in:
Aidan C. Brady 2014-06-19 20:47:45 +02:00
parent 098a74600c
commit efc72769d6
3 changed files with 13 additions and 12 deletions

View file

@ -263,15 +263,15 @@ public class PRCRecipeHandler extends BaseRecipeHandler
int xAxis = point.x-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft)-offset.x;
int yAxis = point.y-(Integer)MekanismUtils.getPrivateValue(gui, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop)-offset.y;
if(xAxis >= 6 && xAxis <= 22 && yAxis >= 11-10 && yAxis <= 69-10)
if(xAxis >= 6-5 && xAxis <= 22-5 && yAxis >= 11-10 && yAxis <= 69-10)
{
currenttip.add(((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.reactants.getFluid().getFluid().getLocalizedName());
}
else if(xAxis >= 29 && xAxis <= 45 && yAxis >= 11-10 && yAxis <= 69-10)
else if(xAxis >= 29-5 && xAxis <= 45-5 && yAxis >= 11-10 && yAxis <= 69-10)
{
currenttip.add(((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.reactants.getGas().getGas().getLocalizedName());
}
else if(xAxis >= 141 && xAxis <= 157 && yAxis >= 41-10 && yAxis <= 69-10)
else if(xAxis >= 141-5 && xAxis <= 157-5 && yAxis >= 41-10 && yAxis <= 69-10)
{
currenttip.add(((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.products.getGasOutput().getGas().getLocalizedName());
}
@ -291,15 +291,15 @@ public class PRCRecipeHandler extends BaseRecipeHandler
GasStack gas = null;
FluidStack fluid = null;
if(xAxis >= 6 && xAxis <= 22 && yAxis >= 11-10 && yAxis <= 69-10)
if(xAxis >= 6-5 && xAxis <= 22-5 && yAxis >= 11-10 && yAxis <= 69-10)
{
fluid = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.reactants.getFluid();
}
else if(xAxis >= 29 && xAxis <= 45 && yAxis >= 11-10 && yAxis <= 69-10)
else if(xAxis >= 29-5 && xAxis <= 45-5 && yAxis >= 11-10 && yAxis <= 69-10)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.reactants.getGas();
}
else if(xAxis >= 141 && xAxis <= 157 && yAxis >= 41-10 && yAxis <= 69-10)
else if(xAxis >= 141-5 && xAxis <= 157-5 && yAxis >= 41-10 && yAxis <= 69-10)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.products.getGasOutput();
}
@ -354,15 +354,15 @@ public class PRCRecipeHandler extends BaseRecipeHandler
GasStack gas = null;
FluidStack fluid = null;
if(xAxis >= 6 && xAxis <= 22 && yAxis >= 11-10 && yAxis <= 69-10)
if(xAxis >= 6-5 && xAxis <= 22-5 && yAxis >= 11-10 && yAxis <= 69-10)
{
fluid = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.reactants.getFluid();
}
else if(xAxis >= 29 && xAxis <= 45 && yAxis >= 11-10 && yAxis <= 69-10)
else if(xAxis >= 29-5 && xAxis <= 45-5 && yAxis >= 11-10 && yAxis <= 69-10)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.reactants.getGas();
}
else if(xAxis >= 141 && xAxis <= 157 && yAxis >= 41-10 && yAxis <= 69-10)
else if(xAxis >= 141-5 && xAxis <= 157-5 && yAxis >= 41-10 && yAxis <= 69-10)
{
gas = ((CachedIORecipe)arecipes.get(recipe)).pressurizedRecipe.products.getGasOutput();
}

View file

@ -77,7 +77,7 @@ public class ThreadMinerSearch extends Thread
info.block = tileEntity.getWorldObj().getBlock(x, y, z);
info.meta = tileEntity.getWorldObj().getBlockMetadata(x, y, z);
if(info.block != null && !tileEntity.getWorldObj().isAirBlock(x, y, z) && info.block != Blocks.bedrock)
if(info.block != null && !tileEntity.getWorldObj().isAirBlock(x, y, z) && info.block.getBlockHardness(tileEntity.getWorldObj(), x, y, z) >= 0)
{
boolean canFilter = false;

View file

@ -4,6 +4,7 @@ import ic2.api.tile.IWrenchable;
import io.netty.buffer.ByteBuf;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@ -29,10 +30,10 @@ public abstract class TileEntityBasicBlock extends TileEntity implements IWrench
public int clientFacing;
public Set<EntityPlayer> openedThisTick = new HashSet<EntityPlayer>();
public Set<EntityPlayer> openedThisTick = Collections.synchronizedSet(new HashSet<EntityPlayer>());
/** The players currently using this block. */
public Set<EntityPlayer> playersUsing = new HashSet<EntityPlayer>();
public Set<EntityPlayer> playersUsing = Collections.synchronizedSet(new HashSet<EntityPlayer>());
/** A timer used to send packets to clients. */
public int ticker;