mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-27 23:45:55 +00:00
Revert "Merge remote-tracking branch 'origin/master' into 1.7.10"
Yeah that didn't work... This reverts commit714542e2c2, reversing changes made tob579bcdcd8.
This commit is contained in:
1 parent
714542e2c2
commit
7c7b644b3f
53 files changed
+150
-1078
No files matched your search
@@ -2,6 +2,7 @@ package crazypants.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -15,6 +16,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemPotion;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
@@ -38,7 +40,7 @@ public class Util {
|
||||
}
|
||||
|
||||
public static ItemStack consumeItem(ItemStack stack) {
|
||||
if (stack.getItem() instanceof ItemPotion) {
|
||||
if(stack.getItem() instanceof ItemPotion) {
|
||||
if(stack.stackSize == 1) {
|
||||
return new ItemStack(Items.glass_bottle);
|
||||
} else {
|
||||
@@ -76,11 +78,11 @@ public class Util {
|
||||
|
||||
// derived from ItemBlock.onItemUse
|
||||
public static BlockCoord canPlaceItem(ItemStack itemUsed, Block blockIdToBePlaced, EntityPlayer player, World world, int x, int y, int z, int side) {
|
||||
|
||||
|
||||
if(blockIdToBePlaced == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Block block = world.getBlock(x, y, z);
|
||||
|
||||
if(block == Blocks.snow_layer && (world.getBlockMetadata(x, y, z) & 7) < 1) {
|
||||
@@ -163,7 +165,7 @@ public class Util {
|
||||
}
|
||||
|
||||
public static void dropItems(World world, ItemStack stack, int x, int y, int z, boolean doRandomSpread) {
|
||||
if(stack == null || stack.stackSize <= 0) {
|
||||
if(stack.stackSize <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -289,19 +291,16 @@ public class Util {
|
||||
|
||||
public static boolean isEquipped(EntityPlayer player, Class<? extends Item> class1) {
|
||||
if(player == null || player.inventory == null || player.inventory.getCurrentItem() == null) {
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
//player.inventory.getCurrentItem().getClass().getItem().isAssignableFrom(class1)
|
||||
return class1.isAssignableFrom(player.inventory.getCurrentItem().getItem().getClass());
|
||||
}
|
||||
|
||||
|
||||
public static boolean isType(ItemStack stack, Class<? extends Item> class1) {
|
||||
if(stack == null || class1 == null) {
|
||||
return false;
|
||||
}
|
||||
return class1.isAssignableFrom(stack.getItem().getClass());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user