mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-12-22 14:59:22 +01:00
refine this homi fix thing
This commit is contained in:
parent
444aae4bea
commit
713ca2782f
2 changed files with 7 additions and 3 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue