mirror of
https://github.com/Xiao-MoMi/Custom-Crops.git
synced 2026-01-06 15:51:52 +00:00
fix
This commit is contained in:
@@ -4,7 +4,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = 'net.momirealms'
|
group = 'net.momirealms'
|
||||||
version = '3.0.2-hotfix'
|
version = '3.0.2-hotfix2'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ public interface PlatformInterface {
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
default ItemDisplay getItemDisplayAt(Location location) {
|
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 i = itemDisplays.size();
|
||||||
int j = 1;
|
int j = 1;
|
||||||
for (ItemDisplay itemDisplay : itemDisplays) {
|
for (ItemDisplay itemDisplay : itemDisplays) {
|
||||||
|
|||||||
@@ -38,11 +38,12 @@ public class BreakImpl implements Action {
|
|||||||
@Override
|
@Override
|
||||||
public void doOn(@Nullable Player player, @Nullable SimpleLocation crop_loc, ItemMode itemMode) {
|
public void doOn(@Nullable Player player, @Nullable SimpleLocation crop_loc, ItemMode itemMode) {
|
||||||
if (crop_loc == null) return;
|
if (crop_loc == null) return;
|
||||||
CustomCrops.getInstance().getScheduler().runTask(() -> {
|
CustomCrops.getInstance().getScheduler().callSyncMethod(() -> {
|
||||||
Location bLoc = crop_loc.getBukkitLocation();
|
Location bLoc = crop_loc.getBukkitLocation();
|
||||||
if (bLoc == null) return;
|
if (bLoc == null) return null;
|
||||||
CustomCrops.getInstance().getPlatformInterface().removeAnyThingAt(bLoc);
|
CustomCrops.getInstance().getPlatformInterface().removeAnyThingAt(bLoc);
|
||||||
CustomCrops.getInstance().getWorldDataManager().removeCropData(crop_loc);
|
CustomCrops.getInstance().getWorldDataManager().removeCropData(crop_loc);
|
||||||
|
return null;
|
||||||
});
|
});
|
||||||
if (triggerAction && stage_id != null) {
|
if (triggerAction && stage_id != null) {
|
||||||
StageConfig stageConfig = CustomCrops.getInstance().getCropManager().getStageConfig(stage_id);
|
StageConfig stageConfig = CustomCrops.getInstance().getCropManager().getStageConfig(stage_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user