SteamWar/BauSystem2.0
Archiviert
12
0

1.18 #77

Zusammengeführt
YoyoNow hat 18 Commits von 1.18 nach master 2022-03-30 11:21:07 +02:00 zusammengeführt
3 geänderte Dateien mit 30 neuen und 24 gelöschten Zeilen
Nur Änderungen aus Commit 4bb25a4ca7 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -34,8 +34,13 @@ public class SimulatorEntity18 extends BaseEntity18 implements AbstractSimulator
public SimulatorEntity18(World world, Vector position, boolean highlight) {
super(world, position, highlight ? Material.WHITE_STAINED_GLASS : Material.TNT);
this.setNoGravity(true);
this.ticksLived = -12000;
this.e(true);
this.S = -12000;
}
@Override
public int getId() {
return ae();
}
@Override
@ -50,7 +55,7 @@ public class SimulatorEntity18 extends BaseEntity18 implements AbstractSimulator
@Override
public void setPosition(Vector position) {
this.position = position;
setPosition(position.getX(), position.getY(), position.getZ());
e(position.getX(), position.getY(), position.getZ());
}
@Override
@ -60,7 +65,7 @@ public class SimulatorEntity18 extends BaseEntity18 implements AbstractSimulator
}
sendEntityDestroy(player);
die();
ag();
return true;
}
}

Datei anzeigen

@ -19,11 +19,11 @@
package de.steamwar.bausystem.shared;
import com.sk89q.worldedit.world.entity.EntityTypes;
import net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy;
import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
import net.minecraft.server.network.PlayerConnection;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.entity.decoration.EntityArmorStand;
import net.minecraft.world.phys.Vec3D;
import org.bukkit.World;
@ -42,21 +42,21 @@ public class BaseArmorStand18 extends EntityArmorStand implements AbstractEntity
super(((CraftWorld) world).getHandle(), position.getX(), position.getY(), position.getZ());
this.position = position;
setNoGravity(true);
ticksLived = -12000;
e(true);
S = -12000;
}
public void sendEntity(Player player) {
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(getId(), getUniqueID(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.ARMOR_STAND, 0, ZERO);
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
playerConnection.sendPacket(packetPlayOutSpawnEntity);
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(ae(), cm(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.c, 0, ZERO);
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
playerConnection.a(packetPlayOutSpawnEntity);
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(getId(), datawatcher, true);
playerConnection.sendPacket(packetPlayOutEntityMetadata);
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(ae(), Z, true);
playerConnection.a(packetPlayOutEntityMetadata);
}
public void sendEntityDestroy(Player player) {
PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(getId());
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutEntityDestroy);
PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(ae());
((CraftPlayer) player).getHandle().b.a(packetPlayOutEntityDestroy);
}
}

Datei anzeigen

@ -19,12 +19,13 @@
package de.steamwar.bausystem.shared;
import com.sk89q.worldedit.world.entity.EntityTypes;
import net.minecraft.network.protocol.game.PacketPlayOutEntityDestroy;
import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
import net.minecraft.server.network.PlayerConnection;
import net.minecraft.world.entity.EntityTypes;
import net.minecraft.world.entity.item.EntityFallingBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.phys.Vec3D;
import org.bukkit.Material;
@ -47,21 +48,21 @@ public class BaseEntity18 extends EntityFallingBlock implements AbstractEntity {
this.iBlockData = ((CraftBlockData) blockType.createBlockData()).getState();
this.position = position;
this.setNoGravity(true);
this.ticksLived = -12000;
this.e(true);
this.S = -12000;
}
public void sendEntity(Player player) {
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(getId(), getUniqueID(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.FALLING_BLOCK, Block.getCombinedId(iBlockData), ZERO);
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().playerConnection;
playerConnection.sendPacket(packetPlayOutSpawnEntity);
PacketPlayOutSpawnEntity packetPlayOutSpawnEntity = new PacketPlayOutSpawnEntity(ae(), cm(), position.getX(), position.getY(), position.getZ(), 0, 0, EntityTypes.C, Block.i(iBlockData), ZERO);
PlayerConnection playerConnection = ((CraftPlayer) player).getHandle().b;
playerConnection.a(packetPlayOutSpawnEntity);
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(getId(), datawatcher, true);
playerConnection.sendPacket(packetPlayOutEntityMetadata);
PacketPlayOutEntityMetadata packetPlayOutEntityMetadata = new PacketPlayOutEntityMetadata(ae(), Z, true);
playerConnection.a(packetPlayOutEntityMetadata);
}
public void sendEntityDestroy(Player player) {
PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(getId());
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutEntityDestroy);
PacketPlayOutEntityDestroy packetPlayOutEntityDestroy = new PacketPlayOutEntityDestroy(ae());
((CraftPlayer) player).getHandle().b.a(packetPlayOutEntityDestroy);
}
}