diff --git a/patches/minecraft/net/minecraft/block/Block.edit.java b/patches/minecraft/net/minecraft/block/Block.edit.java index 4cd9ebb..34be1c7 100644 --- a/patches/minecraft/net/minecraft/block/Block.edit.java +++ b/patches/minecraft/net/minecraft/block/Block.edit.java @@ -5,12 +5,113 @@ # Version: 1.0 # Author: lax1dude -> CHANGE 3 : 5 @ 3 : 135 +> CHANGE 3 : 8 @ 3 : 135 +~ +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; ~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; ~ -> CHANGE 354 : 355 @ 354 : 355 +> CHANGE 31 : 32 @ 31 : 32 + +~ public class Block extends ModData { + +> INSERT 50 : 51 @ 50 + ++ protected boolean fullCube = true; + +> INSERT 24 : 26 @ 24 + ++ public boolean noRender = false; ++ public boolean forceRender = false; + +> INSERT 1 : 73 @ 1 + ++ public void loadModData(BaseData data) { ++ unlocalizedName = data.getString("unlocalizedName"); ++ slipperiness = data.getFloat("slipperiness"); ++ blockParticleGravity = data.getFloat("blockParticleGravity"); ++ ++ minX = data.getDouble("minX"); ++ minY = data.getDouble("minY"); ++ minZ = data.getDouble("minY"); ++ maxX = data.getDouble("maxX"); ++ maxY = data.getDouble("maxY"); ++ maxZ = data.getDouble("maxZ"); ++ ++ enableStats = data.getBoolean("enableStats"); ++ needsRandomTick = data.getBoolean("needsRandomTick"); ++ isBlockContainer = data.getBoolean("isBlockContainer"); ++ useNeighborBrightness = data.getBoolean("useNeighborBrightness"); ++ translucent = data.getBoolean("translucent"); ++ fullBlock = data.getBoolean("fullBlock"); ++ ++ lightOpacity = data.getInt("lightOpacity"); ++ lightValue = data.getInt("lightValue"); ++ ++ blockHardness = data.getFloat("blockHardness"); ++ blockResistance = data.getFloat("blockResistance"); ++ ++ noRender = data.getBoolean("noRender"); ++ forceRender = data.getBoolean("forceRender"); ++ fullCube = data.getBoolean("fullCube"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.set("unlocalizedName", unlocalizedName); ++ data.set("slipperiness", slipperiness); ++ data.set("blockParticleGravity", blockParticleGravity); ++ ++ data.set("minX", minX); ++ data.set("minY", minY); ++ data.set("minZ", minZ); ++ data.set("maxX", maxX); ++ data.set("maxY", maxY); ++ data.set("maxZ", maxZ); ++ ++ data.set("blockMaterial", blockMaterial.makeModData()); ++ ++ data.set("enableStats", enableStats); ++ data.set("needsRandomTick", needsRandomTick); ++ data.set("isBlockContainer", isBlockContainer); ++ data.set("useNeighborBrightness", useNeighborBrightness); ++ data.set("translucent", translucent); ++ data.set("fullBlock", fullBlock); ++ data.set("fullCube", fullCube); ++ ++ data.set("lightOpacity", lightOpacity); ++ data.set("lightValue", lightValue); ++ data.set("blockHardness", blockHardness); ++ data.set("blockResistance", blockResistance); ++ data.set("noRender", noRender); ++ data.set("forceRender", forceRender); ++ ++ data.setCallbackInt("getID", () -> { ++ return getIdFromBlock(this); ++ }); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ return data; ++ } ++ + +> CHANGE 132 : 133 @ 132 : 133 + +~ return this.fullCube && (!this.noRender); + +> INSERT 67 : 70 @ 67 + ++ if (this.noRender || this.forceRender) { ++ return this.forceRender; ++ } + +> CHANGE 47 : 48 @ 47 : 48 ~ public void randomTick(World world, BlockPos blockpos, IBlockState iblockstate, EaglercraftRandom random) { diff --git a/patches/minecraft/net/minecraft/block/material/MapColor.edit.java b/patches/minecraft/net/minecraft/block/material/MapColor.edit.java new file mode 100644 index 0000000..85b7da4 --- /dev/null +++ b/patches/minecraft/net/minecraft/block/material/MapColor.edit.java @@ -0,0 +1,61 @@ + +# Eagler Context Redacted Diff +# Copyright (c) 2024 lax1dude. All rights reserved. + +# Version: 1.0 +# Author: lax1dude + +> CHANGE 2 : 6 @ 2 : 3 + +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; +~ +~ public class MapColor extends ModData { + +> CHANGE 37 : 39 @ 37 : 39 + +~ public int colorValue; +~ public int colorIndex; + +> INSERT 11 : 49 @ 11 + ++ public void loadModData(BaseData data) { ++ colorIndex = data.getInt("colorIndex"); ++ colorValue = data.getInt("colorValue"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.set("colorIndex", colorIndex); ++ data.set("colorValue", colorValue); ++ ++ int[] rgb = new int[3]; ++ int rr; ++ int gg; ++ int bb; ++ int dec = colorValue; ++ rr = (int) Math.floor(dec / 65536); ++ dec -= rr * 65536; ++ gg = (int) Math.floor(dec / 256); ++ dec -= gg * 256; ++ bb = dec; ++ rr = Math.min(rr, 255); ++ rgb[0] = rr; ++ rgb[1] = gg; ++ rgb[2] = bb; ++ data.set("rgb", rgb); ++ ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ ++ return data; ++ ++ } ++ + +> EOF diff --git a/patches/minecraft/net/minecraft/block/material/Material.edit.java b/patches/minecraft/net/minecraft/block/material/Material.edit.java index 818a6dc..8e6a6a6 100644 --- a/patches/minecraft/net/minecraft/block/material/Material.edit.java +++ b/patches/minecraft/net/minecraft/block/material/Material.edit.java @@ -5,6 +5,135 @@ # Version: 1.0 # Author: lax1dude -> DELETE 2 @ 2 : 8 +> CHANGE 2 : 4 @ 2 : 7 + +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; + +> CHANGE 1 : 2 @ 1 : 2 + +~ public class Material extends ModData { + +> INSERT 54 : 173 @ 54 + ++ public static ModData makeModDataStatic() { ++ ModData data = new ModData(); ++ data.set("air", air.makeModData()); ++ data.set("grass", grass.makeModData()); ++ data.set("ground", ground.makeModData()); ++ data.set("wood", wood.makeModData()); ++ data.set("rock", rock.makeModData()); ++ data.set("iron", iron.makeModData()); ++ data.set("anvil", anvil.makeModData()); ++ data.set("water", water.makeModData()); ++ data.set("lava", lava.makeModData()); ++ data.set("leaves", leaves.makeModData()); ++ data.set("plants", plants.makeModData()); ++ data.set("vine", vine.makeModData()); ++ data.set("sponge", sponge.makeModData()); ++ data.set("cloth", cloth.makeModData()); ++ data.set("fire", fire.makeModData()); ++ data.set("sand", sand.makeModData()); ++ data.set("circuits", circuits.makeModData()); ++ data.set("carpet", carpet.makeModData()); ++ data.set("glass", glass.makeModData()); ++ data.set("redstoneLight", redstoneLight.makeModData()); ++ data.set("tnt", tnt.makeModData()); ++ data.set("coral", coral.makeModData()); ++ data.set("ice", ice.makeModData()); ++ data.set("packedIce", packedIce.makeModData()); ++ data.set("snow", snow.makeModData()); ++ data.set("craftedSnow", craftedSnow.makeModData()); ++ data.set("cactus", cactus.makeModData()); ++ data.set("clay", clay.makeModData()); ++ data.set("gourd", gourd.makeModData()); ++ data.set("dragonEgg", dragonEgg.makeModData()); ++ data.set("portal", portal.makeModData()); ++ data.set("cake", cake.makeModData()); ++ data.set("web", web.makeModData()); ++ data.set("piston", piston.makeModData()); ++ data.set("barrier", barrier.makeModData()); ++ return data; ++ } ++ ++ public void loadModData(BaseData data) { ++ canBurn = data.getBoolean("canBurn"); ++ replaceable = data.getBoolean("replaceable"); ++ requiresNoTool = data.getBoolean("requiresNoTool"); ++ isTranslucent = data.getBoolean("isTranslucent"); ++ isAdventureModeExempt = data.getBoolean("isAdventureModeExempt"); ++ materialMapColor.loadModData(data.getBaseData("materialMapColor")); ++ ++ mobilityFlag = data.getInt("mobilityFlag"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.set("canBurn", canBurn); ++ data.set("replaceable", replaceable); ++ data.set("isTranslucent", isTranslucent); ++ data.set("requiresNoTool", requiresNoTool); ++ data.set("mobilityFlag", mobilityFlag); ++ data.set("isAdventureModeExempt", isAdventureModeExempt); ++ data.set("materialMapColor", materialMapColor.makeModData()); ++ ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ ++ data.setCallbackBoolean("isLiquid", () -> { ++ return isLiquid(); ++ }); ++ data.setCallbackBoolean("isSolid", () -> { ++ return isSolid(); ++ }); ++ data.setCallbackBoolean("isReplaceable", () -> { ++ return isReplaceable(); ++ }); ++ data.setCallbackBoolean("isToolNotRequired", () -> { ++ return isToolNotRequired(); ++ }); ++ data.setCallbackBoolean("isOpaque", () -> { ++ return isOpaque(); ++ }); ++ data.setCallbackBoolean("getCanBurn", () -> { ++ return getCanBurn(); ++ }); ++ data.setCallbackBoolean("blocksLight", () -> { ++ return blocksLight(); ++ }); ++ data.setCallbackBoolean("blocksMovement", () -> { ++ return blocksMovement(); ++ }); ++ data.setCallbackObject("setTranslucent", () -> { ++ return setTranslucent().makeModData(); ++ }); ++ data.setCallbackObject("setRequiresTool", () -> { ++ return setRequiresTool().makeModData(); ++ }); ++ data.setCallbackObject("setBurning", () -> { ++ return setBurning().makeModData(); ++ }); ++ data.setCallbackObject("setReplaceable", () -> { ++ return setReplaceable().makeModData(); ++ }); ++ data.setCallbackObject("setNoPushMobility", () -> { ++ return setNoPushMobility().makeModData(); ++ }); ++ data.setCallbackInt("getMaterialMobility", () -> { ++ return getMaterialMobility(); ++ }); ++ data.setCallbackObject("setImmovableMobility", () -> { ++ return setImmovableMobility().makeModData(); ++ }); ++ data.setCallbackObject("setAdventureModeExempt", () -> { ++ return setAdventureModeExempt().makeModData(); ++ }); ++ return data; ++ } ++ > EOF diff --git a/patches/minecraft/net/minecraft/client/Minecraft.edit.java b/patches/minecraft/net/minecraft/client/Minecraft.edit.java index cb4a2a9..acf889e 100644 --- a/patches/minecraft/net/minecraft/client/Minecraft.edit.java +++ b/patches/minecraft/net/minecraft/client/Minecraft.edit.java @@ -134,11 +134,12 @@ ~ public class Minecraft extends ModData implements IThreadListener { -> CHANGE 2 : 3 @ 2 : 9 +> CHANGE 2 : 4 @ 2 : 10 ~ public static final boolean isRunningOnMac = false; +~ public ServerData currentServerData; -> DELETE 12 @ 12 : 14 +> DELETE 11 @ 11 : 13 > INSERT 11 : 12 @ 11 diff --git a/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.edit.java b/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.edit.java index 73441d7..484d1b9 100644 --- a/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.edit.java +++ b/patches/minecraft/net/minecraft/client/entity/EntityOtherPlayerMP.edit.java @@ -5,10 +5,61 @@ # Version: 1.0 # Author: lax1dude -> CHANGE 2 : 3 @ 2 : 3 +> CHANGE 2 : 5 @ 2 : 3 +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; ~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile; > DELETE 1 @ 1 : 2 +> INSERT 1 : 3 @ 1 + ++ import net.minecraft.nbt.JsonToNBT; ++ import net.minecraft.nbt.NBTTagCompound; + +> INSERT 23 : 64 @ 23 + ++ @Override ++ public ModData makeModData() { ++ ModData data = super.makeModData(); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.set("otherPlayerMPPosRotationIncrements", otherPlayerMPPosRotationIncrements); ++ data.set("otherPlayerMPX", otherPlayerMPX); ++ data.set("otherPlayerMPY", otherPlayerMPY); ++ data.set("otherPlayerMPZ", otherPlayerMPZ); ++ data.set("otherPlayerMPYaw", otherPlayerMPYaw); ++ data.set("otherPlayerMPPitch", otherPlayerMPPitch); ++ data.setCallbackVoidWithDataArg("setCurrentItemOrArmor", (BaseData params) -> { ++ try { ++ NBTTagCompound nbtParsed = JsonToNBT.getTagFromJson(params.getString("itemNbt")); ++ ItemStack stack = ItemStack.loadItemStackFromNBT(nbtParsed); ++ setCurrentItemOrArmor(params.getInt("slotIn"), stack); ++ } catch (Exception e) { ++ } ++ }); ++ data.setCallbackBoolean("isSpectator", () -> { ++ return isSpectator(); ++ }); ++ ++ return data; ++ } ++ ++ @Override ++ public void loadModData(BaseData data) { ++ super.loadModData(data); ++ otherPlayerMPPosRotationIncrements = data.getInt("otherPlayerMPPosRotationIncrements"); ++ otherPlayerMPX = data.getDouble("otherPlayerMPX"); ++ otherPlayerMPY = data.getDouble("otherPlayerMPX"); ++ otherPlayerMPZ = data.getDouble("otherPlayerMPX"); ++ otherPlayerMPYaw = data.getDouble("otherPlayerMPX"); ++ otherPlayerMPPitch = data.getDouble("otherPlayerMPX"); ++ } ++ + > EOF diff --git a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.edit.java b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.edit.java index a22b273..cdd250b 100644 --- a/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.edit.java +++ b/patches/minecraft/net/minecraft/client/entity/EntityPlayerSP.edit.java @@ -5,8 +5,11 @@ # Version: 1.0 # Author: lax1dude -> INSERT 2 : 6 @ 2 +> INSERT 2 : 9 @ 2 ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModAPI; ++ import net.eaglerforge.api.ModData; + import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; + import net.lax1dude.eaglercraft.v1_8.sp.lan.LANClientNetworkManager; + import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; @@ -30,13 +33,188 @@ + this.statWriter = statWriter; -> CHANGE 116 : 123 @ 116 : 117 +> INSERT 2 : 141 @ 2 + ++ @Override ++ public ModData makeModData() { ++ ModData data = super.makeModData(); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.set("lastReportedPosX", lastReportedPosX); ++ data.set("lastReportedPosY", lastReportedPosY); ++ data.set("lastReportedPosZ", lastReportedPosZ); ++ data.set("lastReportedYaw", lastReportedYaw); ++ data.set("lastReportedPitch", lastReportedPitch); ++ data.set("serverSneakState", serverSneakState); ++ data.set("serverSprintState", serverSprintState); ++ data.set("positionUpdateTicks", positionUpdateTicks); ++ data.set("hasValidHealth", hasValidHealth); ++ data.set("clientBrand", clientBrand); ++ data.set("sprintToggleTimer", sprintToggleTimer); ++ data.set("sprintingTicksLeft", sprintingTicksLeft); ++ ++ data.set("renderArmYaw", renderArmYaw); ++ data.set("renderArmPitch", renderArmPitch); ++ data.set("prevRenderArmYaw", prevRenderArmYaw); ++ data.set("prevRenderArmPitch", prevRenderArmPitch); ++ data.set("horseJumpPower", horseJumpPower); ++ data.set("horseJumpPowerCounter", horseJumpPowerCounter); ++ ++ data.setCallbackVoidWithDataArg("mountEntity", (BaseData params) -> { ++ if (params.getBaseData("entityIn") instanceof Entity) { ++ mountEntity((Entity) params.getBaseData("entityIn")); ++ } ++ }); ++ data.setCallbackObjectWithDataArg("dropOneItem", (BaseData params) -> { ++ EntityItem itemEntity = dropOneItem(params.getBoolean("dropAll")); ++ if (itemEntity != null) { ++ return itemEntity.makeModData(); ++ } else { ++ return null; ++ } ++ }); ++ data.setCallbackVoidWithDataArg("sendChatMessage", (BaseData params) -> { ++ sendChatMessage(params.getString("message")); ++ }); ++ data.setCallbackVoid("respawnPlayer", () -> { ++ respawnPlayer(); ++ }); ++ data.setCallbackVoid("closeScreen", () -> { ++ closeScreen(); ++ }); ++ data.setCallbackVoid("closeScreenAndDropStack", () -> { ++ closeScreenAndDropStack(); ++ }); ++ data.setCallbackVoidWithDataArg("setPlayerSPHealth", (BaseData params) -> { ++ setPlayerSPHealth(params.getFloat("health")); ++ }); ++ data.setCallbackVoid("sendPlayerAbilities", () -> { ++ sendPlayerAbilities(); ++ }); ++ data.setCallbackBoolean("isUser", () -> { ++ /** ++ * + returns true if this is an EntityPlayerSP, or the logged in player. ++ */ ++ return isUser(); ++ }); ++ data.setCallbackVoid("sendHorseInventory", () -> { ++ sendHorseInventory(); ++ }); ++ data.setCallbackVoid("sendHorseJump", () -> { ++ sendHorseJump(); ++ }); ++ data.setCallbackVoidWithDataArg("setClientBrand", (BaseData params) -> { ++ setClientBrand(params.getString("brand")); ++ }); ++ data.setCallbackString("getClientBrand", () -> { ++ return getClientBrand(); ++ }); ++ data.setCallbackBooleanWithDataArg("pushOutOfBlocks", (BaseData params) -> { ++ return pushOutOfBlocks(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")); ++ }); ++ data.setCallbackBooleanWithDataArg("isOpenBlockSpace", (BaseData bp) -> { ++ /** ++ * + Returns true if the block at the given BlockPos and the block above it are ++ * NOT full cubes. ++ */ ++ return isOpenBlockSpace(BlockPos.fromModData(bp)); ++ }); ++ data.setCallbackVoidWithDataArg("setXPStats", (BaseData params) -> { ++ setXPStats(params.getFloat("currentXP"), params.getInt("maxXP"), params.getInt("level")); ++ }); ++ data.setCallbackVoidWithDataArg("playSound", (BaseData params) -> { ++ playSound(params.getString("name"), params.getFloat("volume"), params.getFloat("pitch")); ++ }); ++ data.setCallbackBoolean("isServerWorld", () -> { ++ /** ++ * + Returns whether the entity is in a server world ++ */ ++ return isServerWorld(); ++ }); ++ data.setCallbackBoolean("isRidingHorse", () -> { ++ return isRidingHorse(); ++ }); ++ data.setCallbackFloat("getHorseJumpPower", () -> { ++ return getHorseJumpPower(); ++ }); ++ data.setCallbackBoolean("isCurrentViewEntity", () -> { ++ return isCurrentViewEntity(); ++ }); ++ data.setCallbackBoolean("isSpectator", () -> { ++ return isSpectator(); ++ }); ++ return data; ++ } ++ ++ @Override ++ public void loadModData(BaseData data) { ++ super.loadModData(data); ++ lastReportedPosX = data.getDouble("lastReportedPosX"); ++ lastReportedPosY = data.getDouble("lastReportedPosY"); ++ lastReportedPosZ = data.getDouble("lastReportedPosZ"); ++ lastReportedYaw = data.getFloat("lastReportedYaw"); ++ lastReportedPitch = data.getFloat("lastReportedPitch"); ++ serverSneakState = data.getBoolean("serverSneakState"); ++ serverSprintState = data.getBoolean("serverSprintState"); ++ positionUpdateTicks = data.getInt("positionUpdateTicks"); ++ hasValidHealth = data.getBoolean("hasValidHealth"); ++ clientBrand = data.getString("clientBrand"); ++ sprintToggleTimer = data.getInt("sprintToggleTimer"); ++ sprintingTicksLeft = data.getInt("sprintingTicksLeft"); ++ ++ renderArmYaw = data.getFloat("renderArmYaw"); ++ renderArmPitch = data.getFloat("renderArmPitch"); ++ prevRenderArmYaw = data.getFloat("prevRenderArmYaw"); ++ prevRenderArmPitch = data.getFloat("prevRenderArmPitch"); ++ horseJumpPower = data.getFloat("horseJumpPower"); ++ horseJumpPowerCounter = data.getInt("horseJumpPowerCounter"); ++ } ++ + +> INSERT 17 : 18 @ 17 + ++ mc.modapi.onUpdate(); + +> INSERT 8 : 9 @ 8 + ++ ModAPI.callEvent("postmotionupdate", new ModData()); + +> INSERT 6 : 11 @ 6 + ++ ModData event = new ModData(); ++ event.set("yaw", this.rotationYaw); ++ event.set("pitch", this.rotationPitch); ++ event.set("onground", this.onGround); ++ ModAPI.callEvent("premotionupdate", event); + +> CHANGE 34 : 40 @ 34 : 35 + +~ ModData eventData = new ModData(); +~ eventData.set("preventDefault", false); +~ BaseData newEvent = ModAPI.callEvent("motionupdate", eventData); +~ if (newEvent.has("preventDefault") && newEvent.getBoolean("preventDefault") == true) { +~ // *sneeze* +~ } else if (this.ridingEntity == null) { + +> CHANGE 48 : 63 @ 48 : 49 ~ if (((sendQueue.getNetworkManager() instanceof ClientIntegratedServerNetworkManager) ~ || (sendQueue.getNetworkManager() instanceof LANClientNetworkManager)) ~ && message.startsWith("/eagskull")) { ~ this.mc.eagskullCommand.openFileChooser(); ~ } else { +~ ModData event = new ModData(); +~ event.set("message", message); +~ event.set("preventDefault", false); +~ BaseData newEvent = mc.modapi.callEvent("sendchatmessage", event); +~ if (newEvent.has("preventDefault") && newEvent.getBoolean("preventDefault")) { +~ return; +~ } +~ message = newEvent.has("message") ? newEvent.getString("message") : message; ~ this.sendQueue.addToSendQueue(new C01PacketChatMessage(message)); ~ } diff --git a/patches/minecraft/net/minecraft/client/settings/GameSettings.edit.java b/patches/minecraft/net/minecraft/client/settings/GameSettings.edit.java index b559f18..b511ece 100644 --- a/patches/minecraft/net/minecraft/client/settings/GameSettings.edit.java +++ b/patches/minecraft/net/minecraft/client/settings/GameSettings.edit.java @@ -15,9 +15,11 @@ > DELETE 1 @ 1 : 3 -> INSERT 3 : 25 @ 3 +> INSERT 3 : 27 @ 3 + ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; + import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager; + import net.minecraft.nbt.CompressedStreamTools; + import net.minecraft.nbt.NBTTagCompound; @@ -44,7 +46,11 @@ > DELETE 5 @ 5 : 11 -> DELETE 3 @ 3 : 8 +> CHANGE 1 : 2 @ 1 : 2 + +~ public class GameSettings extends ModData { + +> DELETE 1 @ 1 : 6 > DELETE 1 @ 1 : 9 @@ -129,7 +135,170 @@ ~ this.renderDistanceChunks = 4; -> DELETE 3 @ 3 : 18 +> CHANGE 3 : 75 @ 3 : 16 + +~ public void loadModData(BaseData data) { +~ mouseSensitivity = data.getFloat("mouseSensitivity"); +~ invertMouse = data.getBoolean("invertMouse"); +~ renderDistanceChunks = data.getInt("renderDistanceChunks"); +~ viewBobbing = data.getBoolean("viewBobbing"); +~ anaglyph = data.getBoolean("anaglyph"); +~ fboEnable = data.getBoolean("fboEnable"); +~ limitFramerate = data.getInt("limitFramerate"); +~ clouds = data.getInt("clouds"); +~ +~ fancyGraphics = data.getBoolean("fancyGraphics"); +~ ambientOcclusion = data.getInt("ambientOcclusion"); +~ chatVisibility = EntityPlayer.EnumChatVisibility.valueOf(data.getString("chatVisibility")); +~ chatColours = data.getBoolean("chatColours"); +~ chatLinks = data.getBoolean("chatLinks"); +~ chatLinksPrompt = data.getBoolean("chatLinksPrompt"); +~ chatOpacity = data.getFloat("chatOpacity"); +~ enableVsync = data.getBoolean("enableVsync"); +~ snooperEnabled = data.getBoolean("snooperEnabled"); +~ +~ allowBlockAlternatives = data.getBoolean("allowBlockAlternatives"); +~ reducedDebugInfo = data.getBoolean("reducedDebugInfo"); +~ hideServerAddress = data.getBoolean("hideServerAddress"); +~ pauseOnLostFocus = data.getBoolean("pauseOnLostFocus"); +~ touchscreen = data.getBoolean("touchscreen"); +~ overrideWidth = data.getInt("overrideWidth"); +~ overrideHeight = data.getInt("overrideHeight"); +~ heldItemTooltips = data.getBoolean("heldItemTooltips"); +~ chatScale = data.getFloat("chatScale"); +~ chatWidth = data.getFloat("chatWidth"); +~ +~ chatHeightUnfocused = data.getFloat("chatHeightUnfocused"); +~ chatHeightFocused = data.getFloat("chatHeightFocused"); +~ fovSetting = data.getFloat("fovSetting"); +~ gammaSetting = data.getFloat("gammaSetting"); +~ saturation = data.getFloat("saturation"); +~ +~ guiScale = data.getInt("guiScale"); +~ fxaa = data.getInt("fxaa"); +~ particleSetting = data.getInt("particleSetting"); +~ +~ thirdPersonView = data.getInt("thirdPersonView"); +~ mipmapLevels = data.getInt("mipmapLevels"); +~ +~ forceUnicodeFont = data.getBoolean("forceUnicodeFont"); +~ hudFps = data.getBoolean("hudFps"); +~ hudCoords = data.getBoolean("hudCoords"); +~ hudPlayer = data.getBoolean("hudPlayer"); +~ hudWorld = data.getBoolean("hudWorld"); +~ hudStats = data.getBoolean("hudStats"); +~ hud24h = data.getBoolean("hud24h"); +~ chunkFix = data.getBoolean("chunkFix"); +~ fog = data.getBoolean("fog"); +~ +~ hideGUI = data.getBoolean("hideGUI"); +~ smoothCamera = data.getBoolean("smoothCamera"); +~ debugCamEnable = data.getBoolean("debugCamEnable"); +~ showDebugInfo = data.getBoolean("showDebugInfo"); +~ showDebugProfilerChart = data.getBoolean("showDebugProfilerChart"); +~ showInventoryAchievementHint = data.getBoolean("showInventoryAchievementHint"); +~ +~ difficulty = EnumDifficulty.valueOf(data.getString("difficulty")); +~ +~ lastServer = data.getString("lastServer"); +~ language = data.getString("language"); +~ +~ BaseData[] parBaseDatas = data.getBaseDataArr("keyBindings"); +~ for (int i = 0; i < keyBindings.length; i++) { +~ if (keyBindings[i] != null && parBaseDatas[i] != null) { +~ keyBindings[i].loadModData(parBaseDatas[i]); +~ } +~ } + +> INSERT 2 : 89 @ 2 + ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ ++ ModData[] parModDatas = new ModData[keyBindings.length]; ++ for (int i = 0; i < keyBindings.length; i++) { ++ if (keyBindings[i] != null) { ++ parModDatas[i] = keyBindings[i].makeModData(); ++ } ++ } ++ ++ data.set("keyBindings", parModDatas); ++ ++ data.set("mouseSensitivity", mouseSensitivity); ++ data.set("invertMouse", invertMouse); ++ data.set("renderDistanceChunks", renderDistanceChunks); ++ data.set("viewBobbing", viewBobbing); ++ data.set("anaglyph", anaglyph); ++ data.set("fboEnable", fboEnable); ++ data.set("limitFramerate", limitFramerate); ++ data.set("clouds", clouds); ++ ++ data.set("fancyGraphics", fancyGraphics); ++ data.set("ambientOcclusion", ambientOcclusion); ++ data.set("chatVisibility", chatVisibility.name()); ++ data.set("chatColours", chatColours); ++ data.set("chatLinks", chatLinks); ++ data.set("chatLinksPrompt", chatLinksPrompt); ++ data.set("chatOpacity", chatOpacity); ++ data.set("snooperEnabled", snooperEnabled); ++ data.set("enableVsync", enableVsync); ++ ++ data.set("allowBlockAlternatives", allowBlockAlternatives); ++ data.set("reducedDebugInfo", reducedDebugInfo); ++ data.set("hideServerAddress", hideServerAddress); ++ data.set("advancedItemTooltips", advancedItemTooltips); ++ data.set("pauseOnLostFocus", pauseOnLostFocus); ++ data.set("touchscreen", touchscreen); ++ data.set("overrideWidth", overrideWidth); ++ data.set("overrideHeight", overrideHeight); ++ data.set("heldItemTooltips", heldItemTooltips); ++ data.set("chatScale", chatScale); ++ data.set("chatWidth", chatWidth); ++ ++ data.set("chatHeightUnfocused", chatHeightUnfocused); ++ data.set("chatHeightFocused", chatHeightFocused); ++ data.set("fovSetting", fovSetting); ++ data.set("gammaSetting", gammaSetting); ++ data.set("saturation", saturation); ++ ++ data.set("guiScale", guiScale); ++ data.set("fxaa", fxaa); ++ data.set("particleSetting", particleSetting); ++ data.set("thirdPersonView", thirdPersonView); ++ data.set("mipmapLevels", mipmapLevels); ++ ++ data.set("forceUnicodeFont", forceUnicodeFont); ++ data.set("hudFps", hudFps); ++ data.set("hudCoords", hudCoords); ++ data.set("hudPlayer", hudPlayer); ++ data.set("hudWorld", hudWorld); ++ data.set("hudStats", hudStats); ++ data.set("hud24h", hud24h); ++ data.set("chunkFix", chunkFix); ++ data.set("fog", fog); ++ data.set("hideGUI", hideGUI); ++ data.set("smoothCamera", smoothCamera); ++ data.set("debugCamEnable", debugCamEnable); ++ data.set("showDebugInfo", showDebugInfo); ++ data.set("showDebugProfilerChart", showDebugProfilerChart); ++ data.set("showInventoryAchievementHint", showInventoryAchievementHint); ++ ++ data.set("difficulty", difficulty.name()); ++ ++ data.set("lastServer", lastServer); ++ data.set("language", language); ++ ++ return data; ++ } ++ > CHANGE 3 : 4 @ 3 : 4 diff --git a/patches/minecraft/net/minecraft/client/settings/KeyBinding.edit.java b/patches/minecraft/net/minecraft/client/settings/KeyBinding.edit.java index 21b9131..850e123 100644 --- a/patches/minecraft/net/minecraft/client/settings/KeyBinding.edit.java +++ b/patches/minecraft/net/minecraft/client/settings/KeyBinding.edit.java @@ -7,11 +7,75 @@ > DELETE 2 @ 2 : 4 -> INSERT 2 : 6 @ 2 +> INSERT 2 : 8 @ 2 + + import com.google.common.collect.Lists; + import com.google.common.collect.Sets; + ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; + +> CHANGE 3 : 4 @ 3 : 4 + +~ public class KeyBinding extends ModData implements Comparable { + +> INSERT 60 : 115 @ 60 + ++ public void loadModData(BaseData data) { ++ keyCode = data.getInt("keyCode"); ++ pressed = data.getBoolean("pressed"); ++ pressTime = data.getInt("pressTime"); ++ ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ ++ data.set("keyCode", keyCode); ++ data.set("pressed", pressed); ++ data.set("pressTime", pressTime); ++ data.set("keyDescription", keyDescription); ++ data.set("keyCategory", keyCategory); ++ ++ data.setCallbackBoolean("isKeyDown", () -> { ++ return isKeyDown(); ++ }); ++ ++ data.setCallbackString("getKeyCategory", () -> { ++ return getKeyCategory(); ++ }); ++ ++ data.setCallbackBoolean("isPressed", () -> { ++ return isPressed(); ++ }); ++ ++ data.setCallbackVoid("unpressKey", () -> { ++ unpressKey(); ++ }); ++ ++ data.setCallbackString("getKeyDescription", () -> { ++ return getKeyDescription(); ++ }); ++ ++ data.setCallbackInt("getKeyCodeDefault", () -> { ++ return getKeyCodeDefault(); ++ }); ++ ++ data.setCallbackInt("getKeyCode", () -> { ++ return getKeyCode(); ++ }); ++ ++ return data; ++ } ++ > EOF diff --git a/patches/minecraft/net/minecraft/enchantment/Enchantment.edit.java b/patches/minecraft/net/minecraft/enchantment/Enchantment.edit.java index ff27385..f0025f7 100644 --- a/patches/minecraft/net/minecraft/enchantment/Enchantment.edit.java +++ b/patches/minecraft/net/minecraft/enchantment/Enchantment.edit.java @@ -7,11 +7,54 @@ > DELETE 2 @ 2 : 4 -> CHANGE 3 : 7 @ 3 : 21 +> CHANGE 3 : 9 @ 3 : 21 ~ ~ import com.google.common.collect.Lists; ~ import com.google.common.collect.Maps; ~ +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; + +> CHANGE 8 : 9 @ 8 : 9 + +~ public abstract class Enchantment extends ModData { + +> CHANGE 41 : 42 @ 41 : 42 + +~ private int weight; + +> INSERT 19 : 49 @ 19 + ++ public void loadModData(BaseData data) { ++ weight = data.getInt("weight"); ++ name = data.getString("name"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.set("enchID", effectId); ++ data.set("weight", weight); ++ data.set("name", name); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ return data; ++ } ++ ++ public static ModData makeModDataStatic() { ++ ModData data = new ModData(); ++ Map enchMap = locationEnchantments; ++ for (Map.Entry entry : enchMap.entrySet()) { ++ if (entry.getKey().resourceName != null && entry.getValue() != null) { ++ data.set(entry.getKey().resourceName, entry.getValue().makeModData()); ++ } ++ } ++ return data; ++ } ++ > EOF diff --git a/patches/minecraft/net/minecraft/entity/Entity.edit.java b/patches/minecraft/net/minecraft/entity/Entity.edit.java index 9f44834..a599c14 100644 --- a/patches/minecraft/net/minecraft/entity/Entity.edit.java +++ b/patches/minecraft/net/minecraft/entity/Entity.edit.java @@ -5,8 +5,11 @@ # Version: 1.0 # Author: lax1dude -> CHANGE 3 : 8 @ 3 : 5 +> CHANGE 3 : 11 @ 3 : 5 +~ +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; ~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; ~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; ~ import net.lax1dude.eaglercraft.v1_8.HString; @@ -23,7 +26,15 @@ > DELETE 6 @ 6 : 9 -> CHANGE 74 : 75 @ 74 : 75 +> CHANGE 8 : 9 @ 8 : 12 + +~ import net.minecraft.nbt.*; + +> CHANGE 17 : 18 @ 17 : 18 + +~ public abstract class Entity extends ModData implements ICommandSender { + +> CHANGE 44 : 45 @ 44 : 45 ~ protected EaglercraftRandom rand; @@ -75,7 +86,380 @@ ~ for (AxisAlignedBB axisalignedbb12 : (List) list) { -> CHANGE 651 : 653 @ 651 : 652 +> INSERT 233 : 603 @ 233 + ++ public void loadModData(BaseData data) { ++ posX = data.getDouble("x"); ++ posY = data.getDouble("y"); ++ posZ = data.getDouble("z"); ++ motionX = data.getDouble("motionX"); ++ motionY = data.getDouble("motionY"); ++ motionZ = data.getDouble("motionZ"); ++ rotationYaw = data.getFloat("yaw"); ++ rotationPitch = data.getFloat("pitch"); ++ isInWeb = data.getBoolean("isInWeb"); ++ onGround = data.getBoolean("onGround"); ++ noClip = data.getBoolean("noClip"); ++ stepHeight = data.getFloat("stepHeight"); ++ isCollided = data.getBoolean("isCollided"); ++ isCollidedHorizontally = data.getBoolean("isCollidedHorizontally"); ++ isCollidedVertically = data.getBoolean("isCollidedVertically"); ++ inPortal = data.getBoolean("inPortal"); ++ inWater = data.getBoolean("inWater"); ++ isAirBorne = data.getBoolean("isAirBorne"); ++ invulnerable = data.getBoolean("invulnerable"); ++ isImmuneToFire = data.getBoolean("isImmuneToFire"); ++ isOutsideBorder = data.getBoolean("isOutsideBorder"); ++ entityCollisionReduction = data.getFloat("entityCollisionReduction"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.set("x", posX); ++ data.set("y", posY); ++ data.set("z", posZ); ++ data.set("chunkCoordX", chunkCoordX); ++ data.set("chunkCoordY", chunkCoordY); ++ data.set("chunkCoordZ", chunkCoordZ); ++ data.set("motionX", motionX); ++ data.set("motionY", motionY); ++ data.set("motionZ", motionZ); ++ data.set("yaw", rotationYaw); ++ data.set("pitch", rotationPitch); ++ data.set("isInWeb", isInWeb); ++ data.set("isCollided", isCollided); ++ data.set("isCollidedVertically", isCollidedVertically); ++ data.set("isCollidedHorizontally", isCollidedHorizontally); ++ data.set("onGround", onGround); ++ data.set("dimension", dimension); ++ data.set("id", entityId); ++ data.set("fallDistance", fallDistance); ++ data.set("noClip", noClip); ++ data.set("stepHeight", stepHeight); ++ data.set("isDead", isDead); ++ data.set("inPortal", inPortal); ++ data.set("inWater", inWater); ++ data.set("isAirBorne", isAirBorne); ++ data.set("ticksExisted", ticksExisted); ++ data.set("invulnerable", invulnerable); ++ data.set("isImmuneToFire", isImmuneToFire); ++ data.set("isOutsideBorder", isOutsideBorder); ++ data.set("entityCollisionReduction", entityCollisionReduction); ++ data.set("ticksExisted", ticksExisted); ++ ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ ++ data.setCallbackBoolean("isBurning", () -> { ++ /** ++ * + Returns true if the entity is on fire. Used by render to add the fire ++ * effect on rendering. ++ */ ++ return isBurning(); ++ }); ++ data.setCallbackBoolean("isPushedByWater", () -> { ++ return isPushedByWater(); ++ }); ++ data.setCallbackBoolean("isEating", () -> { ++ return isEating(); ++ }); ++ data.setCallbackBoolean("isEntityAlive", () -> { ++ /** ++ * + Checks whether target entity is alive. ++ */ ++ return isEntityAlive(); ++ }); ++ data.setCallbackBoolean("isEntityInsideOpaqueBlock", () -> { ++ /** ++ * + Checks if this entity is inside of an opaque block ++ */ ++ return isEntityInsideOpaqueBlock(); ++ }); ++ data.setCallbackBoolean("isImmuneToExplosions", () -> { ++ return isImmuneToExplosions(); ++ }); ++ data.setCallbackBoolean("isImmuneToFire", () -> { ++ return isImmuneToFire(); ++ }); ++ data.setCallbackBoolean("isInLava", () -> { ++ return isInLava(); ++ }); ++ data.setCallbackBooleanWithDataArg("isInRangeToRender3d", (BaseData params) -> { ++ return isInRangeToRender3d(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")); ++ }); ++ data.setCallbackBooleanWithDataArg("isInRangeToRenderDist", (BaseData params) -> { ++ /** ++ * + Checks if the entity is in range to render by using the past in distance ++ * and comparing it to its average edge length * 64 * renderDistanceWeight Args: ++ * distance ++ */ ++ return isInRangeToRenderDist(params.getDouble("distance")); ++ }); ++ data.setCallbackBoolean("isInWater", () -> { ++ /** ++ * + Checks if this entity is inside water (if inWater field is true as a result ++ * of handleWaterMovement() returning true) ++ */ ++ return isInWater(); ++ }); ++ data.setCallbackBoolean("isInvisible", () -> { ++ return isInvisible(); ++ }); ++ data.setCallbackBoolean("isPushedByWater", () -> { ++ return isPushedByWater(); ++ }); ++ data.setCallbackBoolean("isRiding", () -> { ++ /** ++ * + Returns true if the entity is riding another entity, used by render to ++ * rotate the legs to be in 'sit' position for players. ++ */ ++ return isRiding(); ++ }); ++ data.setCallbackBoolean("isSilent", () -> { ++ /** ++ * + ++ * ++ * @return True if this entity will not play sounds ++ */ ++ return isSilent(); ++ }); ++ data.setCallbackBoolean("isSneaking", () -> { ++ /** ++ * + Returns if this entity is sneaking. ++ */ ++ return isSneaking(); ++ }); ++ data.setCallbackBoolean("isSprinting", () -> { ++ /** ++ * + Get if the Entity is sprinting. ++ */ ++ return isSprinting(); ++ }); ++ data.setCallbackBoolean("isWet", () -> { ++ /** ++ * + Checks if this entity is either in water or on an open air block in rain ++ * (used in wolves). ++ */ ++ return isWet(); ++ }); ++ ++ data.setCallbackVoidWithDataArg("setAir", (BaseData params) -> { ++ setAir(params.getInt("air")); ++ }); ++ data.setCallbackVoidWithDataArg("setAlwaysRenderNameTag", (BaseData params) -> { ++ setAlwaysRenderNameTag(params.getBoolean("alwaysRenderNameTag")); ++ }); ++ data.setCallbackVoidWithDataArg("setAngles", (BaseData params) -> { ++ setAngles(params.getFloat("yaw"), params.getFloat("pitch")); ++ }); ++ data.setCallbackVoid("setBeenAttacked", () -> { ++ setBeenAttacked(); ++ }); ++ data.setCallbackVoidWithDataArg("setCustomNameTag", (BaseData params) -> { ++ setCustomNameTag(params.getString("name")); ++ }); ++ data.setCallbackVoid("setDead", () -> { ++ setDead(); ++ }); ++ data.setCallbackVoidWithDataArg("setEating", (BaseData params) -> { ++ setEating(params.getBoolean("eating")); ++ }); ++ data.setCallbackVoidWithDataArg("setEntityId", (BaseData params) -> { ++ setEntityId(params.getInt("id")); ++ }); ++ data.setCallbackVoidWithDataArg("setFire", (BaseData params) -> { ++ setFire(params.getInt("seconds")); ++ }); ++ data.setCallbackVoidWithDataArg("setFlag", (BaseData params) -> { ++ setFlag(params.getInt("flag"), params.getBoolean("set")); ++ }); ++ data.setCallbackVoid("setInWeb", () -> { ++ setInWeb(); ++ }); ++ data.setCallbackVoidWithDataArg("setInvisible", (BaseData params) -> { ++ setInvisible(params.getBoolean("invisible")); ++ }); ++ data.setCallbackVoidWithDataArg("setLocationAndAngles", (BaseData params) -> { ++ setLocationAndAngles(params.getDouble("x"), params.getDouble("y"), params.getDouble("z"), ++ params.getFloat("yaw"), params.getFloat("pitch")); ++ }); ++ data.setCallbackVoid("setOnFireFromLava", () -> { ++ setOnFireFromLava(); ++ }); ++ data.setCallbackVoidWithDataArg("setOutsideBorder", (BaseData params) -> { ++ setOutsideBorder(params.getBoolean("outsideBorder")); ++ }); ++ data.setCallbackVoidWithDataArg("setPosition", (BaseData params) -> { ++ setPosition(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")); ++ }); ++ data.setCallbackVoidWithDataArg("setPositionAndRotation", (BaseData params) -> { ++ setPositionAndRotation(params.getDouble("x"), params.getDouble("y"), params.getDouble("z"), ++ params.getFloat("yaw"), params.getFloat("pitch")); ++ }); ++ data.setCallbackVoidWithDataArg("setPositionAndRotation2", (BaseData params) -> { ++ setPositionAndRotation2(params.getDouble("d0"), params.getDouble("d1"), params.getDouble("d2"), ++ params.getFloat("f"), params.getFloat("f1"), params.getInt("var9"), params.getBoolean("var10")); ++ }); ++ data.setCallbackVoidWithDataArg("setPositionAndUpdate", (BaseData params) -> { ++ setPositionAndUpdate(params.getDouble("d0"), params.getDouble("d1"), params.getDouble("d2")); ++ }); ++ data.setCallbackVoidWithDataArg("setRotation", (BaseData params) -> { ++ setRotation(params.getFloat("yaw"), params.getFloat("pitch")); ++ }); ++ data.setCallbackVoidWithDataArg("setRotationYawHead", (BaseData params) -> { ++ setRotationYawHead(params.getFloat("rotation")); ++ }); ++ data.setCallbackVoidWithDataArg("setSilent", (BaseData params) -> { ++ setSilent(params.getBoolean("isSilent")); ++ }); ++ data.setCallbackVoidWithDataArg("setSize", (BaseData params) -> { ++ setSize(params.getFloat("f"), params.getFloat("f1")); ++ }); ++ data.setCallbackVoidWithDataArg("setSneaking", (BaseData params) -> { ++ setSneaking(params.getBoolean("sneaking")); ++ }); ++ data.setCallbackVoidWithDataArg("setSprinting", (BaseData params) -> { ++ setSprinting(params.getBoolean("flag")); ++ }); ++ data.setCallbackVoidWithDataArg("setVelocity", (BaseData params) -> { ++ setVelocity(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")); ++ }); ++ ++ // Todo: add other getters and other functions. When I get told to! hahhahahah ++ data.setCallbackString("getUUID", () -> { ++ return entityUniqueID.toString(); ++ }); ++ ++ data.setCallbackInt("getAir", () -> { ++ return getAir(); ++ }); ++ data.setCallbackBoolean("getAlwaysRenderNameTag", () -> { ++ return getAlwaysRenderNameTag(); ++ }); ++ data.setCallbackBoolean("getAlwaysRenderNameTagForRender", () -> { ++ return getAlwaysRenderNameTagForRender(); ++ }); ++ data.setCallbackFloatWithDataArg("getBrightness", (BaseData params) -> { ++ return getBrightness(params.getFloat("var1")); ++ }); ++ data.setCallbackIntWithDataArg("getBrightnessForRender", (BaseData params) -> { ++ return getBrightnessForRender(params.getFloat("var1")); ++ }); ++ data.setCallbackFloat("getCollisionBorderSize", () -> { ++ return getCollisionBorderSize(); ++ }); ++ data.setCallbackObject("getCollisionBoundingBox", () -> { ++ return getCollisionBoundingBox().makeModData(); ++ }); ++ data.setCallbackObject("getCommandSenderEntity", () -> { ++ return getCommandSenderEntity().makeModData(); ++ }); ++ data.setCallbackString("getCustomNameTag", () -> { ++ return getCustomNameTag(); ++ }); ++ data.setCallbackString("getDisplayName", () -> { ++ return getDisplayName().getUnformattedText(); ++ }); ++ data.setCallbackString("getDisplayNameFormatted", () -> { ++ return getDisplayName().getFormattedText(); ++ }); ++ data.setCallbackDoubleWithDataArg("getDistance", (BaseData params) -> { ++ return getDistance(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")); ++ }); ++ data.setCallbackDoubleWithDataArg("getDistanceSq", (BaseData params) -> { ++ return getDistanceSq(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")); ++ }); ++ data.setCallbackDouble("getMountedYOffset", () -> { ++ return getMountedYOffset(); ++ }); ++ data.setCallbackInt("getEntityId", () -> { ++ return getEntityId(); ++ }); ++ data.setCallbackString("getEntityString", () -> { ++ return getEntityString(); ++ }); ++ data.setCallbackFloat("getEyeHeight", () -> { ++ return getEyeHeight(); ++ }); ++ data.setCallbackBooleanWithDataArg("getFlag", (BaseData params) -> { ++ return getFlag(params.getInt("flag")); ++ }); ++ data.setCallbackInt("getMaxFallHeight", () -> { ++ return getMaxFallHeight(); ++ }); ++ data.setCallbackInt("getMaxInPortalTime", () -> { ++ return getMaxInPortalTime(); ++ }); ++ data.setCallbackString("getName", () -> { ++ return getName(); ++ }); ++ data.setCallbackObjectArr("getParts", () -> { ++ Entity[] entityArr = getParts(); ++ ModData[] arr = new ModData[entityArr.length]; ++ for (int i = 0; i < entityArr.length; i++) { ++ if (entityArr[i] != null) { ++ arr[i] = entityArr[i].makeModData(); ++ } else { ++ arr[i] = new ModData(); ++ } ++ } ++ return arr; ++ }); ++ data.setCallbackInt("getPortalCooldown", () -> { ++ return getPortalCooldown(); ++ }); ++ data.setCallbackFloat("getRotationYawHead", () -> { ++ return getRotationYawHead(); ++ }); ++ data.setCallbackString("getSplashSound", () -> { ++ return getSplashSound(); ++ }); ++ data.setCallbackString("getSwimSound", () -> { ++ return getSwimSound(); ++ }); ++ data.setCallbackDouble("getYOffset", () -> { ++ return getYOffset(); ++ }); ++ data.setCallbackString("getClassName", () -> { ++ return getClass().getSimpleName(); ++ }); ++ data.setCallbackObject("getPositionVector", () -> { ++ return getPositionVector().makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("getPositionEyes", (BaseData params) -> { ++ return getPositionEyes(params.getFloat("partialTicks")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("getLook", (BaseData params) -> { ++ return getLook(params.getFloat("partialTicks")).makeModData(); ++ }); ++ data.setCallbackObject("getLookVec", () -> { ++ return getLookVec().makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("getVectorForRotation", (BaseData params) -> { ++ return getVectorForRotation(params.getFloat("yaw"), params.getFloat("pitch")).makeModData(); ++ }); ++ data.setCallbackString("getSplashSound", () -> { ++ return getSplashSound(); ++ }); ++ data.setCallbackString("getSwimSound", () -> { ++ return getSwimSound(); ++ }); ++ data.setCallbackString("toNBT", () -> { ++ return toNBT(); ++ }); ++ data.setCallbackVoidWithDataArg("fromNBT", (BaseData params) -> { ++ fromNBT(params.getString("nbt")); ++ }); ++ return data; ++ } ++ + +> CHANGE 418 : 420 @ 418 : 419 ~ this.entityUniqueID = new EaglercraftUUID(tagCompund.getLong("UUIDMost"), ~ tagCompund.getLong("UUIDLeast")); @@ -92,7 +476,25 @@ ~ return HString.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", -> CHANGE 121 : 122 @ 121 : 122 +> INSERT 24 : 39 @ 24 + ++ public String toNBT() { ++ NBTTagCompound nbt = new NBTTagCompound(); ++ writeToNBT(nbt); ++ return nbt.toString(); ++ } ++ ++ public void fromNBT(String nbt) { ++ try { ++ NBTTagCompound nbtParsed = JsonToNBT.getTagFromJson(nbt); ++ this.readFromNBT(nbtParsed); ++ } catch (Exception e) { ++ // Swallowing the error! ++ } ++ } ++ + +> CHANGE 97 : 98 @ 97 : 98 ~ public EaglercraftUUID getUniqueID() { diff --git a/patches/minecraft/net/minecraft/entity/EntityLivingBase.edit.java b/patches/minecraft/net/minecraft/entity/EntityLivingBase.edit.java index 1b184af..172d406 100644 --- a/patches/minecraft/net/minecraft/entity/EntityLivingBase.edit.java +++ b/patches/minecraft/net/minecraft/entity/EntityLivingBase.edit.java @@ -9,8 +9,11 @@ + -> CHANGE 4 : 6 @ 4 : 6 +> CHANGE 4 : 9 @ 4 : 6 +~ +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; ~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; ~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; @@ -25,7 +28,315 @@ ~ private static final EaglercraftUUID sprintingSpeedBoostModifierUUID = EaglercraftUUID ~ .fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D"); -> CHANGE 264 : 265 @ 264 : 265 +> INSERT 75 : 380 @ 75 + ++ @Override ++ public void loadModData(BaseData data) { ++ super.loadModData(data); ++ isSwingInProgress = data.getBoolean("isSwingInProgress"); ++ arrowHitTimer = data.getInt("arrowHitTimer"); ++ hurtTime = data.getInt("hurtTime"); ++ maxHurtTime = data.getInt("maxHurtTime"); ++ swingProgressInt = data.getInt("swingProgressInt"); ++ attackedAtYaw = data.getFloat("attackedAtYaw"); ++ deathTime = data.getInt("deathTime"); ++ ++ prevSwingProgress = data.getFloat("prevSwingProgress"); ++ swingProgress = data.getFloat("swingProgress"); ++ prevLimbSwingAmount = data.getFloat("prevLimbSwingAmount"); ++ limbSwingAmount = data.getFloat("limbSwingAmount"); ++ limbSwing = data.getFloat("limbSwing"); ++ maxHurtResistantTime = data.getInt("maxHurtResistantTime"); ++ prevCameraPitch = data.getFloat("prevCameraPitch"); ++ cameraPitch = data.getFloat("cameraPitch"); ++ renderYawOffset = data.getFloat("renderYawOffset"); ++ prevRenderYawOffset = data.getFloat("prevRenderYawOffset"); ++ rotationYawHead = data.getFloat("rotationYawHead"); ++ prevRotationYawHead = data.getFloat("prevRotationYawHead"); ++ jumpMovementFactor = data.getFloat("jumpMovementFactor"); ++ ++ recentlyHit = data.getInt("recentlyHit"); ++ dead = data.getBoolean("dead"); ++ entityAge = data.getInt("entityAge"); ++ onGroundSpeedFactor = data.getFloat("onGroundSpeedFactor"); ++ prevOnGroundSpeedFactor = data.getFloat("prevOnGroundSpeedFactor"); ++ movedDistance = data.getFloat("movedDistance"); ++ prevMovedDistance = data.getFloat("prevMovedDistance"); ++ scoreValue = data.getInt("scoreValue"); ++ lastDamage = data.getFloat("lastDamage"); ++ isJumping = data.getBoolean("isJumping"); ++ ++ moveForward = data.getFloat("moveForward"); ++ moveStrafing = data.getFloat("moveStrafing"); ++ randomYawVelocity = data.getFloat("randomYawVelocity"); ++ newPosRotationIncrements = data.getInt("newPosRotationIncrements"); ++ newPosX = data.getDouble("newPosX"); ++ newPosY = data.getDouble("newPosY"); ++ newPosZ = data.getDouble("newPosZ"); ++ newRotationPitch = data.getDouble("newRotationPitch"); ++ newRotationYaw = data.getDouble("newRotationYaw"); ++ revengeTimer = data.getInt("revengeTimer"); ++ lastAttackerTime = data.getInt("lastAttackerTime"); ++ landMovementFactor = data.getFloat("landMovementFactor"); ++ jumpTicks = data.getInt("jumpTicks"); ++ absorptionAmount = data.getFloat("absorptionAmount"); ++ } ++ ++ @Override ++ public ModData makeModData() { ++ ModData data = super.makeModData(); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.setCallbackObjectArr("getPreviousEquipment", () -> { ++ ModData[] itemstackBaseDatas = new ModData[previousEquipment.length]; ++ for (int i = 0; i < previousEquipment.length; i++) { ++ if (previousEquipment[i] != null) { ++ itemstackBaseDatas[i] = previousEquipment[i].makeModData(); ++ } ++ } ++ return itemstackBaseDatas; ++ }); ++ data.setCallbackObject("getAttackingPlayer", () -> { ++ if (attackingPlayer != null) { ++ return attackingPlayer.makeModData(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackObject("getLastAttacker", () -> { ++ if (lastAttacker != null) { ++ return lastAttacker.makeModData(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackObject("getEntityLivingToAttack", () -> { ++ if (entityLivingToAttack != null) { ++ return entityLivingToAttack.makeModData(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackVoidWithDataArg("setEntityLivingToAttack", (BaseData params) -> { ++ if (params.getBaseData("entity") instanceof EntityLivingBase) { ++ entityLivingToAttack = (EntityLivingBase) params.getBaseData("entity"); ++ } ++ }); ++ data.set("isSwingInProgress", isSwingInProgress); ++ data.set("arrowHitTimer", arrowHitTimer); ++ data.set("hurtTime", hurtTime); ++ data.set("maxHurtTime", maxHurtTime); ++ data.set("swingProgressInt", swingProgressInt); ++ data.set("attackedAtYaw", attackedAtYaw); ++ data.set("deathTime", deathTime); ++ ++ data.set("prevSwingProgress", prevSwingProgress); ++ data.set("swingProgress", swingProgress); ++ data.set("prevLimbSwingAmount", prevLimbSwingAmount); ++ data.set("limbSwingAmount", limbSwingAmount); ++ data.set("limbSwing", limbSwing); ++ data.set("maxHurtResistantTime", maxHurtResistantTime); ++ ++ data.set("prevCameraPitch", prevCameraPitch); ++ data.set("cameraPitch", cameraPitch); ++ data.set("renderYawOffset", renderYawOffset); ++ data.set("prevRenderYawOffset", prevRenderYawOffset); ++ data.set("rotationYawHead", rotationYawHead); ++ data.set("prevRotationYawHead", prevRotationYawHead); ++ data.set("jumpMovementFactor", jumpMovementFactor); ++ ++ data.set("recentlyHit", recentlyHit); ++ data.set("dead", dead); ++ data.set("entityAge", entityAge); ++ data.set("onGroundSpeedFactor", onGroundSpeedFactor); ++ data.set("movedDistance", movedDistance); ++ data.set("prevOnGroundSpeedFactor", prevOnGroundSpeedFactor); ++ data.set("prevMovedDistance", prevMovedDistance); ++ data.set("scoreValue", scoreValue); ++ data.set("lastDamage", lastDamage); ++ data.set("isJumping", isJumping); ++ ++ data.set("moveForward", moveForward); ++ data.set("moveStrafing", moveStrafing); ++ data.set("randomYawVelocity", randomYawVelocity); ++ data.set("newPosRotationIncrements", newPosRotationIncrements); ++ data.set("newPosX", newPosX); ++ data.set("newPosY", newPosY); ++ data.set("newPosZ", newPosZ); ++ data.set("newRotationPitch", newRotationPitch); ++ data.set("newRotationYaw", newRotationYaw); ++ data.set("revengeTimer", revengeTimer); ++ data.set("lastAttackerTime", lastAttackerTime); ++ data.set("landMovementFactor", landMovementFactor); ++ data.set("jumpTicks", jumpTicks); ++ data.set("absorptionAmount", absorptionAmount); ++ ++ data.setCallbackBoolean("canBreatheUnderwater", () -> { ++ return canBreatheUnderwater(); ++ }); ++ data.setCallbackBoolean("isChild", () -> { ++ return isChild(); ++ }); ++ data.setCallbackBoolean("canDropLoot", () -> { ++ return canDropLoot(); ++ }); ++ data.setCallbackIntWithDataArg("decreaseAirSupply", (BaseData params) -> { ++ return decreaseAirSupply(params.getInt("parInt1")); ++ }); ++ data.setCallbackBoolean("isPlayer", () -> { ++ return isPlayer(); ++ }); ++ data.setCallbackObject("getAITarget", () -> { ++ return getAITarget().makeModData(); ++ }); ++ data.setCallbackInt("getRevengeTimer", () -> { ++ return getRevengeTimer(); ++ }); ++ data.setCallbackInt("getLastAttackerTime", () -> { ++ return getLastAttackerTime(); ++ }); ++ data.setCallbackInt("getAge", () -> { ++ return getAge(); ++ }); ++ data.setCallbackVoid("clearActivePotions", () -> { ++ clearActivePotions(); ++ }); ++ data.setCallbackBooleanWithDataArg("isPotionActive", (BaseData params) -> { ++ return isPotionActive(params.getInt("potionId")); ++ }); ++ data.setCallbackBoolean("isEntityUndead", () -> { ++ return isEntityUndead(); ++ }); ++ data.setCallbackVoidWithDataArg("removePotionEffectClient", (BaseData params) -> { ++ removePotionEffectClient(params.getInt("potionId")); ++ }); ++ data.setCallbackVoidWithDataArg("removePotionEffect", (BaseData params) -> { ++ removePotionEffect(params.getInt("potionId")); ++ }); ++ data.setCallbackVoidWithDataArg("heal", (BaseData params) -> { ++ heal(params.getFloat("f")); ++ }); ++ data.setCallbackFloat("getHealth", () -> { ++ return getHealth(); ++ }); ++ data.setCallbackVoidWithDataArg("setHealth", (BaseData params) -> { ++ setHealth(params.getFloat("health")); ++ }); ++ data.setCallbackString("getHurtSound", () -> { ++ return getHurtSound(); ++ }); ++ data.setCallbackString("getDeathSound", () -> { ++ return getDeathSound(); ++ }); ++ data.setCallbackVoid("addRandomDrop", () -> { ++ addRandomDrop(); ++ }); ++ data.setCallbackBoolean("isOnLadder", () -> { ++ return isOnLadder(); ++ }); ++ data.setCallbackBoolean("isEntityAlive", () -> { ++ return isEntityAlive(); ++ }); ++ data.setCallbackVoidWithDataArg("fall", (BaseData params) -> { ++ fall(params.getFloat("f"), params.getFloat("f1")); ++ }); ++ data.setCallbackStringWithDataArg("getFallSoundString", (BaseData params) -> { ++ return getFallSoundString(params.getInt("damageValue")); ++ }); ++ data.setCallbackVoid("performHurtAnimation", () -> { ++ performHurtAnimation(); ++ }); ++ data.setCallbackInt("getTotalArmorValue", () -> { ++ return getTotalArmorValue(); ++ }); ++ data.setCallbackVoidWithDataArg("damageArmor", (BaseData params) -> { ++ damageArmor(params.getFloat("parFloat1")); ++ }); ++ data.setCallbackFloat("getMaxHealth", () -> { ++ return getMaxHealth(); ++ }); ++ data.setCallbackInt("getArrowCountInEntity", () -> { ++ return getArrowCountInEntity(); ++ }); ++ data.setCallbackVoidWithDataArg("setArrowCountInEntity", (BaseData params) -> { ++ setArrowCountInEntity(params.getInt("count")); ++ }); ++ data.setCallbackVoid("swingItem", () -> { ++ swingItem(); ++ }); ++ data.setCallbackVoid("kill", () -> { ++ kill(); ++ }); ++ data.setCallbackVoidWithDataArg("setSprinting", (BaseData params) -> { ++ setSprinting(params.getBoolean("flag")); ++ }); ++ data.setCallbackFloat("getSoundVolume", () -> { ++ return getSoundVolume(); ++ }); ++ data.setCallbackFloat("getSoundPitch", () -> { ++ return getSoundPitch(); ++ }); ++ data.setCallbackBoolean("isMovementBlocked", () -> { ++ return isMovementBlocked(); ++ }); ++ data.setCallbackFloat("getJumpUpwardsMotion", () -> { ++ return getJumpUpwardsMotion(); ++ }); ++ data.setCallbackVoid("jump", () -> { ++ jump(); ++ }); ++ data.setCallbackVoid("updateAITick", () -> { ++ updateAITick(); ++ }); ++ data.setCallbackVoid("handleJumpLava", () -> { ++ handleJumpLava(); ++ }); ++ data.setCallbackFloat("getAIMoveSpeed", () -> { ++ return getAIMoveSpeed(); ++ }); ++ data.setCallbackVoidWithDataArg("setAIMoveSpeed", (BaseData params) -> { ++ setAIMoveSpeed(params.getFloat("speedIn")); ++ }); ++ data.setCallbackVoid("collideWithNearbyEntities", () -> { ++ collideWithNearbyEntities(); ++ }); ++ data.setCallbackVoidWithDataArg("setJumping", (BaseData params) -> { ++ setJumping(params.getBoolean("parFlag")); ++ }); ++ data.setCallbackBoolean("canBeCollidedWith", () -> { ++ return canBeCollidedWith(); ++ }); ++ data.setCallbackBoolean("canBePushed", () -> { ++ return canBePushed(); ++ }); ++ data.setCallbackVoid("setBeenAttacked", () -> { ++ setBeenAttacked(); ++ }); ++ data.setCallbackFloat("getRotationYawHead", () -> { ++ return getRotationYawHead(); ++ }); ++ data.setCallbackVoidWithDataArg("setRotationYawHead", (BaseData params) -> { ++ setRotationYawHead(params.getFloat("f")); ++ }); ++ data.setCallbackFloat("getAbsorptionAmount", () -> { ++ return getAbsorptionAmount(); ++ }); ++ data.setCallbackVoidWithDataArg("setAbsorptionAmount", (BaseData params) -> { ++ setAbsorptionAmount(params.getFloat("amount")); ++ }); ++ data.setCallbackVoid("markPotionsDirty", () -> { ++ markPotionsDirty(); ++ }); ++ ++ return data; ++ } ++ + +> CHANGE 189 : 190 @ 189 : 190 ~ public EaglercraftRandom getRNG() { diff --git a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.edit.java b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.edit.java index 0b50ac5..18e242f 100644 --- a/patches/minecraft/net/minecraft/entity/player/EntityPlayer.edit.java +++ b/patches/minecraft/net/minecraft/entity/player/EntityPlayer.edit.java @@ -5,8 +5,10 @@ # Version: 1.0 # Author: lax1dude -> CHANGE 4 : 6 @ 4 : 5 +> CHANGE 4 : 8 @ 4 : 5 +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; ~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile; ~ @@ -24,7 +26,426 @@ ~ public abstract class EntityPlayer extends EntityLivingBase implements ICommandSender { -> CHANGE 458 : 459 @ 458 : 459 +> INSERT 51 : 467 @ 51 + ++ @Override ++ public void loadModData(BaseData data) { ++ super.loadModData(data); ++ cameraYaw = data.getFloat("cameraYaw"); ++ chasingPosX = data.getDouble("chasingPosX"); ++ chasingPosY = data.getDouble("chasingPosY"); ++ chasingPosZ = data.getDouble("chasingPosZ"); ++ experience = data.getFloat("experience"); ++ experienceLevel = data.getInt("experienceLevel"); ++ experienceTotal = data.getInt("experienceTotal"); ++ if (fishEntity != null) { ++ fishEntity.loadModData(data.getBaseData("fishEntity")); ++ } ++ if (foodStats != null) { ++ foodStats.loadModData(data.getBaseData("foodStats")); ++ } ++ if (inventory != null) { ++ inventory.loadModData(data.getBaseData("inventory")); ++ } ++ flyToggleTimer = data.getInt("flyToggleTimer"); ++ hasReducedDebug = data.getBoolean("hasReducedDebug"); ++ lastXPSound = data.getInt("lastXPSound"); ++ sleepTimer = data.getInt("sleepTimer"); ++ sleeping = data.getBoolean("sleeping"); ++ spawnForced = data.getBoolean("spawnForced"); ++ speedInAir = data.getFloat("speedInAir"); ++ speedOnGround = data.getFloat("speedOnGround"); ++ xpCooldown = data.getInt("xpCooldown"); ++ xpSeed = data.getInt("xpSeed"); ++ if (itemInUse != null) { ++ itemInUse.loadModData(data.getBaseData("itemInUse")); ++ } ++ ++ if (inventoryContainer != null) { ++ inventoryContainer.loadModData(data.getBaseData("inventoryContainer")); ++ } ++ ++ if (openContainer != null) { ++ openContainer.loadModData(data.getBaseData("openContainer")); ++ } ++ if (capabilities != null) { ++ capabilities.loadModData(data.getBaseData("capabilities")); ++ } ++ } ++ ++ @Override ++ public ModData makeModData() { ++ ModData data = super.makeModData(); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.set("cameraYaw", cameraYaw); ++ data.set("chasingPosX", chasingPosX); ++ data.set("chasingPosY", chasingPosY); ++ data.set("chasingPosZ", chasingPosZ); ++ data.set("experience", experience); ++ data.set("experienceLevel", experienceLevel); ++ data.set("experienceTotal", experienceTotal); ++ if (fishEntity != null) { ++ data.set("fishEntity", fishEntity.makeModData()); ++ } ++ if (itemInUse != null) { ++ data.set("itemInUse", itemInUse.makeModData()); ++ } ++ if (foodStats != null) { ++ data.set("foodStats", foodStats.makeModData()); ++ } ++ data.set("flyToggleTimer", flyToggleTimer); ++ data.set("hasReducedDebug", hasReducedDebug); ++ data.set("itemInUseCount", itemInUseCount); ++ data.set("lastXPSound", lastXPSound); ++ data.set("sleepTimer", sleepTimer); ++ data.set("sleeping", sleeping); ++ data.set("spawnForced", spawnForced); ++ data.set("speedInAir", speedInAir); ++ data.set("speedOnGround", speedOnGround); ++ data.set("xpCooldown", xpCooldown); ++ data.set("xpSeed", xpSeed); ++ ++ if (inventoryContainer != null) { ++ data.set("inventoryContainer", inventoryContainer.makeModData()); ++ } ++ ++ if (openContainer != null) { ++ data.set("openContainer", openContainer.makeModData()); ++ } ++ if (inventory != null) { ++ data.set("inventory", inventory.makeModData()); ++ } ++ if (capabilities != null) { ++ data.set("capabilities", capabilities.makeModData()); ++ } ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ ++ // Todone: adding functions ++ ++ data.setCallbackObject("getItemInUse", () -> { ++ if (getItemInUse() != null) { ++ return getItemInUse().makeModData(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackInt("getItemInUseCount", () -> { ++ return getItemInUseCount(); ++ }); ++ data.setCallbackBoolean("isUsingItem", () -> { ++ return isUsingItem(); ++ }); ++ data.setCallbackInt("getItemInUseDuration", () -> { ++ return getItemInUseDuration(); ++ }); ++ data.setCallbackVoid("stopUsingItem", () -> { ++ stopUsingItem(); ++ }); ++ data.setCallbackVoid("clearItemInUse", () -> { ++ clearItemInUse(); ++ }); ++ data.setCallbackBoolean("isBlocking", () -> { ++ return isBlocking(); ++ }); ++ data.setCallbackInt("getMaxInPortalTime", () -> { ++ return getMaxInPortalTime(); ++ }); ++ data.setCallbackString("getSwimSound", () -> { ++ return getSwimSound(); ++ }); ++ data.setCallbackString("getSplashSound", () -> { ++ return getSplashSound(); ++ }); ++ data.setCallbackInt("getPortalCooldown", () -> { ++ return getPortalCooldown(); ++ }); ++ data.setCallbackVoidWithDataArg("playSound", (BaseData params) -> { ++ playSound(params.getString("s"), params.getFloat("f"), params.getFloat("f1")); ++ }); ++ data.setCallbackVoidWithDataArg("updateItemUse", (BaseData params) -> { ++ updateItemUse((ItemStack) params.getRef("itemStackIn"), params.getInt("parInt1")); ++ }); ++ data.setCallbackVoid("onItemUseFinish", () -> { ++ onItemUseFinish(); ++ }); ++ data.setCallbackVoidWithDataArg("handleStatusUpdate", (BaseData params) -> { ++ handleStatusUpdate(params.getByte("b0")); ++ }); ++ data.setCallbackBoolean("isMovementBlocked", () -> { ++ return isMovementBlocked(); ++ }); ++ data.setCallbackVoid("closeScreen", () -> { ++ closeScreen(); ++ }); ++ data.setCallbackVoid("updateRidden", () -> { ++ updateRidden(); ++ }); ++ data.setCallbackVoid("preparePlayerToSpawn", () -> { ++ preparePlayerToSpawn(); ++ }); ++ data.setCallbackVoid("updateEntityActionState", () -> { ++ updateEntityActionState(); ++ }); ++ data.setCallbackVoid("onLivingUpdate", () -> { ++ onLivingUpdate(); ++ }); ++ data.setCallbackVoidWithDataArg("collideWithPlayer", (BaseData params) -> { ++ collideWithPlayer((Entity) params.getRef("parEntity")); ++ }); ++ data.setCallbackInt("getScore", () -> { ++ return getScore(); ++ }); ++ data.setCallbackVoidWithDataArg("addScore", (BaseData params) -> { ++ addScore(params.getInt("parInt1")); ++ }); ++ data.setCallbackString("getHurtSound", () -> { ++ return getHurtSound(); ++ }); ++ data.setCallbackString("getDeathSound", () -> { ++ return getDeathSound(); ++ }); ++ data.setCallbackVoidWithDataArg("addToPlayerScore", (BaseData params) -> { ++ addToPlayerScore((Entity) params.getRef("entity"), params.getInt("i")); ++ }); ++ data.setCallbackObjectWithDataArg("dropOneItem", (BaseData params) -> { ++ return dropOneItem(params.getBoolean("flag")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("dropPlayerItemWithRandomChoice", (BaseData params) -> { ++ // The second argument (boolean) is not used. ++ return dropPlayerItemWithRandomChoice((ItemStack) params.getRef("itemStackIn"), false).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("dropItem", (BaseData params) -> { ++ return dropItem((ItemStack) params.getRef("droppedItem"), params.getBoolean("dropAround"), ++ params.getBoolean("traceItem")).makeModData(); ++ }); ++ data.setCallbackVoidWithDataArg("joinEntityItemWithWorld", (BaseData params) -> { ++ joinEntityItemWithWorld((EntityItem) params.getRef("entityitem")); ++ }); ++ data.setCallbackFloatWithDataArg("getToolDigEfficiency", (BaseData params) -> { ++ return getToolDigEfficiency((Block) params.getRef("parBlock")); ++ }); ++ data.setCallbackBooleanWithDataArg("canHarvestBlock", (BaseData params) -> { ++ return canHarvestBlock((Block) params.getRef("blockToHarvest")); ++ }); ++ data.setCallbackBooleanWithDataArg("canAttackPlayer", (BaseData params) -> { ++ return canAttackPlayer((EntityPlayer) params.getRef("entityplayer")); ++ }); ++ data.setCallbackVoidWithDataArg("damageArmor", (BaseData params) -> { ++ damageArmor(params.getFloat("f")); ++ }); ++ data.setCallbackInt("getTotalArmorValue", () -> { ++ return getTotalArmorValue(); ++ }); ++ data.setCallbackFloat("getArmorVisibility", () -> { ++ return getArmorVisibility(); ++ }); ++ data.setCallbackBooleanWithDataArg("interactWith", (BaseData params) -> { ++ return interactWith((Entity) params.getRef("parEntity")); ++ }); ++ data.setCallbackObject("getCurrentEquippedItem", () -> { ++ if (getCurrentEquippedItem() != null) { ++ return getCurrentEquippedItem().makeModData(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackVoid("destroyCurrentEquippedItem", () -> { ++ destroyCurrentEquippedItem(); ++ }); ++ data.setCallbackDouble("getYOffset", () -> { ++ return getYOffset(); ++ }); ++ data.setCallbackVoidWithDataArg("attackTargetEntityWithCurrentItem", (BaseData params) -> { ++ attackTargetEntityWithCurrentItem((Entity) params.getRef("entity")); ++ }); ++ data.setCallbackVoid("respawnPlayer", () -> { ++ respawnPlayer(); ++ }); ++ data.setCallbackBoolean("isEntityInsideOpaqueBlock", () -> { ++ return isEntityInsideOpaqueBlock(); ++ }); ++ data.setCallbackBoolean("isUser", () -> { ++ return isUser(); ++ }); ++ data.setCallbackStringWithDataArg("trySleep", (BaseData params) -> { ++ return trySleep((BlockPos) params.getRef("blockpos")).name(); ++ }); ++ data.setCallbackVoidWithDataArg("wakeUpPlayer", (BaseData params) -> { ++ wakeUpPlayer(params.getBoolean("flag"), params.getBoolean("flag1"), params.getBoolean("flag2")); ++ }); ++ data.setCallbackBoolean("isInBed", () -> { ++ return isInBed(); ++ }); ++ data.setCallbackFloat("getBedOrientationInDegrees", () -> { ++ return getBedOrientationInDegrees(); ++ }); ++ data.setCallbackBoolean("isPlayerSleeping", () -> { ++ return isPlayerSleeping(); ++ }); ++ data.setCallbackBoolean("isPlayerFullyAsleep", () -> { ++ return isPlayerFullyAsleep(); ++ }); ++ data.setCallbackInt("getSleepTimer", () -> { ++ return getSleepTimer(); ++ }); ++ data.setCallbackObject("getBedLocation", () -> { ++ if (getBedLocation() != null) { ++ return getBedLocation().makeModData(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackBoolean("isSpawnForced", () -> { ++ return isSpawnForced(); ++ }); ++ data.setCallbackVoidWithDataArg("setSpawnPoint", (BaseData params) -> { ++ setSpawnPoint((BlockPos) params.getRef("pos"), params.getBoolean("forced")); ++ }); ++ data.setCallbackVoidWithDataArg("moveEntityWithHeading", (BaseData params) -> { ++ moveEntityWithHeading(params.getFloat("f"), params.getFloat("f1")); ++ }); ++ data.setCallbackFloat("getAIMoveSpeed", () -> { ++ return getAIMoveSpeed(); ++ }); ++ data.setCallbackVoidWithDataArg("addMovementStat", (BaseData params) -> { ++ addMovementStat(params.getDouble("parDouble1"), params.getDouble("parDouble2"), ++ params.getDouble("parDouble3")); ++ }); ++ data.setCallbackVoidWithDataArg("addMountedMovementStat", (BaseData params) -> { ++ addMountedMovementStat(params.getDouble("parDouble1"), params.getDouble("parDouble2"), ++ params.getDouble("parDouble3")); ++ }); ++ data.setCallbackVoidWithDataArg("fall", (BaseData params) -> { ++ fall(params.getFloat("f"), params.getFloat("f1")); ++ }); ++ data.setCallbackVoid("resetHeight", () -> { ++ resetHeight(); ++ }); ++ data.setCallbackStringWithDataArg("getFallSoundString", (BaseData params) -> { ++ return getFallSoundString(params.getInt("i")); ++ }); ++ data.setCallbackVoid("setInWeb", () -> { ++ setInWeb(); ++ }); ++ data.setCallbackObjectWithDataArg("getCurrentArmor", (BaseData params) -> { ++ if (getCurrentArmor(params.getInt("i")) != null) { ++ return getCurrentArmor(params.getInt("i")).makeModData(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackVoidWithDataArg("addExperience", (BaseData params) -> { ++ addExperience(params.getInt("amount")); ++ }); ++ data.setCallbackInt("getXPSeed", () -> { ++ return getXPSeed(); ++ }); ++ data.setCallbackVoidWithDataArg("removeExperienceLevel", (BaseData params) -> { ++ removeExperienceLevel(params.getInt("i")); ++ }); ++ data.setCallbackVoidWithDataArg("addExperienceLevel", (BaseData params) -> { ++ addExperienceLevel(params.getInt("i")); ++ }); ++ data.setCallbackInt("xpBarCap", () -> { ++ return xpBarCap(); ++ }); ++ data.setCallbackVoidWithDataArg("addExhaustion", (BaseData params) -> { ++ addExhaustion(params.getFloat("parFloat1")); ++ }); ++ data.setCallbackObject("getFoodStats", () -> { ++ return getFoodStats().makeModData(); ++ }); ++ data.setCallbackBooleanWithDataArg("canEat", (BaseData params) -> { ++ return canEat(params.getBoolean("ignoreHunger")); ++ }); ++ data.setCallbackBoolean("shouldHeal", () -> { ++ return shouldHeal(); ++ }); ++ data.setCallbackVoidWithDataArg("setItemInUse", (BaseData params) -> { ++ setItemInUse((ItemStack) params.getRef("itemstack"), params.getInt("i")); ++ }); ++ data.setCallbackBoolean("isAllowEdit", () -> { ++ return isAllowEdit(); ++ }); ++ data.setCallbackBooleanWithDataArg("canPlayerEdit", (BaseData params) -> { ++ return canPlayerEdit((BlockPos) params.getRef("parBlockPos"), ++ EnumFacing.valueOf(params.getString("parEnumFacing")), (ItemStack) params.getRef("parItemStack")); ++ }); ++ data.setCallbackBoolean("isPlayer", () -> { ++ return isPlayer(); ++ }); ++ data.setCallbackBoolean("getAlwaysRenderNameTagForRender", () -> { ++ return getAlwaysRenderNameTagForRender(); ++ }); ++ data.setCallbackVoidWithDataArg("clonePlayer", (BaseData params) -> { ++ clonePlayer((EntityPlayer) params.getRef("entityplayer"), params.getBoolean("flag")); ++ }); ++ data.setCallbackBoolean("canTriggerWalking", () -> { ++ return canTriggerWalking(); ++ }); ++ data.setCallbackVoid("sendPlayerAbilities", () -> { ++ sendPlayerAbilities(); ++ }); ++ data.setCallbackString("getName", () -> { ++ return getName(); ++ }); ++ data.setCallbackObjectWithDataArg("getEquipmentInSlot", (BaseData params) -> { ++ if (getEquipmentInSlot(params.getInt("i")) != null) { ++ return getEquipmentInSlot(params.getInt("i")).makeModData(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackObject("getHeldItem", () -> { ++ if (getHeldItem() != null) { ++ return getHeldItem(); ++ } else { ++ return new ModData(); ++ } ++ }); ++ data.setCallbackVoidWithDataArg("setCurrentItemOrArmor", (BaseData params) -> { ++ setCurrentItemOrArmor(params.getInt("i"), (ItemStack) params.getRef("itemstack")); ++ }); ++ data.setCallbackBooleanWithDataArg("isInvisibleToPlayer", (BaseData params) -> { ++ return isInvisibleToPlayer((EntityPlayer) params.getRef("entityplayer")); ++ }); ++ data.setCallbackObjectArr("getInventory", () -> { ++ ItemStack[] inventory = getInventory(); ++ ModData[] parDatas = new ModData[inventory.length]; ++ for (int i = 0; i < inventory.length; i++) { ++ if (inventory[i] != null) { ++ parDatas[i] = inventory[i].makeModData(); ++ } ++ } ++ return parDatas; ++ }); ++ data.setCallbackBoolean("isPushedByWater", () -> { ++ return isPushedByWater(); ++ }); ++ data.setCallbackFloat("getEyeHeight", () -> { ++ return getEyeHeight(); ++ }); ++ data.setCallbackStringWithDataArg("getOfflineUUID", (BaseData params) -> { ++ return getOfflineUUID(params.getString("username")).toString(); ++ }); ++ data.setCallbackBooleanWithDataArg("replaceItemInInventory", (BaseData params) -> { ++ return replaceItemInInventory(params.getInt("i"), (ItemStack) params.getRef("itemstack")); ++ }); ++ data.setCallbackBoolean("hasReducedDebug", () -> { ++ return hasReducedDebug(); ++ }); ++ data.setCallbackVoidWithDataArg("setReducedDebug", (BaseData params) -> { ++ setReducedDebug(params.getBoolean("reducedDebug")); ++ }); ++ return data; ++ } ++ + +> CHANGE 407 : 408 @ 407 : 408 ~ Collection collection = this.getWorldScoreboard() diff --git a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.edit.java b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.edit.java index 70ecccf..bf5341c 100644 --- a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.edit.java +++ b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.edit.java @@ -5,10 +5,70 @@ # Version: 1.0 # Author: lax1dude -> INSERT 3 : 4 @ 3 +> INSERT 3 : 6 @ 3 + ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; > DELETE 3 @ 3 : 4 +> CHANGE 12 : 13 @ 12 : 13 + +~ public class InventoryPlayer extends ModData implements IInventory { + +> INSERT 11 : 62 @ 11 + ++ public void loadModData(BaseData data) { ++ BaseData[] parItemStacks = data.getBaseDataArr("mainInventory"); ++ for (int i = 0; i < parItemStacks.length && i < mainInventory.length; i++) { ++ if (mainInventory[i] != null) { ++ mainInventory[i].loadModData(parItemStacks[i]); ++ } else if (parItemStacks[i] != null && parItemStacks[i].getRef() instanceof ItemStack) { ++ mainInventory[i] = (ItemStack) parItemStacks[i].getRef(); ++ } ++ } ++ ++ BaseData[] parArmorStacks = data.getBaseDataArr("armorInventory"); ++ for (int i = 0; i < parArmorStacks.length && i < armorInventory.length; i++) { ++ if (armorInventory[i] != null) { ++ armorInventory[i].loadModData(parArmorStacks[i]); ++ } else if (parItemStacks[i] != null && parItemStacks[i].getRef() instanceof ItemStack) { ++ armorInventory[i] = (ItemStack) parItemStacks[i].getRef(); ++ } ++ } ++ currentItem = data.getInt("currentItem"); ++ inventoryChanged = data.getBoolean("inventoryChanged"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ ModData[] parBaseDatas = new ModData[mainInventory.length]; ++ for (int i = 0; i < mainInventory.length; i++) { ++ if (mainInventory[i] != null) { ++ parBaseDatas[i] = mainInventory[i].makeModData(); ++ } ++ } ++ data.set("mainInventory", parBaseDatas); ++ ++ ModData[] parBaseDatasArmor = new ModData[armorInventory.length]; ++ for (int i = 0; i < armorInventory.length; i++) { ++ if (armorInventory[i] != null) { ++ parBaseDatasArmor[i] = armorInventory[i].makeModData(); ++ } ++ } ++ data.set("armorInventory", parBaseDatasArmor); ++ ++ data.set("currentItem", currentItem); ++ data.set("inventoryChanged", inventoryChanged); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ return data; ++ } ++ + > EOF diff --git a/patches/minecraft/net/minecraft/entity/player/PlayerCapabilities.edit.java b/patches/minecraft/net/minecraft/entity/player/PlayerCapabilities.edit.java new file mode 100644 index 0000000..fbb2fef --- /dev/null +++ b/patches/minecraft/net/minecraft/entity/player/PlayerCapabilities.edit.java @@ -0,0 +1,61 @@ + +# Eagler Context Redacted Diff +# Copyright (c) 2024 lax1dude. All rights reserved. + +# Version: 1.0 +# Author: lax1dude + +> INSERT 2 : 4 @ 2 + ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; + +> CHANGE 2 : 3 @ 2 : 3 + +~ public class PlayerCapabilities extends ModData { + +> INSERT 8 : 49 @ 8 + ++ public void loadModData(BaseData data) { ++ disableDamage = data.getBoolean("disableDamage"); ++ isFlying = data.getBoolean("isFlying"); ++ allowFlying = data.getBoolean("allowFlying"); ++ isCreativeMode = data.getBoolean("isCreativeMode"); ++ allowEdit = data.getBoolean("allowEdit"); ++ ++ flySpeed = data.getFloat("flySpeed"); ++ walkSpeed = data.getFloat("walkSpeed"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.set("disableDamage", disableDamage); ++ data.set("isFlying", isFlying); ++ data.set("allowFlying", allowFlying); ++ data.set("isCreativeMode", isCreativeMode); ++ data.set("allowEdit", allowEdit); ++ data.set("flySpeed", flySpeed); ++ data.set("walkSpeed", walkSpeed); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.setCallbackFloat("getFlySpeed", () -> { ++ return getFlySpeed(); ++ }); ++ data.setCallbackFloat("getWalkSpeed", () -> { ++ return getWalkSpeed(); ++ }); ++ data.setCallbackVoidWithDataArg("setFlySpeed", (BaseData params) -> { ++ setFlySpeed(params.getFloat("speed")); ++ }); ++ data.setCallbackVoidWithDataArg("setPlayerWalkSpeed", (BaseData params) -> { ++ setPlayerWalkSpeed(params.getFloat("speed")); ++ }); ++ return data; ++ } ++ + +> EOF diff --git a/patches/minecraft/net/minecraft/init/Blocks.edit.java b/patches/minecraft/net/minecraft/init/Blocks.edit.java index c42d27b..4efa736 100644 --- a/patches/minecraft/net/minecraft/init/Blocks.edit.java +++ b/patches/minecraft/net/minecraft/init/Blocks.edit.java @@ -5,211 +5,232 @@ # Version: 1.0 # Author: lax1dude -> DELETE 34 @ 34 : 35 +> INSERT 2 : 3 @ 2 -> CHANGE 3 : 201 @ 3 : 201 ++ import net.eaglerforge.api.ModData; -~ public static Block air; -~ public static Block stone; -~ public static BlockGrass grass; -~ public static Block dirt; -~ public static Block cobblestone; -~ public static Block planks; -~ public static Block sapling; -~ public static Block bedrock; -~ public static BlockDynamicLiquid flowing_water; -~ public static BlockStaticLiquid water; -~ public static BlockDynamicLiquid flowing_lava; -~ public static BlockStaticLiquid lava; -~ public static BlockSand sand; -~ public static Block gravel; -~ public static Block gold_ore; -~ public static Block iron_ore; -~ public static Block coal_ore; -~ public static Block log; -~ public static Block log2; -~ public static BlockLeaves leaves; -~ public static BlockLeaves leaves2; -~ public static Block sponge; -~ public static Block glass; -~ public static Block lapis_ore; -~ public static Block lapis_block; -~ public static Block dispenser; -~ public static Block sandstone; -~ public static Block noteblock; -~ public static Block bed; -~ public static Block golden_rail; -~ public static Block detector_rail; -~ public static BlockPistonBase sticky_piston; -~ public static Block web; -~ public static BlockTallGrass tallgrass; -~ public static BlockDeadBush deadbush; -~ public static BlockPistonBase piston; -~ public static BlockPistonExtension piston_head; -~ public static Block wool; -~ public static BlockPistonMoving piston_extension; -~ public static BlockFlower yellow_flower; -~ public static BlockFlower red_flower; -~ public static BlockBush brown_mushroom; -~ public static BlockBush red_mushroom; -~ public static Block gold_block; -~ public static Block iron_block; -~ public static BlockSlab double_stone_slab; -~ public static BlockSlab stone_slab; -~ public static Block brick_block; -~ public static Block tnt; -~ public static Block bookshelf; -~ public static Block mossy_cobblestone; -~ public static Block obsidian; -~ public static Block torch; -~ public static BlockFire fire; -~ public static Block mob_spawner; -~ public static Block oak_stairs; -~ public static BlockChest chest; -~ public static BlockRedstoneWire redstone_wire; -~ public static Block diamond_ore; -~ public static Block diamond_block; -~ public static Block crafting_table; -~ public static Block wheat; -~ public static Block farmland; -~ public static Block furnace; -~ public static Block lit_furnace; -~ public static Block standing_sign; -~ public static Block oak_door; -~ public static Block spruce_door; -~ public static Block birch_door; -~ public static Block jungle_door; -~ public static Block acacia_door; -~ public static Block dark_oak_door; -~ public static Block ladder; -~ public static Block rail; -~ public static Block stone_stairs; -~ public static Block wall_sign; -~ public static Block lever; -~ public static Block stone_pressure_plate; -~ public static Block iron_door; -~ public static Block wooden_pressure_plate; -~ public static Block redstone_ore; -~ public static Block lit_redstone_ore; -~ public static Block unlit_redstone_torch; -~ public static Block redstone_torch; -~ public static Block stone_button; -~ public static Block snow_layer; -~ public static Block ice; -~ public static Block snow; -~ public static BlockCactus cactus; -~ public static Block clay; -~ public static BlockReed reeds; -~ public static Block jukebox; -~ public static Block oak_fence; -~ public static Block spruce_fence; -~ public static Block birch_fence; -~ public static Block jungle_fence; -~ public static Block dark_oak_fence; -~ public static Block acacia_fence; -~ public static Block pumpkin; -~ public static Block netherrack; -~ public static Block soul_sand; -~ public static Block glowstone; -~ public static BlockPortal portal; -~ public static Block lit_pumpkin; -~ public static Block cake; -~ public static BlockRedstoneRepeater unpowered_repeater; -~ public static BlockRedstoneRepeater powered_repeater; -~ public static Block trapdoor; -~ public static Block monster_egg; -~ public static Block stonebrick; -~ public static Block brown_mushroom_block; -~ public static Block red_mushroom_block; -~ public static Block iron_bars; -~ public static Block glass_pane; -~ public static Block melon_block; -~ public static Block pumpkin_stem; -~ public static Block melon_stem; -~ public static Block vine; -~ public static Block oak_fence_gate; -~ public static Block spruce_fence_gate; -~ public static Block birch_fence_gate; -~ public static Block jungle_fence_gate; -~ public static Block dark_oak_fence_gate; -~ public static Block acacia_fence_gate; -~ public static Block brick_stairs; -~ public static Block stone_brick_stairs; -~ public static BlockMycelium mycelium; -~ public static Block waterlily; -~ public static Block nether_brick; -~ public static Block nether_brick_fence; -~ public static Block nether_brick_stairs; -~ public static Block nether_wart; -~ public static Block enchanting_table; -~ public static Block brewing_stand; -~ public static BlockCauldron cauldron; -~ public static Block end_portal; -~ public static Block end_portal_frame; -~ public static Block end_stone; -~ public static Block dragon_egg; -~ public static Block redstone_lamp; -~ public static Block lit_redstone_lamp; -~ public static BlockSlab double_wooden_slab; -~ public static BlockSlab wooden_slab; -~ public static Block cocoa; -~ public static Block sandstone_stairs; -~ public static Block emerald_ore; -~ public static Block ender_chest; -~ public static BlockTripWireHook tripwire_hook; -~ public static Block tripwire; -~ public static Block emerald_block; -~ public static Block spruce_stairs; -~ public static Block birch_stairs; -~ public static Block jungle_stairs; -~ public static Block command_block; -~ public static BlockBeacon beacon; -~ public static Block cobblestone_wall; -~ public static Block flower_pot; -~ public static Block carrots; -~ public static Block potatoes; -~ public static Block wooden_button; -~ public static BlockSkull skull; -~ public static Block anvil; -~ public static Block trapped_chest; -~ public static Block light_weighted_pressure_plate; -~ public static Block heavy_weighted_pressure_plate; -~ public static BlockRedstoneComparator unpowered_comparator; -~ public static BlockRedstoneComparator powered_comparator; -~ public static BlockDaylightDetector daylight_detector; -~ public static BlockDaylightDetector daylight_detector_inverted; -~ public static Block redstone_block; -~ public static Block quartz_ore; -~ public static BlockHopper hopper; -~ public static Block quartz_block; -~ public static Block quartz_stairs; -~ public static Block activator_rail; -~ public static Block dropper; -~ public static Block stained_hardened_clay; -~ public static Block barrier; -~ public static Block iron_trapdoor; -~ public static Block hay_block; -~ public static Block carpet; -~ public static Block hardened_clay; -~ public static Block coal_block; -~ public static Block packed_ice; -~ public static Block acacia_stairs; -~ public static Block dark_oak_stairs; -~ public static Block slime_block; -~ public static BlockDoublePlant double_plant; -~ public static BlockStainedGlass stained_glass; -~ public static BlockStainedGlassPane stained_glass_pane; -~ public static Block prismarine; -~ public static Block sea_lantern; -~ public static Block standing_banner; -~ public static Block wall_banner; -~ public static Block red_sandstone; -~ public static Block red_sandstone_stairs; -~ public static BlockSlab double_stone_slab2; -~ public static BlockSlab stone_slab2; +> DELETE 32 @ 32 : 33 -> CHANGE 5 : 6 @ 5 : 6 +> CHANGE 2 : 3 @ 2 : 201 +~ import java.util.Map; + +> INSERT 1 : 201 @ 1 + ++ public class Blocks extends ModData { ++ public static Block air; ++ public static Block stone; ++ public static BlockGrass grass; ++ public static Block dirt; ++ public static Block cobblestone; ++ public static Block planks; ++ public static Block sapling; ++ public static Block bedrock; ++ public static BlockDynamicLiquid flowing_water; ++ public static BlockStaticLiquid water; ++ public static BlockDynamicLiquid flowing_lava; ++ public static BlockStaticLiquid lava; ++ public static BlockSand sand; ++ public static Block gravel; ++ public static Block gold_ore; ++ public static Block iron_ore; ++ public static Block coal_ore; ++ public static Block log; ++ public static Block log2; ++ public static BlockLeaves leaves; ++ public static BlockLeaves leaves2; ++ public static Block sponge; ++ public static Block glass; ++ public static Block lapis_ore; ++ public static Block lapis_block; ++ public static Block dispenser; ++ public static Block sandstone; ++ public static Block noteblock; ++ public static Block bed; ++ public static Block golden_rail; ++ public static Block detector_rail; ++ public static BlockPistonBase sticky_piston; ++ public static Block web; ++ public static BlockTallGrass tallgrass; ++ public static BlockDeadBush deadbush; ++ public static BlockPistonBase piston; ++ public static BlockPistonExtension piston_head; ++ public static Block wool; ++ public static BlockPistonMoving piston_extension; ++ public static BlockFlower yellow_flower; ++ public static BlockFlower red_flower; ++ public static BlockBush brown_mushroom; ++ public static BlockBush red_mushroom; ++ public static Block gold_block; ++ public static Block iron_block; ++ public static BlockSlab double_stone_slab; ++ public static BlockSlab stone_slab; ++ public static Block brick_block; ++ public static Block tnt; ++ public static Block bookshelf; ++ public static Block mossy_cobblestone; ++ public static Block obsidian; ++ public static Block torch; ++ public static BlockFire fire; ++ public static Block mob_spawner; ++ public static Block oak_stairs; ++ public static BlockChest chest; ++ public static BlockRedstoneWire redstone_wire; ++ public static Block diamond_ore; ++ public static Block diamond_block; ++ public static Block crafting_table; ++ public static Block wheat; ++ public static Block farmland; ++ public static Block furnace; ++ public static Block lit_furnace; ++ public static Block standing_sign; ++ public static Block oak_door; ++ public static Block spruce_door; ++ public static Block birch_door; ++ public static Block jungle_door; ++ public static Block acacia_door; ++ public static Block dark_oak_door; ++ public static Block ladder; ++ public static Block rail; ++ public static Block stone_stairs; ++ public static Block wall_sign; ++ public static Block lever; ++ public static Block stone_pressure_plate; ++ public static Block iron_door; ++ public static Block wooden_pressure_plate; ++ public static Block redstone_ore; ++ public static Block lit_redstone_ore; ++ public static Block unlit_redstone_torch; ++ public static Block redstone_torch; ++ public static Block stone_button; ++ public static Block snow_layer; ++ public static Block ice; ++ public static Block snow; ++ public static BlockCactus cactus; ++ public static Block clay; ++ public static BlockReed reeds; ++ public static Block jukebox; ++ public static Block oak_fence; ++ public static Block spruce_fence; ++ public static Block birch_fence; ++ public static Block jungle_fence; ++ public static Block dark_oak_fence; ++ public static Block acacia_fence; ++ public static Block pumpkin; ++ public static Block netherrack; ++ public static Block soul_sand; ++ public static Block glowstone; ++ public static BlockPortal portal; ++ public static Block lit_pumpkin; ++ public static Block cake; ++ public static BlockRedstoneRepeater unpowered_repeater; ++ public static BlockRedstoneRepeater powered_repeater; ++ public static Block trapdoor; ++ public static Block monster_egg; ++ public static Block stonebrick; ++ public static Block brown_mushroom_block; ++ public static Block red_mushroom_block; ++ public static Block iron_bars; ++ public static Block glass_pane; ++ public static Block melon_block; ++ public static Block pumpkin_stem; ++ public static Block melon_stem; ++ public static Block vine; ++ public static Block oak_fence_gate; ++ public static Block spruce_fence_gate; ++ public static Block birch_fence_gate; ++ public static Block jungle_fence_gate; ++ public static Block dark_oak_fence_gate; ++ public static Block acacia_fence_gate; ++ public static Block brick_stairs; ++ public static Block stone_brick_stairs; ++ public static BlockMycelium mycelium; ++ public static Block waterlily; ++ public static Block nether_brick; ++ public static Block nether_brick_fence; ++ public static Block nether_brick_stairs; ++ public static Block nether_wart; ++ public static Block enchanting_table; ++ public static Block brewing_stand; ++ public static BlockCauldron cauldron; ++ public static Block end_portal; ++ public static Block end_portal_frame; ++ public static Block end_stone; ++ public static Block dragon_egg; ++ public static Block redstone_lamp; ++ public static Block lit_redstone_lamp; ++ public static BlockSlab double_wooden_slab; ++ public static BlockSlab wooden_slab; ++ public static Block cocoa; ++ public static Block sandstone_stairs; ++ public static Block emerald_ore; ++ public static Block ender_chest; ++ public static BlockTripWireHook tripwire_hook; ++ public static Block tripwire; ++ public static Block emerald_block; ++ public static Block spruce_stairs; ++ public static Block birch_stairs; ++ public static Block jungle_stairs; ++ public static Block command_block; ++ public static BlockBeacon beacon; ++ public static Block cobblestone_wall; ++ public static Block flower_pot; ++ public static Block carrots; ++ public static Block potatoes; ++ public static Block wooden_button; ++ public static BlockSkull skull; ++ public static Block anvil; ++ public static Block trapped_chest; ++ public static Block light_weighted_pressure_plate; ++ public static Block heavy_weighted_pressure_plate; ++ public static BlockRedstoneComparator unpowered_comparator; ++ public static BlockRedstoneComparator powered_comparator; ++ public static BlockDaylightDetector daylight_detector; ++ public static BlockDaylightDetector daylight_detector_inverted; ++ public static Block redstone_block; ++ public static Block quartz_ore; ++ public static BlockHopper hopper; ++ public static Block quartz_block; ++ public static Block quartz_stairs; ++ public static Block activator_rail; ++ public static Block dropper; ++ public static Block stained_hardened_clay; ++ public static Block barrier; ++ public static Block iron_trapdoor; ++ public static Block hay_block; ++ public static Block carpet; ++ public static Block hardened_clay; ++ public static Block coal_block; ++ public static Block packed_ice; ++ public static Block acacia_stairs; ++ public static Block dark_oak_stairs; ++ public static Block slime_block; ++ public static BlockDoublePlant double_plant; ++ public static BlockStainedGlass stained_glass; ++ public static BlockStainedGlassPane stained_glass_pane; ++ public static Block prismarine; ++ public static Block sea_lantern; ++ public static Block standing_banner; ++ public static Block wall_banner; ++ public static Block red_sandstone; ++ public static Block red_sandstone_stairs; ++ public static BlockSlab double_stone_slab2; ++ public static BlockSlab stone_slab2; ++ + +> CHANGE 4 : 16 @ 4 : 5 + +~ public static ModData makeModData() { +~ ModData data = new ModData(); +~ Map blockMap = Block.blockRegistry.registryObjects; +~ for (Map.Entry entry : blockMap.entrySet()) { +~ if (entry.getKey().resourceName != null && entry.getValue() != null) { +~ data.set(entry.getKey().resourceName, entry.getValue().makeModData()); +~ } +~ } +~ return data; +~ } +~ ~ static void doBootstrap() { > EOF diff --git a/patches/minecraft/net/minecraft/init/Items.edit.java b/patches/minecraft/net/minecraft/init/Items.edit.java index 3a74e8a..1727d7b 100644 --- a/patches/minecraft/net/minecraft/init/Items.edit.java +++ b/patches/minecraft/net/minecraft/init/Items.edit.java @@ -5,200 +5,219 @@ # Version: 1.0 # Author: lax1dude -> DELETE 2 @ 2 : 3 +> CHANGE 2 : 3 @ 2 : 3 -> CHANGE 13 : 200 @ 13 : 200 +~ import net.eaglerforge.api.ModData; -~ public static Item iron_shovel; -~ public static Item iron_pickaxe; -~ public static Item iron_axe; -~ public static Item flint_and_steel; -~ public static Item apple; -~ public static ItemBow bow; -~ public static Item arrow; -~ public static Item coal; -~ public static Item diamond; -~ public static Item iron_ingot; -~ public static Item gold_ingot; -~ public static Item iron_sword; -~ public static Item wooden_sword; -~ public static Item wooden_shovel; -~ public static Item wooden_pickaxe; -~ public static Item wooden_axe; -~ public static Item stone_sword; -~ public static Item stone_shovel; -~ public static Item stone_pickaxe; -~ public static Item stone_axe; -~ public static Item diamond_sword; -~ public static Item diamond_shovel; -~ public static Item diamond_pickaxe; -~ public static Item diamond_axe; -~ public static Item stick; -~ public static Item bowl; -~ public static Item mushroom_stew; -~ public static Item golden_sword; -~ public static Item golden_shovel; -~ public static Item golden_pickaxe; -~ public static Item golden_axe; -~ public static Item string; -~ public static Item feather; -~ public static Item gunpowder; -~ public static Item wooden_hoe; -~ public static Item stone_hoe; -~ public static Item iron_hoe; -~ public static Item diamond_hoe; -~ public static Item golden_hoe; -~ public static Item wheat_seeds; -~ public static Item wheat; -~ public static Item bread; -~ public static ItemArmor leather_helmet; -~ public static ItemArmor leather_chestplate; -~ public static ItemArmor leather_leggings; -~ public static ItemArmor leather_boots; -~ public static ItemArmor chainmail_helmet; -~ public static ItemArmor chainmail_chestplate; -~ public static ItemArmor chainmail_leggings; -~ public static ItemArmor chainmail_boots; -~ public static ItemArmor iron_helmet; -~ public static ItemArmor iron_chestplate; -~ public static ItemArmor iron_leggings; -~ public static ItemArmor iron_boots; -~ public static ItemArmor diamond_helmet; -~ public static ItemArmor diamond_chestplate; -~ public static ItemArmor diamond_leggings; -~ public static ItemArmor diamond_boots; -~ public static ItemArmor golden_helmet; -~ public static ItemArmor golden_chestplate; -~ public static ItemArmor golden_leggings; -~ public static ItemArmor golden_boots; -~ public static Item flint; -~ public static Item porkchop; -~ public static Item cooked_porkchop; -~ public static Item painting; -~ public static Item golden_apple; -~ public static Item sign; -~ public static Item oak_door; -~ public static Item spruce_door; -~ public static Item birch_door; -~ public static Item jungle_door; -~ public static Item acacia_door; -~ public static Item dark_oak_door; -~ public static Item bucket; -~ public static Item water_bucket; -~ public static Item lava_bucket; -~ public static Item minecart; -~ public static Item saddle; -~ public static Item iron_door; -~ public static Item redstone; -~ public static Item snowball; -~ public static Item boat; -~ public static Item leather; -~ public static Item milk_bucket; -~ public static Item brick; -~ public static Item clay_ball; -~ public static Item reeds; -~ public static Item paper; -~ public static Item book; -~ public static Item slime_ball; -~ public static Item chest_minecart; -~ public static Item furnace_minecart; -~ public static Item egg; -~ public static Item compass; -~ public static ItemFishingRod fishing_rod; -~ public static Item clock; -~ public static Item glowstone_dust; -~ public static Item fish; -~ public static Item cooked_fish; -~ public static Item dye; -~ public static Item bone; -~ public static Item sugar; -~ public static Item cake; -~ public static Item bed; -~ public static Item repeater; -~ public static Item cookie; -~ public static ItemMap filled_map; -~ public static ItemShears shears; -~ public static Item melon; -~ public static Item pumpkin_seeds; -~ public static Item melon_seeds; -~ public static Item beef; -~ public static Item cooked_beef; -~ public static Item chicken; -~ public static Item cooked_chicken; -~ public static Item mutton; -~ public static Item cooked_mutton; -~ public static Item rabbit; -~ public static Item cooked_rabbit; -~ public static Item rabbit_stew; -~ public static Item rabbit_foot; -~ public static Item rabbit_hide; -~ public static Item rotten_flesh; -~ public static Item ender_pearl; -~ public static Item blaze_rod; -~ public static Item ghast_tear; -~ public static Item gold_nugget; -~ public static Item nether_wart; -~ public static ItemPotion potionitem; -~ public static Item glass_bottle; -~ public static Item spider_eye; -~ public static Item fermented_spider_eye; -~ public static Item blaze_powder; -~ public static Item magma_cream; -~ public static Item brewing_stand; -~ public static Item cauldron; -~ public static Item ender_eye; -~ public static Item speckled_melon; -~ public static Item spawn_egg; -~ public static Item experience_bottle; -~ public static Item fire_charge; -~ public static Item writable_book; -~ public static Item written_book; -~ public static Item emerald; -~ public static Item item_frame; -~ public static Item flower_pot; -~ public static Item carrot; -~ public static Item potato; -~ public static Item baked_potato; -~ public static Item poisonous_potato; -~ public static ItemEmptyMap map; -~ public static Item golden_carrot; -~ public static Item skull; -~ public static Item carrot_on_a_stick; -~ public static Item nether_star; -~ public static Item pumpkin_pie; -~ public static Item fireworks; -~ public static Item firework_charge; -~ public static ItemEnchantedBook enchanted_book; -~ public static Item comparator; -~ public static Item netherbrick; -~ public static Item quartz; -~ public static Item tnt_minecart; -~ public static Item hopper_minecart; -~ public static ItemArmorStand armor_stand; -~ public static Item iron_horse_armor; -~ public static Item golden_horse_armor; -~ public static Item diamond_horse_armor; -~ public static Item lead; -~ public static Item name_tag; -~ public static Item command_block_minecart; -~ public static Item record_13; -~ public static Item record_cat; -~ public static Item record_blocks; -~ public static Item record_chirp; -~ public static Item record_far; -~ public static Item record_mall; -~ public static Item record_mellohi; -~ public static Item record_stal; -~ public static Item record_strad; -~ public static Item record_ward; -~ public static Item record_11; -~ public static Item record_wait; -~ public static Item prismarine_shard; -~ public static Item prismarine_crystals; -~ public static Item banner; +> CHANGE 12 : 13 @ 12 : 200 -> CHANGE 5 : 6 @ 5 : 6 +~ import java.util.Map; +> INSERT 1 : 190 @ 1 + ++ public class Items extends ModData { ++ public static Item iron_shovel; ++ public static Item iron_pickaxe; ++ public static Item iron_axe; ++ public static Item flint_and_steel; ++ public static Item apple; ++ public static ItemBow bow; ++ public static Item arrow; ++ public static Item coal; ++ public static Item diamond; ++ public static Item iron_ingot; ++ public static Item gold_ingot; ++ public static Item iron_sword; ++ public static Item wooden_sword; ++ public static Item wooden_shovel; ++ public static Item wooden_pickaxe; ++ public static Item wooden_axe; ++ public static Item stone_sword; ++ public static Item stone_shovel; ++ public static Item stone_pickaxe; ++ public static Item stone_axe; ++ public static Item diamond_sword; ++ public static Item diamond_shovel; ++ public static Item diamond_pickaxe; ++ public static Item diamond_axe; ++ public static Item stick; ++ public static Item bowl; ++ public static Item mushroom_stew; ++ public static Item golden_sword; ++ public static Item golden_shovel; ++ public static Item golden_pickaxe; ++ public static Item golden_axe; ++ public static Item string; ++ public static Item feather; ++ public static Item gunpowder; ++ public static Item wooden_hoe; ++ public static Item stone_hoe; ++ public static Item iron_hoe; ++ public static Item diamond_hoe; ++ public static Item golden_hoe; ++ public static Item wheat_seeds; ++ public static Item wheat; ++ public static Item bread; ++ public static ItemArmor leather_helmet; ++ public static ItemArmor leather_chestplate; ++ public static ItemArmor leather_leggings; ++ public static ItemArmor leather_boots; ++ public static ItemArmor chainmail_helmet; ++ public static ItemArmor chainmail_chestplate; ++ public static ItemArmor chainmail_leggings; ++ public static ItemArmor chainmail_boots; ++ public static ItemArmor iron_helmet; ++ public static ItemArmor iron_chestplate; ++ public static ItemArmor iron_leggings; ++ public static ItemArmor iron_boots; ++ public static ItemArmor diamond_helmet; ++ public static ItemArmor diamond_chestplate; ++ public static ItemArmor diamond_leggings; ++ public static ItemArmor diamond_boots; ++ public static ItemArmor golden_helmet; ++ public static ItemArmor golden_chestplate; ++ public static ItemArmor golden_leggings; ++ public static ItemArmor golden_boots; ++ public static Item flint; ++ public static Item porkchop; ++ public static Item cooked_porkchop; ++ public static Item painting; ++ public static Item golden_apple; ++ public static Item sign; ++ public static Item oak_door; ++ public static Item spruce_door; ++ public static Item birch_door; ++ public static Item jungle_door; ++ public static Item acacia_door; ++ public static Item dark_oak_door; ++ public static Item bucket; ++ public static Item water_bucket; ++ public static Item lava_bucket; ++ public static Item minecart; ++ public static Item saddle; ++ public static Item iron_door; ++ public static Item redstone; ++ public static Item snowball; ++ public static Item boat; ++ public static Item leather; ++ public static Item milk_bucket; ++ public static Item brick; ++ public static Item clay_ball; ++ public static Item reeds; ++ public static Item paper; ++ public static Item book; ++ public static Item slime_ball; ++ public static Item chest_minecart; ++ public static Item furnace_minecart; ++ public static Item egg; ++ public static Item compass; ++ public static ItemFishingRod fishing_rod; ++ public static Item clock; ++ public static Item glowstone_dust; ++ public static Item fish; ++ public static Item cooked_fish; ++ public static Item dye; ++ public static Item bone; ++ public static Item sugar; ++ public static Item cake; ++ public static Item bed; ++ public static Item repeater; ++ public static Item cookie; ++ public static ItemMap filled_map; ++ public static ItemShears shears; ++ public static Item melon; ++ public static Item pumpkin_seeds; ++ public static Item melon_seeds; ++ public static Item beef; ++ public static Item cooked_beef; ++ public static Item chicken; ++ public static Item cooked_chicken; ++ public static Item mutton; ++ public static Item cooked_mutton; ++ public static Item rabbit; ++ public static Item cooked_rabbit; ++ public static Item rabbit_stew; ++ public static Item rabbit_foot; ++ public static Item rabbit_hide; ++ public static Item rotten_flesh; ++ public static Item ender_pearl; ++ public static Item blaze_rod; ++ public static Item ghast_tear; ++ public static Item gold_nugget; ++ public static Item nether_wart; ++ public static ItemPotion potionitem; ++ public static Item glass_bottle; ++ public static Item spider_eye; ++ public static Item fermented_spider_eye; ++ public static Item blaze_powder; ++ public static Item magma_cream; ++ public static Item brewing_stand; ++ public static Item cauldron; ++ public static Item ender_eye; ++ public static Item speckled_melon; ++ public static Item spawn_egg; ++ public static Item experience_bottle; ++ public static Item fire_charge; ++ public static Item writable_book; ++ public static Item written_book; ++ public static Item emerald; ++ public static Item item_frame; ++ public static Item flower_pot; ++ public static Item carrot; ++ public static Item potato; ++ public static Item baked_potato; ++ public static Item poisonous_potato; ++ public static ItemEmptyMap map; ++ public static Item golden_carrot; ++ public static Item skull; ++ public static Item carrot_on_a_stick; ++ public static Item nether_star; ++ public static Item pumpkin_pie; ++ public static Item fireworks; ++ public static Item firework_charge; ++ public static ItemEnchantedBook enchanted_book; ++ public static Item comparator; ++ public static Item netherbrick; ++ public static Item quartz; ++ public static Item tnt_minecart; ++ public static Item hopper_minecart; ++ public static ItemArmorStand armor_stand; ++ public static Item iron_horse_armor; ++ public static Item golden_horse_armor; ++ public static Item diamond_horse_armor; ++ public static Item lead; ++ public static Item name_tag; ++ public static Item command_block_minecart; ++ public static Item record_13; ++ public static Item record_cat; ++ public static Item record_blocks; ++ public static Item record_chirp; ++ public static Item record_far; ++ public static Item record_mall; ++ public static Item record_mellohi; ++ public static Item record_stal; ++ public static Item record_strad; ++ public static Item record_ward; ++ public static Item record_11; ++ public static Item record_wait; ++ public static Item prismarine_shard; ++ public static Item prismarine_crystals; ++ public static Item banner; ++ + +> CHANGE 4 : 16 @ 4 : 5 + +~ public static ModData makeModData() { +~ ModData data = new ModData(); +~ Map itemMap = Item.itemRegistry.registryObjects; +~ for (Map.Entry entry : itemMap.entrySet()) { +~ if (entry.getKey().resourceName != null && entry.getValue() != null) { +~ data.set(entry.getKey().resourceName, entry.getValue().makeModData()); +~ } +~ } +~ return data; +~ } +~ ~ static void doBootstrap() { > EOF diff --git a/patches/minecraft/net/minecraft/inventory/Container.edit.java b/patches/minecraft/net/minecraft/inventory/Container.edit.java index 7f92d03..ffb6dc7 100644 --- a/patches/minecraft/net/minecraft/inventory/Container.edit.java +++ b/patches/minecraft/net/minecraft/inventory/Container.edit.java @@ -7,17 +7,71 @@ > DELETE 2 @ 2 : 4 -> INSERT 3 : 7 @ 3 +> INSERT 3 : 9 @ 3 + + import com.google.common.collect.Lists; + import com.google.common.collect.Sets; + ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; > DELETE 2 @ 2 : 5 -> CHANGE 19 : 20 @ 19 : 20 +> CHANGE 5 : 6 @ 5 : 6 + +~ public abstract class Container extends ModData { + +> INSERT 1 : 42 @ 1 + ++ ++ public void loadModData(BaseData data) { ++ BaseData[] parItemStacks = data.getBaseDataArr("inventoryItemStacks"); ++ for (int i = 0; i < parItemStacks.length && i < inventoryItemStacks.size(); i++) { ++ if (inventoryItemStacks.get(i) != null) { ++ inventoryItemStacks.get(i).loadModData(parItemStacks[i]); ++ } else if (parItemStacks[i] != null && parItemStacks[i].getRef() instanceof ItemStack) { ++ inventoryItemStacks.set(i, (ItemStack) parItemStacks[i].getRef()); ++ } ++ } ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ ModData[] parBaseDatas = new ModData[inventoryItemStacks.size()]; ++ for (int i = 0; i < inventoryItemStacks.size(); i++) { ++ if (inventoryItemStacks.get(i) != null) { ++ parBaseDatas[i] = inventoryItemStacks.get(i).makeModData(); ++ } ++ } ++ data.set("inventoryItemStacks", parBaseDatas); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.setCallbackObjectArr("getPlayerList", () -> { ++ ModData[] parPlayerList = new ModData[playerList.size()]; ++ int i = 0; ++ for (EntityPlayer player : playerList) { ++ if (player != null) { ++ parPlayerList[i] = player.makeModData(); ++ } ++ i++; ++ } ++ return parPlayerList; ++ }); ++ return data; ++ } ++ + +> CHANGE 12 : 13 @ 12 : 13 ~ this.inventoryItemStacks.add((ItemStack) null); +> INSERT 521 : 522 @ 521 + ++ + > EOF diff --git a/patches/minecraft/net/minecraft/item/Item.edit.java b/patches/minecraft/net/minecraft/item/Item.edit.java index ac58e6e..0c0a068 100644 --- a/patches/minecraft/net/minecraft/item/Item.edit.java +++ b/patches/minecraft/net/minecraft/item/Item.edit.java @@ -5,10 +5,13 @@ # Version: 1.0 # Author: lax1dude -> INSERT 2 : 7 @ 2 +> INSERT 2 : 10 @ 2 + import java.util.List; + import java.util.Map; ++ ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; + import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; + import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + @@ -19,7 +22,11 @@ > DELETE 23 @ 23 : 91 -> CHANGE 16 : 18 @ 16 : 17 +> CHANGE 13 : 14 @ 13 : 14 + +~ public class Item extends ModData { + +> CHANGE 2 : 4 @ 2 : 3 ~ protected static final EaglercraftUUID itemModifierUUID = EaglercraftUUID ~ .fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF"); @@ -28,4 +35,51 @@ ~ protected static EaglercraftRandom itemRand = new EaglercraftRandom(); +> INSERT 20 : 64 @ 20 + ++ public void loadModData(BaseData data) { ++ maxStackSize = data.getInt("maxStackSize"); ++ maxDamage = data.getInt("maxDamage"); ++ bFull3D = data.getBoolean("bFull3D"); ++ hasSubtypes = data.getBoolean("hasSubtypes"); ++ potionEffect = data.getString("potionEffect"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.set("potionEffect", potionEffect); ++ data.set("unlocalizedName", unlocalizedName); ++ data.set("hasSubtypes", hasSubtypes); ++ data.set("bFull3D", bFull3D); ++ data.set("maxDamage", maxDamage); ++ data.set("maxStackSize", maxStackSize); ++ ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.setCallbackInt("getID", () -> { ++ return getIdFromItem(this); ++ }); ++ data.setCallbackObjectWithDataArg("setMaxStackSize", (BaseData params) -> { ++ return setMaxStackSize(params.getInt("maxStackSize")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("setHasSubtypes", (BaseData params) -> { ++ return setHasSubtypes(params.getBoolean("hasSubtypes")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("setMaxDamage", (BaseData params) -> { ++ return setMaxDamage(params.getInt("maxDamageIn")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("setUnlocalizedName", (BaseData params) -> { ++ return setUnlocalizedName(params.getString("s")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("setPotionEffect", (BaseData params) -> { ++ return setPotionEffect(params.getString("potionEffect")).makeModData(); ++ }); ++ return data; ++ } ++ + > EOF diff --git a/patches/minecraft/net/minecraft/item/ItemStack.edit.java b/patches/minecraft/net/minecraft/item/ItemStack.edit.java index a616fd5..c60cb15 100644 --- a/patches/minecraft/net/minecraft/item/ItemStack.edit.java +++ b/patches/minecraft/net/minecraft/item/ItemStack.edit.java @@ -9,8 +9,11 @@ > DELETE 3 @ 3 : 4 -> INSERT 1 : 9 @ 1 +> INSERT 1 : 12 @ 1 ++ ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; + import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; + import net.lax1dude.eaglercraft.v1_8.HString; + import java.util.Set; @@ -20,13 +23,229 @@ + import com.google.common.collect.Multimap; + -> DELETE 13 @ 13 : 17 +> CHANGE 13 : 14 @ 13 : 20 -> CHANGE 185 : 186 @ 185 : 186 +~ import net.minecraft.nbt.*; + +> CHANGE 10 : 11 @ 10 : 11 + +~ public final class ItemStack extends ModData { + +> INSERT 16 : 168 @ 16 + ++ public void loadModData(BaseData data) { ++ stackSize = data.getInt("amount"); ++ animationsToGo = data.getInt("animationsToGo"); ++ itemDamage = data.getInt("itemDamage"); ++ if (itemFrame != null) { ++ itemFrame.loadModData(data.getBaseData("itemFrame")); ++ } ++ if (canDestroyCacheBlock != null) { ++ canDestroyCacheBlock.loadModData(data.getBaseData("canDestroyCacheBlock")); ++ } ++ if (canPlaceOnCacheBlock != null) { ++ canPlaceOnCacheBlock.loadModData(data.getBaseData("canPlaceOnCacheBlock")); ++ } ++ canDestroyCacheResult = data.getBoolean("canDestroyCacheResult"); ++ canPlaceOnCacheResult = data.getBoolean("canPlaceOnCacheResult"); ++ } ++ ++ public static ItemStack fromModData(BaseData data) { ++ return new ItemStack(Item.getItemById(data.getInt("itemId")), data.getInt("amount"), data.getInt("itemDamage")); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.set("amount", stackSize); ++ data.set("animationsToGo", animationsToGo); ++ data.set("itemId", item.getIdFromItem(item)); ++ data.set("itemDamage", itemDamage); ++ if (itemFrame != null) { ++ data.set("itemFrame", itemFrame.makeModData()); ++ } ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ if (canDestroyCacheBlock != null) { ++ data.set("canDestroyCacheBlock", canDestroyCacheBlock.makeModData()); ++ } ++ data.set("canDestroyCacheResult", canDestroyCacheResult); ++ if (canPlaceOnCacheBlock != null) { ++ data.set("canPlaceOnCacheBlock", canPlaceOnCacheBlock.makeModData()); ++ } ++ data.set("canPlaceOnCacheResult", canPlaceOnCacheResult); ++ ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getItem", () -> { ++ return getItem().makeModData(); ++ }); ++ data.setCallbackInt("getMaxStackSize", () -> { ++ return getMaxStackSize(); ++ }); ++ data.setCallbackBoolean("isStackable", () -> { ++ return isStackable(); ++ }); ++ data.setCallbackBoolean("isItemStackDamageable", () -> { ++ return isItemStackDamageable(); ++ }); ++ data.setCallbackBoolean("getHasSubtypes", () -> { ++ return getHasSubtypes(); ++ }); ++ data.setCallbackBoolean("isItemDamaged", () -> { ++ return isItemDamaged(); ++ }); ++ data.setCallbackInt("getItemDamage", () -> { ++ return getItemDamage(); ++ }); ++ data.setCallbackInt("getMetadata", () -> { ++ return getMetadata(); ++ }); ++ data.setCallbackVoidWithDataArg("setItemDamage", (BaseData params) -> { ++ setItemDamage(params.getInt("meta")); ++ }); ++ data.setCallbackInt("getMaxDamage", () -> { ++ return getMaxDamage(); ++ }); ++ data.setCallbackObject("copy", () -> { ++ return copy().makeModData(); ++ }); ++ data.setCallbackString("getUnlocalizedName", () -> { ++ return getUnlocalizedName(); ++ }); ++ data.setCallbackString("toString", () -> { ++ return toString(); ++ }); ++ data.setCallbackInt("getMaxItemUseDuration", () -> { ++ return getMaxItemUseDuration(); ++ }); ++ data.setCallbackString("getDisplayName", () -> { ++ return getDisplayName(); ++ }); ++ data.setCallbackObjectWithDataArg("setDisplayName", (BaseData params) -> { ++ return setStackDisplayName(params.getString("displayName")).makeModData(); ++ }); ++ data.setCallbackVoid("clearCustomName", () -> { ++ clearCustomName(); ++ }); ++ data.setCallbackBoolean("hasDisplayName", () -> { ++ return hasDisplayName(); ++ }); ++ data.setCallbackBoolean("hasEffect", () -> { ++ return hasEffect(); ++ }); ++ data.setCallbackBoolean("isItemEnchantable", () -> { ++ return isItemEnchantable(); ++ }); ++ data.setCallbackVoidWithDataArg("addEnchantment", (BaseData params) -> { ++ if (params.getBaseData("ench") instanceof Enchantment) { ++ addEnchantment((Enchantment) params.getBaseData("ench"), params.getInt("level")); ++ } ++ }); ++ data.setCallbackBoolean("isItemEnchanted", () -> { ++ return isItemEnchanted(); ++ }); ++ data.setCallbackBoolean("canEditBlocks", () -> { ++ return canEditBlocks(); ++ }); ++ data.setCallbackBoolean("isOnItemFrame", () -> { ++ return isOnItemFrame(); ++ }); ++ data.setCallbackInt("getRepairCost", () -> { ++ return getRepairCost(); ++ }); ++ data.setCallbackVoidWithDataArg("setRepairCost", (BaseData params) -> { ++ setRepairCost(params.getInt("cost")); ++ }); ++ data.setCallbackVoidWithDataArg("setItem", (BaseData params) -> { ++ if (params.getBaseData("newItem") instanceof Item) { ++ setItem((Item) params.getBaseData("newItem")); ++ } ++ }); ++ data.setCallbackBooleanWithDataArg("canDestroy", (BaseData params) -> { ++ return canDestroy(Block.getBlockById(params.getInt("blockId"))); ++ }); ++ data.setCallbackBooleanWithDataArg("canPlaceOn", (BaseData params) -> { ++ return canPlaceOn(Block.getBlockById(params.getInt("blockId"))); ++ }); ++ data.setCallbackString("toNBT", () -> { ++ return toNBT(); ++ }); ++ data.setCallbackVoidWithDataArg("fromNBT", (BaseData params) -> { ++ fromNBT(params.getString("nbt")); ++ }); ++ data.setCallbackStringArr("getLore", () -> { ++ return getLore(); ++ }); ++ data.setCallbackVoidWithDataArg("setLore", (BaseData params) -> { ++ setLore(params.getStringArr("lore")); ++ }); ++ ++ return data; ++ } ++ + +> INSERT 91 : 106 @ 91 + ++ public String toNBT() { ++ NBTTagCompound nbt = new NBTTagCompound(); ++ nbt = writeToNBT(nbt); ++ return nbt.toString(); ++ } ++ ++ public void fromNBT(String nbt) { ++ try { ++ NBTTagCompound nbtParsed = JsonToNBT.getTagFromJson(nbt); ++ this.readFromNBT(nbtParsed); ++ } catch (Exception e) { ++ // Swallowing the error! ++ } ++ } ++ + +> CHANGE 64 : 65 @ 64 : 65 ~ public boolean attemptDamageItem(int amount, EaglercraftRandom rand) { -> CHANGE 249 : 250 @ 249 : 250 +> INSERT 210 : 244 @ 210 + ++ public void setLore(String[] loreIn) { ++ if (this.stackTagCompound == null) { ++ this.stackTagCompound = new NBTTagCompound(); ++ } ++ if (!this.stackTagCompound.hasKey("display", 10)) { ++ this.stackTagCompound.setTag("display", new NBTTagCompound()); ++ } ++ NBTTagCompound display = this.stackTagCompound.getCompoundTag("display"); ++ NBTTagList lore = new NBTTagList(); ++ for (String strIn : loreIn) { ++ lore.appendTag(new NBTTagString(strIn)); ++ } ++ display.setTag("Lore", lore); ++ } ++ ++ public String[] getLore() { ++ if (this.stackTagCompound == null) { ++ return new String[0]; ++ } ++ if (!this.stackTagCompound.hasKey("display", 10)) { ++ return new String[0]; ++ } ++ NBTTagCompound display = this.stackTagCompound.getCompoundTag("display"); ++ if (!display.hasKey("Lore", 9)) { ++ return new String[0]; ++ } ++ NBTTagList lore = (NBTTagList) display.getTag("Lore"); ++ String[] outStrArr = new String[lore.tagCount()]; ++ for (int i = 0; i < outStrArr.length; i++) { ++ outStrArr[i] = lore.getStringTagAt(i); ++ } ++ return outStrArr; ++ } ++ + +> CHANGE 39 : 40 @ 39 : 40 ~ s = s + HString.format("#%04d/%d%s", diff --git a/patches/minecraft/net/minecraft/network/play/client/C00PacketKeepAlive.edit.java b/patches/minecraft/net/minecraft/network/play/client/C00PacketKeepAlive.edit.java index 6d88f89..053b069 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C00PacketKeepAlive.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C00PacketKeepAlive.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public int key; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C01PacketChatMessage.edit.java b/patches/minecraft/net/minecraft/network/play/client/C01PacketChatMessage.edit.java index 6d88f89..b29d42c 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C01PacketChatMessage.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C01PacketChatMessage.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public String message; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C02PacketUseEntity.edit.java b/patches/minecraft/net/minecraft/network/play/client/C02PacketUseEntity.edit.java index 6d88f89..0b85387 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C02PacketUseEntity.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C02PacketUseEntity.edit.java @@ -9,4 +9,23 @@ + +> CHANGE 8 : 11 @ 8 : 11 + +~ public int entityId; +~ public C02PacketUseEntity.Action action; +~ public Vec3 hitVec; + +> INSERT 14 : 24 @ 14 + ++ public C02PacketUseEntity(int entityIdentifier, C02PacketUseEntity.Action action) { ++ this.entityId = entityIdentifier; ++ this.action = action; ++ } ++ ++ public C02PacketUseEntity(int entityIdentifier, Vec3 hitVec) { ++ this(entityIdentifier, C02PacketUseEntity.Action.INTERACT_AT); ++ this.hitVec = hitVec; ++ } ++ + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C03PacketPlayer.edit.java b/patches/minecraft/net/minecraft/network/play/client/C03PacketPlayer.edit.java index 6d88f89..ba602a4 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C03PacketPlayer.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C03PacketPlayer.edit.java @@ -9,4 +9,15 @@ + +> CHANGE 5 : 13 @ 5 : 13 + +~ public double x; +~ public double y; +~ public double z; +~ public float yaw; +~ public float pitch; +~ public boolean onGround; +~ public boolean moving; +~ public boolean rotating; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C07PacketPlayerDigging.edit.java b/patches/minecraft/net/minecraft/network/play/client/C07PacketPlayerDigging.edit.java index 6d88f89..99981e4 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C07PacketPlayerDigging.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C07PacketPlayerDigging.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 7 : 10 @ 7 : 10 + +~ public BlockPos position; +~ public EnumFacing facing; +~ public C07PacketPlayerDigging.Action status; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C08PacketPlayerBlockPlacement.edit.java b/patches/minecraft/net/minecraft/network/play/client/C08PacketPlayerBlockPlacement.edit.java index 6d88f89..e1b4257 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C08PacketPlayerBlockPlacement.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C08PacketPlayerBlockPlacement.edit.java @@ -9,4 +9,13 @@ + +> CHANGE 8 : 14 @ 8 : 14 + +~ public BlockPos position; +~ public int placedBlockDirection; +~ public ItemStack stack; +~ public float facingX; +~ public float facingY; +~ public float facingZ; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C09PacketHeldItemChange.edit.java b/patches/minecraft/net/minecraft/network/play/client/C09PacketHeldItemChange.edit.java index 6d88f89..11def12 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C09PacketHeldItemChange.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C09PacketHeldItemChange.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public int slotId; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C0BPacketEntityAction.edit.java b/patches/minecraft/net/minecraft/network/play/client/C0BPacketEntityAction.edit.java index 6d88f89..ba84f29 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C0BPacketEntityAction.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C0BPacketEntityAction.edit.java @@ -9,4 +9,19 @@ + +> CHANGE 6 : 9 @ 6 : 9 + +~ public int entityID; +~ public C0BPacketEntityAction.Action action; +~ public int auxData; + +> INSERT 14 : 20 @ 14 + ++ public C0BPacketEntityAction(int entityId, C0BPacketEntityAction.Action action, int auxData) { ++ this.entityID = entityId; ++ this.action = action; ++ this.auxData = auxData; ++ } ++ + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C0CPacketInput.edit.java b/patches/minecraft/net/minecraft/network/play/client/C0CPacketInput.edit.java index 6d88f89..4dcbdec 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C0CPacketInput.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C0CPacketInput.edit.java @@ -9,4 +9,11 @@ + +> CHANGE 5 : 9 @ 5 : 9 + +~ public float strafeSpeed; +~ public float forwardSpeed; +~ public boolean jumping; +~ public boolean sneaking; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C0DPacketCloseWindow.edit.java b/patches/minecraft/net/minecraft/network/play/client/C0DPacketCloseWindow.edit.java index 6d88f89..ff3843d 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C0DPacketCloseWindow.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C0DPacketCloseWindow.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public int windowId; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C0EPacketClickWindow.edit.java b/patches/minecraft/net/minecraft/network/play/client/C0EPacketClickWindow.edit.java index 6d88f89..4f288ac 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C0EPacketClickWindow.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C0EPacketClickWindow.edit.java @@ -9,4 +9,13 @@ + +> CHANGE 6 : 12 @ 6 : 12 + +~ public int windowId; +~ public int slotId; +~ public int usedButton; +~ public short actionNumber; +~ public ItemStack clickedItem; +~ public int mode; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C0FPacketConfirmTransaction.edit.java b/patches/minecraft/net/minecraft/network/play/client/C0FPacketConfirmTransaction.edit.java index 6d88f89..1b25bbc 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C0FPacketConfirmTransaction.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C0FPacketConfirmTransaction.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 5 : 8 @ 5 : 8 + +~ public int windowId; +~ public short uid; +~ public boolean accepted; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C10PacketCreativeInventoryAction.edit.java b/patches/minecraft/net/minecraft/network/play/client/C10PacketCreativeInventoryAction.edit.java index 6d88f89..2d61a89 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C10PacketCreativeInventoryAction.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C10PacketCreativeInventoryAction.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public int slotId; +~ public ItemStack stack; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C11PacketEnchantItem.edit.java b/patches/minecraft/net/minecraft/network/play/client/C11PacketEnchantItem.edit.java index 6d88f89..368788f 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C11PacketEnchantItem.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C11PacketEnchantItem.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 5 : 7 @ 5 : 7 + +~ public int windowId; +~ public int button; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C12PacketUpdateSign.edit.java b/patches/minecraft/net/minecraft/network/play/client/C12PacketUpdateSign.edit.java index 6d88f89..55cd613 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C12PacketUpdateSign.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C12PacketUpdateSign.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 7 : 9 @ 7 : 9 + +~ public BlockPos pos; +~ public IChatComponent[] lines; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C13PacketPlayerAbilities.edit.java b/patches/minecraft/net/minecraft/network/play/client/C13PacketPlayerAbilities.edit.java index 6d88f89..172d39f 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C13PacketPlayerAbilities.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C13PacketPlayerAbilities.edit.java @@ -9,4 +9,13 @@ + +> CHANGE 6 : 12 @ 6 : 12 + +~ public boolean invulnerable; +~ public boolean flying; +~ public boolean allowFlying; +~ public boolean creativeMode; +~ public float flySpeed; +~ public float walkSpeed; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C14PacketTabComplete.edit.java b/patches/minecraft/net/minecraft/network/play/client/C14PacketTabComplete.edit.java index 92e388a..bf3242d 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C14PacketTabComplete.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C14PacketTabComplete.edit.java @@ -13,4 +13,9 @@ > DELETE 4 @ 4 : 5 +> CHANGE 2 : 4 @ 2 : 4 + +~ public String message; +~ public BlockPos targetBlock; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C15PacketClientSettings.edit.java b/patches/minecraft/net/minecraft/network/play/client/C15PacketClientSettings.edit.java index 8f6b137..66f6f80 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C15PacketClientSettings.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C15PacketClientSettings.edit.java @@ -5,7 +5,15 @@ # Version: 1.0 # Author: lax1dude -> INSERT 62 : 66 @ 62 +> CHANGE 9 : 14 @ 9 : 14 + +~ public String lang; +~ public int view; +~ public EntityPlayer.EnumChatVisibility chatVisibility; +~ public boolean enableColors; +~ public int modelPartFlags; + +> INSERT 48 : 52 @ 48 + + public int getViewDistance() { diff --git a/patches/minecraft/net/minecraft/network/play/client/C16PacketClientStatus.edit.java b/patches/minecraft/net/minecraft/network/play/client/C16PacketClientStatus.edit.java index 6d88f89..04fa03a 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C16PacketClientStatus.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C16PacketClientStatus.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public C16PacketClientStatus.EnumState status; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C17PacketCustomPayload.edit.java b/patches/minecraft/net/minecraft/network/play/client/C17PacketCustomPayload.edit.java index 8cf4611..82040c4 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C17PacketCustomPayload.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C17PacketCustomPayload.edit.java @@ -12,4 +12,8 @@ + + import net.lax1dude.eaglercraft.v1_8.netty.ByteBuf; +> CHANGE 5 : 6 @ 5 : 6 + +~ public String channel; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/client/C18PacketSpectate.edit.java b/patches/minecraft/net/minecraft/network/play/client/C18PacketSpectate.edit.java index b3c0e2f..7ce1089 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C18PacketSpectate.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C18PacketSpectate.edit.java @@ -11,7 +11,7 @@ > CHANGE 7 : 8 @ 7 : 8 -~ private EaglercraftUUID id; +~ public EaglercraftUUID id; > CHANGE 4 : 5 @ 4 : 5 diff --git a/patches/minecraft/net/minecraft/network/play/client/C19PacketResourcePackStatus.edit.java b/patches/minecraft/net/minecraft/network/play/client/C19PacketResourcePackStatus.edit.java index 6d88f89..9381af9 100644 --- a/patches/minecraft/net/minecraft/network/play/client/C19PacketResourcePackStatus.edit.java +++ b/patches/minecraft/net/minecraft/network/play/client/C19PacketResourcePackStatus.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 5 : 7 @ 5 : 7 + +~ public String hash; +~ public C19PacketResourcePackStatus.Action status; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S00PacketKeepAlive.edit.java b/patches/minecraft/net/minecraft/network/play/server/S00PacketKeepAlive.edit.java index 6d88f89..bc74557 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S00PacketKeepAlive.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S00PacketKeepAlive.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public int id; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S01PacketJoinGame.edit.java b/patches/minecraft/net/minecraft/network/play/server/S01PacketJoinGame.edit.java index 6d88f89..a22838a 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S01PacketJoinGame.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S01PacketJoinGame.edit.java @@ -9,4 +9,17 @@ + +> CHANGE 8 : 10 @ 8 : 10 + +~ public int entityId; +~ public boolean hardcoreMode; + +> CHANGE 1 : 2 @ 1 : 2 + +~ public int dimension; + +> CHANGE 1 : 2 @ 1 : 2 + +~ public int maxPlayers; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S02PacketChat.edit.java b/patches/minecraft/net/minecraft/network/play/server/S02PacketChat.edit.java index 6d88f89..0c94b17 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S02PacketChat.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S02PacketChat.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public IChatComponent chatComponent; +~ public byte type; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S03PacketTimeUpdate.edit.java b/patches/minecraft/net/minecraft/network/play/server/S03PacketTimeUpdate.edit.java index 6d88f89..045b2b7 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S03PacketTimeUpdate.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S03PacketTimeUpdate.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 5 : 7 @ 5 : 7 + +~ public long totalWorldTime; +~ public long worldTime; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S04PacketEntityEquipment.edit.java b/patches/minecraft/net/minecraft/network/play/server/S04PacketEntityEquipment.edit.java index 6d88f89..4e83f93 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S04PacketEntityEquipment.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S04PacketEntityEquipment.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 6 : 9 @ 6 : 9 + +~ public int entityID; +~ public int equipmentSlot; +~ public ItemStack itemStack; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S05PacketSpawnPosition.edit.java b/patches/minecraft/net/minecraft/network/play/server/S05PacketSpawnPosition.edit.java index 6d88f89..0334dce 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S05PacketSpawnPosition.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S05PacketSpawnPosition.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 6 : 7 @ 6 : 7 + +~ public BlockPos spawnBlockPos; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S06PacketUpdateHealth.edit.java b/patches/minecraft/net/minecraft/network/play/server/S06PacketUpdateHealth.edit.java index 6d88f89..a8c119b 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S06PacketUpdateHealth.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S06PacketUpdateHealth.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 5 : 8 @ 5 : 8 + +~ public float health; +~ public int foodLevel; +~ public float saturationLevel; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S07PacketRespawn.edit.java b/patches/minecraft/net/minecraft/network/play/server/S07PacketRespawn.edit.java index 6d88f89..f350704 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S07PacketRespawn.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S07PacketRespawn.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 8 : 11 @ 8 : 11 + +~ public int dimensionID; +~ public EnumDifficulty difficulty; +~ public WorldSettings.GameType gameType; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S08PacketPlayerPosLook.edit.java b/patches/minecraft/net/minecraft/network/play/server/S08PacketPlayerPosLook.edit.java index 613846d..0c96a13 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S08PacketPlayerPosLook.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S08PacketPlayerPosLook.edit.java @@ -9,4 +9,12 @@ + +> CHANGE 5 : 10 @ 5 : 10 + +~ public double x; +~ public double y; +~ public double z; +~ public float yaw; +~ public float pitch; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S09PacketHeldItemChange.edit.java b/patches/minecraft/net/minecraft/network/play/server/S09PacketHeldItemChange.edit.java index 6d88f89..a66f364 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S09PacketHeldItemChange.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S09PacketHeldItemChange.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public int heldItemHotbarIndex; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S0APacketUseBed.edit.java b/patches/minecraft/net/minecraft/network/play/server/S0APacketUseBed.edit.java index 6d88f89..377cbfa 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S0APacketUseBed.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S0APacketUseBed.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 8 : 10 @ 8 : 10 + +~ public int playerID; +~ public BlockPos bedPos; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S0BPacketAnimation.edit.java b/patches/minecraft/net/minecraft/network/play/server/S0BPacketAnimation.edit.java index 6d88f89..a859be9 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S0BPacketAnimation.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S0BPacketAnimation.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public int entityId; +~ public int type; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S0CPacketSpawnPlayer.edit.java b/patches/minecraft/net/minecraft/network/play/server/S0CPacketSpawnPlayer.edit.java index 671f361..ccdca19 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S0CPacketSpawnPlayer.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S0CPacketSpawnPlayer.edit.java @@ -10,11 +10,18 @@ ~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; ~ -> CHANGE 11 : 12 @ 11 : 12 +> CHANGE 10 : 18 @ 10 : 18 -~ private EaglercraftUUID playerId; +~ public int entityId; +~ public EaglercraftUUID playerId; +~ public int x; +~ public int y; +~ public int z; +~ public byte yaw; +~ public byte pitch; +~ public int currentItem; -> CHANGE 65 : 66 @ 65 : 66 +> CHANGE 59 : 60 @ 59 : 60 ~ public EaglercraftUUID getPlayer() { diff --git a/patches/minecraft/net/minecraft/network/play/server/S0DPacketCollectItem.edit.java b/patches/minecraft/net/minecraft/network/play/server/S0DPacketCollectItem.edit.java index 6d88f89..b4f2028 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S0DPacketCollectItem.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S0DPacketCollectItem.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 5 : 7 @ 5 : 7 + +~ public int collectedItemEntityId; +~ public int entityId; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S0EPacketSpawnObject.edit.java b/patches/minecraft/net/minecraft/network/play/server/S0EPacketSpawnObject.edit.java index 6d88f89..2783f9c 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S0EPacketSpawnObject.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S0EPacketSpawnObject.edit.java @@ -9,4 +9,17 @@ + +> CHANGE 7 : 17 @ 7 : 17 + +~ public int entityId; +~ public int x; +~ public int y; +~ public int z; +~ public int speedX; +~ public int speedY; +~ public int speedZ; +~ public int pitch; +~ public int yaw; +~ public int type; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S0FPacketSpawnMob.edit.java b/patches/minecraft/net/minecraft/network/play/server/S0FPacketSpawnMob.edit.java index 1307512..0b36c4d 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S0FPacketSpawnMob.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S0FPacketSpawnMob.edit.java @@ -9,4 +9,18 @@ + +> CHANGE 9 : 20 @ 9 : 20 + +~ public int entityId; +~ public int type; +~ public int x; +~ public int y; +~ public int z; +~ public int velocityX; +~ public int velocityY; +~ public int velocityZ; +~ public byte yaw; +~ public byte pitch; +~ public byte headPitch; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S10PacketSpawnPainting.edit.java b/patches/minecraft/net/minecraft/network/play/server/S10PacketSpawnPainting.edit.java index 6d88f89..53cc1d5 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S10PacketSpawnPainting.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S10PacketSpawnPainting.edit.java @@ -9,4 +9,13 @@ + +> CHANGE 8 : 10 @ 8 : 10 + +~ public int entityID; +~ public BlockPos position; + +> CHANGE 1 : 2 @ 1 : 2 + +~ public String title; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S11PacketSpawnExperienceOrb.edit.java b/patches/minecraft/net/minecraft/network/play/server/S11PacketSpawnExperienceOrb.edit.java index 6d88f89..7431916 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S11PacketSpawnExperienceOrb.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S11PacketSpawnExperienceOrb.edit.java @@ -9,4 +9,12 @@ + +> CHANGE 7 : 12 @ 7 : 12 + +~ public int entityID; +~ public int posX; +~ public int posY; +~ public int posZ; +~ public int xpValue; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S12PacketEntityVelocity.edit.java b/patches/minecraft/net/minecraft/network/play/server/S12PacketEntityVelocity.edit.java index 6d88f89..8595625 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S12PacketEntityVelocity.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S12PacketEntityVelocity.edit.java @@ -9,4 +9,11 @@ + +> CHANGE 6 : 10 @ 6 : 10 + +~ public int entityID; +~ public int motionX; +~ public int motionY; +~ public int motionZ; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S13PacketDestroyEntities.edit.java b/patches/minecraft/net/minecraft/network/play/server/S13PacketDestroyEntities.edit.java index 6d88f89..65781d0 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S13PacketDestroyEntities.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S13PacketDestroyEntities.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public int[] entityIDs; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S14PacketEntity.edit.java b/patches/minecraft/net/minecraft/network/play/server/S14PacketEntity.edit.java index 6d88f89..c654d4a 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S14PacketEntity.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S14PacketEntity.edit.java @@ -9,4 +9,14 @@ + +> CHANGE 7 : 14 @ 7 : 14 + +~ public int entityId; +~ public byte posX; +~ public byte posY; +~ public byte posZ; +~ public byte yaw; +~ public byte pitch; +~ public boolean onGround; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S18PacketEntityTeleport.edit.java b/patches/minecraft/net/minecraft/network/play/server/S18PacketEntityTeleport.edit.java index 6d88f89..145436a 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S18PacketEntityTeleport.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S18PacketEntityTeleport.edit.java @@ -9,4 +9,14 @@ + +> CHANGE 7 : 14 @ 7 : 14 + +~ public int entityId; +~ public int posX; +~ public int posY; +~ public int posZ; +~ public byte yaw; +~ public byte pitch; +~ public boolean onGround; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S19PacketEntityHeadLook.edit.java b/patches/minecraft/net/minecraft/network/play/server/S19PacketEntityHeadLook.edit.java index 6d88f89..703c4d5 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S19PacketEntityHeadLook.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S19PacketEntityHeadLook.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 7 : 9 @ 7 : 9 + +~ public int entityId; +~ public byte yaw; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S19PacketEntityStatus.edit.java b/patches/minecraft/net/minecraft/network/play/server/S19PacketEntityStatus.edit.java index 6d88f89..78c7091 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S19PacketEntityStatus.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S19PacketEntityStatus.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 7 : 9 @ 7 : 9 + +~ public int entityId; +~ public byte logicOpcode; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S1BPacketEntityAttach.edit.java b/patches/minecraft/net/minecraft/network/play/server/S1BPacketEntityAttach.edit.java index 6d88f89..f13170c 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S1BPacketEntityAttach.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S1BPacketEntityAttach.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 6 : 9 @ 6 : 9 + +~ public int leash; +~ public int entityId; +~ public int vehicleEntityId; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S1CPacketEntityMetadata.edit.java b/patches/minecraft/net/minecraft/network/play/server/S1CPacketEntityMetadata.edit.java index 1307512..39b2a17 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S1CPacketEntityMetadata.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S1CPacketEntityMetadata.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 6 : 7 @ 6 : 7 + +~ public int entityId; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S1DPacketEntityEffect.edit.java b/patches/minecraft/net/minecraft/network/play/server/S1DPacketEntityEffect.edit.java index 6d88f89..df29aae 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S1DPacketEntityEffect.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S1DPacketEntityEffect.edit.java @@ -9,4 +9,12 @@ + +> CHANGE 6 : 11 @ 6 : 11 + +~ public int entityId; +~ public byte effectId; +~ public byte amplifier; +~ public int duration; +~ public byte hideParticles; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S1EPacketRemoveEntityEffect.edit.java b/patches/minecraft/net/minecraft/network/play/server/S1EPacketRemoveEntityEffect.edit.java index 6d88f89..042ef84 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S1EPacketRemoveEntityEffect.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S1EPacketRemoveEntityEffect.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public int entityId; +~ public int effectId; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S1FPacketSetExperience.edit.java b/patches/minecraft/net/minecraft/network/play/server/S1FPacketSetExperience.edit.java index 6d88f89..aafd734 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S1FPacketSetExperience.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S1FPacketSetExperience.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public int totalExperience; +~ public int level; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S20PacketEntityProperties.edit.java b/patches/minecraft/net/minecraft/network/play/server/S20PacketEntityProperties.edit.java index 8f9ea8e..733c5f4 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S20PacketEntityProperties.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S20PacketEntityProperties.edit.java @@ -14,7 +14,11 @@ ~ import com.google.common.collect.Lists; ~ -> CHANGE 35 : 36 @ 35 : 36 +> CHANGE 7 : 8 @ 7 : 8 + +~ public int entityId; + +> CHANGE 27 : 28 @ 27 : 28 ~ EaglercraftUUID uuid = parPacketBuffer.readUuid(); diff --git a/patches/minecraft/net/minecraft/network/play/server/S21PacketChunkData.edit.java b/patches/minecraft/net/minecraft/network/play/server/S21PacketChunkData.edit.java index 1b47a86..7fd3be5 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S21PacketChunkData.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S21PacketChunkData.edit.java @@ -7,13 +7,21 @@ > DELETE 2 @ 2 : 3 -> INSERT 2 : 5 @ 2 +> INSERT 2 : 7 @ 2 + + import com.google.common.collect.Lists; + ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; -> CHANGE 74 : 75 @ 74 : 75 +> CHANGE 7 : 10 @ 7 : 10 + +~ public int chunkX; +~ public int chunkZ; +~ public S21PacketChunkData.Extracted extractedData; + +> CHANGE 64 : 65 @ 64 : 65 ~ for (ExtendedBlockStorage extendedblockstorage1 : (ArrayList) arraylist) { @@ -25,4 +33,29 @@ ~ for (ExtendedBlockStorage extendedblockstorage3 : (ArrayList) arraylist) { +> CHANGE 33 : 34 @ 33 : 34 + +~ public static class Extracted extends ModData { + +> INSERT 2 : 20 @ 2 + ++ ++ public ModData makeModData() { ++ ModData d = new ModData(); ++ d.setCallbackVoid("reload", () -> { ++ loadModData(d); ++ }); ++ d.set("data", data); ++ d.set("dataSize", dataSize); ++ d.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ return d; ++ } ++ ++ public void loadModData(BaseData d) { ++ data = d.getByteArr("data"); ++ dataSize = d.getInt("dataSize"); ++ } + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S23PacketBlockChange.edit.java b/patches/minecraft/net/minecraft/network/play/server/S23PacketBlockChange.edit.java index 6d88f89..c3a4e68 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S23PacketBlockChange.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S23PacketBlockChange.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 9 : 10 @ 9 : 10 + +~ public BlockPos blockPosition; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S24PacketBlockAction.edit.java b/patches/minecraft/net/minecraft/network/play/server/S24PacketBlockAction.edit.java index 6d88f89..d5eac5e 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S24PacketBlockAction.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S24PacketBlockAction.edit.java @@ -9,4 +9,11 @@ + +> CHANGE 7 : 11 @ 7 : 11 + +~ public BlockPos blockPosition; +~ public int instrument; +~ public int pitch; +~ public Block block; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S25PacketBlockBreakAnim.edit.java b/patches/minecraft/net/minecraft/network/play/server/S25PacketBlockBreakAnim.edit.java index 6d88f89..1bba7e0 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S25PacketBlockBreakAnim.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S25PacketBlockBreakAnim.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 6 : 9 @ 6 : 9 + +~ public int breakerId; +~ public BlockPos position; +~ public int progress; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S26PacketMapChunkBulk.edit.java b/patches/minecraft/net/minecraft/network/play/server/S26PacketMapChunkBulk.edit.java index 0079e55..48cde52 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S26PacketMapChunkBulk.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S26PacketMapChunkBulk.edit.java @@ -11,4 +11,11 @@ > DELETE 3 @ 3 : 4 +> CHANGE 3 : 7 @ 3 : 7 + +~ public int[] xPositions; +~ public int[] zPositions; +~ public S21PacketChunkData.Extracted[] chunksData; +~ public boolean isOverworld; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S27PacketExplosion.edit.java b/patches/minecraft/net/minecraft/network/play/server/S27PacketExplosion.edit.java index 56ec8e8..9724acd 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S27PacketExplosion.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S27PacketExplosion.edit.java @@ -13,4 +13,11 @@ + import com.google.common.collect.Lists; + +> CHANGE 7 : 11 @ 7 : 11 + +~ public double posX; +~ public double posY; +~ public double posZ; +~ public float strength; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S28PacketEffect.edit.java b/patches/minecraft/net/minecraft/network/play/server/S28PacketEffect.edit.java index 6d88f89..e5b3d27 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S28PacketEffect.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S28PacketEffect.edit.java @@ -9,4 +9,11 @@ + +> CHANGE 6 : 10 @ 6 : 10 + +~ public int soundType; +~ public BlockPos soundPos; +~ public int soundData; +~ public boolean serverWide; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S29PacketSoundEffect.edit.java b/patches/minecraft/net/minecraft/network/play/server/S29PacketSoundEffect.edit.java index eac2e46..a48c47b 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S29PacketSoundEffect.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S29PacketSoundEffect.edit.java @@ -13,4 +13,13 @@ > DELETE 4 @ 4 : 5 +> CHANGE 2 : 8 @ 2 : 8 + +~ public String soundName; +~ public int posX; +~ public int posY = Integer.MAX_VALUE; +~ public int posZ; +~ public float soundVolume; +~ public int soundPitch; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S2APacketParticles.edit.java b/patches/minecraft/net/minecraft/network/play/server/S2APacketParticles.edit.java index 6d88f89..45ea1d6 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S2APacketParticles.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S2APacketParticles.edit.java @@ -9,4 +9,18 @@ + +> CHANGE 6 : 17 @ 6 : 17 + +~ public EnumParticleTypes particleType; +~ public float xCoord; +~ public float yCoord; +~ public float zCoord; +~ public float xOffset; +~ public float yOffset; +~ public float zOffset; +~ public float particleSpeed; +~ public int particleCount; +~ public boolean longDistance; +~ public int[] particleArguments; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S2BPacketChangeGameState.edit.java b/patches/minecraft/net/minecraft/network/play/server/S2BPacketChangeGameState.edit.java index 6d88f89..32c1baa 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S2BPacketChangeGameState.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S2BPacketChangeGameState.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 6 : 7 @ 6 : 7 + +~ public int state; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S2CPacketSpawnGlobalEntity.edit.java b/patches/minecraft/net/minecraft/network/play/server/S2CPacketSpawnGlobalEntity.edit.java index 6d88f89..3040941 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S2CPacketSpawnGlobalEntity.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S2CPacketSpawnGlobalEntity.edit.java @@ -9,4 +9,12 @@ + +> CHANGE 8 : 13 @ 8 : 13 + +~ public int entityId; +~ public int x; +~ public int y; +~ public int z; +~ public int type; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S2DPacketOpenWindow.edit.java b/patches/minecraft/net/minecraft/network/play/server/S2DPacketOpenWindow.edit.java index 6d88f89..bf49b15 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S2DPacketOpenWindow.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S2DPacketOpenWindow.edit.java @@ -9,4 +9,12 @@ + +> CHANGE 6 : 11 @ 6 : 11 + +~ public int windowId; +~ public String inventoryType; +~ public IChatComponent windowTitle; +~ public int slotCount; +~ public int entityId; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S2EPacketCloseWindow.edit.java b/patches/minecraft/net/minecraft/network/play/server/S2EPacketCloseWindow.edit.java index 6d88f89..ff3843d 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S2EPacketCloseWindow.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S2EPacketCloseWindow.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public int windowId; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S2FPacketSetSlot.edit.java b/patches/minecraft/net/minecraft/network/play/server/S2FPacketSetSlot.edit.java index 6d88f89..f0c6c1e 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S2FPacketSetSlot.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S2FPacketSetSlot.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 6 : 9 @ 6 : 9 + +~ public int windowId; +~ public int slot; +~ public ItemStack item; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S30PacketWindowItems.edit.java b/patches/minecraft/net/minecraft/network/play/server/S30PacketWindowItems.edit.java index 1307512..ad6c43f 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S30PacketWindowItems.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S30PacketWindowItems.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public int windowId; +~ public ItemStack[] itemStacks; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S31PacketWindowProperty.edit.java b/patches/minecraft/net/minecraft/network/play/server/S31PacketWindowProperty.edit.java index 6d88f89..f60c075 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S31PacketWindowProperty.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S31PacketWindowProperty.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 5 : 8 @ 5 : 8 + +~ public int windowId; +~ public int varIndex; +~ public int varValue; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S32PacketConfirmTransaction.edit.java b/patches/minecraft/net/minecraft/network/play/server/S32PacketConfirmTransaction.edit.java index 6d88f89..96feafe 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S32PacketConfirmTransaction.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S32PacketConfirmTransaction.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 5 : 7 @ 5 : 7 + +~ public int windowId; +~ public short actionNumber; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S33PacketUpdateSign.edit.java b/patches/minecraft/net/minecraft/network/play/server/S33PacketUpdateSign.edit.java index 6d88f89..a8667be 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S33PacketUpdateSign.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S33PacketUpdateSign.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 9 : 10 @ 9 : 10 + +~ public BlockPos blockPos; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S34PacketMaps.edit.java b/patches/minecraft/net/minecraft/network/play/server/S34PacketMaps.edit.java index 1307512..df5025d 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S34PacketMaps.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S34PacketMaps.edit.java @@ -9,4 +9,15 @@ + +> CHANGE 7 : 15 @ 7 : 15 + +~ public int mapId; +~ public byte mapScale; +~ public Vec4b[] mapVisiblePlayersVec4b; +~ public int mapMinX; +~ public int mapMinY; +~ public int mapMaxX; +~ public int mapMaxY; +~ public byte[] mapDataBytes; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S35PacketUpdateTileEntity.edit.java b/patches/minecraft/net/minecraft/network/play/server/S35PacketUpdateTileEntity.edit.java index 6d88f89..9150ca6 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S35PacketUpdateTileEntity.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S35PacketUpdateTileEntity.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 7 : 9 @ 7 : 9 + +~ public BlockPos blockPos; +~ public int metadata; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S36PacketSignEditorOpen.edit.java b/patches/minecraft/net/minecraft/network/play/server/S36PacketSignEditorOpen.edit.java index 6d88f89..ce2bb59 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S36PacketSignEditorOpen.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S36PacketSignEditorOpen.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 6 : 7 @ 6 : 7 + +~ public BlockPos signPosition; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S38PacketPlayerListItem.edit.java b/patches/minecraft/net/minecraft/network/play/server/S38PacketPlayerListItem.edit.java index 0dd348a..68320b9 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S38PacketPlayerListItem.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S38PacketPlayerListItem.edit.java @@ -5,9 +5,49 @@ # Version: 1.0 # Author: lax1dude -> CHANGE 4 : 6 @ 4 : 6 +> CHANGE 4 : 8 @ 4 : 6 +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; ~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile; ~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.Property; +> CHANGE 10 : 12 @ 10 : 12 + +~ public S38PacketPlayerListItem.Action action; +~ public final List players = Lists.newArrayList(); + +> CHANGE 159 : 160 @ 159 : 160 + +~ public class AddPlayerData extends ModData { + +> INSERT 17 : 43 @ 17 + ++ public void loadModData(BaseData data) { ++ // Yep, all the fields are 'final', so i can be lazy here. ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.set("ping", ping); ++ if (gamemode != null) { ++ data.set("gamemode", gamemode.name()); ++ } ++ if (displayName != null) { ++ data.set("displayNameFormatted", displayName.getFormattedText()); ++ data.set("displayName", displayName.getUnformattedText()); ++ } ++ if (profile != null && profile.name != null) { ++ data.set("profileName", profile.name); ++ } ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ return data; ++ } ++ + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S39PacketPlayerAbilities.edit.java b/patches/minecraft/net/minecraft/network/play/server/S39PacketPlayerAbilities.edit.java index 6d88f89..172d39f 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S39PacketPlayerAbilities.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S39PacketPlayerAbilities.edit.java @@ -9,4 +9,13 @@ + +> CHANGE 6 : 12 @ 6 : 12 + +~ public boolean invulnerable; +~ public boolean flying; +~ public boolean allowFlying; +~ public boolean creativeMode; +~ public float flySpeed; +~ public float walkSpeed; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S3APacketTabComplete.edit.java b/patches/minecraft/net/minecraft/network/play/server/S3APacketTabComplete.edit.java index 6d88f89..98db216 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S3APacketTabComplete.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S3APacketTabComplete.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public String[] matches; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S3BPacketScoreboardObjective.edit.java b/patches/minecraft/net/minecraft/network/play/server/S3BPacketScoreboardObjective.edit.java index 6d88f89..27f4fd7 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S3BPacketScoreboardObjective.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S3BPacketScoreboardObjective.edit.java @@ -9,4 +9,10 @@ + +> CHANGE 7 : 10 @ 7 : 10 + +~ public String objectiveName; +~ public String objectiveValue; +~ public IScoreObjectiveCriteria.EnumRenderType type; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S3CPacketUpdateScore.edit.java b/patches/minecraft/net/minecraft/network/play/server/S3CPacketUpdateScore.edit.java index 6d88f89..944c47f 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S3CPacketUpdateScore.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S3CPacketUpdateScore.edit.java @@ -9,4 +9,11 @@ + +> CHANGE 7 : 11 @ 7 : 11 + +~ public String name = ""; +~ public String objective = ""; +~ public int value; +~ public S3CPacketUpdateScore.Action action; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S3DPacketDisplayScoreboard.edit.java b/patches/minecraft/net/minecraft/network/play/server/S3DPacketDisplayScoreboard.edit.java index 6d88f89..aa79310 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S3DPacketDisplayScoreboard.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S3DPacketDisplayScoreboard.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public int position; +~ public String scoreName; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.edit.java b/patches/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.edit.java index 8cf4611..82040c4 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.edit.java @@ -12,4 +12,8 @@ + + import net.lax1dude.eaglercraft.v1_8.netty.ByteBuf; +> CHANGE 5 : 6 @ 5 : 6 + +~ public String channel; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S40PacketDisconnect.edit.java b/patches/minecraft/net/minecraft/network/play/server/S40PacketDisconnect.edit.java index 6d88f89..30b9942 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S40PacketDisconnect.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S40PacketDisconnect.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 6 : 7 @ 6 : 7 + +~ public IChatComponent reason; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S41PacketServerDifficulty.edit.java b/patches/minecraft/net/minecraft/network/play/server/S41PacketServerDifficulty.edit.java index 6d88f89..4f80f86 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S41PacketServerDifficulty.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S41PacketServerDifficulty.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public EnumDifficulty difficulty; +~ public boolean difficultyLocked; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S44PacketWorldBorder.edit.java b/patches/minecraft/net/minecraft/network/play/server/S44PacketWorldBorder.edit.java index 6d88f89..eb73cd8 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S44PacketWorldBorder.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S44PacketWorldBorder.edit.java @@ -9,4 +9,16 @@ + +> CHANGE 6 : 15 @ 6 : 15 + +~ public S44PacketWorldBorder.Action action; +~ public int size; +~ public double centerX; +~ public double centerZ; +~ public double targetSize; +~ public double diameter; +~ public long timeUntilTarget; +~ public int warningTime; +~ public int warningDistance; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S45PacketTitle.edit.java b/patches/minecraft/net/minecraft/network/play/server/S45PacketTitle.edit.java index 6d88f89..7b3d16c 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S45PacketTitle.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S45PacketTitle.edit.java @@ -9,4 +9,12 @@ + +> CHANGE 6 : 11 @ 6 : 11 + +~ public S45PacketTitle.Type type; +~ public IChatComponent message; +~ public int fadeInTime; +~ public int displayTime; +~ public int fadeOutTime; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S46PacketSetCompressionLevel.edit.java b/patches/minecraft/net/minecraft/network/play/server/S46PacketSetCompressionLevel.edit.java index 6d88f89..0d163cb 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S46PacketSetCompressionLevel.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S46PacketSetCompressionLevel.edit.java @@ -9,4 +9,8 @@ + +> CHANGE 5 : 6 @ 5 : 6 + +~ public int field_179761_a; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S47PacketPlayerListHeaderFooter.edit.java b/patches/minecraft/net/minecraft/network/play/server/S47PacketPlayerListHeaderFooter.edit.java index 6d88f89..047eca9 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S47PacketPlayerListHeaderFooter.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S47PacketPlayerListHeaderFooter.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 6 : 8 @ 6 : 8 + +~ public IChatComponent header; +~ public IChatComponent footer; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S48PacketResourcePackSend.edit.java b/patches/minecraft/net/minecraft/network/play/server/S48PacketResourcePackSend.edit.java index 6d88f89..655bd37 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S48PacketResourcePackSend.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S48PacketResourcePackSend.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 5 : 7 @ 5 : 7 + +~ public String url; +~ public String hash; + > EOF diff --git a/patches/minecraft/net/minecraft/network/play/server/S49PacketUpdateEntityNBT.edit.java b/patches/minecraft/net/minecraft/network/play/server/S49PacketUpdateEntityNBT.edit.java index 6d88f89..ac120fb 100644 --- a/patches/minecraft/net/minecraft/network/play/server/S49PacketUpdateEntityNBT.edit.java +++ b/patches/minecraft/net/minecraft/network/play/server/S49PacketUpdateEntityNBT.edit.java @@ -9,4 +9,9 @@ + +> CHANGE 8 : 10 @ 8 : 10 + +~ public int entityId; +~ public NBTTagCompound tagCompound; + > EOF diff --git a/patches/minecraft/net/minecraft/util/AxisAlignedBB.edit.java b/patches/minecraft/net/minecraft/util/AxisAlignedBB.edit.java index fc4c050..08ffdf8 100644 --- a/patches/minecraft/net/minecraft/util/AxisAlignedBB.edit.java +++ b/patches/minecraft/net/minecraft/util/AxisAlignedBB.edit.java @@ -5,6 +5,92 @@ # Version: 1.0 # Author: lax1dude -> DELETE 2 @ 2 : 7 +> CHANGE 2 : 4 @ 2 : 6 + +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; + +> CHANGE 1 : 8 @ 1 : 8 + +~ public class AxisAlignedBB extends ModData { +~ public double minX; +~ public double minY; +~ public double minZ; +~ public double maxX; +~ public double maxY; +~ public double maxZ; + +> INSERT 278 : 348 @ 278 + ++ ++ public void loadModData(BaseData data) { ++ minX = data.getDouble("minX"); ++ minY = data.getDouble("minY"); ++ minZ = data.getDouble("minZ"); ++ maxX = data.getDouble("maxX"); ++ maxY = data.getDouble("maxY"); ++ maxZ = data.getDouble("maxZ"); ++ } ++ ++ public static AxisAlignedBB fromModData(BaseData data) { ++ return new AxisAlignedBB(data.getDouble("x1"), data.getDouble("y1"), data.getDouble("z1"), data.getDouble("x1"), ++ data.getDouble("y1"), data.getDouble("z1")); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ ++ data.set("minX", minX); ++ data.set("minY", minY); ++ data.set("minZ", minZ); ++ data.set("maxX", maxX); ++ data.set("maxY", maxY); ++ data.set("maxZ", maxZ); ++ ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ ++ data.setCallbackObjectWithDataArg("addCoord", (BaseData params) -> { ++ return addCoord(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")).makeModData(); ++ }); ++ ++ data.setCallbackObjectWithDataArg("contract", (BaseData params) -> { ++ return contract(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")).makeModData(); ++ }); ++ ++ data.setCallbackObjectWithDataArg("expand", (BaseData params) -> { ++ return expand(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")).makeModData(); ++ }); ++ ++ data.setCallbackObjectWithDataArg("offset", (BaseData params) -> { ++ return offset(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")).makeModData(); ++ }); ++ ++ data.setCallbackObjectWithDataArg("union", (BaseData axisAlignedBB) -> { ++ return union(AxisAlignedBB.fromModData(axisAlignedBB)).makeModData(); ++ }); ++ ++ data.setCallbackBooleanWithDataArg("intersectsWith", (BaseData axisAlignedBB) -> { ++ return intersectsWith(AxisAlignedBB.fromModData(axisAlignedBB)); ++ }); ++ ++ data.setCallbackBooleanWithDataArg("isVecInside", (BaseData vec) -> { ++ return isVecInside(Vec3.fromModData(vec)); ++ }); ++ data.setCallbackDouble("getAverageEdgeLength", () -> { ++ return getAverageEdgeLength(); ++ }); ++ ++ data.setCallbackString("toString", () -> { ++ return toString(); ++ }); ++ ++ return data; ++ } > EOF diff --git a/patches/minecraft/net/minecraft/util/BlockPos.edit.java b/patches/minecraft/net/minecraft/util/BlockPos.edit.java index c1cc32d..5a6245a 100644 --- a/patches/minecraft/net/minecraft/util/BlockPos.edit.java +++ b/patches/minecraft/net/minecraft/util/BlockPos.edit.java @@ -7,15 +7,67 @@ > DELETE 2 @ 2 : 3 -> INSERT 1 : 4 @ 1 +> INSERT 1 : 7 @ 1 + + import com.google.common.collect.AbstractIterator; + ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; ++ import net.minecraft.client.Minecraft; > DELETE 1 @ 1 : 5 -> INSERT 55 : 65 @ 55 +> INSERT 32 : 78 @ 32 + ++ @Override ++ public void loadModData(BaseData data) { ++ super.loadModData(data); ++ } ++ ++ public static BlockPos fromModData(BaseData data) { ++ return new BlockPos(Vec3i.fromModData(data)); ++ } ++ ++ @Override ++ public ModData makeModData() { ++ ModData data = super.makeModData(); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.setCallbackObjectWithDataArg("add", (BaseData params) -> { ++ return add(params.getInt("x"), params.getInt("y"), params.getInt("z")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("up", (BaseData params) -> { ++ return up(params.getInt("n")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("down", (BaseData params) -> { ++ return down(params.getInt("n")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("north", (BaseData params) -> { ++ return north(params.getInt("n")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("south", (BaseData params) -> { ++ return south(params.getInt("n")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("east", (BaseData params) -> { ++ return east(params.getInt("n")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("west", (BaseData params) -> { ++ return west(params.getInt("n")).makeModData(); ++ }); ++ data.setCallbackObject("getBlock", () -> { ++ loadModData(data); ++ return Minecraft.getMinecraft().theWorld.getBlock(this).makeModData(); ++ }); ++ return data; ++ } ++ + +> INSERT 23 : 33 @ 23 + /** + * eagler diff --git a/patches/minecraft/net/minecraft/util/FoodStats.edit.java b/patches/minecraft/net/minecraft/util/FoodStats.edit.java index 97688dc..8a7c5c8 100644 --- a/patches/minecraft/net/minecraft/util/FoodStats.edit.java +++ b/patches/minecraft/net/minecraft/util/FoodStats.edit.java @@ -5,6 +5,66 @@ # Version: 1.0 # Author: lax1dude -> DELETE 6 @ 6 : 7 +> INSERT 2 : 4 @ 2 + ++ import net.eaglerforge.api.BaseData; ++ import net.eaglerforge.api.ModData; + +> DELETE 4 @ 4 : 5 + +> CHANGE 2 : 3 @ 2 : 3 + +~ public class FoodStats extends ModData { + +> INSERT 6 : 54 @ 6 + ++ public void loadModData(BaseData data) { ++ foodLevel = data.getInt("foodLevel"); ++ foodSaturationLevel = data.getFloat("foodSaturationLevel"); ++ foodExhaustionLevel = data.getFloat("foodExhaustionLevel"); ++ foodTimer = data.getInt("foodTimer"); ++ prevFoodLevel = data.getInt("prevFoodLevel"); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.set("foodLevel", foodLevel); ++ data.set("foodSaturationLevel", foodSaturationLevel); ++ data.set("foodExhaustionLevel", foodExhaustionLevel); ++ data.set("foodTimer", foodTimer); ++ data.set("prevFoodLevel", prevFoodLevel); ++ data.setCallbackVoidWithDataArg("addStats", (BaseData params) -> { ++ addStats(params.getInt("foodLevelIn"), params.getFloat("foodSaturationModifier")); ++ }); ++ data.setCallbackVoidWithDataArg("addExhaustion", (BaseData params) -> { ++ addExhaustion(params.getFloat("parFloat1")); ++ }); ++ data.setCallbackVoidWithDataArg("setFoodLevel", (BaseData params) -> { ++ setFoodLevel(params.getInt("foodLevelIn")); ++ }); ++ data.setCallbackVoidWithDataArg("setFoodSaturationLevel", (BaseData params) -> { ++ setFoodSaturationLevel(params.getFloat("foodSaturationLevelIn")); ++ }); ++ data.setCallbackInt("getFoodLevel", () -> { ++ return getFoodLevel(); ++ }); ++ data.setCallbackInt("getPrevFoodLevel", () -> { ++ return getPrevFoodLevel(); ++ }); ++ data.setCallbackFloat("getSaturationLevel", () -> { ++ return getSaturationLevel(); ++ }); ++ data.setCallbackBoolean("needFood", () -> { ++ return needFood(); ++ }); ++ return data; ++ } ++ > EOF diff --git a/patches/minecraft/net/minecraft/util/RegistrySimple.edit.java b/patches/minecraft/net/minecraft/util/RegistrySimple.edit.java index e941e56..0443187 100644 --- a/patches/minecraft/net/minecraft/util/RegistrySimple.edit.java +++ b/patches/minecraft/net/minecraft/util/RegistrySimple.edit.java @@ -21,4 +21,8 @@ + import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + +> CHANGE 2 : 3 @ 2 : 3 + +~ public final Map registryObjects = this.createUnderlyingMap(); + > EOF diff --git a/patches/minecraft/net/minecraft/util/ResourceLocation.edit.java b/patches/minecraft/net/minecraft/util/ResourceLocation.edit.java index b2ee3b0..a2246b0 100644 --- a/patches/minecraft/net/minecraft/util/ResourceLocation.edit.java +++ b/patches/minecraft/net/minecraft/util/ResourceLocation.edit.java @@ -5,9 +5,19 @@ # Version: 1.0 # Author: lax1dude -> INSERT 8 : 10 @ 8 +> INSERT 8 : 12 @ 8 ++ public String resourceName; ++ + public Object cachedPointer = null; + +> INSERT 1 : 2 @ 1 + ++ this.resourceName = resourceName[0]; + +> INSERT 8 : 9 @ 8 + ++ this.resourceName = resourceName; + > EOF diff --git a/patches/minecraft/net/minecraft/util/Vec3.edit.java b/patches/minecraft/net/minecraft/util/Vec3.edit.java index 0c65978..989fa48 100644 --- a/patches/minecraft/net/minecraft/util/Vec3.edit.java +++ b/patches/minecraft/net/minecraft/util/Vec3.edit.java @@ -5,6 +5,94 @@ # Version: 1.0 # Author: lax1dude -> DELETE 2 @ 2 : 5 +> CHANGE 2 : 5 @ 2 : 4 + +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; +~ import org.teavm.jso.JSObject; + +> CHANGE 1 : 5 @ 1 : 5 + +~ public class Vec3 extends ModData { +~ public double xCoord; +~ public double yCoord; +~ public double zCoord; + +> INSERT 142 : 216 @ 142 + ++ ++ public void loadModData(BaseData data) { ++ xCoord = data.getDouble("x"); ++ yCoord = data.getDouble("y"); ++ zCoord = data.getDouble("z"); ++ } ++ ++ public static Vec3 fromModData(BaseData data) { ++ return new Vec3(data.getDouble("x"), data.getDouble("y"), data.getDouble("z")); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.set("x", xCoord); ++ data.set("y", yCoord); ++ data.set("z", zCoord); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.setCallbackVoidWithDataArg("subtractReverse", (BaseData vec3) -> { ++ subtractReverse(Vec3.fromModData(vec3)); ++ }); ++ data.setCallbackObject("normalize", () -> { ++ return normalize().makeModData(); ++ }); ++ data.setCallbackDoubleWithDataArg("dotProduct", (BaseData vec3) -> { ++ return dotProduct(Vec3.fromModData(vec3)); ++ }); ++ data.setCallbackObjectWithDataArg("crossProduct", (BaseData vec3) -> { ++ return crossProduct(Vec3.fromModData(vec3)).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("subtract", (BaseData params) -> { ++ return subtract(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("addVector", (BaseData params) -> { ++ return addVector(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")).makeModData(); ++ }); ++ data.setCallbackDoubleWithDataArg("distanceTo", (BaseData vec3) -> { ++ return distanceTo(Vec3.fromModData(vec3)); ++ }); ++ data.setCallbackDoubleWithDataArg("squareDistanceTo", (BaseData vec3) -> { ++ return squareDistanceTo(Vec3.fromModData(vec3)); ++ }); ++ data.setCallbackDouble("lengthVector", () -> { ++ return lengthVector(); ++ }); ++ data.setCallbackObjectWithDataArg("getIntermediateWithXValue", (BaseData params) -> { ++ return getIntermediateWithXValue(Vec3.fromModData(params.getBaseData("vec")), params.getDouble("x")) ++ .makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("getIntermediateWithYValue", (BaseData params) -> { ++ return getIntermediateWithYValue(Vec3.fromModData(params.getBaseData("vec")), params.getDouble("y")) ++ .makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("getIntermediateWithZValue", (BaseData params) -> { ++ return getIntermediateWithZValue(Vec3.fromModData(params.getBaseData("vec")), params.getDouble("z")) ++ .makeModData(); ++ }); ++ data.setCallbackString("toString", () -> { ++ return toString(); ++ }); ++ data.setCallbackObjectWithDataArg("rotatePitch", (BaseData params) -> { ++ return rotatePitch(params.getFloat("pitch")).makeModData(); ++ }); ++ data.setCallbackObjectWithDataArg("rotateYaw", (BaseData params) -> { ++ return rotateYaw(params.getFloat("yaw")).makeModData(); ++ }); ++ ++ return data; ++ } ++ > EOF diff --git a/patches/minecraft/net/minecraft/util/Vec3i.edit.java b/patches/minecraft/net/minecraft/util/Vec3i.edit.java index f7b26f5..a83c7fb 100644 --- a/patches/minecraft/net/minecraft/util/Vec3i.edit.java +++ b/patches/minecraft/net/minecraft/util/Vec3i.edit.java @@ -5,12 +5,73 @@ # Version: 1.0 # Author: lax1dude -> DELETE 3 @ 3 : 4 +> CHANGE 3 : 5 @ 3 : 4 -> CHANGE 3 : 6 @ 3 : 6 +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; + +> CHANGE 1 : 2 @ 1 : 2 + +~ public class Vec3i extends ModData implements Comparable { + +> CHANGE 1 : 4 @ 1 : 4 ~ public int x; ~ public int y; ~ public int z; +> INSERT 23 : 74 @ 23 + ++ public void loadModData(BaseData data) { ++ x = data.getInt("x"); ++ y = data.getInt("y"); ++ z = data.getInt("z"); ++ } ++ ++ public static Vec3i fromModData(BaseData data) { ++ return new Vec3i(data.getInt("x"), data.getInt("y"), data.getInt("z")); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.set("x", x); ++ data.set("y", y); ++ data.set("z", z); ++ data.setCallbackInt("hashCode", () -> { ++ return hashCode(); ++ }); ++ data.setCallbackIntWithDataArg("compareTo", (BaseData vec) -> { ++ return compareTo(Vec3i.fromModData(vec)); ++ }); ++ data.setCallbackInt("getX", () -> { ++ return hashCode(); ++ }); ++ data.setCallbackInt("getY", () -> { ++ return getY(); ++ }); ++ data.setCallbackInt("getZ", () -> { ++ return getZ(); ++ }); ++ data.setCallbackObjectWithDataArg("crossProduct", (BaseData vec) -> { ++ return crossProduct(Vec3i.fromModData(vec)).makeModData(); ++ }); ++ data.setCallbackDoubleWithDataArg("distanceSq", (BaseData vec) -> { ++ return distanceSq(Vec3i.fromModData(vec)); ++ }); ++ data.setCallbackDoubleWithDataArg("distanceSqToCenter", (BaseData params) -> { ++ return distanceSqToCenter(params.getDouble("x"), params.getDouble("y"), params.getDouble("z")); ++ }); ++ data.setCallbackString("toString", () -> { ++ return toString(); ++ }); ++ return data; ++ } ++ + > EOF diff --git a/patches/minecraft/net/minecraft/util/Vec4b.edit.java b/patches/minecraft/net/minecraft/util/Vec4b.edit.java new file mode 100644 index 0000000..aa3eca5 --- /dev/null +++ b/patches/minecraft/net/minecraft/util/Vec4b.edit.java @@ -0,0 +1,44 @@ + +# Eagler Context Redacted Diff +# Copyright (c) 2024 lax1dude. All rights reserved. + +# Version: 1.0 +# Author: lax1dude + +> CHANGE 2 : 6 @ 2 : 3 + +~ import net.eaglerforge.api.BaseData; +~ import net.eaglerforge.api.ModData; +~ +~ public class Vec4b extends ModData { + +> INSERT 19 : 45 @ 19 + ++ public void loadModData(BaseData data) { ++ field_176117_a = data.getByte("a"); ++ field_176115_b = data.getByte("b"); ++ field_176116_c = data.getByte("c"); ++ field_176114_d = data.getByte("d"); ++ } ++ ++ public static Vec4b fromModData(BaseData data) { ++ return new Vec4b(data.getByte("a"), data.getByte("b"), data.getByte("c"), data.getByte("d")); ++ } ++ ++ public ModData makeModData() { ++ ModData data = new ModData(); ++ data.setCallbackVoid("reload", () -> { ++ loadModData(data); ++ }); ++ data.setCallbackObject("getRef", () -> { ++ return this; ++ }); ++ data.set("a", field_176117_a); ++ data.set("b", field_176115_b); ++ data.set("c", field_176116_c); ++ data.set("d", field_176114_d); ++ return data; ++ } ++ + +> EOF diff --git a/patches/minecraft/net/minecraft/world/World.edit.java b/patches/minecraft/net/minecraft/world/World.edit.java index e12c6c5..0dd9241 100644 --- a/patches/minecraft/net/minecraft/world/World.edit.java +++ b/patches/minecraft/net/minecraft/world/World.edit.java @@ -64,7 +64,14 @@ ~ return Chunk.getNoSkyLightValue(); -> CHANGE 1299 : 1300 @ 1299 : 1300 +> INSERT 94 : 98 @ 94 + ++ public Block getBlock(BlockPos pos) { ++ return getBlockState(pos).getBlock(); ++ } ++ + +> CHANGE 1205 : 1206 @ 1205 : 1206 ~ this.worldInfo.setThunderTime((this.rand.nextInt(12000) / 2) + 3600); diff --git a/sources/main/java/net/eaglerforge/api/ModAPI.java b/sources/main/java/net/eaglerforge/api/ModAPI.java index a357e97..e22a2fe 100644 --- a/sources/main/java/net/eaglerforge/api/ModAPI.java +++ b/sources/main/java/net/eaglerforge/api/ModAPI.java @@ -10,6 +10,10 @@ import me.otterdev.UwUAPI; import org.teavm.jso.JSBody; import org.teavm.jso.JSObject; import net.eaglerforge.EaglerForge; +import net.minecraft.enchantment.Enchantment; +import net.minecraft.init.Blocks; +import net.minecraft.init.Items; +import net.minecraft.block.material.Material; import java.util.ArrayList; @@ -51,6 +55,10 @@ public class ModAPI { if (data == null) { return; } + switch (global) { + case "player": + mc.thePlayer.loadModData(data); + } } public void onRequire(String global) { @@ -69,8 +77,110 @@ public class ModAPI { newEvent("gui"); newEvent("drawhud"); newEvent("key"); + newEvent("postmotionupdate"); + newEvent("motionupdate"); + newEvent("premotionupdate"); newEvent("update"); + + /*newEvent("packetjoingame"); + newEvent("packetspawnobject"); + newEvent("packetspawnxporb"); + newEvent("packetspawnglobalentity"); + newEvent("packetspawnpainting"); + newEvent("packetentityvelocity"); + newEvent("packetentitymetadata"); + newEvent("packetspawnplayer"); + newEvent("packetentityteleport"); + newEvent("packethelditemchange"); + newEvent("packetentity"); + newEvent("packetentityheadlook"); + newEvent("packetdestroyentities"); + newEvent("packetplayerposlook"); + newEvent("packetmultiblockchange"); + newEvent("packetchunkdata"); + newEvent("packetblockchange"); + newEvent("packetdisconnect"); + newEvent("packetcollectitem"); + newEvent("packetchat"); + newEvent("packetanimation"); + newEvent("packetusebed"); + newEvent("packetspawnmob"); + newEvent("packettimeupdate"); + newEvent("packetspawnposition"); + newEvent("packetentityattatch"); + newEvent("packetentitystatus"); + newEvent("packetupdatehealth"); + newEvent("packetsetxp"); + newEvent("packetrespawn"); + newEvent("packetexplosion"); + newEvent("packetopenwindow"); + newEvent("packetsetslot"); + newEvent("packetconfirmtransaction"); + newEvent("packetwindowitems"); + newEvent("packetsigneditoropen"); + newEvent("packetupdatesign"); + newEvent("packetupdatetileentity"); + newEvent("packetwindowproperty"); + newEvent("packetentityequipment"); + newEvent("packetclosewindow"); + newEvent("packetblockaction"); + newEvent("packetblockbreakanim"); + newEvent("packetmapchunkbulk"); + newEvent("packetchangegamestate"); + newEvent("packetmaps"); + newEvent("packeteffect"); + newEvent("packetstatistics"); + newEvent("packetentityeffect"); + newEvent("packetcombatevent"); + newEvent("packetserverdifficulty"); + newEvent("packetcamera"); + newEvent("packetworldborder"); + newEvent("packettitle"); + newEvent("packetsetcompressionlevel"); + newEvent("packetplayerlistheaderfooter"); + newEvent("packetremoveentityeffect"); + newEvent("packetplayerlistitem"); + newEvent("packetkeepalive"); + newEvent("packetplayerabilities"); + newEvent("packettabcomplete"); + newEvent("packetsoundeffect"); + newEvent("packetresourcepack"); + newEvent("packetupdateentitynbt"); + newEvent("packetcustompayload"); + newEvent("packetscoreboardobjective"); + newEvent("packetupdatescore"); + newEvent("packetdisplayscoreboard"); + newEvent("packetteams"); + newEvent("packetparticles"); + newEvent("packetentityproperties"); + + newEvent("sendpacketanimation"); + newEvent("sendpacketentityaction"); + newEvent("sendpacketinput"); + newEvent("sendpacketclosewindow"); + newEvent("sendpacketclickwindow"); + newEvent("sendpacketconfirmtransaction"); + newEvent("sendpacketkeepalive"); + newEvent("sendpacketchatmessage"); + newEvent("sendpacketuseentity"); + newEvent("sendpacketplayer"); + newEvent("sendpacketplayerposition"); + newEvent("sendpacketplayerlook"); + newEvent("sendpacketplayerposlook"); + newEvent("sendpacketplayerdigging"); + newEvent("sendpacketplayerblockplacement"); + newEvent("sendpackethelditemchange"); + newEvent("sendpacketcreativeinventoryaction"); + newEvent("sendpacketenchantitem"); + newEvent("sendpacketupdatesign"); + newEvent("sendpacketplayerabilities"); + newEvent("sendpackettabcomplete"); + newEvent("sendpacketclientsettings"); + newEvent("sendpacketclientstatus"); + newEvent("sendpacketcustompayload"); + newEvent("sendpacketspectate"); + newEvent("sendpacketresourcepackstatus");*/ globalsFunctor(this); globalsRequireFunctor(this); globalsUpdateFunctor(this); @@ -91,13 +201,13 @@ public class ModAPI { }); getModAPI().set("clientBrand", ClientBrandRetriever.getClientModName()); + setGlobal("enchantments", Enchantment.makeModDataStatic()); + setGlobal("blocks", Blocks.makeModData()); + setGlobal("items", Items.makeModData()); + setGlobal("materials", Material.makeModDataStatic()); setGlobal("mcinstance", mc); setGlobal("platform", PlatformAPI.makeModData()); setGlobal("logger", LoggerAPI.makeModData()); - getModAPI().setCallbackVoidWithDataArg("drawStringWithShadow", (BaseData params) -> { - mc.fontRendererObj.drawStringWithShadow(params.getString("msg"), params.getFloat("x"), params.getFloat("y"), params.getInt("color")); - EaglerForge.jsconsolelog("your params : " + params.getString("msg")+" "+params.getFloat("x")+" "+params.getFloat("y")+" "+params.getInt("color")); - }); getModAPI().setCallbackInt("getdisplayHeight", () -> { return mc.displayHeight; }); @@ -135,6 +245,15 @@ public class ModAPI { public void onUpdate() { + if (requiredList.contains("player") && mc.thePlayer != null) { + ModAPI.setGlobal("player", mc.thePlayer.makeModData()); + } +/* if (requiredList.contains("network") && mc.thePlayer != null && mc.thePlayer.sendQueue != null) { + ModAPI.setGlobal("network", mc.thePlayer.sendQueue.makeModData()); + }*/ + if (requiredList.contains("settings") && mc.gameSettings != null) { + ModAPI.setGlobal("settings", mc.gameSettings.makeModData()); + } ModAPI.callEvent("update", new ModData()); } } diff --git a/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java b/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java index 1ddb093..ec79cea 100644 --- a/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java +++ b/sources/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java @@ -14,7 +14,7 @@ public class EaglercraftVersion { /// Customize these to fit your fork: public static final String projectForkName = "EaglerForge"; - public static final String projectForkVersion = "v1.1"; + public static final String projectForkVersion = "v1.2"; public static final String projectForkVendor = "radmanplays"; public static final String projectForkURL = "https://github.com/eaglerforge/EaglerForge"; diff --git a/sources/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/GameProfile.java b/sources/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/GameProfile.java index 7d45576..546db9b 100644 --- a/sources/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/GameProfile.java +++ b/sources/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/GameProfile.java @@ -27,7 +27,7 @@ public class GameProfile { private final EaglercraftUUID id; - private final String name; + public final String name; private final Multimap properties;