Skip to content

Commit

Permalink
- Bottles will no longer be placed in inventories of fake players (e.…
Browse files Browse the repository at this point in the history
…g. Thaumcraft Golems, Thermal Expansion Autonomous Activators). They're always spawned in the world instead.(Fixes #6).

- Recipes now use ore dictionary by default.
  • Loading branch information
Zarathul committed Dec 1, 2014
1 parent 5f6ee97 commit bf50de4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ buildscript

apply plugin: 'forge'

version = "1.7.10-1.2.0.4"
version = "1.7.10-1.2.0.5"
group= "net.zarathul.simplefluidtanks" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "simplefluidtanks"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import net.minecraft.util.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidContainerItem;
Expand Down Expand Up @@ -314,11 +315,11 @@ private void fillContainerFromTank(World world, int x, int y, int z, EntityPlaye
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}

// add filled container to player inventory or drop it to the ground if the inventory is full
// add filled container to player inventory or drop it to the ground if the inventory is full or we're dealing with a fake player

if (!player.inventory.addItemStackToInventory(filledContainer))
if (player instanceof FakePlayer || !player.inventory.addItemStackToInventory(filledContainer))
{
world.spawnEntityInWorld(new EntityItem(world, x + 0.5D, y + 1.5D, z + 0.5D, filledContainer));
world.spawnEntityInWorld(new EntityItem(world, player.posX + 0.5D, player.posY + 1.5D, player.posZ + 0.5D, filledContainer));
}
else if (player instanceof EntityPlayerMP)
{
Expand Down Expand Up @@ -383,11 +384,11 @@ private void drainContainerIntoTank(World world, int x, int y, int z, EntityPlay
player.inventory.setInventorySlotContents(player.inventory.currentItem, null);
}

// add emptied container to player inventory or drop it to the ground if the inventory is full
// add emptied container to player inventory or drop it to the ground if the inventory is full or we're dealing with a fake player

if (!player.inventory.addItemStackToInventory(emptyContainer))
if (player instanceof FakePlayer || !player.inventory.addItemStackToInventory(emptyContainer))
{
world.spawnEntityInWorld(new EntityItem(world, x + 0.5D, y + 1.5D, z + 0.5D, emptyContainer));
world.spawnEntityInWorld(new EntityItem(world, player.posX + 0.5D, player.posY + 1.5D, player.posZ + 0.5D, emptyContainer));
}
else if (player instanceof EntityPlayerMP)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ public final class Config
),
new RecipeComponent[]
{
new RecipeComponent("I", "minecraft", "iron_ingot"),
new RecipeComponent("G", "minecraft", "glass")
new RecipeComponent("I", "oreDict", "ingotIron"),
new RecipeComponent("G", "oreDict", "blockGlass")
}
);

Expand All @@ -43,8 +43,8 @@ public final class Config
),
new RecipeComponent[]
{
new RecipeComponent("I", "minecraft", "iron_ingot"),
new RecipeComponent("S", "minecraft", "slime_ball"),
new RecipeComponent("I", "oreDict", "ingotIron"),
new RecipeComponent("S", "oreDict", "slimeball"),
new RecipeComponent("T", SimpleFluidTanks.MOD_ID, Registry.TANKBLOCK_NAME)
}
);
Expand All @@ -59,7 +59,7 @@ public final class Config
),
new RecipeComponent[]
{
new RecipeComponent("I", "minecraft", "iron_ingot")
new RecipeComponent("I", "oreDict", "ingotIron")
}
);

Expand Down

0 comments on commit bf50de4

Please sign in to comment.