From bfd13a414026d2a02d399eb33d1219e4d30611a6 Mon Sep 17 00:00:00 2001 From: wizjany Date: Mon, 12 Aug 2013 21:26:17 -0400 Subject: [PATCH] Updated forge code to 1.6.2. Note that this is untested (although it compiles) since I don't currently have a 1.6 forge installation set up. --- .../sk89q/worldedit/forge/ForgePlayer.java | 21 ++++++++++++------- .../worldedit/forge/ForgeServerInterface.java | 4 ++++ .../com/sk89q/worldedit/forge/ForgeWorld.java | 8 +++---- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/forge/java/com/sk89q/worldedit/forge/ForgePlayer.java b/src/forge/java/com/sk89q/worldedit/forge/ForgePlayer.java index 8954a8e81..842cd709c 100644 --- a/src/forge/java/com/sk89q/worldedit/forge/ForgePlayer.java +++ b/src/forge/java/com/sk89q/worldedit/forge/ForgePlayer.java @@ -3,6 +3,7 @@ package com.sk89q.worldedit.forge; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; import net.minecraft.network.packet.Packet250CustomPayload; +import net.minecraft.util.ChatMessageComponent; import com.sk89q.util.StringUtil; import com.sk89q.worldedit.LocalPlayer; @@ -60,23 +61,27 @@ public class ForgePlayer extends LocalPlayer { } public void printRaw(String msg) { - for (String part : msg.split("\n")) - this.player.sendChatToPlayer(msg); + for (String part : msg.split("\n")) { + this.player.sendChatToPlayer(ChatMessageComponent.func_111077_e(msg)); + } } public void printDebug(String msg) { - for (String part : msg.split("\n")) - this.player.sendChatToPlayer("\u00a77" + part); + for (String part : msg.split("\n")) { + this.player.sendChatToPlayer(ChatMessageComponent.func_111077_e("\u00a77" + part)); + } } public void print(String msg) { - for (String part : msg.split("\n")) - this.player.sendChatToPlayer("\u00a7d" + part); + for (String part : msg.split("\n")) { + this.player.sendChatToPlayer(ChatMessageComponent.func_111077_e("\u00a7d" + part)); + } } public void printError(String msg) { - for (String part : msg.split("\n")) - this.player.sendChatToPlayer("\u00a7c" + part); + for (String part : msg.split("\n")) { + this.player.sendChatToPlayer(ChatMessageComponent.func_111077_e("\u00a7c" + part)); + } } public void setPosition(Vector pos, float pitch, float yaw) { diff --git a/src/forge/java/com/sk89q/worldedit/forge/ForgeServerInterface.java b/src/forge/java/com/sk89q/worldedit/forge/ForgeServerInterface.java index a67af9e0f..91297a66b 100644 --- a/src/forge/java/com/sk89q/worldedit/forge/ForgeServerInterface.java +++ b/src/forge/java/com/sk89q/worldedit/forge/ForgeServerInterface.java @@ -71,6 +71,10 @@ public class ForgeServerInterface extends ServerInterface { public void processCommand(ICommandSender var1, String[] var2) { } + + public String getCommandUsage(ICommandSender icommandsender) { + return null; + } }); } } diff --git a/src/forge/java/com/sk89q/worldedit/forge/ForgeWorld.java b/src/forge/java/com/sk89q/worldedit/forge/ForgeWorld.java index 2d13b0a3f..162e16356 100644 --- a/src/forge/java/com/sk89q/worldedit/forge/ForgeWorld.java +++ b/src/forge/java/com/sk89q/worldedit/forge/ForgeWorld.java @@ -227,13 +227,15 @@ public class ForgeWorld extends LocalWorld { return true; } + /* if (block instanceof MobSpawnerBlock) { // Mob spawners TileEntityMobSpawner spawner = new TileEntityMobSpawner(); - spawner.func_98049_a().setMobID(((MobSpawnerBlock) block).getMobType()); + spawner.getSpawnerLogic().setMobID(((MobSpawnerBlock) block).getMobType()); world.setBlockTileEntity(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ(), spawner); return true; } + */ if (block instanceof NoteBlock) { // Note block @@ -371,10 +373,6 @@ public class ForgeWorld extends LocalWorld { } EntityLiving ent = (EntityLiving) obj; - if (ent instanceof EntityPlayer) { - continue; - } - if (!killAnimals && ent instanceof EntityAnimal) { continue; }