Merge pull request #4 from q1051278389/1.7.10

Fixes by q1051278389
This commit is contained in:
Magnar 2020-08-03 03:46:41 +02:00 committed by GitHub
commit 9baf4682c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 384 additions and 41 deletions

5
.gitignore vendored
View file

@ -1,6 +1,5 @@
build
output
.gradle
.idea
*.iml
*.ipr
@ -10,13 +9,11 @@ out
Mekanism*.jar
MDK.zip
/run
/gradle
*.bat
*.classpath
*.project
/.settings
/eclipse
gradlew
*.txt
*.mtl

View file

@ -0,0 +1 @@
#Thu Jul 30 20:38:22 CST 2020

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

71
.gradle/gradle.log Normal file
View file

@ -0,0 +1,71 @@
#################################################
ForgeGradle 1.2-SNAPSHOT-fb514d3
https://github.com/MinecraftForge/ForgeGradle
#################################################
Powered by MCP unknown
http://modcoderpack.com
by: Searge, ProfMobius, Fesh0r,
R4wk, ZeuX, IngisKahn, bspkrs
#################################################
:MDKZip
:extractMcpData
:getVersionJson
:extractUserDev
:genSrgs SKIPPED
:compileApiJava警告: [options] 未与 -source 1.7 一起设置引导类路径
注: C:\Users\Xmsoft\IdeaProjects\Mekanism\src\api\java\dan200\computercraft\api\ComputerCraftAPI.java使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
1 个警告
:processApiResources UP-TO-DATE
:apiClasses
:sourceMainJava
:compileJava警告: [options] 未与 -source 1.7 一起设置引导类路径
C:\Users\Xmsoft\IdeaProjects\Mekanism\build\sources\java\codechicken\core\launch\DepLoader.java:12: 警告: URLClassPath是内部专用 API, 可能会在未来发行版中删除
import sun.misc.URLClassPath;
^
C:\Users\Xmsoft\IdeaProjects\Mekanism\build\sources\java\codechicken\core\launch\DepLoader.java:13: 警告: URLUtil是内部专用 API, 可能会在未来发行版中删除
import sun.net.util.URLUtil;
^
C:\Users\Xmsoft\IdeaProjects\Mekanism\build\sources\java\codechicken\core\launch\DepLoader.java:302: 警告: URLClassPath是内部专用 API, 可能会在未来发行版中删除
Field f_loaders = URLClassPath.class.getDeclaredField("loaders");
^
C:\Users\Xmsoft\IdeaProjects\Mekanism\build\sources\java\codechicken\core\launch\DepLoader.java:303: 警告: URLClassPath是内部专用 API, 可能会在未来发行版中删除
Field f_lmap = URLClassPath.class.getDeclaredField("lmap");
^
C:\Users\Xmsoft\IdeaProjects\Mekanism\build\sources\java\codechicken\core\launch\DepLoader.java:308: 警告: URLClassPath是内部专用 API, 可能会在未来发行版中删除
URLClassPath ucp = (URLClassPath) f_ucp.get(cl);
^
C:\Users\Xmsoft\IdeaProjects\Mekanism\build\sources\java\codechicken\core\launch\DepLoader.java:308: 警告: URLClassPath是内部专用 API, 可能会在未来发行版中删除
URLClassPath ucp = (URLClassPath) f_ucp.get(cl);
^
C:\Users\Xmsoft\IdeaProjects\Mekanism\build\sources\java\codechicken\core\launch\DepLoader.java:309: 警告: URLUtil是内部专用 API, 可能会在未来发行版中删除
Closeable loader = ((Map<String, Closeable>) f_lmap.get(ucp)).remove(URLUtil.urlNoFragString(url));
^
注: 某些输入文件使用或覆盖了已过时的 API。
注: 有关详细信息, 请使用 -Xlint:deprecation 重新编译。
注: 某些输入文件使用了未经检查或不安全的操作。
注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。
8 个警告
:processResources
:classes
:jar
:reobf
:coreJar
:generatorsJar
:toolsJar
:releaseJars
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture snapshot of output files for task 'releaseJars' during up-to-date check. See stacktrace for details.
> Failed to create MD5 hash for file C:\Users\Xmsoft\IdeaProjects\Mekanism\.gradle\2.7\taskArtifacts\cache.properties.lock.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 39.754 secs

View file

View file

