fix #2397, minor tweaks

This commit is contained in:
asiekierka 2015-01-18 16:37:55 +01:00
parent f8b2efbc35
commit 7d9892bc13
2 changed files with 8 additions and 4 deletions

View file

@ -22,6 +22,7 @@ import io.netty.buffer.Unpooled;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -190,10 +191,13 @@ public final class Utils {
}
public static void dropTryIntoPlayerInventory(World world, int x, int y, int z, ItemStack stack, EntityPlayer player) {
if (player == null || !player.inventory.addItemStackToInventory(stack)) {
InvUtils.dropItems(world, stack, x, y, z);
if (player != null && player.inventory.addItemStackToInventory(stack)) {
if (player instanceof EntityPlayerMP) {
((EntityPlayerMP) player).sendContainerToPlayer(player.inventoryContainer);
}
}
InvUtils.dropItems(world, stack, x, y, z);
}
public static TileEntity getTile(World world, Position pos, ForgeDirection step) {
Position tmp = new Position(pos);

View file

@ -120,9 +120,9 @@ public final class FacadeRenderHelper {
textures[side.ordinal()] = renderBlock.getIcon(
facadeBlockAccess, tile.x(), tile.y(), tile.z(), side.ordinal()
);
/* if (textures[side.ordinal()] == null) {
if (textures[side.ordinal()] == null) {
textures[side.ordinal()] = renderBlock.getIcon(side.ordinal(), renderMeta);
} */
}
if (side == direction || side == direction.getOpposite()) {
blockStateMachine.setRenderSide(side, true);
} else {