Skip to content

Commit

Permalink
Merge pull request #5 from Team-RTG/1.11.2-dev
Browse files Browse the repository at this point in the history
Merged dev into master (5.1.0.0)
  • Loading branch information
whichonespink44 authored Jun 13, 2017
2 parents 15e7d62 + bba3867 commit 3a9ec9a
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 36 deletions.
14 changes: 7 additions & 7 deletions build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
43 changes: 21 additions & 22 deletions etc/config/PassableLeaves/passableleaves.cfg
Original file line number Diff line number Diff line change
@@ -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
}


2 changes: 1 addition & 1 deletion src/main/java/passableleaves/PassableLeaves.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 6 additions & 4 deletions src/main/java/passableleaves/core/PLCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 {
Expand All @@ -27,7 +29,7 @@ public PLCore() {

@Override
public String[] getASMTransformerClass() {
return new String[0];
return new String[] {"passableleaves.core.PLTransformer"};
}

@Override
Expand All @@ -47,7 +49,7 @@ public void injectData(Map<String, Object> data) {

@Override
public String getAccessTransformerClass() {
return "passableleaves.core.PLTransformer";
return null;
}

}
}
4 changes: 2 additions & 2 deletions src/main/java/passableleaves/core/PLTransformer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions src/main/java/passableleaves/reference/ModInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit 3a9ec9a

Please sign in to comment.