--- a/net/minecraft/item/Item.java
+++ b/net/minecraft/item/Item.java
@@ -40,8 +40,8 @@
 import net.minecraftforge.api.distmarker.Dist;
 import net.minecraftforge.api.distmarker.OnlyIn;
 
-public class Item implements IItemProvider {
-   public static final Map<Block, Item> field_179220_a = Maps.newHashMap();
+public class Item extends net.minecraftforge.registries.ForgeRegistryEntry<Item> implements IItemProvider, net.minecraftforge.common.extensions.IForgeItem {
+   public static final Map<Block, Item> field_179220_a = net.minecraftforge.registries.GameData.getBlockItemMap();
    protected static final UUID field_111210_e = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
    protected static final UUID field_185050_h = UUID.fromString("FA233E1C-4180-4865-B01B-BCCE9785ACA3");
    protected static final Random field_77697_d = new Random();
@@ -77,6 +77,10 @@
       this.field_77777_bU = p_i48487_1_.field_200920_a;
       this.field_219974_q = p_i48487_1_.field_221541_f;
       this.field_234684_d_ = p_i48487_1_.field_234688_g_;
+      this.canRepair = p_i48487_1_.canRepair;
+      this.toolClasses.putAll(p_i48487_1_.toolClasses);
+      Object tmp = p_i48487_1_.ister == null ? null : net.minecraftforge.fml.DistExecutor.callWhenOn(Dist.CLIENT, p_i48487_1_.ister);
+      this.ister = tmp == null ? null : () -> (net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer) tmp;
    }
 
    public void func_219972_a(World p_219972_1_, LivingEntity p_219972_2_, ItemStack p_219972_3_, int p_219972_4_) {
@@ -120,10 +124,12 @@
       return this.func_219971_r() ? p_77654_3_.func_213357_a(p_77654_2_, p_77654_1_) : p_77654_1_;
    }
 
+   @Deprecated // Use ItemStack sensitive version.
    public final int func_77639_j() {
       return this.field_77777_bU;
    }
 
+   @Deprecated // Use ItemStack sensitive version.
    public final int func_77612_l() {
       return this.field_77699_b;
    }
@@ -178,10 +184,12 @@
    }
 
    @Nullable
+   @Deprecated // Use ItemStack sensitive version.
    public final Item func_77668_q() {
       return this.field_77700_c;
    }
 
+   @Deprecated // Use ItemStack sensitive version.
    public boolean func_77634_r() {
       return this.field_77700_c != null;
    }
@@ -241,7 +249,7 @@
    }
 
    public boolean func_77616_k(ItemStack p_77616_1_) {
-      return this.func_77639_j() == 1 && this.func_77645_m();
+      return this.getItemStackLimit(p_77616_1_) == 1 && this.func_77645_m();
    }
 
    protected static BlockRayTraceResult func_219968_a(World p_219968_0_, PlayerEntity p_219968_1_, RayTraceContext.FluidMode p_219968_2_) {
@@ -254,8 +262,8 @@
       float f5 = MathHelper.func_76126_a(-f * ((float)Math.PI / 180F));
       float f6 = f3 * f4;
       float f7 = f2 * f4;
-      double d0 = 5.0D;
-      Vector3d vector3d1 = vector3d.func_72441_c((double)f6 * 5.0D, (double)f5 * 5.0D, (double)f7 * 5.0D);
+      double d0 = p_219968_1_.func_110148_a(net.minecraftforge.common.ForgeMod.REACH_DISTANCE.get()).func_111126_e();;
+      Vector3d vector3d1 = vector3d.func_72441_c((double)f6 * d0, (double)f5 * d0, (double)f7 * d0);
       return p_219968_0_.func_217299_a(new RayTraceContext(vector3d, vector3d1, RayTraceContext.BlockMode.OUTLINE, p_219968_2_, p_219968_1_));
    }
 
@@ -271,6 +279,7 @@
    }
 
    protected boolean func_194125_a(ItemGroup p_194125_1_) {
+      if (getCreativeTabs().stream().anyMatch(tab -> tab == p_194125_1_)) return true;
       ItemGroup itemgroup = this.func_77640_w();
       return itemgroup != null && (p_194125_1_ == ItemGroup.field_78027_g || p_194125_1_ == itemgroup);
    }
@@ -284,10 +293,44 @@
       return false;
    }
 
+   @Deprecated // Use ItemStack sensitive version.
    public Multimap<Attribute, AttributeModifier> func_111205_h(EquipmentSlotType p_111205_1_) {
       return ImmutableMultimap.of();
    }
 
+   @Nullable
+   private final java.util.function.Supplier<net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer> ister;
+   private final java.util.Map<net.minecraftforge.common.ToolType, Integer> toolClasses = Maps.newHashMap();
+   private final net.minecraftforge.common.util.ReverseTagWrapper<Item> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, net.minecraft.tags.ItemTags::func_199903_a);
+   protected final boolean canRepair;
+
+   @Override
+   public boolean isRepairable(ItemStack stack) {
+      return canRepair && func_77645_m();
+   }
+
+   @Override
+   public java.util.Set<net.minecraftforge.common.ToolType> getToolTypes(ItemStack stack) {
+      return toolClasses.keySet();
+   }
+
+   @Override
+   public int getHarvestLevel(ItemStack stack, net.minecraftforge.common.ToolType tool, @Nullable PlayerEntity player, @Nullable BlockState blockState) {
+      return toolClasses.getOrDefault(tool, -1);
+   }
+
+   @OnlyIn(Dist.CLIENT)
+   @Override
+   public final net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer getItemStackTileEntityRenderer() {
+      net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer renderer = ister != null ? ister.get() : null;
+      return renderer != null ? renderer : net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer.field_147719_a;
+   }
+
+   @Override
+   public java.util.Set<net.minecraft.util.ResourceLocation> getTags() {
+      return reverseTags.getTagNames();
+   }
+
    public boolean func_219970_i(ItemStack p_219970_1_) {
       return p_219970_1_.func_77973_b() == Items.field_222114_py;
    }
@@ -333,6 +376,9 @@
       private Rarity field_208104_e = Rarity.COMMON;
       private Food field_221541_f;
       private boolean field_234688_g_;
+      private boolean canRepair;
+      private java.util.Map<net.minecraftforge.common.ToolType, Integer> toolClasses = Maps.newHashMap();
+      private java.util.function.Supplier<java.util.concurrent.Callable<net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer>> ister;
 
       public Item.Properties func_221540_a(Food p_221540_1_) {
          this.field_221541_f = p_221540_1_;
@@ -377,5 +423,20 @@
          this.field_234688_g_ = true;
          return this;
       }
+
+      public Item.Properties setNoRepair() {
+         canRepair = false;
+         return this;
+      }
+
+      public Item.Properties addToolType(net.minecraftforge.common.ToolType type, int level) {
+         toolClasses.put(type, level);
+         return this;
+      }
+
+      public Item.Properties setISTER(java.util.function.Supplier<java.util.concurrent.Callable<net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer>> ister) {
+         this.ister = ister;
+         return this;
+      }
    }
 }
