Fixed ItemTile and updated Update JSON
This commit is contained in:
parent
8848759b30
commit
24fdee0125
|
|
@ -28,7 +28,7 @@ public class CarryOn {
|
||||||
public static final String MODID = "carryon";
|
public static final String MODID = "carryon";
|
||||||
public static final String VERSION = "1.2";
|
public static final String VERSION = "1.2";
|
||||||
public static final String NAME = "Carry On";
|
public static final String NAME = "Carry On";
|
||||||
public static final String UPDATE_JSON = "https://gist.githubusercontent.com/Tschipp/dccadee7c90d7a34e6e76a35d9d6fa2e/raw/bf7fb60d5e59f73eee65b271d5c01585e26a0352/update.json";
|
public static final String UPDATE_JSON = "https://gist.githubusercontent.com/Tschipp/dccadee7c90d7a34e6e76a35d9d6fa2e/raw/";
|
||||||
public static final Logger LOGGER = LogManager.getFormatterLogger("CarryOn");
|
public static final Logger LOGGER = LogManager.getFormatterLogger("CarryOn");
|
||||||
|
|
||||||
//public static SimpleNetworkWrapper network;
|
//public static SimpleNetworkWrapper network;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ public class ItemTile extends Item
|
||||||
pos2 = pos.offset(facing);
|
pos2 = pos.offset(facing);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.getBlockState(pos2).getBlock().isReplaceable(world, pos2))
|
if (world.getBlockState(pos2).getBlock().isReplaceable(world, pos2) && containedblock != null)
|
||||||
{
|
{
|
||||||
boolean canPlace = containedblock.canPlaceBlockAt(world, pos2);
|
boolean canPlace = containedblock.canPlaceBlockAt(world, pos2);
|
||||||
|
|
||||||
|
|
@ -227,8 +227,8 @@ public class ItemTile extends Item
|
||||||
if (stack.hasTagCompound())
|
if (stack.hasTagCompound())
|
||||||
{
|
{
|
||||||
NBTTagCompound tag = stack.getTagCompound();
|
NBTTagCompound tag = stack.getTagCompound();
|
||||||
String name = tag.getString("block");
|
int id = tag.getInteger("stateid");
|
||||||
return Block.getBlockFromName(name);
|
return Block.getStateById(id).getBlock();
|
||||||
}
|
}
|
||||||
return Blocks.AIR;
|
return Blocks.AIR;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user