Compare commits

...
3 Commits
Author SHA1 Message Date
Andrew Wong e18fe99161 Release 2.7.12 2023-06-12 00:40:46 +10:00
Andrew Wong bdc9e32c13 Add support for 1.20 2023-06-12 00:40:08 +10:00
Andrew Wong 9a46d5ae3b Bump version to 2.7.12-SNAPSHOT 2023-03-29 16:14:26 +11:00
7 changed files with 91 additions and 7 deletions

No files matched your search

+3 -2
View File
@@ -25,10 +25,10 @@ dependencies {
// 3rd party libraries
implementation(libs.findbugs)
implementation("io.papermc:paperlib:1.0.7")
implementation("io.papermc:paperlib:1.0.8")
implementation("com.github.NLthijs48:InteractiveMessenger:e7749258ca")
implementation("com.github.NLthijs48:BukkitDo:819d51ec2b")
implementation("io.github.baked-libs:dough-data:1.0.3")
implementation("io.github.baked-libs:dough-data:1.2.0")
implementation("com.google.inject:guice:5.1.0") {
exclude("com.google.guava", "guava")
}
@@ -48,6 +48,7 @@ dependencies {
runtimeOnly(project(":adapters:platform:bukkit-1-17", "reobf"))
runtimeOnly(project(":adapters:platform:bukkit-1-18", "reobf"))
runtimeOnly(project(":adapters:platform:bukkit-1-19", "reobf"))
runtimeOnly(project(":adapters:platform:bukkit-1-20", "reobf"))
}
repositories {
@@ -0,0 +1,21 @@
plugins.apply("io.papermc.paperweight.userdev")
dependencies {
paperDevBundle("1.20-R0.1-SNAPSHOT")
compileOnly(projects.areashopInterface)
compileOnly(projects.areashopNms)
}
description = "AreaShop NMS Helper 1-19"
tasks {
assemble {
dependsOn("reobfJar")
}
named("reobfJar", io.papermc.paperweight.tasks.RemapJar::class) {
outputJar.set(file("build/libs/${project.name}-${project.version}.jar"))
}
}
@@ -0,0 +1,46 @@
package me.wiefferink.areashop.adapters.platform.v1_20_R1;
import me.wiefferink.areashop.nms.BlockBehaviourHelper;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.level.block.state.BlockState;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_20_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_20_R1.block.CraftBlock;
import org.bukkit.craftbukkit.v1_20_R1.block.CraftBlockState;
import org.bukkit.craftbukkit.v1_20_R1.block.data.CraftBlockData;
import java.util.Objects;
public class BlockBehaviourImpl implements BlockBehaviourHelper {
@Override
public boolean canPlace(Location location, BlockData blockData) {
Objects.requireNonNull(location.getWorld(), "Null World!");
final BlockPos blockPosition = new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ());
final CraftWorld craftWorld = (CraftWorld) location.getWorld();
final ServerLevel world = craftWorld.getHandle();
final CraftBlockData craftBlockData = (CraftBlockData) blockData;
final BlockState ibd = craftBlockData.getState();
return ibd.canSurvive(world, blockPosition);
}
@Override
public boolean isBlockValid(Block block) {
final CraftBlock craftBlock = (CraftBlock) block;
final CraftWorld craftWorld = (CraftWorld) craftBlock.getWorld();
final ServerLevel world = craftWorld.getHandle();
final BlockState ibd = craftBlock.getNMS();
return ibd.canSurvive(world, craftBlock.getPosition());
}
@Override
public boolean isBlockStateValid(org.bukkit.block.BlockState blockState) {
final CraftBlockState craftBlockState = (CraftBlockState) blockState;
final BlockState ibd = craftBlockState.getHandle();
return ibd.canSurvive(craftBlockState.getBlock().getCraftWorld().getHandle(), craftBlockState.getPosition());
}
}
@@ -0,0 +1,15 @@
package me.wiefferink.areashop.adapters.platform.v1_20_R1;
import me.wiefferink.areashop.nms.BlockBehaviourHelper;
import me.wiefferink.areashop.nms.NMS;
public class NMSImpl implements NMS {
private final BlockBehaviourImpl blockBehaviourHelper = new BlockBehaviourImpl();
@Override
public BlockBehaviourHelper blockBehaviourHelper() {
return this.blockBehaviourHelper;
}
}
+2 -2
View File
@@ -2,13 +2,13 @@ plugins {
java
`java-library`
`maven-publish`
id("io.papermc.paperweight.userdev") version "1.5.1" apply false
id("io.papermc.paperweight.userdev") version "1.5.5" apply false
idea
eclipse
}
group = "me.wiefferink"
version = "2.7.11"
version = "2.7.12"
subprojects {
+3 -3
View File
@@ -4,9 +4,9 @@ minecraft = "1.17.1-R0.1-SNAPSHOT"
findbugs = "3.0.2"
# Minecraft Plugins
worldedit = "7.2.13"
worldguard = "7.0.7"
fawe = "2.5.2"
worldedit = "7.2.14"
worldguard = "7.0.8"
fawe = "2.6.2"
[libraries]
# Platform
+1
View File
@@ -21,6 +21,7 @@ include(":areashop-nms")
include(":adapters:platform:bukkit-1-17")
include(":adapters:platform:bukkit-1-18")
include(":adapters:platform:bukkit-1-19")
include(":adapters:platform:bukkit-1-20")
include(":adapters:platform:paper")
include(":adapters:platform:platform-interface")
include(":adapters:plugins:worldedit")