9
0
mirror of https://github.com/Xiao-MoMi/Custom-Crops.git synced 2025-12-19 15:09:25 +00:00
This commit is contained in:
XiaoMoMi
2025-04-12 22:39:37 +08:00
parent 6a574a712d
commit cbf25fa522
5 changed files with 14 additions and 11 deletions

View File

@@ -37,6 +37,7 @@ import net.momirealms.customcrops.api.core.world.Pos3;
import net.momirealms.customcrops.api.event.CropPlantEvent;
import net.momirealms.customcrops.api.misc.value.MathValue;
import net.momirealms.customcrops.api.util.EventUtils;
import net.momirealms.customcrops.api.util.LocationUtils;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.inventory.EquipmentSlot;

View File

@@ -7,8 +7,8 @@ repositories {
dependencies {
compileOnly(project(":api"))
compileOnly("io.papermc.paper:paper-api:1.20.4-R0.1-SNAPSHOT")
compileOnly("net.momirealms:craft-engine-core:0.0.41")
compileOnly("net.momirealms:craft-engine-bukkit:0.0.41")
compileOnly("net.momirealms:craft-engine-core:0.0.45")
compileOnly("net.momirealms:craft-engine-bukkit:0.0.45")
}
tasks.withType<JavaCompile> {

View File

@@ -27,6 +27,7 @@ import net.momirealms.craftengine.core.item.ItemBuildContext;
import net.momirealms.craftengine.core.util.Key;
import net.momirealms.craftengine.libraries.nbt.CompoundTag;
import net.momirealms.customcrops.api.core.CustomItemProvider;
import net.momirealms.customcrops.api.util.LocationUtils;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
@@ -50,7 +51,7 @@ public class CraftEngineProvider implements CustomItemProvider {
@Override
public @Nullable Entity placeFurniture(Location location, String id) {
LoadedFurniture furniture = CraftEngineFurniture.place(location, Key.of(id), AnchorType.GROUND);
LoadedFurniture furniture = CraftEngineFurniture.place(LocationUtils.toSurfaceCenterLocation(location), Key.of(id), AnchorType.GROUND);
if (furniture == null) return null;
return furniture.baseEntity();
}

View File

@@ -25,6 +25,7 @@ import com.nexomc.nexo.mechanics.Mechanic;
import com.nexomc.nexo.mechanics.furniture.FurnitureMechanic;
import net.momirealms.customcrops.api.BukkitCustomCropsPlugin;
import net.momirealms.customcrops.api.core.CustomItemProvider;
import net.momirealms.customcrops.api.util.LocationUtils;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.Rotation;
@@ -59,7 +60,7 @@ public class NexoProvider implements CustomItemProvider {
@Override
public @Nullable Entity placeFurniture(Location location, String id) {
Entity entity = NexoFurniture.place(id, location, Rotation.NONE, BlockFace.UP);
Entity entity = NexoFurniture.place(id, LocationUtils.toSurfaceCenterLocation(location), Rotation.NONE, BlockFace.UP);
if (entity == null) {
BukkitCustomCropsPlugin.getInstance().getPluginLogger().warn("Furniture[" + id +"] doesn't exist. Please double check if that furniture exists.");
}

View File

@@ -1,6 +1,6 @@
# Project settings
# Rule: [major update].[feature update].[bug fix]
project_version=3.6.33
project_version=3.6.34
config_version=42
project_group=net.momirealms
@@ -41,9 +41,9 @@ vault_version=1.7
netty_version=4.1.117
# Proxy settings
#systemProp.socks.proxyHost=127.0.0.1
#systemProp.socks.proxyPort=7890
#systemProp.http.proxyHost=127.0.0.1
#systemProp.http.proxyPort=7890
#systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=7890
systemProp.socks.proxyHost=127.0.0.1
systemProp.socks.proxyPort=7890
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=7890
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=7890