SteamWar/BauSystem2.0
Archiviert
12
0

Fix build
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Lixfel 2022-03-29 12:37:32 +02:00
Ursprung 305664e9ea
Commit 26140fd054
5 geänderte Dateien mit 17 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -32,6 +32,7 @@ import de.steamwar.bausystem.entities.WarpEntity15;
import net.minecraft.server.v1_15_R1.*; import net.minecraft.server.v1_15_R1.*;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.Particle; import org.bukkit.Particle;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.craftbukkit.v1_15_R1.entity.CraftEntity; import org.bukkit.craftbukkit.v1_15_R1.entity.CraftEntity;
@ -103,6 +104,11 @@ public class NMSWrapper15 implements NMSWrapper.INMSWrapper {
return Particle.BARRIER; return Particle.BARRIER;
} }
@Override
public Material pathMaterial() {
return Material.GRASS_PATH;
}
private static final int threshold = 2048; private static final int threshold = 2048;
@Override @Override
public boolean checkItemStack(ItemStack item) { public boolean checkItemStack(ItemStack item) {

Datei anzeigen

@ -42,10 +42,7 @@ import net.minecraft.network.protocol.game.PacketPlayOutGameStateChange;
import net.minecraft.server.level.PlayerInteractManager; import net.minecraft.server.level.PlayerInteractManager;
import net.minecraft.world.level.EnumGamemode; import net.minecraft.world.level.EnumGamemode;
import net.minecraft.world.phys.Vec3D; import net.minecraft.world.phys.Vec3D;
import org.bukkit.Bukkit; import org.bukkit.*;
import org.bukkit.GameMode;
import org.bukkit.Particle;
import org.bukkit.World;
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity; 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.entity.CraftPlayer;
import org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack; import org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack;
@ -115,6 +112,11 @@ public class NMSWrapper18 implements NMSWrapper.INMSWrapper {
return Particle.BLOCK_MARKER; return Particle.BLOCK_MARKER;
} }
@Override
public Material pathMaterial() {
return Material.DIRT_PATH;
}
private static final int threshold = 2048; private static final int threshold = 2048;
@Override @Override
public boolean checkItemStack(ItemStack item) { public boolean checkItemStack(ItemStack item) {

Datei anzeigen

@ -19,6 +19,7 @@
package de.steamwar.bausystem.features.slaves.laufbau; package de.steamwar.bausystem.features.slaves.laufbau;
import de.steamwar.bausystem.utils.NMSWrapper;
import de.steamwar.inventory.SWItem; import de.steamwar.inventory.SWItem;
import lombok.Getter; import lombok.Getter;
import lombok.ToString; import lombok.ToString;
@ -86,7 +87,7 @@ public class BlockBoundingBox {
addPixel(Material.AIR.createBlockData(), 0, 0, 0, 0, 0, 0, null); addPixel(Material.AIR.createBlockData(), 0, 0, 0, 0, 0, 0, null);
addPixel(Material.END_STONE.createBlockData(), 0, 0, 0, 16, 16, 16, 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)); 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(); Cocoa cocoaNorth = (Cocoa) Material.COCOA.createBlockData();

Datei anzeigen

@ -45,7 +45,7 @@ public class SignEdit implements Listener {
private static final Class<?> generatorAccess = Reflection.getClass("{nms.world.level}.GeneratorAccess"); 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 getPosition = Reflection.getTypedMethod(craftBlock, "getPosition", blockPosition);
private static final Reflection.MethodInvoker getWorldHandle = Reflection.getTypedMethod(craftWorld, "getHandle", null); 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 Class<?> openSign = Reflection.getClass("{nms.network.protocol.game}.PacketPlayOutOpenSignEditor");
private static final Reflection.FieldAccessor<?> blockPositionFieldAccessor = Reflection.getField(openSign, blockPosition, 0); private static final Reflection.FieldAccessor<?> blockPositionFieldAccessor = Reflection.getField(openSign, blockPosition, 0);

Datei anzeigen

@ -26,6 +26,7 @@ import de.steamwar.bausystem.features.tracer.AbstractTraceEntity;
import de.steamwar.bausystem.features.warp.AbstractWarpEntity; import de.steamwar.bausystem.features.warp.AbstractWarpEntity;
import de.steamwar.core.VersionDependent; import de.steamwar.core.VersionDependent;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.Particle; import org.bukkit.Particle;
import org.bukkit.World; import org.bukkit.World;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
@ -50,6 +51,7 @@ public class NMSWrapper {
void setPlayerBuildAbilities(Player player); void setPlayerBuildAbilities(Player player);
Particle tntPositionParticle(); Particle tntPositionParticle();
Material pathMaterial();
boolean checkItemStack(ItemStack item); boolean checkItemStack(ItemStack item);