Change the seed source for plentiful mantle rod, fixes #3178

This commit is contained in:
Hubry committed 2020-02-17 19:10:31 +01:00
1 parent 0e73ef6f08
commit 99df65bb45
1 file changed
+4 -2
@@ -10,6 +10,7 @@
*/
package vazkii.botania.common.item.rod;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
@@ -67,8 +68,9 @@ public class ItemDiviningRod extends ItemMod implements IManaUsingItem, IAvatarW
pos.add(range, range, range))) {
BlockState state = world.getBlockState(pos_);
if(Tags.Blocks.ORES.contains(state.getBlock())) {
Random rand = new Random(state.hashCode() ^ seedxor);
Block block = state.getBlock();
if(Tags.Blocks.ORES.contains(block)) {
Random rand = new Random(block.getRegistryName().hashCode() ^ seedxor);
WispParticleData data = WispParticleData.wisp(0.25F, rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), 8, false);
world.addParticle(data, pos_.getX() + world.rand.nextFloat(),
pos_.getY() + world.rand.nextFloat(),