fix #2397, minor tweaks
This commit is contained in:
parent
f8b2efbc35
commit
7d9892bc13
2 changed files with 8 additions and 4 deletions
|
@ -22,6 +22,7 @@ import io.netty.buffer.Unpooled;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
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) {
|
public static void dropTryIntoPlayerInventory(World world, int x, int y, int z, ItemStack stack, EntityPlayer player) {
|
||||||
if (player == null || !player.inventory.addItemStackToInventory(stack)) {
|
if (player != null && player.inventory.addItemStackToInventory(stack)) {
|
||||||
InvUtils.dropItems(world, stack, x, y, z);
|
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) {
|
public static TileEntity getTile(World world, Position pos, ForgeDirection step) {
|
||||||
Position tmp = new Position(pos);
|
Position tmp = new Position(pos);
|
||||||
|
|
|
@ -120,9 +120,9 @@ public final class FacadeRenderHelper {
|
||||||
textures[side.ordinal()] = renderBlock.getIcon(
|
textures[side.ordinal()] = renderBlock.getIcon(
|
||||||
facadeBlockAccess, tile.x(), tile.y(), tile.z(), side.ordinal()
|
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);
|
textures[side.ordinal()] = renderBlock.getIcon(side.ordinal(), renderMeta);
|
||||||
} */
|
}
|
||||||
if (side == direction || side == direction.getOpposite()) {
|
if (side == direction || side == direction.getOpposite()) {
|
||||||
blockStateMachine.setRenderSide(side, true);
|
blockStateMachine.setRenderSide(side, true);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue