Repository: techreborn/techreborn
Issue: Ore Exp Bug

**Describe the bug**
TR ores give no exp after digging/smelting

**Steps to Reproduce**
Steps to reproduce the behavior:
- Dig ore(ruby,sapphire)
- No exp
- be sad



**Environment (please complete the following information with the version):**
 - Minecraft: 1.18.1 Valhesia Enchanced Vanilla
 - Mod Loader: Fabric





Changed files:
src/main/java/techreborn/world/OreDistribution.java, src/main/java/techreborn/init/TRContent.java

diff --git a/src/main/java/techreborn/init/TRContent.java b/src/main/java/techreborn/init/TRContent.java
index 17c258587..8888da7b0 100644
--- a/src/main/java/techreborn/init/TRContent.java
+++ b/src/main/java/techreborn/init/TRContent.java
@@ -32,6 +32,7 @@ import net.minecraft.item.Item;
 import net.minecraft.item.ItemConvertible;
 import net.minecraft.item.ItemStack;
 import net.minecraft.sound.BlockSoundGroup;
+import net.minecraft.util.math.intprovider.UniformIntProvider;
 import org.jetbrains.annotations.Nullable;
 import reborncore.api.blockentity.IUpgrade;
 import reborncore.common.fluid.FluidValue;
@@ -427,20 +428,25 @@ public class TRContent {
 		public final Block block;
 		public final OreDistribution distribution;
 
-		Ores(OreDistribution distribution) {
+		Ores(OreDistribution distribution, UniformIntProvider experienceDroppedFallback) {
 			name = this.toString().toLowerCase(Locale.ROOT);
 			block = new OreBlock(FabricBlockSettings.of(Material.STONE)
 					.requiresTool()
 					.sounds(name.startsWith("deepslate") ? BlockSoundGroup.DEEPSLATE : BlockSoundGroup.STONE)
-					.strength(2f, 2f)
+					.strength(2f, 2f),
+					distribution != null ? distribution.experienceDropped : experienceDroppedFallback
 			);
 
 			InitUtils.setup(block, name + "_ore");
 			this.distribution = distribution;
 		}
 
+		Ores(OreDistribution distribution) {
+			this(distribution, null);
+		}
+
 		Ores(TRContent.Ores stoneOre) {
-			this((OreDistribution) null);
+			this(null, stoneOre.distribution != null ? stoneOre.distribution.experienceDropped : null);
 			deepslateMap.put(stoneOre, this);
 			unDeepslateMap.put(this, stoneOre);
 		}
diff --git a/src/main/java/techreborn/world/OreDistribution.java b/src/main/java/techreborn/world/OreDistribution.java
index 09da4c331..5fe1f0874 100644
--- a/src/main/java/techreborn/world/OreDistribution.java
+++ b/src/main/java/techreborn/world/OreDistribution.java
@@ -24,7 +24,11 @@
 
 package techreborn.world;
 
+import net.minecraft.util.math.intprovider.UniformIntProvider;
 import net.minecraft.world.gen.YOffset;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.Objects;
 
 public enum OreDistribution {
 	BAUXITE(6, 12, YOffset.aboveBottom(0), 20, TargetDimension.OVERWORLD),
@@ -32,10 +36,10 @@ public enum OreDistribution {
 	GALENA(8, 12, YOffset.aboveBottom(25), 40, TargetDimension.OVERWORLD),
 	IRIDIUM(3, 4, YOffset.aboveBottom(0), 0, TargetDimension.OVERWORLD),
 	LEAD(6, 16, YOffset.aboveBottom(40), 40, TargetDimension.OVERWORLD),
-	PERIDOT(6, 6, YOffset.aboveBottom(0), 360, TargetDimension.END),
+	PERIDOT(6, 6, YOffset.aboveBottom(0), 360, TargetDimension.END, UniformIntProvider.create(2,6)),
 	PYRITE(6, 6, YOffset.aboveBottom(0), 128, TargetDimension.NETHER),
-	RUBY(6, 8, YOffset.fixed(20), 120, TargetDimension.OVERWORLD),
-	SAPPHIRE(6, 7, YOffset.fixed(20), 120, TargetDimension.OVERWORLD),
+	RUBY(6, 8, YOffset.fixed(20), 120, TargetDimension.OVERWORLD, UniformIntProvider.create(2,6)),
+	SAPPHIRE(6, 7, YOffset.fixed(20), 120, TargetDimension.OVERWORLD, UniformIntProvider.create(2,6)),
 	SHELDONITE(6, 4, YOffset.aboveBottom(0), 360, TargetDimension.END),
 	SILVER(6, 16, YOffset.aboveBottom(40), 60,TargetDimension.OVERWORLD),
 	SODALITE(6, 4, YOffset.aboveBottom(0), 360, TargetDimension.END),
@@ -47,13 +51,19 @@ public enum OreDistribution {
 	public final int veinsPerChunk;
 	public final YOffset minOffset;
 	public final int maxY; // Max height of ore in numbers of blocks from the bottom of the world
+	public @NotNull final UniformIntProvider experienceDropped;
 	public final TargetDimension dimension;
 
-	OreDistribution(int veinSize, int veinsPerChunk, YOffset minOffset, int maxY, TargetDimension dimension) {
+	OreDistribution(int veinSize, int veinsPerChunk, YOffset minOffset, int maxY, TargetDimension dimension, UniformIntProvider experienceDropped) {
 		this.veinSize = veinSize;
 		this.veinsPerChunk = veinsPerChunk;
 		this.minOffset = minOffset;
 		this.maxY = maxY;
+		this.experienceDropped = Objects.requireNonNullElse(experienceDropped, UniformIntProvider.create(0,0));
 		this.dimension = dimension;
 	}
+
+	OreDistribution(int veinSize, int veinsPerChunk, YOffset minOffset, int maxY, TargetDimension dimension) {
+		this(veinSize, veinsPerChunk, minOffset, maxY, dimension, null);
+	}
 }