Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
b9b368320c
Commit
386a324e66
@ -30,8 +30,8 @@ import net.minecraft.world.level.material.Fluid;
|
|||||||
import net.minecraft.world.level.material.FluidTypes;
|
import net.minecraft.world.level.material.FluidTypes;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.block.Block;
|
import org.bukkit.block.Block;
|
||||||
import org.bukkit.craftbukkit.v1_18_R1.CraftWorld;
|
import org.bukkit.craftbukkit.v1_18_R2.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_18_R1.block.CraftBlock;
|
import org.bukkit.craftbukkit.v1_18_R2.block.CraftBlock;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
@ -58,15 +58,15 @@ public class BlockIdWrapper18 implements BlockIdWrapper.IBlockIdWrapper {
|
|||||||
public Set<Integer> getHiddenBlockIds() {
|
public Set<Integer> getHiddenBlockIds() {
|
||||||
Set<Integer> hiddenBlockIds = new HashSet<>();
|
Set<Integer> hiddenBlockIds = new HashSet<>();
|
||||||
for(String tag : Config.HiddenBlocks){
|
for(String tag : Config.HiddenBlocks){
|
||||||
for(IBlockData data : IRegistry.X.a(new MinecraftKey(tag)).m().a()){
|
for(IBlockData data : IRegistry.U.a(new MinecraftKey(tag)).m().a()){
|
||||||
hiddenBlockIds.add(net.minecraft.world.level.block.Block.i(data));
|
hiddenBlockIds.add(net.minecraft.world.level.block.Block.i(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Config.HiddenBlocks.contains("water")){
|
if(Config.HiddenBlocks.contains("water")){
|
||||||
Fluid water = FluidTypes.c.h();
|
Fluid water = FluidTypes.c.h();
|
||||||
for(IBlockData data : net.minecraft.world.level.block.Block.p) {
|
for(IBlockData data : net.minecraft.world.level.block.Block.o) {
|
||||||
if(data.n() == water) {
|
if(data.o() == water) {
|
||||||
hiddenBlockIds.add(net.minecraft.world.level.block.Block.i(data));
|
hiddenBlockIds.add(net.minecraft.world.level.block.Block.i(data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ public class BlockIdWrapper18 implements BlockIdWrapper.IBlockIdWrapper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getObfuscateWith() { //ResourceLocation, DefaultedRegistry
|
public int getObfuscateWith() { //ResourceLocation, DefaultedRegistry
|
||||||
return net.minecraft.world.level.block.Block.i(IRegistry.X.a(new MinecraftKey(Config.ObfuscateWith)).n());
|
return net.minecraft.world.level.block.Block.i(IRegistry.U.a(new MinecraftKey(Config.ObfuscateWith)).n());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -21,10 +21,10 @@ package de.steamwar.fightsystem.utils;
|
|||||||
|
|
||||||
import net.minecraft.world.level.chunk.Chunk;
|
import net.minecraft.world.level.chunk.Chunk;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.craftbukkit.v1_18_R1.CraftWorld;
|
import org.bukkit.craftbukkit.v1_18_R2.CraftWorld;
|
||||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftEntity;
|
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftEntity;
|
||||||
import org.bukkit.craftbukkit.v1_18_R1.entity.CraftPlayer;
|
import org.bukkit.craftbukkit.v1_18_R2.entity.CraftPlayer;
|
||||||
import org.bukkit.craftbukkit.v1_18_R1.inventory.CraftItemStack;
|
import org.bukkit.craftbukkit.v1_18_R2.inventory.CraftItemStack;
|
||||||
import org.bukkit.entity.Entity;
|
import org.bukkit.entity.Entity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.inventory.ItemStack;
|
import org.bukkit.inventory.ItemStack;
|
||||||
@ -55,7 +55,7 @@ public class CraftbukkitWrapper18 implements CraftbukkitWrapper.ICraftbukkitWrap
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasItems(ItemStack stack) {
|
public boolean hasItems(ItemStack stack) {
|
||||||
Set<String> keys = new HashSet<>(CraftItemStack.asNMSCopy(stack).s().d());
|
Set<String> keys = new HashSet<>(CraftItemStack.asNMSCopy(stack).t().d());
|
||||||
keys.remove("Enchantments");
|
keys.remove("Enchantments");
|
||||||
keys.remove("Damage");
|
keys.remove("Damage");
|
||||||
return !keys.isEmpty();
|
return !keys.isEmpty();
|
||||||
|
@ -125,6 +125,6 @@ public class ProtocolWrapper18 implements ProtocolWrapper {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean iBlockDataHidden(Object iBlockData) {
|
public boolean iBlockDataHidden(Object iBlockData) {
|
||||||
return Config.HiddenBlocks.contains(IRegistry.X.b(((IBlockData) iBlockData).b()).a());
|
return Config.HiddenBlocks.contains(IRegistry.U.b(((IBlockData) iBlockData).b()).a());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ public class TechHider18 implements TechHider.ChunkHider {
|
|||||||
Object data = chunkDataCloner.apply(chunkData.get(packet));
|
Object data = chunkDataCloner.apply(chunkData.get(packet));
|
||||||
|
|
||||||
tileEntities.set(data, ((List<?>)tileEntities.get(data)).stream().filter(
|
tileEntities.set(data, ((List<?>)tileEntities.get(data)).stream().filter(
|
||||||
tile -> Config.HiddenBlockEntities.contains(IRegistry.ad.b(entityType.get(tile)).a())
|
tile -> Config.HiddenBlockEntities.contains(IRegistry.aa.b(entityType.get(tile)).a())
|
||||||
).collect(Collectors.toList()));
|
).collect(Collectors.toList()));
|
||||||
|
|
||||||
World world = p.getWorld();
|
World world = p.getWorld();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren