ok actually nvm not every block has an item
@@ -11,8 +11,6 @@ import com.matt.forgehax.util.serialization.ISerializableJson;
import joptsimple.internal.Strings;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
-import net.minecraft.init.Items;
-import net.minecraft.item.Item;
import javax.annotation.Nonnull;
import java.io.IOException;
@@ -35,8 +33,6 @@ public class BlockEntry implements ISerializableJson, Globals {
private final Block block;
private final int meta;
- private final Item item;
-
public BlockEntry(String uniqueId) {
this.uniqueId = uniqueId;
Block block;
@@ -51,7 +47,6 @@ public class BlockEntry implements ISerializableJson, Globals {
}
this.block = block;
this.meta = meta;
- this.item = block == null ? Items.AIR : Item.getItemFromBlock(block);
}
public BlockEntry(Block block, int meta, boolean check) throws BlockDoesNotExistException {
@@ -60,7 +55,6 @@ public class BlockEntry implements ISerializableJson, Globals {
this.block = block;
this.meta = BlockOptionHelper.getAllBlocks(block).size() > 1 ? meta : -1;
this.uniqueId = getResourceName() + (isMetadata() ? ("::" + getMetadata()) : Strings.EMPTY);
- this.item = Item.getItemFromBlock(block);
}
public BlockEntry(String name, int meta) throws BlockDoesNotExistException {
@@ -107,10 +101,6 @@ public class BlockEntry implements ISerializableJson, Globals {
return meta > -1;
}
- public Item getItem() {
- return item;
- }
-
private <T extends IBlockProperty> T getProperty(@Nonnull Class<T> clazz, OpenMode mode) {
switch (mode) {
case READ:
