package me.deftware.client.framework.wrappers.world;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.block.BlockContainer;
import net.minecraft.client.resources.I18n;

public class IBlock {

	private Block block;

	public IBlock(int id) {
		block = Block.getBlockById(id);
	}

	public IBlock(String name) {
		block = Block.getBlockFromName(name);
	}

	public IBlock(Block block) {
		this.block = block;
	}

	public boolean isValidBlock() {
		return block != null;
	}

	public boolean isAir() {
		return block == Blocks.AIR;
	}

	public Block getBlock() {
		return block;
	}

	public int getID() {
		return Block.REGISTRY.getIDForObject(block);
	}

	public String getLocalizedName() {
		return block.getNameTextComponent().getUnformattedComponentText();
	}

	public static boolean isValidBlock(int id) {
		return Block.getBlockById(id) != null;
	}

	public static boolean isValidBlock(String id) {
		return Block.getBlockFromName(id) != null;
	}

	public boolean instanceOf(IBlockTypes type) {
		if (type.equals(IBlockTypes.BlockContainer)) {
			return block instanceof BlockContainer;
		}
		return false;
	}

	public enum IBlockTypes {
		BlockContainer
	}

}

@@ -203,16 +203,134 @@
 .I18n;%0A%0A
+/**%0A * NOTE: ID's have changed for all blocks in Minecraft 1.13 and up, using block ids is discouraged%0A * @return%0A */%0A
 public c
@@ -367,16 +367,29 @@
 block;%0A%0A
+%09@Deprecated%0A
 %09public 
@@ -733,32 +733,45 @@
 turn block;%0A%09%7D%0A%0A
+%09@Deprecated%0A
 %09public int getI
@@ -932,24 +932,37 @@
 Text();%0A%09%7D%0A%0A
+%09@Deprecated%0A
 %09public stat

Add warning about block id's in mc 1.13+