Dieser Commit ist enthalten in:
Ursprung
305664e9ea
Commit
26140fd054
@ -32,6 +32,7 @@ import de.steamwar.bausystem.entities.WarpEntity15;
|
||||
import net.minecraft.server.v1_15_R1.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftEntity;
|
||||
@ -103,6 +104,11 @@ public class NMSWrapper15 implements NMSWrapper.INMSWrapper {
|
||||
return Particle.BARRIER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Material pathMaterial() {
|
||||
return Material.GRASS_PATH;
|
||||
}
|
||||
|
||||
private static final int threshold = 2048;
|
||||
@Override
|
||||
public boolean checkItemStack(ItemStack item) {
|
||||
|
@ -42,10 +42,7 @@ import net.minecraft.network.protocol.game.PacketPlayOutGameStateChange;
|
||||
import net.minecraft.server.level.PlayerInteractManager;
|
||||
import net.minecraft.world.level.EnumGamemode;
|
||||
import net.minecraft.world.phys.Vec3D;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.*;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
|
||||
import org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack;
|
||||
@ -115,6 +112,11 @@ public class NMSWrapper18 implements NMSWrapper.INMSWrapper {
|
||||
return Particle.BLOCK_MARKER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Material pathMaterial() {
|
||||
return Material.DIRT_PATH;
|
||||
}
|
||||
|
||||
private static final int threshold = 2048;
|
||||
@Override
|
||||
public boolean checkItemStack(ItemStack item) {
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
package de.steamwar.bausystem.features.slaves.laufbau;
|
||||
|
||||
import de.steamwar.bausystem.utils.NMSWrapper;
|
||||
import de.steamwar.inventory.SWItem;
|
||||
import lombok.Getter;
|
||||
import lombok.ToString;
|
||||
@ -86,7 +87,7 @@ public class BlockBoundingBox {
|
||||
addPixel(Material.AIR.createBlockData(), 0, 0, 0, 0, 0, 0, null);
|
||||
addPixel(Material.END_STONE.createBlockData(), 0, 0, 0, 16, 16, 16, null);
|
||||
|
||||
addPixel(SWItem.getMaterial("GRASS_PATH").createBlockData(), 0, 0, 0, 16, 15, 16, createItem("LAUFBAU_BLOCK_GRASS_PATH", SWItem.getMaterial("GRASS_PATH")));
|
||||
addPixel(NMSWrapper.impl.pathMaterial().createBlockData(), 0, 0, 0, 16, 15, 16, createItem("LAUFBAU_BLOCK_GRASS_PATH", NMSWrapper.impl.pathMaterial()));
|
||||
addPixel(Material.SOUL_SAND.createBlockData(), 0, 0, 0, 16, 14, 16, createItem("LAUFBAU_BLOCK_SOUL_SAND", Material.SOUL_SAND));
|
||||
|
||||
Cocoa cocoaNorth = (Cocoa) Material.COCOA.createBlockData();
|
||||
|
@ -45,7 +45,7 @@ public class SignEdit implements Listener {
|
||||
private static final Class<?> generatorAccess = Reflection.getClass("{nms.world.level}.GeneratorAccess");
|
||||
private static final Reflection.MethodInvoker getPosition = Reflection.getTypedMethod(craftBlock, "getPosition", blockPosition);
|
||||
private static final Reflection.MethodInvoker getWorldHandle = Reflection.getTypedMethod(craftWorld, "getHandle", null);
|
||||
private static final Reflection.MethodInvoker at = Reflection.getTypedMethod(craftBlock, "at", generatorAccess, blockPosition);
|
||||
private static final Reflection.MethodInvoker at = Reflection.getTypedMethod(craftBlock, "at", craftBlock, generatorAccess, blockPosition);
|
||||
|
||||
private static final Class<?> openSign = Reflection.getClass("{nms.network.protocol.game}.PacketPlayOutOpenSignEditor");
|
||||
private static final Reflection.FieldAccessor<?> blockPositionFieldAccessor = Reflection.getField(openSign, blockPosition, 0);
|
||||
|
@ -26,6 +26,7 @@ import de.steamwar.bausystem.features.tracer.AbstractTraceEntity;
|
||||
import de.steamwar.bausystem.features.warp.AbstractWarpEntity;
|
||||
import de.steamwar.core.VersionDependent;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -50,6 +51,7 @@ public class NMSWrapper {
|
||||
void setPlayerBuildAbilities(Player player);
|
||||
|
||||
Particle tntPositionParticle();
|
||||
Material pathMaterial();
|
||||
|
||||
boolean checkItemStack(ItemStack item);
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren