mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2025-12-25 18:09:28 +00:00
fix
This commit is contained in:
@@ -141,7 +141,7 @@ public interface PlatformInterface {
|
||||
|
||||
@Nullable
|
||||
default ItemDisplay getItemDisplayAt(Location location) {
|
||||
Collection<ItemDisplay> itemDisplays = location.clone().add(0.5,0,0.5).getNearbyEntitiesByType(ItemDisplay.class, 0.5, 0.5, 0.5);
|
||||
Collection<ItemDisplay> itemDisplays = location.clone().add(0.5,0.25,0.5).getNearbyEntitiesByType(ItemDisplay.class, 0.5, 0.5, 0.5);
|
||||
int i = itemDisplays.size();
|
||||
int j = 1;
|
||||
for (ItemDisplay itemDisplay : itemDisplays) {
|
||||
|
||||
@@ -38,11 +38,12 @@ public class BreakImpl implements Action {
|
||||
@Override
|
||||
public void doOn(@Nullable Player player, @Nullable SimpleLocation crop_loc, ItemMode itemMode) {
|
||||
if (crop_loc == null) return;
|
||||
CustomCrops.getInstance().getScheduler().runTask(() -> {
|
||||
CustomCrops.getInstance().getScheduler().callSyncMethod(() -> {
|
||||
Location bLoc = crop_loc.getBukkitLocation();
|
||||
if (bLoc == null) return;
|
||||
if (bLoc == null) return null;
|
||||
CustomCrops.getInstance().getPlatformInterface().removeAnyThingAt(bLoc);
|
||||
CustomCrops.getInstance().getWorldDataManager().removeCropData(crop_loc);
|
||||
return null;
|
||||
});
|
||||
if (triggerAction && stage_id != null) {
|
||||
StageConfig stageConfig = CustomCrops.getInstance().getCropManager().getStageConfig(stage_id);
|
||||
|
||||
Reference in New Issue
Block a user