@ -1,3 +1,16 @@
# ATTENTION #
This repo is thirdparty version,sometimes will not working
If have more bugs,please post to issues,I'll take a favour
# FIX LOG #
fix industrialTrubine can input Water or some liquid with another mod's pipe(now only accept water)
fix EnergyMatrix use IC2 cable(EnergyNetBug) connecting valve as a loop to fully charge the Matrix(now IC2Cable can't connect the MatrixValve which in "Input Mode")
# Mekanism for Minecraft 1.7.10 #
[**Official Website**](http://aidancbrady.com/mekanism/)

BIN
gradle/wrapper/gradle-wrapper.jar vendored Normal file

Binary file not shown.

View file

@ -0,0 +1,6 @@
#Mon Sep 14 12:28:28 PDT 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip

164
gradlew vendored Normal file
View file

@ -0,0 +1,164 @@
#!/usr/bin/env bash
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn ( ) {
echo "$*"
}
die ( ) {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

90
gradlew.bat vendored Normal file
View file

@ -0,0 +1,90 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
@rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

View file

@ -34,32 +34,32 @@ import cpw.mods.fml.common.Optional.InterfaceList;
import cpw.mods.fml.common.Optional.Method;
@InterfaceList({
@Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2"),
@Interface(iface = "ic2.api.energy.tile.IEnergySource", modid = "IC2"),
@Interface(iface = "ic2.api.tile.IEnergyStorage", modid = "IC2")
@Interface(iface = "ic2.api.energy.tile.IEnergySink", modid = "IC2"),
@Interface(iface = "ic2.api.energy.tile.IEnergySource", modid = "IC2"),
@Interface(iface = "ic2.api.tile.IEnergyStorage", modid = "IC2")
})
public class TileEntityInductionPort extends TileEntityInductionCasing implements IEnergyWrapper, IConfigurable, IActiveState
{
public boolean ic2Registered = false;
/** false = input, true = output */
public boolean mode;
public TileEntityInductionPort()
{
super("InductionPort");
}
@Override
public void onUpdate()
{
super.onUpdate();
if(!ic2Registered && MekanismUtils.useIC2())
{
register();
}
if(!worldObj.isRemote)
{
if(structure != null && mode == true)
@ -70,7 +70,7 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
}
}
}
@Override
public EnumSet<ForgeDirection> getOutputtingSides()
{
@ -78,7 +78,7 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
{
EnumSet set = EnumSet.allOf(ForgeDirection.class);
set.remove(ForgeDirection.UNKNOWN);
for(ForgeDirection side : ForgeDirection.VALID_DIRECTIONS)
{
if(structure.locations.contains(Coord4D.get(this).getFromSide(side)))
@ -86,10 +86,10 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
set.remove(side);
}
}
return set;
}
return EnumSet.noneOf(ForgeDirection.class);
}
@ -102,17 +102,17 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
set.remove(ForgeDirection.UNKNOWN);
return set;
}
return EnumSet.noneOf(ForgeDirection.class);
}
@Method(modid = "IC2")
public void register()
{
if(!worldObj.isRemote)
{
TileEntity registered = EnergyNet.instance.getTileEntity(worldObj, xCoord, yCoord, zCoord);
if(registered != this)
{
if(registered instanceof IEnergyTile)
@ -134,7 +134,7 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
if(!worldObj.isRemote)
{
TileEntity registered = EnergyNet.instance.getTileEntity(worldObj, xCoord, yCoord, zCoord);
if(registered instanceof IEnergyTile)
{
MinecraftForge.EVENT_BUS.post(new EnergyTileUnloadEvent((IEnergyTile)registered));
@ -147,7 +147,7 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
{
return structure != null ? structure.remainingOutput : 0;
}
private double getMaxInput()
{
return structure != null ? structure.remainingInput : 0;
@ -157,11 +157,11 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
public void handlePacketData(ByteBuf dataStream)
{
super.handlePacketData(dataStream);
if(worldObj.isRemote)
{
mode = dataStream.readBoolean();
MekanismUtils.updateBlock(worldObj, xCoord, yCoord, zCoord);
}
}
@ -170,17 +170,17 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
public ArrayList getNetworkedData(ArrayList data)
{
super.getNetworkedData(data);
data.add(mode);
return data;
}
@Override
public void onAdded()
{
super.onAdded();
if(MekanismUtils.useIC2())
{
register();
@ -329,7 +329,8 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
@Method(modid = "IC2")
public boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction)
{
return getConsumingSides().contains(direction);
return false;
//return getConsumingSides().contains(direction);
}
@Override
@ -427,23 +428,23 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
}
@Override
public boolean onSneakRightClick(EntityPlayer player, int side)
public boolean onSneakRightClick(EntityPlayer player, int side)
{
if(!worldObj.isRemote)
{
mode = !mode;
String modeText = " " + (mode ? EnumColor.DARK_RED : EnumColor.DARK_GREEN) + LangUtils.transOutputInput(mode) + ".";
player.addChatMessage(new ChatComponentText(EnumColor.DARK_BLUE + "[Mekanism] " + EnumColor.GREY + LangUtils.localize("tooltip.configurator.inductionPortMode") + modeText));
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
markDirty();
}
return true;
}
@Override
public boolean onRightClick(EntityPlayer player, int side)
public boolean onRightClick(EntityPlayer player, int side)
{
return false;
}
@ -471,4 +472,4 @@ public class TileEntityInductionPort extends TileEntityInductionCasing implement
{
return false;
}
}
}

View file

@ -108,7 +108,7 @@ public abstract class TileEntityReactorBlock extends TileEntityElectricBlock imp
{
if(getReactor() != null)
{
getReactor().formMultiblock(false);
getReactor().formMultiblock(true);
}
else {
updateController();
@ -124,7 +124,7 @@ public abstract class TileEntityReactorBlock extends TileEntityElectricBlock imp
if(found != null && (found.getReactor() == null || !found.getReactor().isFormed()))
{
found.formMultiblock(false);
found.formMultiblock(true);
}
}
}

View file

@ -146,7 +146,7 @@ public class TileEntityReactorController extends TileEntityReactorBlock implemen
{
super.onAdded();
formMultiblock(false);
formMultiblock(true);
}
@Override

View file

@ -7,7 +7,6 @@ import ic2.api.energy.tile.IEnergyConductor;
import ic2.api.energy.tile.IEnergyTile;
import java.util.EnumSet;
import mekanism.api.Coord4D;
import mekanism.api.MekanismConfig.general;
import mekanism.common.base.IEnergyWrapper;
@ -357,19 +356,20 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I
{
return 0;
}
if(resource.getFluid()==FluidRegistry.WATER){
return 0;
}
int filled = fluidTank.fill(resource, doFill);
if(doFill)
{
structure.newSteamInput += filled;
}
if(filled < structure.getFluidCapacity() && structure.dumpMode != GasMode.IDLE)
{
filled = structure.getFluidCapacity();
}
return filled;
}