diff --git a/build.properties b/build.properties index a79f5ae47..4979422ad 100644 --- a/build.properties +++ b/build.properties @@ -3,18 +3,18 @@ mod_id=passableleaves mod_name=Passable Leaves mod_desc=Minecraft core mod that makes leaves passable. -mod_version=4.1.0.0 -mc_version=1.10.2 +mod_version=5.1.0.0 +mc_version=1.11.2 mod_url=https://github.com/Team-RTG/PassableLeaves mod_author="Team RTG" -mod_creds="Based on code donated by HellFirePvP for the Appalachia mod." +mod_creds=Based on code donated by HellFirePvP for the Appalachia mod. mod_logo=assets/passableleaves/logo.png -mcf_version=12.18.2.2099 -mcf_minver=12.18.1.2011 +mcf_version=13.20.0.2315 +mcf_minver=13.20.0.2228 mcf_maxver= # mcf_suffix is the branch suffix (without '-') on the Forge version when it's not the default branch in the Forge repo # This may be the same as mc_version, eg Non-default: 1.9.4-12.18.2.2099-1.9.4, Default: 1.9.4-12.18.2.2099 mcf_suffix= -mcp_mappings=snapshot_nodoc_20161027 +mcp_mappings=stable_nodoc_32 run_dir=run -package_base=org.teamrtg +package_base=org.teamrtg \ No newline at end of file diff --git a/etc/config/PassableLeaves/passableleaves.cfg b/etc/config/PassableLeaves/passableleaves.cfg index f9990844e..7d98fda20 100644 --- a/etc/config/PassableLeaves/passableleaves.cfg +++ b/etc/config/PassableLeaves/passableleaves.cfg @@ -1,28 +1,27 @@ # Configuration file -debugging { - # WARNING: This should only be enabled if you know what you're doing. - # [default: false] - B:"Enable Debugging"=false -} - - leaves { - # fallDistance - # [default: 0] - S:fallDistance=0 - - # motionX - # [default: 0.75] - S:motionX=0.75 - - # motionY - # [default: 0.75] - S:motionY=0.75 - - # motionZ - # [default: 0.75] - S:motionZ=0.75 + # Higher values = more damage taken upon falling onto leaves. + # For example, most blocks have a value of 1.0 (full damage). + # Hay blocks have a value of 0.2 (20% damage). + # Slime blocks & cobwebs have a value of 0.0 (no damage); + # [range: 0.0 ~ 1.0, default: 0.0] + S:"Amount of fall distance to keep upon falling onto leaves."=0.0 + + # Higher values = faster speed. Set to 1.0 to pass through leaves without slowing down. + # You normally want this to be the same as the rate of speed along the Z axis. + # [range: 0.0 ~ 1.0, default: 0.75] + S:"Rate of speed when passing through leaves along the X axis."=0.75 + + # Higher values = faster speed. Set to 1.0 to pass through leaves without slowing down. + # This setting affects how fast you fall through leaves. + # [range: 0.0 ~ 1.0, default: 0.75] + S:"Rate of speed when passing through leaves along the Y axis."=0.75 + + # Higher values = faster speed. Set to 1.0 to pass through leaves without slowing down. + # You normally want this to be the same as the rate of speed along the X axis. + # [range: 0.0 ~ 1.0, default: 0.75] + S:"Rate of speed when passing through leaves along the Z axis."=0.75 } diff --git a/src/main/java/passableleaves/PassableLeaves.java b/src/main/java/passableleaves/PassableLeaves.java index 667b9ef9b..bd7524d84 100644 --- a/src/main/java/passableleaves/PassableLeaves.java +++ b/src/main/java/passableleaves/PassableLeaves.java @@ -21,7 +21,7 @@ modid = ModInfo.MOD_ID, name = ModInfo.MOD_NAME, version = ModInfo.MOD_VERSION, - dependencies = "required-after:Forge@[" + ModInfo.MCF_MINVER + "," + ModInfo.MCF_MAXVER + ")", + dependencies = "required-after:forge@[" + ModInfo.MCF_MINVER + "," + ModInfo.MCF_MAXVER + ")", acceptableRemoteVersions = "*" ) public class PassableLeaves { diff --git a/src/main/java/passableleaves/core/PLCore.java b/src/main/java/passableleaves/core/PLCore.java index 1dbcb506c..ade70d551 100644 --- a/src/main/java/passableleaves/core/PLCore.java +++ b/src/main/java/passableleaves/core/PLCore.java @@ -5,6 +5,8 @@ import net.minecraftforge.fml.common.FMLLog; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; +import passableleaves.reference.ModInfo; + /** * This class was originally written by HellFirePvP for the Appalachia addon for RTG. * It was extracted from Appalachia by WhichOnesPink so that it could be a standalone mod. @@ -14,7 +16,7 @@ * Date: 12.02.2017 / 15:23 */ @IFMLLoadingPlugin.Name(value = "PLCore") -@IFMLLoadingPlugin.MCVersion(value = "1.10.2") +@IFMLLoadingPlugin.MCVersion(value = ModInfo.MC_VERSION) @IFMLLoadingPlugin.TransformerExclusions({"passableleaves.core"}) @IFMLLoadingPlugin.SortingIndex(1001) public class PLCore implements IFMLLoadingPlugin { @@ -27,7 +29,7 @@ public PLCore() { @Override public String[] getASMTransformerClass() { - return new String[0]; + return new String[] {"passableleaves.core.PLTransformer"}; } @Override @@ -47,7 +49,7 @@ public void injectData(Map data) { @Override public String getAccessTransformerClass() { - return "passableleaves.core.PLTransformer"; + return null; } -} +} \ No newline at end of file diff --git a/src/main/java/passableleaves/core/PLTransformer.java b/src/main/java/passableleaves/core/PLTransformer.java index 0ef8115e4..b235e7b0d 100644 --- a/src/main/java/passableleaves/core/PLTransformer.java +++ b/src/main/java/passableleaves/core/PLTransformer.java @@ -34,7 +34,7 @@ public byte[] transform(String name, String transformedName, byte[] basicClass) //TODO keep those updated with minecraft updates as SRG names or parameters may change! String methodNameGetCollisionBox = PLCore.isDebofEnabled ? "func_180646_a" : "getCollisionBoundingBox"; - String methodDescGetCollisionBox = "(Lnet/minecraft/block/state/IBlockState;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/AxisAlignedBB;"; + String methodDescGetCollisionBox = "(Lnet/minecraft/block/state/IBlockState;Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/util/math/AxisAlignedBB;"; String methodNameIsPassable = PLCore.isDebofEnabled ? "func_176205_b" : "isPassable"; String methodDescIsPassable = "(Lnet/minecraft/world/IBlockAccess;Lnet/minecraft/util/math/BlockPos;)Z"; @@ -82,7 +82,7 @@ public byte[] transform(String name, String transformedName, byte[] basicClass) //TODO keep track of parameter changes between minecraft updates! LocalVariableNode lvnThis = new LocalVariableNode("this", "Lnet/minecraft/block/BlockLeaves;", null, startLabel, endLabel, 0); LocalVariableNode lvnPState = new LocalVariableNode("inState", "Lnet/minecraft/block/state/IBlockState;", null, startLabel, endLabel, 1); - LocalVariableNode lvnPWorld = new LocalVariableNode("inWorld", "Lnet/minecraft/world/World;", null, startLabel, endLabel, 2); + LocalVariableNode lvnPWorld = new LocalVariableNode("inWorld", "Lnet/minecraft/world/IBlockAccess;", null, startLabel, endLabel, 2); LocalVariableNode lvnPPos = new LocalVariableNode("inPos", "Lnet/minecraft/util/math/BlockPos;", null, startLabel, endLabel, 3); getCollisionBox.localVariables = Lists.newArrayList(lvnThis, lvnPState, lvnPWorld, lvnPPos); diff --git a/src/main/java/passableleaves/reference/ModInfo.java b/src/main/java/passableleaves/reference/ModInfo.java index 3b9d9d58f..b7e5350a0 100644 --- a/src/main/java/passableleaves/reference/ModInfo.java +++ b/src/main/java/passableleaves/reference/ModInfo.java @@ -6,6 +6,7 @@ public class ModInfo public static final String MOD_ID = "passableleaves"; public static final String MOD_NAME = "Passable Leaves"; public static final String MOD_VERSION = "@MOD_VERSION@"; + public static final String MC_VERSION = "1.11.2"; public static final String MCF_MINVER = "0.0-MCF+MINVER"; public static final String MCF_MAXVER = "9001.0-MCF+MAXVER"; public static final String CONFIG_DIRECTORY = "PassableLeaves";