refine this homi fix thing

This commit is contained in:
Ellpeck 2020-03-14 13:54:31 +01:00
parent 444aae4bea
commit 713ca2782f
2 changed files with 7 additions and 3 deletions

View file

@ -12,6 +12,7 @@ import de.ellpeck.naturesaura.chunk.AuraChunkProvider;
import de.ellpeck.naturesaura.commands.CommandAura;
import de.ellpeck.naturesaura.misc.WorldData;
import de.ellpeck.naturesaura.packet.PacketHandler;
import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@ -57,8 +58,11 @@ public class CommonEvents {
return;
ItemStack held = event.getItemStack();
if (!held.isEmpty() && held.getItem().getRegistryName().getPath().contains("chisel")) {
WorldData data = (WorldData) IWorldData.getWorldData(player.world);
data.addMossStone(event.getPos());
BlockState state = player.world.getBlockState(event.getPos());
if (NaturesAuraAPI.BOTANIST_PICKAXE_CONVERSIONS.containsKey(state)) {
WorldData data = (WorldData) IWorldData.getWorldData(player.world);
data.addMossStone(event.getPos());
}
}
}

View file

@ -93,7 +93,7 @@ public class WorldData implements IWorldData {
public void addMossStone(BlockPos pos) {
this.recentlyConvertedMossStones.add(pos);
if (this.recentlyConvertedMossStones.size() > 512)
if (this.recentlyConvertedMossStones.size() > 2048)
this.recentlyConvertedMossStones.remove(0);
}
}