fixed syncing things, and bug with last commit

This commit is contained in:
modmuss50 2015-05-16 16:59:36 +01:00
parent 6bd2818e74
commit f7124cb7e6
2 changed files with 5 additions and 4 deletions

View file

@ -85,9 +85,6 @@ public class RecipeCrafter {
* Call this on the tile tick * Call this on the tile tick
*/ */
public void updateEntity() { public void updateEntity() {
/*if (parentTile.getWorldObj().isRemote) {
return;
}*/
if (currentRecipe == null) { if (currentRecipe == null) {
for (IBaseRecipeType recipe : RecipeHanderer.getRecipeClassFromName(recipeName)) { for (IBaseRecipeType recipe : RecipeHanderer.getRecipeClassFromName(recipeName)) {
boolean isFullRecipe = false; boolean isFullRecipe = false;
@ -160,6 +157,10 @@ public class RecipeCrafter {
} }
public void fitStack(ItemStack stack, int slot) { public void fitStack(ItemStack stack, int slot) {
//Don't do this on the client.
if (parentTile.getWorldObj().isRemote) {
return;
}
if (stack == null) { if (stack == null) {
return; return;
} }

View file

@ -117,7 +117,7 @@ public class ItemUtils {
ArrayList<ItemStack> list = new ArrayList<ItemStack>(); ArrayList<ItemStack> list = new ArrayList<ItemStack>();
for (int oreID : OreDictionary.getOreIDs(stack)){ for (int oreID : OreDictionary.getOreIDs(stack)){
for(ItemStack ore : OreDictionary.getOres(OreDictionary.getOreName(oreID))){ for(ItemStack ore : OreDictionary.getOres(OreDictionary.getOreName(oreID))){
ItemStack newOre = stack; ItemStack newOre = ore;
newOre.stackSize = stack.stackSize; newOre.stackSize = stack.stackSize;
list.add(newOre); list.add(newOre);
} }