mirror of
https://github.com/xoo0524tw/OpenArcadeGames.git
synced 2026-12-06 02:46:01 +02:00
Consolidate engine and games into common module and unify platform APIs
This commit is contained in:
1 parent
76ac0e3acd
commit
fbed884ad9
1353 files changed
+44571
-59600
No files matched your search
@@ -2,5 +2,5 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion><parent><groupId>ro.fr33styler.arcade</groupId><artifactId>arcadegames-parent</artifactId><version>2.19f-reconstructed</version><relativePath>../../../../pom.xml</relativePath></parent>
|
||||
<artifactId>platforms-legacy-v1_8_R3</artifactId><properties><reconstruction.variant>legacy</reconstruction.variant><maven.compiler.release>17</maven.compiler.release></properties>
|
||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>platform-api-legacy</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>legacy-v1_8_R3</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-legacy-v1_8_R3.jar</systemPath></dependency></dependencies>
|
||||
<dependencies><dependency><groupId>ro.fr33styler.arcade</groupId><artifactId>common</artifactId><version>${project.version}</version></dependency><dependency><groupId>local.compile-only</groupId><artifactId>legacy-v1_8_R3</artifactId><version>2.19f</version><scope>system</scope><systemPath>${maven.multiModuleProjectDirectory}/build-support/deps/stubs-legacy-v1_8_R3.jar</systemPath></dependency></dependencies>
|
||||
</project>
|
||||
+31
-31
@@ -65,14 +65,14 @@ import org.bukkit.event.entity.EntityDamageEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.scoreboard.NameTagVisibility;
|
||||
import ro.fr33styler.arcade.platform.api.scoreboard.TeamVisibility;
|
||||
import org.bukkit.scoreboard.Score;
|
||||
import org.bukkit.scoreboard.Team;
|
||||
|
||||
public class V1_8_8Platform implements ServerPlatform {
|
||||
private static final Map<Class<?>, String> a;
|
||||
private static final Map<Class<?>, Integer> b;
|
||||
private final Field c = Reflection.a(Entity.class, "invulnerable");
|
||||
private final Field c = Reflection.findFieldByName(Entity.class, "invulnerable");
|
||||
private final V1_8_8NpcFactory d;
|
||||
private final V1_8_8PacketInterceptor e;
|
||||
private final Set<Material> f = new HashSet<>(
|
||||
@@ -104,51 +104,51 @@ public class V1_8_8Platform implements ServerPlatform {
|
||||
Material.YELLOW_FLOWER
|
||||
)
|
||||
);
|
||||
private final Field g = Reflection.a(Chunk.class, "f");
|
||||
private final Field g = Reflection.findFieldByName(Chunk.class, "f");
|
||||
|
||||
V1_8_8Platform(Server var1) {
|
||||
this.e = new V1_8_8PacketInterceptor();
|
||||
this.d = new V1_8_8NpcFactory(var1);
|
||||
}
|
||||
|
||||
public V1_8_8NpcFactory a() {
|
||||
public V1_8_8NpcFactory getNpcFactory() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
public V1_8_8PacketInterceptor b() {
|
||||
public V1_8_8PacketInterceptor getPacketInterceptor() {
|
||||
return this.e;
|
||||
}
|
||||
|
||||
public LegacyBossBar c() {
|
||||
public LegacyBossBar createLegacyBossBar() {
|
||||
return new V1_8_8BossBar();
|
||||
}
|
||||
|
||||
public void a(Firework var1) {
|
||||
public void detonateFirework(Firework var1) {
|
||||
((CraftFirework)var1).getHandle().expectedLifespan = 2;
|
||||
}
|
||||
|
||||
public void a(org.bukkit.entity.Entity var1, boolean var2) {
|
||||
public void setInvulnerable(org.bukkit.entity.Entity var1, boolean var2) {
|
||||
try {
|
||||
this.c.setBoolean(((CraftEntity)var1).getHandle(), var2);
|
||||
} catch (IllegalAccessException var4) {
|
||||
}
|
||||
}
|
||||
|
||||
public void a(LivingEntity var1, double var2) {
|
||||
public void setMovementSpeed(LivingEntity var1, double var2) {
|
||||
((CraftLivingEntity)var1).getHandle().getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(var2);
|
||||
}
|
||||
|
||||
public void a(Player var1) {
|
||||
public void sendHealthUpdate(Player var1) {
|
||||
EntityPlayer var2 = ((CraftPlayer)var1).getHandle();
|
||||
var2.playerConnection
|
||||
.sendPacket(new PacketPlayOutUpdateHealth(var2.getHealth(), var2.getFoodData().getFoodLevel(), var2.getFoodData().getSaturationLevel()));
|
||||
}
|
||||
|
||||
public void a(Player var1, Item var2) {
|
||||
public void sendCollectItemAnimation(Player var1, Item var2) {
|
||||
((CraftPlayer)var1).getHandle().playerConnection.sendPacket(new PacketPlayOutCollect(var1.getEntityId(), var2.getEntityId()));
|
||||
}
|
||||
|
||||
public void a(Block var1, Material var2, int var3) {
|
||||
public void setBlock(Block var1, Material var2, int var3) {
|
||||
Chunk var4 = ((CraftChunk)var1.getChunk()).getHandle();
|
||||
IBlockData var5 = net.minecraft.server.v1_8_R3.Block.getByCombinedId(var2.getId() + (var3 << 12));
|
||||
BlockPosition var6 = new BlockPosition(var1.getX(), var1.getY(), var1.getZ());
|
||||
@@ -222,16 +222,16 @@ public class V1_8_8Platform implements ServerPlatform {
|
||||
}
|
||||
}
|
||||
|
||||
public HologramEntity a(World var1, double var2, double var4, double var6) {
|
||||
public HologramEntity createHologram(World var1, double var2, double var4, double var6) {
|
||||
a.put(V1_8_8HologramEntity.class, "ArmorStand");
|
||||
b.put(V1_8_8HologramEntity.class, 30);
|
||||
return new V1_8_8HologramEntity(((CraftWorld)var1).getHandle(), var2, var4, var6);
|
||||
}
|
||||
|
||||
public void a(SkullMeta var1, SkinTexture var2) {
|
||||
public void applySkullTexture(SkullMeta var1, SkinTexture var2) {
|
||||
}
|
||||
|
||||
public boolean a(Block var1, double var2, double var4, double var6) {
|
||||
public boolean isInsideBlockHitbox(Block var1, double var2, double var4, double var6) {
|
||||
return switch (V1_8_8PlatformSwitchTable.a[var1.getType().ordinal()]) {
|
||||
case 1 -> {
|
||||
double var13 = var2 - var1.getX();
|
||||
@@ -251,19 +251,19 @@ public class V1_8_8Platform implements ServerPlatform {
|
||||
};
|
||||
}
|
||||
|
||||
public boolean a(PlayerInteractEvent var1) {
|
||||
public boolean isMainHandInteract(PlayerInteractEvent var1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean a(EntityDamageEvent var1) {
|
||||
public boolean isCrammingDamage(EntityDamageEvent var1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public SwapHandListener d() {
|
||||
public SwapHandListener createSwapHandListener() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public SkinTexture c(Player var1) {
|
||||
public SkinTexture getSkinTexture(Player var1) {
|
||||
for (Property var3 : ((CraftPlayer)var1).getHandle().getProfile().getProperties().get("textures")) {
|
||||
if (var3.getName().equals("textures")) {
|
||||
return new SkinTexture(var3.getValue());
|
||||
@@ -273,30 +273,30 @@ public class V1_8_8Platform implements ServerPlatform {
|
||||
return new SkinTexture();
|
||||
}
|
||||
|
||||
public ItemStack d(Player var1) {
|
||||
public ItemStack getMainHandItem(Player var1) {
|
||||
return var1.getItemInHand();
|
||||
}
|
||||
|
||||
public void a(Player var1, ItemStack var2) {
|
||||
public void setMainHandItem(Player var1, ItemStack var2) {
|
||||
var1.setItemInHand(var2);
|
||||
}
|
||||
|
||||
public ItemStack e(Player var1) {
|
||||
public ItemStack getOffHandItem(Player var1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void b(Player var1, ItemStack var2) {
|
||||
public void setOffHandItem(Player var1, ItemStack var2) {
|
||||
}
|
||||
|
||||
public void a(Player var1, boolean var2) {
|
||||
public void setCollidable(Player var1, boolean var2) {
|
||||
var1.spigot().setCollidesWithEntities(var2);
|
||||
}
|
||||
|
||||
public void a(Player var1, String var2) {
|
||||
public void sendActionBar(Player var1, String var2) {
|
||||
((CraftPlayer)var1).getHandle().playerConnection.sendPacket(new PacketPlayOutChat(ChatSerializer.a("{\"text\": \"" + var2 + "\"}"), (byte)2));
|
||||
}
|
||||
|
||||
public void a(Player var1, String var2, String var3, int var4, int var5, int var6) {
|
||||
public void sendTitle(Player var1, String var2, String var3, int var4, int var5, int var6) {
|
||||
PlayerConnection var7 = ((CraftPlayer)var1).getHandle().playerConnection;
|
||||
var7.sendPacket(new PacketPlayOutTitle(EnumTitleAction.TIMES, null, var4, var5, var6));
|
||||
if (var2 != null) {
|
||||
@@ -308,7 +308,7 @@ public class V1_8_8Platform implements ServerPlatform {
|
||||
}
|
||||
}
|
||||
|
||||
public void a(Player var1, String var2, String var3) {
|
||||
public void sendHeaderAndFooter(Player var1, String var2, String var3) {
|
||||
IChatBaseComponent var4 = ChatSerializer.a("{\"text\":\"" + var2 + "\"}");
|
||||
IChatBaseComponent var5 = ChatSerializer.a("{\"text\":\"" + var3 + "\"}");
|
||||
|
||||
@@ -324,7 +324,7 @@ public class V1_8_8Platform implements ServerPlatform {
|
||||
}
|
||||
}
|
||||
|
||||
public void a(Player var1, boolean var2, Score var3, int var4) {
|
||||
public void sendScorePacket(Player var1, boolean var2, Score var3, int var4) {
|
||||
PacketDataSerializer var5 = new PacketDataSerializer(Unpooled.buffer());
|
||||
var5.a(var3.getEntry());
|
||||
var5.b(var2 ? 1 : 0);
|
||||
@@ -341,7 +341,7 @@ public class V1_8_8Platform implements ServerPlatform {
|
||||
}
|
||||
}
|
||||
|
||||
public void a(Player var1, Team var2, String var3, String var4, NameTagVisibility var5) {
|
||||
public void sendTeamPacket(Player var1, Team var2, String var3, String var4, TeamVisibility var5) {
|
||||
if (var1.getScoreboard() == var2.getScoreboard()) {
|
||||
EntityPlayer var6 = ((CraftPlayer)var1).getHandle();
|
||||
ScoreboardTeam var7 = ((CraftScoreboard)var1.getScoreboard()).getHandle().getTeam(var2.getName());
|
||||
@@ -369,8 +369,8 @@ public class V1_8_8Platform implements ServerPlatform {
|
||||
|
||||
static {
|
||||
try {
|
||||
a = (Map<Class<?>, String>)Reflection.a(EntityTypes.class, "d").get(null);
|
||||
b = (Map<Class<?>, Integer>)Reflection.a(EntityTypes.class, "f").get(null);
|
||||
a = (Map<Class<?>, String>)Reflection.findFieldByName(EntityTypes.class, "d").get(null);
|
||||
b = (Map<Class<?>, Integer>)Reflection.findFieldByName(EntityTypes.class, "f").get(null);
|
||||
} catch (IllegalAccessException var1) {
|
||||
throw new RuntimeException(var1);
|
||||
}
|
||||
|
||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
||||
import org.bukkit.Server;
|
||||
|
||||
public class V1_8_8PlatformFactory implements VersionFactory<ServerPlatform> {
|
||||
public String a() {
|
||||
public String getVersionLabel() {
|
||||
return "1.8.8";
|
||||
}
|
||||
|
||||
public boolean a(String var1) {
|
||||
public boolean supports(String var1) {
|
||||
return var1.equals("1.8.8") || var1.equals("1.8.9");
|
||||
}
|
||||
|
||||
public ServerPlatform a(Server var1) {
|
||||
public ServerPlatform create(Server var1) {
|
||||
return new V1_8_8Platform(var1);
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -20,7 +20,7 @@ public class V1_8_8BossBar implements LegacyBossBar {
|
||||
private boolean b = true;
|
||||
private final Map<Player, EntityWither> c = new HashMap<>();
|
||||
|
||||
public void a(Player var1) {
|
||||
public void addPlayer(Player var1) {
|
||||
EntityWither var2 = new EntityWither(this.c(var1).world);
|
||||
var2.setCustomName(this.a);
|
||||
var2.setInvisible(true);
|
||||
@@ -40,7 +40,7 @@ public class V1_8_8BossBar implements LegacyBossBar {
|
||||
return var1.add(var1.getDirection().multiply(60));
|
||||
}
|
||||
|
||||
public void a(String var1) {
|
||||
public void setTitle(String var1) {
|
||||
this.a = var1;
|
||||
|
||||
for (Entry var3 : this.c.entrySet()) {
|
||||
@@ -50,7 +50,7 @@ public class V1_8_8BossBar implements LegacyBossBar {
|
||||
}
|
||||
}
|
||||
|
||||
public void a(boolean var1) {
|
||||
public void setVisible(boolean var1) {
|
||||
if (var1 != this.b) {
|
||||
this.b = var1;
|
||||
if (var1) {
|
||||
@@ -65,7 +65,7 @@ public class V1_8_8BossBar implements LegacyBossBar {
|
||||
}
|
||||
}
|
||||
|
||||
public void b(Player var1) {
|
||||
public void removePlayer(Player var1) {
|
||||
EntityWither var2 = this.c.remove(var1);
|
||||
if (var2 != null) {
|
||||
if (this.b) {
|
||||
@@ -74,7 +74,7 @@ public class V1_8_8BossBar implements LegacyBossBar {
|
||||
}
|
||||
}
|
||||
|
||||
public void a() {
|
||||
public void removeAll() {
|
||||
for (Entry var2 : this.c.entrySet()) {
|
||||
this.c((Player)var2.getKey()).playerConnection.sendPacket(new PacketPlayOutEntityDestroy(new int[]{((EntityWither)var2.getValue()).getId()}));
|
||||
}
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class BombLobbersV1_8_8TntEntity extends EntityTNTPrimed {
|
||||
private static final Field a = Reflection.a(EntityTNTPrimed.class, "source");
|
||||
private static final Field a = Reflection.findFieldByName(EntityTNTPrimed.class, "source");
|
||||
private boolean b;
|
||||
private float c = 0.004F;
|
||||
private float d;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
public class BombLobbersV1_8_8TntFactory implements BombLobbersTntFactory {
|
||||
public TNTPrimed a(Player var1, Color var2, Vector var3) {
|
||||
public TNTPrimed spawnTnt(Player var1, Color var2, Vector var3) {
|
||||
EntityPlayer var4 = ((CraftPlayer)var1).getHandle();
|
||||
BombLobbersV1_8_8TntEntity var5 = new BombLobbersV1_8_8TntEntity(var4, var2, var3);
|
||||
var4.world.addEntity(var5, SpawnReason.CUSTOM);
|
||||
|
||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
||||
import org.bukkit.Server;
|
||||
|
||||
public class BombLobbersV1_8_8TntFactorySelector implements VersionFactory<BombLobbersTntFactory> {
|
||||
public String a() {
|
||||
public String getVersionLabel() {
|
||||
return "1.8.8";
|
||||
}
|
||||
|
||||
public boolean a(String var1) {
|
||||
public boolean supports(String var1) {
|
||||
return var1.equals("1.8.8") || var1.equals("1.8.9");
|
||||
}
|
||||
|
||||
public BombLobbersTntFactory a(Server var1) {
|
||||
public BombLobbersTntFactory create(Server var1) {
|
||||
return new BombLobbersV1_8_8TntFactory();
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -22,24 +22,24 @@ public class MiniWallsV1_8_8EntityFactory implements MiniWallsEntityFactory {
|
||||
private static final Map<Class<?>, String> a;
|
||||
private static final Map<Class<?>, Integer> b;
|
||||
|
||||
public Wither a(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
||||
public Wither spawnWither(Location var1, Predicate<LivingEntity> var2, Runnable var3) {
|
||||
a.put(MiniWallsV1_8_8Wither.class, "WitherBoss");
|
||||
b.put(MiniWallsV1_8_8Wither.class, 64);
|
||||
return (Wither)new MiniWallsV1_8_8Wither(var1, var2, var3).getBukkitEntity();
|
||||
}
|
||||
|
||||
public Arrow a(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
||||
public Arrow spawnArrow(Player var1, Color var2, Vector var3, Predicate<Entity> var4) {
|
||||
return (Arrow)new MiniWallsV1_8_8Arrow(((CraftPlayer)var1).getHandle(), var2, var3, var4).getBukkitEntity();
|
||||
}
|
||||
|
||||
public WitherSkull a(Wither var1, Vector var2, Predicate<Entity> var3) {
|
||||
public WitherSkull spawnWitherSkull(Wither var1, Vector var2, Predicate<Entity> var3) {
|
||||
return (WitherSkull)new MiniWallsV1_8_8WitherSkull(((CraftWither)var1).getHandle(), var2, var3).getBukkitEntity();
|
||||
}
|
||||
|
||||
static {
|
||||
try {
|
||||
a = (Map<Class<?>, String>)Reflection.a(EntityTypes.class, "d").get(null);
|
||||
b = (Map<Class<?>, Integer>)Reflection.a(EntityTypes.class, "f").get(null);
|
||||
a = (Map<Class<?>, String>)Reflection.findFieldByName(EntityTypes.class, "d").get(null);
|
||||
b = (Map<Class<?>, Integer>)Reflection.findFieldByName(EntityTypes.class, "f").get(null);
|
||||
} catch (IllegalAccessException var1) {
|
||||
throw new RuntimeException(var1);
|
||||
}
|
||||
|
||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
||||
import org.bukkit.Server;
|
||||
|
||||
public class MiniWallsV1_8_8EntityFactorySelector implements VersionFactory<MiniWallsEntityFactory> {
|
||||
public String a() {
|
||||
public String getVersionLabel() {
|
||||
return "1.8.8";
|
||||
}
|
||||
|
||||
public boolean a(String var1) {
|
||||
public boolean supports(String var1) {
|
||||
return var1.equals("1.8.8") || var1.equals("1.8.9");
|
||||
}
|
||||
|
||||
public MiniWallsEntityFactory a(Server var1) {
|
||||
public MiniWallsEntityFactory create(Server var1) {
|
||||
return new MiniWallsV1_8_8EntityFactory();
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.bukkit.Material;
|
||||
import org.bukkit.entity.FallingBlock;
|
||||
|
||||
public class PartyGamesV1_8_8FallingBlockFactory implements PartyGamesFallingBlockFactory {
|
||||
public FallingBlock a(Location var1, Material var2, byte var3) {
|
||||
public FallingBlock spawnFallingBlock(Location var1, Material var2, byte var3) {
|
||||
return (FallingBlock)new PartyGamesV1_8_8FallingBlock(var1, var2, var3).getBukkitEntity();
|
||||
}
|
||||
}
|
||||
+11
-11
@@ -31,34 +31,34 @@ public class PropHuntV1_8_8PropEntity extends EntityArmorStand implements PropHu
|
||||
this.setEquipment(4, CraftItemStack.asNMSCopy(var2));
|
||||
}
|
||||
|
||||
this.a(var3);
|
||||
this.teleport(var3);
|
||||
}
|
||||
|
||||
public UUID a() {
|
||||
public UUID getUniqueId() {
|
||||
return this.uniqueID;
|
||||
}
|
||||
|
||||
public PropHuntPropType b() {
|
||||
public PropHuntPropType getPropType() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
public ItemStack c() {
|
||||
public ItemStack getItem() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public Player d() {
|
||||
public Player getOwner() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public void a(Player var1) {
|
||||
public void setOwner(Player var1) {
|
||||
this.a = (CraftPlayer)var1;
|
||||
}
|
||||
|
||||
public Location e() {
|
||||
public Location getLocation() {
|
||||
return new Location(this.world.getWorld(), this.locX, this.locY + 1.35, this.locZ, this.yaw, this.pitch);
|
||||
}
|
||||
|
||||
public void a(Location var1) {
|
||||
public void teleport(Location var1) {
|
||||
double var2 = var1.getX();
|
||||
double var4 = var1.getY() - 1.35;
|
||||
double var6 = var1.getZ();
|
||||
@@ -72,19 +72,19 @@ public class PropHuntV1_8_8PropEntity extends EntityArmorStand implements PropHu
|
||||
this.setPosition(var2, var4, var6);
|
||||
}
|
||||
|
||||
public void f() {
|
||||
public void attachOwner() {
|
||||
if (this.a != null) {
|
||||
this.getBukkitEntity().setPassenger(this.a);
|
||||
}
|
||||
}
|
||||
|
||||
public void g() {
|
||||
public void destroy() {
|
||||
this.dead = true;
|
||||
}
|
||||
|
||||
public void t_() {
|
||||
if (this.a != null && !this.a.isInsideVehicle()) {
|
||||
this.a(this.a.getLocation());
|
||||
this.teleport(this.a.getLocation());
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -9,7 +9,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class PropHuntV1_8_8PropFactory implements PropHuntPropFactory {
|
||||
public PropHuntProp a(PropHuntPropType var1, ItemStack var2, Location var3) {
|
||||
public PropHuntProp createProp(PropHuntPropType var1, ItemStack var2, Location var3) {
|
||||
PropHuntV1_8_8PropEntity var4 = new PropHuntV1_8_8PropEntity(var1, var2, var3);
|
||||
var4.world.addEntity(var4, SpawnReason.CUSTOM);
|
||||
return var4;
|
||||
|
||||
+3
-3
@@ -6,15 +6,15 @@ import ro.fr33styler.arcade.platform.version.VersionFactory;
|
||||
import org.bukkit.Server;
|
||||
|
||||
public class PropHuntV1_8_8PropFactorySelector implements VersionFactory<PropHuntPropFactory> {
|
||||
public String a() {
|
||||
public String getVersionLabel() {
|
||||
return "1.8.8";
|
||||
}
|
||||
|
||||
public boolean a(String var1) {
|
||||
public boolean supports(String var1) {
|
||||
return var1.equals("1.8.8") || var1.equals("1.8.9");
|
||||
}
|
||||
|
||||
public PropHuntPropFactory a(Server var1) {
|
||||
public PropHuntPropFactory create(Server var1) {
|
||||
return new PropHuntV1_8_8PropFactory();
|
||||
}
|
||||
}
|
||||
+4
-4
@@ -20,22 +20,22 @@ public class V1_8_8HologramEntity extends EntityArmorStand implements HologramEn
|
||||
super.setInvisible(true);
|
||||
}
|
||||
|
||||
public void a(String var1) {
|
||||
public void setText(String var1) {
|
||||
super.setCustomName(var1);
|
||||
if (super.hasCustomName()) {
|
||||
super.setCustomNameVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
public LivingEntity a() {
|
||||
public LivingEntity getEntity() {
|
||||
return (LivingEntity)this.getBukkitEntity();
|
||||
}
|
||||
|
||||
public void a(Player var1) {
|
||||
public void updateMetadata(Player var1) {
|
||||
this.a(this.b(var1));
|
||||
}
|
||||
|
||||
public void a(Player var1, boolean var2) {
|
||||
public void setVisible(Player var1, boolean var2) {
|
||||
PlayerConnection var3 = this.b(var1);
|
||||
if (var2) {
|
||||
var3.sendPacket(new PacketPlayOutSpawnEntityLiving(this));
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ public class V1_8_8PacketInterceptor implements PacketInterceptor {
|
||||
}
|
||||
}
|
||||
|
||||
public void a(String var1, Player var2) {
|
||||
public void inject(String var1, Player var2) {
|
||||
try {
|
||||
ChannelPipeline var3 = this.a(var2).pipeline();
|
||||
this.a(var3, var1);
|
||||
@@ -28,7 +28,7 @@ public class V1_8_8PacketInterceptor implements PacketInterceptor {
|
||||
}
|
||||
}
|
||||
|
||||
public void b(String var1, Player var2) {
|
||||
public void eject(String var1, Player var2) {
|
||||
Channel var3 = this.a(var2);
|
||||
var3.eventLoop().execute(() -> this.a(var3.pipeline(), var1));
|
||||
}
|
||||
|
||||
+4
-4
@@ -29,15 +29,15 @@ public class V1_8_8Npc extends EntityPlayer implements Npc {
|
||||
this.a = var4;
|
||||
}
|
||||
|
||||
public int a() {
|
||||
public int getEntityId() {
|
||||
return this.getId();
|
||||
}
|
||||
|
||||
public Location b() {
|
||||
public Location getLocation() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public void a(Player var1, boolean var2) {
|
||||
public void setVisible(Player var1, boolean var2) {
|
||||
PlayerConnection var3 = this.b(var1);
|
||||
if (var2) {
|
||||
var3.sendPacket(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.ADD_PLAYER, new EntityPlayer[]{this}));
|
||||
@@ -59,7 +59,7 @@ public class V1_8_8Npc extends EntityPlayer implements Npc {
|
||||
return ((CraftPlayer)var1).getHandle().playerConnection;
|
||||
}
|
||||
|
||||
public void a(Player var1) {
|
||||
public void removeFromTabList(Player var1) {
|
||||
this.b(var1).sendPacket(new PacketPlayOutPlayerInfo(EnumPlayerInfoAction.REMOVE_PLAYER, new EntityPlayer[]{this}));
|
||||
}
|
||||
}
|
||||
+8
-8
@@ -24,7 +24,7 @@ public class V1_8_8NpcFactory implements NpcFactory {
|
||||
this.a = var1;
|
||||
}
|
||||
|
||||
public V1_8_8Npc a(Location var1, Player var2) {
|
||||
public V1_8_8Npc createPlayerNpc(Location var1, Player var2) {
|
||||
EntityPlayer var3 = ((CraftPlayer)var2).getHandle();
|
||||
GameProfile var4 = new GameProfile(UUID.randomUUID(), var2.getName());
|
||||
var4.getProperties().putAll(var3.getProfile().getProperties());
|
||||
@@ -34,17 +34,17 @@ public class V1_8_8NpcFactory implements NpcFactory {
|
||||
public V1_8_8Npc a(Location var1, String var2, SkinTexture var3) {
|
||||
CraftWorld var4 = (CraftWorld)var1.getWorld();
|
||||
GameProfile var5 = new GameProfile(UUID.randomUUID(), var2);
|
||||
var5.getProperties().put("textures", new Property("textures", var3.a(), var3.b()));
|
||||
var5.getProperties().put("textures", new Property("textures", var3.getValue(), var3.getSignature()));
|
||||
return new V1_8_8Npc(((CraftServer)this.a).getServer(), var4.getHandle(), var5, var1);
|
||||
}
|
||||
|
||||
public V1_8_8Npc a(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
||||
public V1_8_8Npc createNpc(Location var1, String var2, SkinTexture var3, NpcEquipment var4) {
|
||||
V1_8_8Npc var5 = this.a(var1, var2, var3);
|
||||
var5.setEquipment(0, CraftItemStack.asNMSCopy(var4.c()));
|
||||
var5.setEquipment(1, CraftItemStack.asNMSCopy(var4.d()));
|
||||
var5.setEquipment(2, CraftItemStack.asNMSCopy(var4.e()));
|
||||
var5.setEquipment(3, CraftItemStack.asNMSCopy(var4.f()));
|
||||
var5.inventory.setItem(0, CraftItemStack.asNMSCopy(var4.a()));
|
||||
var5.setEquipment(0, CraftItemStack.asNMSCopy(var4.getHelmetItem()));
|
||||
var5.setEquipment(1, CraftItemStack.asNMSCopy(var4.getChestplateItem()));
|
||||
var5.setEquipment(2, CraftItemStack.asNMSCopy(var4.getLeggingsItem()));
|
||||
var5.setEquipment(3, CraftItemStack.asNMSCopy(var4.getBootsItem()));
|
||||
var5.inventory.setItem(0, CraftItemStack.asNMSCopy(var4.getMainHandItem()));
|
||||
return var5;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user