├── .github └── workflows │ └── compile.yml ├── .gitignore ├── AdditionalPipesBC_Client.launch ├── AdditionalPipesBC_Server.launch ├── LICENSE ├── README.md ├── README.txt ├── debugger.png ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── lib ├── .gradle │ └── 2.4 │ │ └── taskArtifacts │ │ ├── cache.properties │ │ ├── cache.properties.lock │ │ ├── fileSnapshots.bin │ │ └── taskArtifacts.bin ├── buildcraft-7.1.22-dev.jar ├── buildcraft-7.1.22-sources.jar ├── buildcraft-7.2.0-dev.jar ├── buildcraft-7.2.0-sources.jar ├── buildcraft-7.2.0.jar └── buildcraft-compat-7.1.6-dev.jar └── src └── main ├── java └── buildcraft │ └── additionalpipes │ ├── APConfiguration.java │ ├── APPipeDefintions.java │ ├── AdditionalPipes.java │ ├── ChunkLoadViewDataProxy.java.disabled │ ├── CommandAdditionalPipes.java │ ├── MultiPlayerProxy.java │ ├── MultiPlayerProxyClient.java │ ├── api │ ├── ITeleportPipe.java │ ├── TeleportManagerBase.java │ ├── TeleportPipeType.java │ └── package-info.java │ ├── chunkloader │ ├── BlockTeleportTether.java │ ├── ChunkLoadingHandler.java │ └── TileTeleportTether.java │ ├── gates │ ├── APTrigger.java │ ├── GateProvider.java │ └── TriggerPipeClosed.java │ ├── gui │ ├── ContainerAdvancedWoodPipe.java │ ├── ContainerDistributionPipe.java │ ├── ContainerJeweledPipe.java │ ├── ContainerPipeClosed.java │ ├── ContainerPriorityInsertionPipe.java │ ├── ContainerTeleportPipe.java │ ├── GuiAdvancedWoodPipe.java │ ├── GuiButtonOnOff.java │ ├── GuiDistributionPipe.java │ ├── GuiHandler.java │ ├── GuiJeweledPipe.java │ ├── GuiPipeClosed.java │ ├── GuiPriorityInsertionPipe.java │ └── GuiTeleportPipe.java │ ├── item │ └── ItemDogDeaggravator.java │ ├── keyboard │ ├── KeyInputEventHandler.java │ └── Keybindings.java │ ├── network │ ├── PacketHandler.java │ └── message │ │ ├── MessageAdvWoodPipe.java │ │ ├── MessageChunkloadData.java.disabled │ │ ├── MessageChunkloadRequest.java.disabled │ │ ├── MessageDistPipe.java │ │ ├── MessageJeweledPipeOptionsClient.java │ │ ├── MessageJeweledPipeOptionsServer.java │ │ ├── MessagePriorityPipe.java │ │ ├── MessageTelePipeData.java │ │ └── MessageTelePipeUpdate.java │ ├── pipes │ ├── APPipe.java │ ├── PipeBehaviorAddition.java │ ├── PipeBehaviorAdvWood.java │ ├── PipeBehaviorClosed.java │ ├── PipeBehaviorDistribution.java │ ├── PipeBehaviorGravityFeed.java │ ├── PipeBehaviorJeweled.java │ ├── PipeBehaviorPriorityInsertion.java │ ├── PipeBehaviorSwitch.java │ ├── PipeBehaviorTeleport.java │ ├── PipeBehaviorTeleportFluids.java │ ├── PipeBehaviorTeleportItems.java │ ├── PipeBehaviorTeleportPower.java │ ├── PipeBehaviorWaterPump.java │ ├── PipeLiquidsObsidian.java.disabled │ ├── SideFilterData.java │ └── TeleportManager.java │ ├── sound │ └── APSounds.java │ ├── test │ └── TeleportManagerTest.java │ ├── textures │ └── Textures.java │ └── utils │ ├── GeometryUtils.java │ ├── InventoryUtils.java │ ├── ItemHandlerPresenceFilter.java │ ├── Log.java │ ├── NetworkUtils.java │ ├── PipeCreator.java │ └── PlayerUtils.java └── resources ├── assets ├── .gitignore └── additionalpipes │ ├── blockstates │ └── teleport_tether.json │ ├── compat │ └── buildcraft │ │ └── guide │ │ ├── contents.json │ │ └── en_us │ │ └── pipe │ │ └── pipe_items_teleport.md │ ├── lang │ ├── de_de.lang │ ├── en_us.lang │ ├── es_es.lang │ ├── fr_fr.lang │ ├── ja_jp.lang │ ├── pt_br.lang │ ├── ru_ru.lang │ └── zh_cn.lang │ ├── models │ ├── block │ │ └── teleport_tether.json │ └── item │ │ ├── dog_deaggravator.json │ │ └── teleport_tether.json │ ├── recipes │ ├── dog_deaggravator.json │ ├── pipe_fluids_switch.json │ ├── pipe_fluids_teleport.json │ ├── pipe_fluids_water_pump.json │ ├── pipe_items_addition.json │ ├── pipe_items_adv_wood.json │ ├── pipe_items_closed.json │ ├── pipe_items_distribution.json │ ├── pipe_items_gravity_feed.json │ ├── pipe_items_jeweled.json │ ├── pipe_items_priority.json │ ├── pipe_items_switch.json │ └── pipe_power_switch.json │ ├── sounds.json │ ├── sounds │ └── copper-bell.ogg │ └── textures │ ├── blocks │ ├── jeweledPipeBase.pdn │ └── teleport_tether.png │ ├── gui │ ├── background_adv_wood.png │ ├── background_distribution.png │ ├── background_generic.png │ ├── background_jeweled.pdn │ ├── background_jeweled.png │ ├── background_priority.png │ ├── jeweled_gui_outline_1.png │ ├── jeweled_gui_outline_2.png │ ├── jeweled_gui_outline_3.png │ ├── jeweled_gui_outline_4.png │ ├── jeweled_gui_outline_5.png │ └── jeweled_gui_outline_6.png │ ├── items │ ├── dog_deaggravator.png │ └── triggers │ │ ├── 1.png │ │ ├── 2.png │ │ ├── 3.png │ │ ├── 4.png │ │ ├── 5.png │ │ ├── 6.png │ │ ├── 7.png │ │ ├── 8.png │ │ └── pipe_closed.png │ └── pipes │ ├── 15.png │ ├── 31.png │ ├── 8.png │ ├── liquidsRedstonePipe.png │ ├── logisticsTeleportPipe.png │ ├── pipe_fluids_switch_closed.png │ ├── pipe_fluids_switch_open.png │ ├── pipe_fluids_teleport.png │ ├── pipe_fluids_water_pump.png │ ├── pipe_items_addition.png │ ├── pipe_items_adv_wood_input.png │ ├── pipe_items_adv_wood_output.png │ ├── pipe_items_closed_closed.png │ ├── pipe_items_closed_open.png │ ├── pipe_items_distribution_down.png │ ├── pipe_items_distribution_east.png │ ├── pipe_items_distribution_north.png │ ├── pipe_items_distribution_south.png │ ├── pipe_items_distribution_up.png │ ├── pipe_items_distribution_west.png │ ├── pipe_items_gravity_feed_sides.png │ ├── pipe_items_gravity_feed_up.pdn │ ├── pipe_items_gravity_feed_up.png │ ├── pipe_items_jeweled_down.png │ ├── pipe_items_jeweled_east.png │ ├── pipe_items_jeweled_north.png │ ├── pipe_items_jeweled_south.png │ ├── pipe_items_jeweled_up.png │ ├── pipe_items_jeweled_west.png │ ├── pipe_items_priority_down.png │ ├── pipe_items_priority_east.png │ ├── pipe_items_priority_north.png │ ├── pipe_items_priority_south.png │ ├── pipe_items_priority_up.png │ ├── pipe_items_priority_west.png │ ├── pipe_items_switch_closed.png │ ├── pipe_items_switch_open.png │ ├── pipe_items_teleport.png │ ├── pipe_power_switch_closed.png │ ├── pipe_power_switch_open.png │ ├── pipe_power_teleport.png │ └── redstonePipeActive.png ├── mcmod.info └── pack.mcmeta /.github/workflows/compile.yml: -------------------------------------------------------------------------------- 1 | name: Compile 2 | 3 | on: 4 | push 5 | 6 | jobs: 7 | build: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout sources 11 | uses: actions/checkout@v5 12 | - name: Setup Java 13 | uses: actions/setup-java@v4 14 | with: 15 | distribution: 'temurin' 16 | java-version: 8 17 | - name: Setup Gradle 18 | uses: gradle/actions/setup-gradle@v4 19 | - name: Build with Gradle 20 | run: ./gradlew build -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .project 2 | .classpath 3 | **.class 4 | CREDITS-fml.txt 5 | forge-*.txt 6 | /LICENSE-fml.txt 7 | MinecraftForge-*.txt 8 | /bin 9 | /eclipse 10 | 11 | /minecraft/* 12 | /minecraft.1.7.10 13 | /minecraft-server 14 | !/minecraft/mods 15 | /build 16 | /.settings 17 | /.gradle 18 | 19 | /buildcraft_resources 20 | 21 | *.iml 22 | /.idea/ 23 | /classes/ -------------------------------------------------------------------------------- /AdditionalPipesBC_Client.launch: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AdditionalPipesBC_Server.launch: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Minecraft Mod Public License 2 | ============================ 3 | 4 | Version 1.0.1 5 | 6 | 0. Definitions 7 | -------------- 8 | 9 | Minecraft: Denotes a copy of the Minecraft game licensed by Mojang AB 10 | 11 | User: Anybody that interacts with the software in one of the following ways: 12 | - play 13 | - decompile 14 | - recompile or compile 15 | - modify 16 | - distribute 17 | 18 | Mod: The mod code designated by the present license, in source form, binary 19 | form, as obtained standalone, as part of a wider distribution or resulting from 20 | the compilation of the original or modified sources. 21 | 22 | Dependency: Code required for the mod to work properly. This includes 23 | dependencies required to compile the code as well as any file or modification 24 | that is explicitely or implicitely required for the mod to be working. 25 | 26 | 1. Scope 27 | -------- 28 | 29 | The present license is granted to any user of the mod. As a prerequisite, 30 | a user must own a legally acquired copy of Minecraft 31 | 32 | 2. Liability 33 | ------------ 34 | 35 | This mod is provided 'as is' with no warranties, implied or otherwise. The owner 36 | of this mod takes no responsibility for any damages incurred from the use of 37 | this mod. This mod alters fundamental parts of the Minecraft game, parts of 38 | Minecraft may not work with this mod installed. All damages caused from the use 39 | or misuse of this mad fall on the user. 40 | 41 | 3. Play rights 42 | -------------- 43 | 44 | The user is allowed to install this mod on a client or a server and to play 45 | without restriction. 46 | 47 | 4. Modification rights 48 | ---------------------- 49 | 50 | The user has the right to decompile the source code, look at either the 51 | decompiled version or the original source code, and to modify it. 52 | 53 | 5. Derivation rights 54 | -------------------- 55 | 56 | The user has the rights to derive code from this mod, that is to say to 57 | write code that extends or instanciate the mod classes or interfaces, refer to 58 | its objects, or calls its functions. This code is known as "derived" code, and 59 | can be licensed under a license different from this mod. 60 | 61 | 6. Distribution of original or modified copy rights 62 | --------------------------------------------------- 63 | 64 | Is subject to distribution rights this entire mod in its various forms. This 65 | include: 66 | - original binary or source forms of this mod files 67 | - modified versions of these binaries or source files, as well as binaries 68 | resulting from source modifications 69 | - patch to its source or binary files 70 | - any copy of a portion of its binary source files 71 | 72 | The user is allowed to redistribute this mod partially, in totality, or 73 | included in a distribution. 74 | 75 | When distributing binary files, the user must provide means to obtain its 76 | entire set of sources or modified sources at no costs. 77 | 78 | All distributions of this mod must remain licensed under the MMPL. 79 | 80 | All dependencies that this mod have on other mods or classes must be licensed 81 | under conditions comparable to this version of MMPL, with the exception of the 82 | Minecraft code and the mod loading framework (e.g. ModLoader, ModLoaderMP or 83 | Bukkit). 84 | 85 | Modified version of binaries and sources, as well as files containing sections 86 | copied from this mod, should be distributed under the terms of the present 87 | license. 88 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Update of Additional Pipes for BC3+ and Minecraft 1.5+ 2 | 3 | ### Downloads 4 | Click the releases tab at the top. 5 | 6 | ### Mod Documentation 7 | [Current CurseForge page is here](https://www.curseforge.com/minecraft/mc-mods/additional-pipes-for-buildcraft). 8 | 9 | [an archived version of the forum thread is here](https://web.archive.org/web/20150919105906/http://mod-buildcraft.com/forums/showthread.php?tid=1467). 10 | 11 | ### Cloning and Compiling ### 12 | 13 | Note that you will need JDK 8 as this mod (still) targets Minecraft 1.12. You can download that [here](https://www.openlogic.com/openjdk-downloads). 14 | 15 | Also note that you will need gradle 6.x, not older or newer. Gradle 6.8 will be used automatically if you use the `gradlew` script. 16 | 17 | git clone https://github.com/tcooc/AdditionalPipesBC.git 18 | cd AdditionalPipesBC 19 | gradlew setupDecompWorkspace 20 | gradlew build 21 | Compiled binaries can be found in `build/libs`. 22 | 23 | 24 | ### Setting Up Eclipse ### 25 | 1. Install Eclipse JDK. 26 | 2. Run the command `gradlew setupDecompWorkspace --refresh-dependencies eclipse` 27 | 3. In Eclipse, go to `File > Import... > General > Existing Projects into Workspace` 28 | 4. Hit Next. Click Browse... in the top right, and select the directory you cloned Additional Pipes into. Check the box next to AdditionalPipesBC in the Projects list. 29 | 5. Hit Finish, and the mod project should be imported. 30 | 6. Set up the run configuration. Go to `File > Import... > Run/Debug > Launch Configurations` and hit next. 31 | 7. Click the Browse... button and select the directory you cloned Additional Pipes into. Check the box next to `AdditionalPipesBC_Client.launch` and `AdditionalPipesBC_Server.launch` in the right pane. 32 | 8. Hit finish. 33 | 9. Click the down arrow next to the play button on the top bar, select `Run Configurations...`, and click on AP Client 1.8 in the left pane. 34 | 10. Click on `AdditionalPipesBC_Client` in the left pane and go to the arguments tab. 35 | 11. Replace `` with your Minecraft username. 36 | 11. Hit run. If it works, you're done! 37 | 12. If it doesn't, it's probably because your `.gradle` folder is not in your home directory, or you have unusual environment variables defined. Either way, in the Arguments tab, replace `${env_var:userprofile}${env_var:HOME}/.gradle` with the full path to the folder containing your `.gradle` folder. 38 | 39 | *Done!* 40 | 41 | ### Download: [latest releases](https://github.com/tcooc/AdditionalPipesBC/releases) #### 42 | To install, place in the standard minecraft/mods folder. 43 | 44 | ### Credits to Zeldo, DaStormBringer and [Additional Pipes Contributors](https://github.com/tcooc/AdditionalPipesBC/graphs/contributors) for their work on the mod. 45 | 46 | 1.2.5 Thread: http://www.minecraftforum.net/topic/856360-125bc2214-bc315rev213rev310-additional-pipes-for-buildcraft-teleport-pipes/ 47 | 48 | Pipes still generally do the same thing. Some GUIs and recipes have changed (check NEI for recipes). 49 | 50 | #### Experimental Pipes & Gate Features #### 51 | 52 | ##### Power Switch Pipe ##### 53 | 54 | Just a nifty little pipe with nice texture effects. Complete credits to ABO for the idea (the code is original though). 55 | 56 | ##### Closed Pipe ##### 57 | 58 | This pipe has 3 functions: 59 | 60 | 1. Acts like a normal pipe when transporting items. 61 | 62 | 2. Acts like a void pipe in that it never drops items. 63 | 64 | 3. Stores the items it "drops" inside an buffer. This buffer will destroy the oldest stack to make space for new stack when full. 65 | 66 | Closed pipes also have a "closed" gate trigger which activates when the buffer has item(s) inside. 67 | 68 | ##### Water Pump Pipe ##### 69 | 70 | Just a pipe that fills with water if a source block is under it. -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | ------------------------------------------- 2 | Source installation information for modders 3 | ------------------------------------------- 4 | This code follows the Minecraft Forge installation methodology. It will apply 5 | some small patches to the vanilla MCP source code, giving you and it access 6 | to some of the data and functions you need to build a successful mod. 7 | 8 | Note also that the patches are built against "unrenamed" MCP source code (aka 9 | srgnames) - this means that you will not be able to read them directly against 10 | normal code. 11 | 12 | Source pack installation information: 13 | 14 | Standalone source installation 15 | ============================== 16 | 17 | To install this source code for development purposes, extract this zip file. 18 | It ships with a demonstration mod. Run 'gradlew setupDevWorkspace' to create 19 | a gradle environment primed with FML. Run 'gradlew eclipse' or 'gradlew idea' to 20 | create an IDE workspace of your choice. 21 | Refer to ForgeGradle for more information about the gradle environment 22 | Note: On macs or linux you run the './gradlew.sh' instead of 'gradlew' 23 | 24 | Forge source installation 25 | ========================= 26 | MinecraftForge ships with this code and installs it as part of the forge 27 | installation process, no further action is required on your part. 28 | 29 | For reference this is version @MAJOR@.@MINOR@.@REV@.@BUILD@ of FML 30 | for Minecraft version @MCVERSION@. 31 | 32 | LexManos' Install Video 33 | ======================= 34 | https://www.youtube.com/watch?v=8VEdtQLuLO0&feature=youtu.be 35 | 36 | For more details update more often refer to the Forge Forums: 37 | http://www.minecraftforge.net/forum/index.php/topic,14048.0.html 38 | -------------------------------------------------------------------------------- /debugger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/debugger.png -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx4096M 2 | mc_version=1.12.2 3 | jei_version=4.8.5.142 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip 6 | -------------------------------------------------------------------------------- /gradlew: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | ############################################################################## 4 | ## 5 | ## Gradle start up script for UN*X 6 | ## 7 | ############################################################################## 8 | 9 | # Attempt to set APP_HOME 10 | # Resolve links: $0 may be a link 11 | PRG="$0" 12 | # Need this for relative symlinks. 13 | while [ -h "$PRG" ] ; do 14 | ls=`ls -ld "$PRG"` 15 | link=`expr "$ls" : '.*-> \(.*\)$'` 16 | if expr "$link" : '/.*' > /dev/null; then 17 | PRG="$link" 18 | else 19 | PRG=`dirname "$PRG"`"/$link" 20 | fi 21 | done 22 | SAVED="`pwd`" 23 | cd "`dirname \"$PRG\"`/" >/dev/null 24 | APP_HOME="`pwd -P`" 25 | cd "$SAVED" >/dev/null 26 | 27 | APP_NAME="Gradle" 28 | APP_BASE_NAME=`basename "$0"` 29 | 30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 31 | DEFAULT_JVM_OPTS="" 32 | 33 | # Use the maximum available, or set MAX_FD != -1 to use that value. 34 | MAX_FD="maximum" 35 | 36 | warn () { 37 | echo "$*" 38 | } 39 | 40 | die () { 41 | echo 42 | echo "$*" 43 | echo 44 | exit 1 45 | } 46 | 47 | # OS specific support (must be 'true' or 'false'). 48 | cygwin=false 49 | msys=false 50 | darwin=false 51 | nonstop=false 52 | case "`uname`" in 53 | CYGWIN* ) 54 | cygwin=true 55 | ;; 56 | Darwin* ) 57 | darwin=true 58 | ;; 59 | MINGW* ) 60 | msys=true 61 | ;; 62 | NONSTOP* ) 63 | nonstop=true 64 | ;; 65 | esac 66 | 67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 68 | 69 | # Determine the Java command to use to start the JVM. 70 | if [ -n "$JAVA_HOME" ] ; then 71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 72 | # IBM's JDK on AIX uses strange locations for the executables 73 | JAVACMD="$JAVA_HOME/jre/sh/java" 74 | else 75 | JAVACMD="$JAVA_HOME/bin/java" 76 | fi 77 | if [ ! -x "$JAVACMD" ] ; then 78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 79 | 80 | Please set the JAVA_HOME variable in your environment to match the 81 | location of your Java installation." 82 | fi 83 | else 84 | JAVACMD="java" 85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 86 | 87 | Please set the JAVA_HOME variable in your environment to match the 88 | location of your Java installation." 89 | fi 90 | 91 | # Increase the maximum file descriptors if we can. 92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then 93 | MAX_FD_LIMIT=`ulimit -H -n` 94 | if [ $? -eq 0 ] ; then 95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then 96 | MAX_FD="$MAX_FD_LIMIT" 97 | fi 98 | ulimit -n $MAX_FD 99 | if [ $? -ne 0 ] ; then 100 | warn "Could not set maximum file descriptor limit: $MAX_FD" 101 | fi 102 | else 103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" 104 | fi 105 | fi 106 | 107 | # For Darwin, add options to specify how the application appears in the dock 108 | if $darwin; then 109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" 110 | fi 111 | 112 | # For Cygwin, switch paths to Windows format before running java 113 | if $cygwin ; then 114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"` 115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` 116 | JAVACMD=`cygpath --unix "$JAVACMD"` 117 | 118 | # We build the pattern for arguments to be converted via cygpath 119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` 120 | SEP="" 121 | for dir in $ROOTDIRSRAW ; do 122 | ROOTDIRS="$ROOTDIRS$SEP$dir" 123 | SEP="|" 124 | done 125 | OURCYGPATTERN="(^($ROOTDIRS))" 126 | # Add a user-defined pattern to the cygpath arguments 127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then 128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" 129 | fi 130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 131 | i=0 132 | for arg in "$@" ; do 133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` 134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option 135 | 136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition 137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` 138 | else 139 | eval `echo args$i`="\"$arg\"" 140 | fi 141 | i=$((i+1)) 142 | done 143 | case $i in 144 | (0) set -- ;; 145 | (1) set -- "$args0" ;; 146 | (2) set -- "$args0" "$args1" ;; 147 | (3) set -- "$args0" "$args1" "$args2" ;; 148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;; 149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; 150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; 151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; 152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; 153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; 154 | esac 155 | fi 156 | 157 | # Escape application args 158 | save () { 159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done 160 | echo " " 161 | } 162 | APP_ARGS=$(save "$@") 163 | 164 | # Collect all arguments for the java command, following the shell quoting and substitution rules 165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" 166 | 167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong 168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then 169 | cd "$(dirname "$0")" 170 | fi 171 | 172 | exec "$JAVACMD" "$@" -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega -------------------------------------------------------------------------------- /lib/.gradle/2.4/taskArtifacts/cache.properties: -------------------------------------------------------------------------------- 1 | #Mon Mar 14 07:29:46 PDT 2016 2 | -------------------------------------------------------------------------------- /lib/.gradle/2.4/taskArtifacts/cache.properties.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/.gradle/2.4/taskArtifacts/cache.properties.lock -------------------------------------------------------------------------------- /lib/.gradle/2.4/taskArtifacts/fileSnapshots.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/.gradle/2.4/taskArtifacts/fileSnapshots.bin -------------------------------------------------------------------------------- /lib/.gradle/2.4/taskArtifacts/taskArtifacts.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/.gradle/2.4/taskArtifacts/taskArtifacts.bin -------------------------------------------------------------------------------- /lib/buildcraft-7.1.22-dev.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/buildcraft-7.1.22-dev.jar -------------------------------------------------------------------------------- /lib/buildcraft-7.1.22-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/buildcraft-7.1.22-sources.jar -------------------------------------------------------------------------------- /lib/buildcraft-7.2.0-dev.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/buildcraft-7.2.0-dev.jar -------------------------------------------------------------------------------- /lib/buildcraft-7.2.0-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/buildcraft-7.2.0-sources.jar -------------------------------------------------------------------------------- /lib/buildcraft-7.2.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/buildcraft-7.2.0.jar -------------------------------------------------------------------------------- /lib/buildcraft-compat-7.1.6-dev.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/lib/buildcraft-compat-7.1.6-dev.jar -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/APConfiguration.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes; 2 | 3 | import java.io.File; 4 | 5 | import buildcraft.additionalpipes.utils.Log; 6 | import buildcraft.lib.registry.RegistryConfig; 7 | import net.minecraftforge.common.config.Configuration; 8 | import net.minecraftforge.common.config.Property; 9 | 10 | 11 | public class APConfiguration 12 | { 13 | public static int chunkSightRange; // config option 14 | 15 | public static boolean chunkSightAutorefresh = true; 16 | 17 | public static boolean enableDebugLog; 18 | 19 | public static boolean enableChunkloaderRecipe; 20 | 21 | // keybinding 22 | public static int laserKeyCode; // config option (& in options menu) 23 | 24 | public static float powerTransmittanceCfg; // config option 25 | 26 | public static int waterPumpWaterPerTick; // in millibuckets / tick 27 | 28 | public static int gravityFeedPipeTicksPerPull; 29 | 30 | public static boolean enableTriggers = true; 31 | 32 | //set from config 33 | public static boolean filterRightclicks = false; 34 | 35 | 36 | public static void loadConfigs(File configFile) 37 | { 38 | Configuration config = new Configuration(configFile); 39 | try 40 | { 41 | config.load(); 42 | 43 | Property powerTransmittance = config.get(Configuration.CATEGORY_GENERAL, "powerTransmittance", 90); 44 | powerTransmittance.setComment("Percentage of power a power teleport pipe transmits. Between 0 and 100."); 45 | powerTransmittanceCfg = powerTransmittance.getInt() / 100.0f; 46 | if(powerTransmittanceCfg > 1.00) 47 | { 48 | powerTransmittanceCfg = 1f; 49 | } 50 | else if(powerTransmittanceCfg < 0.0) 51 | { 52 | powerTransmittanceCfg = 0.0f; 53 | } 54 | 55 | Property chunkSightRangeProperty = config.get(Configuration.CATEGORY_GENERAL, "chunkSightRange", 8); 56 | chunkSightRangeProperty.setComment("Range of chunk load boundaries."); 57 | chunkSightRange = chunkSightRangeProperty.getInt(); 58 | 59 | Property laserKey = config.get(Configuration.CATEGORY_GENERAL, "laserKeyChar", 68); 60 | laserKey.setComment("Default key to toggle chunk load boundaries."); 61 | laserKeyCode = laserKey.getInt(); 62 | 63 | Property filterRightclicksProperty = config.get(Configuration.CATEGORY_GENERAL, "filterRightclicks", false); 64 | filterRightclicksProperty.setComment("When right clicking on something with a gui, do not show the gui if you have a pipe in your hand"); 65 | filterRightclicks = filterRightclicksProperty.getBoolean(); 66 | 67 | Property enableDebugLogProperty = config.get(Configuration.CATEGORY_GENERAL, "enableDebugLog", false); 68 | enableDebugLogProperty.setComment("Enable debug logging for development"); 69 | enableDebugLog = enableDebugLogProperty.getBoolean(); 70 | 71 | Property waterPerTickProperty = config.get(Configuration.CATEGORY_GENERAL, "waterPumpWaterPerTick", 90); 72 | waterPerTickProperty.setComment("Amount of water the Water Pump Pipe produces in millibuckets/tick"); 73 | waterPumpWaterPerTick = waterPerTickProperty.getInt(); 74 | 75 | Property gpPullRateProperty = config.get(Configuration.CATEGORY_GENERAL, "gravityFeedPipeTicksPerPull", 20); 76 | gpPullRateProperty.setComment("How many ticks the Gravity Feed Pipe needs to extract an item"); 77 | gravityFeedPipeTicksPerPull = gpPullRateProperty.getInt(); 78 | 79 | Property enableChunkloaderProperty = config.get(Configuration.CATEGORY_GENERAL, "enableChunkloaderRecipe", true); 80 | enableChunkloaderProperty.setComment("Whether or not the chunkloader will have a crafting recipe. Set to false to make it a creative-only item."); 81 | enableChunkloaderRecipe = enableChunkloaderProperty.getBoolean(); 82 | } 83 | catch(Exception e) 84 | { 85 | Log.error("Error loading Additional Pipes configs." + e); 86 | } 87 | finally 88 | { 89 | config.save(); 90 | 91 | // tell Buildcraft that this is our configuration file 92 | RegistryConfig.setRegistryConfig(AdditionalPipes.MODID, config); 93 | } 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/CommandAdditionalPipes.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes; 2 | 3 | import java.util.Collection; 4 | 5 | import buildcraft.additionalpipes.api.TeleportPipeType; 6 | import buildcraft.additionalpipes.pipes.PipeBehaviorTeleport; 7 | import buildcraft.additionalpipes.pipes.TeleportManager; 8 | import net.minecraft.command.CommandBase; 9 | import net.minecraft.command.CommandException; 10 | import net.minecraft.command.ICommandSender; 11 | import net.minecraft.server.MinecraftServer; 12 | import net.minecraft.util.text.ITextComponent; 13 | import net.minecraft.util.text.TextComponentString; 14 | import net.minecraft.util.text.TextComponentTranslation; 15 | import net.minecraft.util.text.translation.I18n; 16 | 17 | public class CommandAdditionalPipes extends CommandBase { 18 | 19 | @Override 20 | public String getName() { 21 | return AdditionalPipes.MODID.toLowerCase(); 22 | } 23 | 24 | @SuppressWarnings("rawtypes") 25 | @Override 26 | public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException 27 | { 28 | if(args.length > 1 && "teleport".equals(args[0])) 29 | { 30 | //let's be a bit lenient with plurals 31 | 32 | TeleportPipeType type; 33 | 34 | if(args[1].equals("items") || args[1].equals("item")) 35 | { 36 | type = TeleportPipeType.ITEMS; 37 | } 38 | else if(args[1].equals("fluids") || args[1].equals("fluid")) 39 | { 40 | type = TeleportPipeType.FLUIDS; 41 | } 42 | else if(args[1].equals("power")) 43 | { 44 | type = TeleportPipeType.POWER; 45 | } 46 | else 47 | { 48 | return; 49 | } 50 | 51 | Collection pipes = TeleportManager.instance.getAllPipesInNetwork(type); 52 | 53 | sender.sendMessage((ITextComponent) new TextComponentTranslation("command.ap.pipelist_header")); 54 | for(Object pipeObject : pipes) 55 | { 56 | StringBuffer sb = new StringBuffer(); 57 | PipeBehaviorTeleport pipe = (PipeBehaviorTeleport)pipeObject; 58 | sb.append('['); 59 | sb.append(pipe.getPosition().getX()).append(", "); 60 | sb.append(pipe.getPosition().getY()).append(", "); 61 | sb.append(pipe.getPosition().getZ()).append("] "); 62 | sb.append(pipe.ownerName); 63 | sender.sendMessage(new TextComponentString(sb.toString())); 64 | } 65 | } 66 | else 67 | { 68 | sender.sendMessage(new TextComponentTranslation("command.ap.usage")); 69 | } 70 | } 71 | 72 | 73 | @Override 74 | public String getUsage(ICommandSender sender) 75 | { 76 | return I18n.translateToLocal("command.ap.usage"); 77 | } 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/MultiPlayerProxy.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes; 2 | 3 | public class MultiPlayerProxy { 4 | 5 | //none of these methods do anything on the server 6 | 7 | public void registerKeyHandler() { 8 | } 9 | 10 | public void registerRendering() 11 | { 12 | // do nothing 13 | } 14 | 15 | public void registerSprites() 16 | { 17 | // do nothing 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/MultiPlayerProxyClient.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes; 2 | 3 | import buildcraft.additionalpipes.item.ItemDogDeaggravator; 4 | import buildcraft.additionalpipes.textures.Textures; 5 | import buildcraft.lib.client.sprite.SpriteHolderRegistry; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.client.renderer.RenderItem; 8 | import net.minecraft.client.renderer.block.model.ModelResourceLocation; 9 | import net.minecraft.item.Item; 10 | import net.minecraftforge.fml.relauncher.Side; 11 | import net.minecraftforge.fml.relauncher.SideOnly; 12 | 13 | @SideOnly(Side.CLIENT) 14 | public class MultiPlayerProxyClient extends MultiPlayerProxy 15 | { 16 | 17 | @Override 18 | public void registerKeyHandler() 19 | { 20 | // disabled since I cannot get this to work in 1.8 21 | //Log.info("Registering key handler(s)"); 22 | 23 | //Keybindings.lasers = new KeyBinding("key.lasers", APConfiguration.laserKeyCode, AdditionalPipes.NAME); 24 | //ClientRegistry.registerKeyBinding(Keybindings.lasers); 25 | 26 | //MinecraftForge.EVENT_BUS.register(new KeyInputEventHandler()); 27 | } 28 | 29 | @Override 30 | public void registerRendering() 31 | { 32 | RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); 33 | 34 | if(APConfiguration.enableChunkloaderRecipe) 35 | { 36 | renderItem.getItemModelMesher().register(Item.getItemFromBlock(AdditionalPipes.instance.blockTeleportTether), 0, 37 | new ModelResourceLocation(AdditionalPipes.instance.blockTeleportTether.getRegistryName(), "inventory")); 38 | } 39 | 40 | renderItem.getItemModelMesher().register(AdditionalPipes.instance.dogDeaggravator, 0, 41 | new ModelResourceLocation(AdditionalPipes.MODID + ":" + ItemDogDeaggravator.NAME, "inventory")); 42 | 43 | 44 | } 45 | 46 | @Override 47 | public void registerSprites() 48 | { 49 | Textures.TRIGGER_PIPE_CLOSED = SpriteHolderRegistry.getHolder("additionalpipes:items/triggers/pipe_closed"); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/api/ITeleportPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.api; 2 | 3 | import java.util.UUID; 4 | 5 | import buildcraft.transport.tile.TilePipeHolder; 6 | import net.minecraft.util.math.BlockPos; 7 | 8 | 9 | /** 10 | * Interface that describes the functions of a Teleport Pipe. 11 | * 12 | * Mostly just getters and setters for the various properties. 13 | * @author Jamie 14 | * 15 | */ 16 | public interface ITeleportPipe 17 | { 18 | public void setFrequency(int freq); 19 | 20 | public int getFrequency(); 21 | 22 | /** 23 | * Gets the send-receive state of the teleport pipe. 24 | * 25 | * 0b0 = none, 0b1 = send, 0b10 = receive, 0b11 = both 26 | * @param state 27 | */ 28 | public byte getState(); 29 | 30 | public void setState(byte state); 31 | 32 | 33 | public boolean isPublic(); 34 | 35 | public void setPublic(boolean isPublic); 36 | 37 | public TeleportPipeType getType(); 38 | 39 | public BlockPos getPosition(); 40 | 41 | public boolean canReceive(); 42 | 43 | public boolean canSend(); 44 | 45 | public UUID getOwnerUUID(); 46 | 47 | public String getOwnerName(); 48 | 49 | public TilePipeHolder getContainer(); 50 | 51 | /** 52 | * Checks two teleport pipes for equality. The teleport manager will remove entries that are equal according to this method when adding a new pipe. 53 | */ 54 | public boolean equals(Object obj); 55 | } -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/api/TeleportManagerBase.java: -------------------------------------------------------------------------------- 1 | 2 | package buildcraft.additionalpipes.api; 3 | 4 | import java.util.ArrayList; 5 | 6 | /** 7 | * This class defines the interface for the teleport pipe manager. 8 | * 9 | * It keeps track of all teleport pipes, and has functions to get all of them or certain ones connected to a pipe. 10 | * 11 | */ 12 | public abstract class TeleportManagerBase 13 | { 14 | //set at runtime when the mod initializes 15 | public static TeleportManagerBase INSTANCE = null; 16 | 17 | /** 18 | * Add a pipe to to the manager on the given frequency. 19 | * 20 | * Automatically called by the teleport pipe constructor. 21 | * @param pipe 22 | * @param frequency 23 | */ 24 | public abstract void add(ITeleportPipe pipe, int frequency); 25 | 26 | /** 27 | * Remove a pipe from the manager on the given frequency. 28 | * @param pipe 29 | * @param frequency 30 | */ 31 | public abstract void remove(ITeleportPipe pipe, int frequency); 32 | 33 | /** 34 | * Remove the knowledge of all pipes from the teleport manager. If called, pipes will stay in the world, but 35 | * not send items to each other until the world is reloaded. 36 | * 37 | * This function is useful for testing the teleport manager. 38 | */ 39 | public abstract void reset(); 40 | 41 | /** 42 | * Get pipes connected to the provided one. (template function version) 43 | * @param pipe 44 | * @param includeSend whether or not to return connected pipes that send stuff. 45 | * @param includeReceive whether or not to return connected pipes that receive stuff. 46 | * @return 47 | */ 48 | public abstract ArrayList getConnectedPipes(T pipe, boolean includeSend, boolean includeReceive); 49 | 50 | /** 51 | * Get the name of the provided frequency. 52 | * 53 | * NOTE: frequency naming is not supported in the UI as of v4.6.0 54 | * @param frequency 55 | * @return the name of the frequency, or an empty string if it has no name. 56 | */ 57 | public abstract String getFrequencyName(int frequency); 58 | 59 | /** 60 | * Set the name of a frequency. 61 | * @param frequency 62 | * @param name 63 | */ 64 | public abstract void setFrequencyName(int frequency, String name); 65 | } -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/api/TeleportPipeType.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.api; 2 | 3 | public enum TeleportPipeType 4 | { 5 | ITEMS, 6 | FLUIDS, 7 | POWER, 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/api/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Additional Pipes API - just for teleport pipes at this point. 3 | */ 4 | @API(apiVersion = "3", owner = "additionalpipes", provides = "apAPI") 5 | package buildcraft.additionalpipes.api; 6 | 7 | import net.minecraftforge.fml.common.API; 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/chunkloader/BlockTeleportTether.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.chunkloader; 2 | 3 | import buildcraft.additionalpipes.AdditionalPipes; 4 | import net.minecraft.block.BlockContainer; 5 | import net.minecraft.block.material.Material; 6 | import net.minecraft.block.state.IBlockState; 7 | import net.minecraft.tileentity.TileEntity; 8 | import net.minecraft.util.EnumBlockRenderType; 9 | import net.minecraft.world.World; 10 | 11 | public class BlockTeleportTether extends BlockContainer { 12 | 13 | public BlockTeleportTether() 14 | { 15 | super(Material.CLOTH); 16 | setCreativeTab(AdditionalPipes.instance.creativeTab); 17 | setUnlocalizedName("teleport_tether"); 18 | } 19 | 20 | @Override 21 | public TileEntity createNewTileEntity(World world, int meta) 22 | { 23 | return new TileTeleportTether(); 24 | } 25 | 26 | public boolean isFullCube() 27 | { 28 | return true; 29 | } 30 | 31 | public boolean isOpaqueCube() 32 | { 33 | return true; 34 | } 35 | 36 | /** 37 | * The type of render function called. 3 for standard block models, 2 for TESR's, 1 for liquids, -1 is no render 38 | */ 39 | @Override 40 | public EnumBlockRenderType getRenderType(IBlockState state) 41 | { 42 | return EnumBlockRenderType.MODEL; 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/chunkloader/ChunkLoadingHandler.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.chunkloader; 2 | 3 | import java.util.List; 4 | 5 | import net.minecraft.tileentity.TileEntity; 6 | import net.minecraft.util.math.BlockPos; 7 | import net.minecraft.world.World; 8 | import net.minecraftforge.common.ForgeChunkManager.LoadingCallback; 9 | import net.minecraftforge.common.ForgeChunkManager.Ticket; 10 | 11 | public class ChunkLoadingHandler implements LoadingCallback { 12 | @Override 13 | public void ticketsLoaded(List tickets, World world) { 14 | for(Ticket ticket : tickets) { 15 | int x = ticket.getModData().getInteger("xCoord"); 16 | int y = ticket.getModData().getInteger("yCoord"); 17 | int z = ticket.getModData().getInteger("zCoord"); 18 | TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); 19 | if(te instanceof TileTeleportTether) { 20 | ((TileTeleportTether) te).forceChunkLoading(ticket); 21 | } 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/chunkloader/TileTeleportTether.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.chunkloader; 2 | 3 | import java.util.LinkedList; 4 | import java.util.List; 5 | 6 | import buildcraft.additionalpipes.AdditionalPipes; 7 | import buildcraft.additionalpipes.utils.Log; 8 | import net.minecraft.nbt.NBTTagCompound; 9 | import net.minecraft.tileentity.TileEntity; 10 | import net.minecraft.util.math.ChunkPos; 11 | import net.minecraftforge.common.ForgeChunkManager; 12 | import net.minecraftforge.common.ForgeChunkManager.Ticket; 13 | import net.minecraftforge.common.ForgeChunkManager.Type; 14 | 15 | public class TileTeleportTether extends TileEntity { 16 | 17 | private Ticket chunkTicket; 18 | private int loadDistance = 1; 19 | 20 | public List getLoadArea() { 21 | List loadArea = new LinkedList(); 22 | 23 | for(int x = -loadDistance; x < loadDistance + 1; x++) { 24 | for(int z = -loadDistance; z < loadDistance + 1; z++) { 25 | ChunkPos chunkCoords = new ChunkPos((pos.getX() >> 4) + x, (pos.getZ() >> 4) + z); 26 | 27 | loadArea.add(chunkCoords); 28 | } 29 | } 30 | 31 | return loadArea; 32 | } 33 | 34 | @Override 35 | public void validate() { 36 | super.validate(); 37 | if(!getWorld().isRemote && chunkTicket == null) { 38 | Ticket ticket = ForgeChunkManager.requestTicket(AdditionalPipes.instance, getWorld(), Type.NORMAL); 39 | if(ticket != null) { 40 | forceChunkLoading(ticket); 41 | } 42 | } 43 | } 44 | 45 | @Override 46 | public void invalidate() { 47 | super.invalidate(); 48 | stopChunkLoading(); 49 | } 50 | 51 | public void setLoadDistance(int dist) { 52 | loadDistance = dist; 53 | forceChunkLoading(chunkTicket); 54 | } 55 | 56 | public void forceChunkLoading(Ticket ticket) { 57 | stopChunkLoading(); 58 | chunkTicket = ticket; 59 | for(ChunkPos coord : getLoadArea()) { 60 | Log.info(String.format("Teleport Tether @ %s: Force loading chunk %s in %s", getPos().toString(), coord, getWorld().provider.getClass())); 61 | ForgeChunkManager.forceChunk(chunkTicket, coord); 62 | } 63 | } 64 | 65 | public void unforceChunkLoading() { 66 | for(Object obj : chunkTicket.getChunkList()) { 67 | ChunkPos coord = (ChunkPos) obj; 68 | ForgeChunkManager.unforceChunk(chunkTicket, coord); 69 | } 70 | } 71 | 72 | public void stopChunkLoading() { 73 | if(chunkTicket != null) { 74 | ForgeChunkManager.releaseTicket(chunkTicket); 75 | chunkTicket = null; 76 | } 77 | } 78 | 79 | @Override 80 | public void readFromNBT(NBTTagCompound par1NBTTagCompound) { 81 | super.readFromNBT(par1NBTTagCompound); 82 | } 83 | 84 | @Override 85 | public NBTTagCompound writeToNBT(NBTTagCompound par1NBTTagCompound) { 86 | return super.writeToNBT(par1NBTTagCompound); 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gates/APTrigger.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gates; 2 | 3 | import buildcraft.additionalpipes.AdditionalPipes; 4 | import buildcraft.api.statements.IStatement; 5 | import buildcraft.api.statements.StatementManager; 6 | import net.minecraft.util.ResourceLocation; 7 | import net.minecraft.util.text.translation.I18n; 8 | 9 | @SuppressWarnings("deprecation") 10 | public abstract class APTrigger implements IStatement { 11 | 12 | protected String id; //used as unique key in BC registry 13 | protected String descriptionKey; //used for description translations 14 | protected ResourceLocation texture; 15 | 16 | /** 17 | * 18 | * @param id the name of the trigger, without the "additionalpipes:" prefix. Also the name of the texture. 19 | */ 20 | public APTrigger(String idWithoutPrefix) 21 | { 22 | descriptionKey = "trigger." + idWithoutPrefix; 23 | 24 | this.id = AdditionalPipes.MODID + ":" + descriptionKey; 25 | StatementManager.statements.put(this.id, this); } 26 | 27 | @Override 28 | public String getUniqueTag() 29 | { 30 | return id; 31 | } 32 | 33 | @Override 34 | public String getDescription() 35 | { 36 | return I18n.translateToLocal(descriptionKey); 37 | } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gates/GateProvider.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gates; 2 | 3 | import java.util.Collection; 4 | 5 | import buildcraft.additionalpipes.AdditionalPipes; 6 | import buildcraft.additionalpipes.pipes.PipeBehaviorClosed; 7 | import buildcraft.api.statements.IStatementContainer; 8 | import buildcraft.api.statements.ITriggerExternal; 9 | import buildcraft.api.statements.ITriggerInternal; 10 | import buildcraft.api.statements.ITriggerInternalSided; 11 | import buildcraft.api.statements.ITriggerProvider; 12 | import buildcraft.api.transport.pipe.PipeBehaviour; 13 | import buildcraft.transport.tile.TilePipeHolder; 14 | import net.minecraft.tileentity.TileEntity; 15 | import net.minecraft.util.EnumFacing; 16 | 17 | public class GateProvider implements ITriggerProvider { 18 | 19 | 20 | @Override 21 | public void addInternalTriggers(Collection triggers, IStatementContainer container) 22 | { 23 | PipeBehaviour behavior = ((TilePipeHolder)container.getTile()).getPipe().getBehaviour(); 24 | 25 | if(behavior instanceof PipeBehaviorClosed) 26 | { 27 | triggers.add(AdditionalPipes.instance.triggerPipeClosed); 28 | } 29 | } 30 | 31 | @Override 32 | public void addInternalSidedTriggers(Collection triggers, IStatementContainer container, 33 | EnumFacing side) 34 | { 35 | // do nothing 36 | 37 | } 38 | 39 | @Override 40 | public void addExternalTriggers(Collection triggers, EnumFacing side, TileEntity tile) 41 | { 42 | // do nothing 43 | 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gates/TriggerPipeClosed.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gates; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorClosed; 4 | import buildcraft.additionalpipes.textures.Textures; 5 | import buildcraft.additionalpipes.utils.Log; 6 | import buildcraft.api.core.render.ISprite; 7 | import buildcraft.api.statements.IStatement; 8 | import buildcraft.api.statements.IStatementContainer; 9 | import buildcraft.api.statements.IStatementParameter; 10 | import buildcraft.api.statements.ITriggerInternal; 11 | import buildcraft.transport.tile.TilePipeHolder; 12 | import net.minecraftforge.fml.relauncher.Side; 13 | import net.minecraftforge.fml.relauncher.SideOnly; 14 | 15 | public class TriggerPipeClosed extends APTrigger implements ITriggerInternal { 16 | 17 | public TriggerPipeClosed() 18 | { 19 | super("pipe_closed"); 20 | } 21 | 22 | @Override 23 | public boolean isTriggerActive(IStatementContainer statement, IStatementParameter[] parameters) 24 | { 25 | PipeBehaviorClosed closedPipe = null; 26 | //this much casting feels unsafe 27 | try 28 | { 29 | closedPipe = (PipeBehaviorClosed) ((TilePipeHolder)statement.getTile()).getPipe().getBehaviour(); 30 | } 31 | catch(RuntimeException ex) 32 | { 33 | Log.error("Failed to get reference to Closed Pipe:"); 34 | ex.printStackTrace(); 35 | return false; 36 | } 37 | 38 | // if the first ItemStack is null, then there are no items in the pipe and the trigger should be inactive 39 | return closedPipe.isClosed(); 40 | } 41 | 42 | @Override 43 | public int maxParameters() 44 | { 45 | return 0; 46 | } 47 | 48 | @Override 49 | public int minParameters() 50 | { 51 | return 0; 52 | } 53 | 54 | @Override 55 | public IStatementParameter createParameter(int index) 56 | { 57 | return null; 58 | } 59 | 60 | @Override 61 | public IStatement rotateLeft() 62 | { 63 | return this; 64 | } 65 | 66 | @Override 67 | @SideOnly(Side.CLIENT) 68 | public ISprite getSprite() 69 | { 70 | return Textures.TRIGGER_PIPE_CLOSED; 71 | } 72 | 73 | @Override 74 | public IStatement[] getPossible() 75 | { 76 | return new IStatement[0]; 77 | } 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/ContainerAdvancedWoodPipe.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BuildCraft is open-source. It is distributed under the terms of the 3 | * BuildCraft Open Source License. It grants rights to read, modify, compile 4 | * or run the code. It does *NOT* grant the right to redistribute this software 5 | * or its modifications in any form, binary or source, except if expressively 6 | * granted by the copyright holder. 7 | */ 8 | 9 | package buildcraft.additionalpipes.gui; 10 | 11 | import buildcraft.additionalpipes.pipes.PipeBehaviorAdvWood; 12 | import buildcraft.lib.gui.ContainerBC_Neptune; 13 | import buildcraft.transport.tile.TilePipeHolder; 14 | import net.minecraft.entity.player.EntityPlayer; 15 | import net.minecraft.inventory.IContainerListener; 16 | import net.minecraft.inventory.IInventory; 17 | import net.minecraft.inventory.Slot; 18 | import net.minecraftforge.items.CapabilityItemHandler; 19 | import net.minecraftforge.items.SlotItemHandler; 20 | 21 | public class ContainerAdvancedWoodPipe extends ContainerBC_Neptune { 22 | 23 | private boolean exclude; 24 | private PipeBehaviorAdvWood pipe; 25 | 26 | public ContainerAdvancedWoodPipe(EntityPlayer player, IInventory playerInventory, PipeBehaviorAdvWood pipe) { 27 | super(player); 28 | this.pipe = pipe; 29 | exclude = !pipe.getExclude(); // force a network update 30 | int k = 0; 31 | 32 | for(int j1 = 0; j1 < 9; j1++) { 33 | addSlotToContainer(new SlotItemHandler(pipe.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null), j1 + k * 9, 8 + j1 * 18, 18 + k * 18)); 34 | } 35 | 36 | for(int l = 0; l < 3; l++) { 37 | for(int k1 = 0; k1 < 9; k1++) { 38 | addSlotToContainer(new Slot(playerInventory, k1 + l * 9 + 9, 8 + k1 * 18, 76 + l * 18)); 39 | } 40 | 41 | } 42 | 43 | for(int i1 = 0; i1 < 9; i1++) { 44 | addSlotToContainer(new Slot(playerInventory, i1, 8 + i1 * 18, 134)); 45 | } 46 | } 47 | 48 | @Override 49 | public boolean canInteractWith(EntityPlayer entityplayer) { 50 | TilePipeHolder tile = (TilePipeHolder) pipe.pipe.getHolder(); 51 | if(tile.getWorld().getTileEntity(tile.getPos()) != tile) return false; 52 | if(entityplayer.getDistanceSq(tile.getPos().getX() + 0.5D, tile.getPos().getY() + 0.5D, tile.getPos().getZ() + 0.5D) > 64) return false; 53 | return true; 54 | } 55 | 56 | @Override 57 | /** 58 | * Called on the server, checks if the exclusion state has changed vs our cache 59 | */ 60 | public void detectAndSendChanges() 61 | { 62 | super.detectAndSendChanges(); 63 | for(IContainerListener crafter : listeners) { 64 | if(exclude != pipe.getExclude()) { 65 | crafter.sendWindowProperty(this, 0, pipe.getExclude() ? 1 : 0); 66 | } 67 | } 68 | exclude = pipe.getExclude(); 69 | } 70 | 71 | /** 72 | * Called on the client to update the exclusion state. Information is transmitted in the other direction via MessageAdvWoodenPipe 73 | */ 74 | @Override 75 | public void updateProgressBar(int i, int j) 76 | { 77 | switch(i) { 78 | case 0: 79 | pipe.setExclude(j == 1); 80 | break; 81 | } 82 | } 83 | 84 | } -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/ContainerDistributionPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorDistribution; 4 | import buildcraft.transport.tile.TilePipeHolder; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | import net.minecraft.inventory.Container; 7 | 8 | public class ContainerDistributionPipe extends Container { 9 | private PipeBehaviorDistribution pipe; 10 | 11 | public ContainerDistributionPipe(PipeBehaviorDistribution pipe) { 12 | this.pipe = pipe; 13 | } 14 | 15 | @Override 16 | public boolean canInteractWith(EntityPlayer entityplayer) { 17 | TilePipeHolder tile = (TilePipeHolder) pipe.pipe.getHolder(); 18 | if(tile.getWorld().getTileEntity(tile.getPos()) != tile) return false; 19 | if(entityplayer.getDistanceSq(tile.getPos().getX() + 0.5D, tile.getPos().getY() + 0.5D, tile.getPos().getZ() + 0.5D) > 64) return false; 20 | return true; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/ContainerPipeClosed.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorClosed; 4 | import buildcraft.lib.gui.ContainerBC_Neptune; 5 | import buildcraft.transport.tile.TilePipeHolder; 6 | import net.minecraft.entity.player.EntityPlayer; 7 | import net.minecraft.inventory.Slot; 8 | import net.minecraftforge.items.CapabilityItemHandler; 9 | import net.minecraftforge.items.SlotItemHandler; 10 | 11 | //NOTE: uses the same texture and slot positions as the vanilla Dispenser 12 | public class ContainerPipeClosed extends ContainerBC_Neptune { 13 | 14 | private PipeBehaviorClosed pipe; 15 | 16 | public ContainerPipeClosed(EntityPlayer player, PipeBehaviorClosed pipe) 17 | { 18 | super(player); 19 | this.pipe = (PipeBehaviorClosed) pipe; 20 | int row; 21 | int col; 22 | 23 | for(row = 0; row < 3; ++row) { 24 | for(col = 0; col < 3; ++col) { 25 | addSlotToContainer(new SlotItemHandler(this.pipe.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null), col + row * 3, 62 + col * 18, 17 + row * 18)); 26 | } 27 | } 28 | 29 | for(row = 0; row < 3; ++row) { 30 | for(col = 0; col < 9; ++col) { 31 | addSlotToContainer(new Slot(player.inventory, col + row * 9 + 9, 8 + col * 18, 84 + row * 18)); 32 | } 33 | } 34 | 35 | for(row = 0; row < 9; ++row) { 36 | addSlotToContainer(new Slot(player.inventory, row, 8 + row * 18, 142)); 37 | } 38 | } 39 | 40 | @Override 41 | public boolean canInteractWith(EntityPlayer entityplayer) { 42 | TilePipeHolder tile = (TilePipeHolder) pipe.pipe.getHolder(); 43 | if(tile.getWorld().getTileEntity(tile.getPos()) != tile) return false; 44 | if(entityplayer.getDistanceSq(tile.getPos().getX() + 0.5D, tile.getPos().getY() + 0.5D, tile.getPos().getZ() + 0.5D) > 64) return false; 45 | return true; 46 | } 47 | 48 | 49 | 50 | @Override 51 | public void onContainerClosed(EntityPlayer playerIn) 52 | { 53 | super.onContainerClosed(playerIn); 54 | 55 | // update the pipe's texture if the user has added or removed items 56 | if(!playerIn.world.isRemote) 57 | { 58 | pipe.updateClosedStatus(); 59 | } 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/ContainerPriorityInsertionPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorPriorityInsertion; 4 | import buildcraft.transport.tile.TilePipeHolder; 5 | import net.minecraft.entity.player.EntityPlayer; 6 | import net.minecraft.inventory.Container; 7 | import net.minecraft.inventory.IContainerListener; 8 | 9 | public class ContainerPriorityInsertionPipe extends Container { 10 | private PipeBehaviorPriorityInsertion pipe; 11 | public int[] lastPriorityData; 12 | 13 | public ContainerPriorityInsertionPipe(PipeBehaviorPriorityInsertion pipe) { 14 | this.pipe = pipe; 15 | lastPriorityData = new int[pipe.sidePriorities.length]; 16 | for(int i = 0; i < lastPriorityData.length; i++) { 17 | lastPriorityData[i] = -1; 18 | } 19 | } 20 | 21 | @Override 22 | public boolean canInteractWith(EntityPlayer entityplayer) { 23 | TilePipeHolder tile = (TilePipeHolder) pipe.pipe.getHolder(); 24 | if(tile.getWorld().getTileEntity(tile.getPos()) != tile) return false; 25 | if(entityplayer.getDistanceSq(tile.getPos().getX() + 0.5D, tile.getPos().getY() + 0.5D, tile.getPos().getZ() + 0.5D) > 64) return false; 26 | return true; 27 | } 28 | 29 | @Override 30 | public void detectAndSendChanges() 31 | { 32 | super.detectAndSendChanges(); 33 | for(IContainerListener crafter : listeners) 34 | { 35 | for(int i = 0; i < lastPriorityData.length; i++) { 36 | if(lastPriorityData[i] != pipe.sidePriorities[i]) { 37 | crafter.sendWindowProperty(this, i, pipe.sidePriorities[i]); 38 | } 39 | } 40 | } 41 | for(int i = 0; i < lastPriorityData.length; i++) { 42 | lastPriorityData[i] = pipe.sidePriorities[i]; 43 | } 44 | } 45 | 46 | @Override 47 | public void updateProgressBar(int i, int j) { 48 | if(i >= 0 && i < pipe.sidePriorities.length) { 49 | pipe.sidePriorities[i] = (byte) j; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/ContainerTeleportPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import java.util.List; 4 | 5 | import buildcraft.additionalpipes.api.ITeleportPipe; 6 | import buildcraft.additionalpipes.network.PacketHandler; 7 | import buildcraft.additionalpipes.network.message.MessageTelePipeData; 8 | import buildcraft.additionalpipes.pipes.PipeBehaviorTeleport; 9 | import buildcraft.additionalpipes.pipes.TeleportManager; 10 | import buildcraft.additionalpipes.utils.Log; 11 | import buildcraft.lib.gui.ContainerBC_Neptune; 12 | import buildcraft.transport.tile.TilePipeHolder; 13 | import net.minecraft.entity.player.EntityPlayer; 14 | import net.minecraft.entity.player.EntityPlayerMP; 15 | import net.minecraft.inventory.IContainerListener; 16 | import net.minecraftforge.fml.common.FMLCommonHandler; 17 | import net.minecraftforge.fml.relauncher.Side; 18 | 19 | public class ContainerTeleportPipe extends ContainerBC_Neptune { 20 | 21 | public int connectedPipes = 0; 22 | 23 | private int ticks = 0; 24 | public PipeBehaviorTeleport pipe; 25 | private int freq; 26 | private byte state; 27 | private boolean isPublic; 28 | 29 | //true if the provided pipe is sending items to other pipes 30 | //and output locations should be shown on the ledger 31 | private boolean isSendingPipe; 32 | 33 | // only set on the server side 34 | private int originalfreq; 35 | 36 | public ContainerTeleportPipe(EntityPlayer player, PipeBehaviorTeleport pipe) 37 | { 38 | super(player); 39 | this.pipe = pipe; 40 | 41 | //set these variables to invalid values so that they will be updated 42 | state = -1; 43 | isPublic = !pipe.isPublic; 44 | freq = -1; 45 | 46 | isSendingPipe = pipe.canSend(); 47 | 48 | if(FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) 49 | { 50 | List connectedPipes = TeleportManager.instance.getConnectedPipes(pipe, !isSendingPipe, isSendingPipe); 51 | int[] locations = new int[connectedPipes.size() * 3]; 52 | for(int i = 0; i < connectedPipes.size() && i < 9; i++) { 53 | ITeleportPipe connectedPipe = connectedPipes.get(i); 54 | locations[3 * i] = connectedPipe.getContainer().getPos().getX(); 55 | locations[3 * i + 1] = connectedPipe.getContainer().getPos().getY(); 56 | locations[3 * i + 2] = connectedPipe.getContainer().getPos().getZ(); 57 | } 58 | 59 | MessageTelePipeData message = new MessageTelePipeData(pipe.getPos(), locations, pipe.ownerUUID, pipe.ownerName); 60 | PacketHandler.INSTANCE.sendTo(message, (EntityPlayerMP) player); 61 | 62 | //save the pipe's old frequency so it can be removed later 63 | originalfreq = pipe.getFrequency(); 64 | 65 | } 66 | } 67 | 68 | @Override 69 | public boolean canInteractWith(EntityPlayer entityplayer) 70 | { 71 | TilePipeHolder tile = pipe.getContainer(); 72 | if(tile.getWorld().getTileEntity(tile.getPos()) != tile) return false; 73 | if(entityplayer.getDistanceSq(tile.getPos().getX() + 0.5D, tile.getPos().getY() + 0.5D, tile.getPos().getZ() + 0.5D) > 64) return false; 74 | return true; 75 | } 76 | 77 | @Override 78 | public void detectAndSendChanges() { 79 | super.detectAndSendChanges(); 80 | int connectedPipesNew = connectedPipes; 81 | if(ticks % 20 == 0) { // reduce lag 82 | ticks = 0; 83 | Log.debug("Old connected:" + connectedPipesNew); 84 | connectedPipesNew = TeleportManager.instance.getConnectedPipes(pipe, !isSendingPipe, isSendingPipe).size(); 85 | Log.debug("New connected:" + connectedPipesNew); 86 | } 87 | ticks++; 88 | for(IContainerListener crafter : listeners) { 89 | if(freq != pipe.getFrequency()) { 90 | crafter.sendWindowProperty(this, 0, pipe.getFrequency()); 91 | } 92 | if(state != pipe.state) { 93 | crafter.sendWindowProperty(this, 1, pipe.state); 94 | } 95 | if(connectedPipesNew != connectedPipes) { 96 | crafter.sendWindowProperty(this, 2, connectedPipesNew); 97 | } 98 | if(isPublic != pipe.isPublic) { 99 | crafter.sendWindowProperty(this, 3, pipe.isPublic ? 1 : 0); 100 | } 101 | } 102 | state = pipe.state; 103 | freq = pipe.getFrequency(); 104 | isPublic = pipe.isPublic; 105 | connectedPipes = connectedPipesNew; 106 | } 107 | 108 | @Override 109 | public void updateProgressBar(int i, int j) { 110 | switch(i) { 111 | case 0: 112 | pipe.setFrequency(j); 113 | break; 114 | case 1: 115 | pipe.state = (byte) j; 116 | break; 117 | case 2: 118 | connectedPipes = j; 119 | break; 120 | case 3: 121 | pipe.isPublic = (j == 1); 122 | break; 123 | } 124 | } 125 | 126 | @Override 127 | public void onContainerClosed(EntityPlayer player) 128 | { 129 | super.onContainerClosed(player); 130 | if(FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) 131 | { 132 | //remove the pipe from the old frequency 133 | TeleportManager.instance.remove(pipe, originalfreq); 134 | //re-add the pipe to the new frequency 135 | TeleportManager.instance.add(pipe, freq); 136 | 137 | } 138 | } 139 | 140 | } 141 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/GuiAdvancedWoodPipe.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BuildCraft is open-source. It is distributed under the terms of the 3 | * BuildCraft Open Source License. It grants rights to read, modify, compile 4 | * or run the code. It does *NOT* grant the right to redistribute this software 5 | * or its modifications in any form, binary or source, except if expressively 6 | * granted by the copyright holder. 7 | */ 8 | 9 | package buildcraft.additionalpipes.gui; 10 | 11 | import org.lwjgl.opengl.GL11; 12 | 13 | import buildcraft.additionalpipes.network.PacketHandler; 14 | import buildcraft.additionalpipes.network.message.MessageAdvWoodPipe; 15 | import buildcraft.additionalpipes.pipes.PipeBehaviorAdvWood; 16 | import buildcraft.additionalpipes.textures.Textures; 17 | import net.minecraft.client.gui.GuiButton; 18 | import net.minecraft.client.gui.inventory.GuiContainer; 19 | import net.minecraft.client.resources.I18n; 20 | import net.minecraft.entity.player.EntityPlayer; 21 | import net.minecraft.inventory.IInventory; 22 | import net.minecraftforge.fml.relauncher.Side; 23 | import net.minecraftforge.fml.relauncher.SideOnly; 24 | 25 | @SideOnly(Side.CLIENT) 26 | public class GuiAdvancedWoodPipe extends GuiContainer { 27 | 28 | int inventoryRows = 1; 29 | IInventory playerInventory; 30 | PipeBehaviorAdvWood pipe; 31 | private GuiButton[] buttons = new GuiButton[1]; 32 | 33 | int guiX, guiY; 34 | 35 | public GuiAdvancedWoodPipe(EntityPlayer player, IInventory playerInventory, PipeBehaviorAdvWood pipe) 36 | { 37 | super(new ContainerAdvancedWoodPipe(player, playerInventory, pipe)); 38 | this.playerInventory = playerInventory; 39 | this.pipe = pipe; 40 | // container = theContainer; 41 | xSize = 175; 42 | ySize = 156; 43 | 44 | } 45 | 46 | @Override 47 | public void initGui() 48 | { 49 | super.initGui(); 50 | guiX = (width - xSize) / 2; 51 | guiY = (height - ySize) / 2; 52 | buttons[0] = new GuiButton(1, guiX + 8, guiY + 40, 140, 20, ""); 53 | buttonList.add(buttons[0]); 54 | } 55 | 56 | public void drawScreen(int mouseX, int mouseY, float partialTicks) 57 | { 58 | this.drawDefaultBackground(); 59 | super.drawScreen(mouseX, mouseY, partialTicks); 60 | this.renderHoveredToolTip(mouseX, mouseY); 61 | } 62 | 63 | @Override 64 | protected void drawGuiContainerForegroundLayer(int p1, int p2) 65 | { 66 | if(pipe.getExclude()) 67 | { 68 | buttons[0].displayString = I18n.format("gui.advwood_pipe.blacklist"); 69 | } 70 | else 71 | { 72 | buttons[0].displayString = I18n.format("gui.advwood_pipe.whitelist"); 73 | } 74 | 75 | fontRenderer.drawString(I18n.format("gui.advwood_pipe.title"), guiX + 42, guiY + 22, 4210752); 76 | } 77 | 78 | @Override 79 | protected void actionPerformed(GuiButton guibutton) { 80 | if(guibutton.id == 1) 81 | { 82 | pipe.setExclude(!pipe.getExclude()); 83 | MessageAdvWoodPipe packet = new MessageAdvWoodPipe(pipe.pipe.getHolder().getPipePos(), pipe.getExclude()); 84 | PacketHandler.INSTANCE.sendToServer(packet); 85 | } 86 | } 87 | 88 | @Override 89 | protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { 90 | 91 | GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 92 | mc.renderEngine.bindTexture(Textures.GUI_ADVANCEDWOOD); 93 | int j1 = (width - xSize) / 2; 94 | int k = (height - ySize) / 2; 95 | drawTexturedModalRect(j1, k, 0, 0, xSize, ySize); 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/GuiButtonOnOff.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import net.minecraft.client.gui.GuiButton; 4 | 5 | /** 6 | * GuiButton which can be set to a "permanently pressed" mode to indicate that the option it controls is enabled. 7 | * 8 | * Sort of like a poor man's checkbox 9 | * @author Jamie 10 | * 11 | */ 12 | public class GuiButtonOnOff extends GuiButton 13 | { 14 | boolean pressed; 15 | 16 | public boolean isPressed() 17 | { 18 | return pressed; 19 | } 20 | 21 | public void togglePressed() 22 | { 23 | pressed = !pressed; 24 | } 25 | 26 | public void setPressed(boolean pressed) 27 | { 28 | this.pressed = pressed; 29 | } 30 | 31 | public GuiButtonOnOff(int id, int x, int y, int width, boolean pressed, String text) 32 | { 33 | super(id, x, y, width, 20, text); 34 | 35 | this.pressed = pressed; 36 | } 37 | 38 | /** 39 | * Returns 0 if the button is disabled, 1 if the mouse is NOT hovering over this button and 2 if it IS hovering over 40 | * this button. 41 | */ 42 | @Override 43 | public int getHoverState(boolean isHoveredOver) 44 | { 45 | byte retval = 1; 46 | 47 | if (!this.enabled) 48 | { 49 | retval = 0; 50 | } 51 | else if(isHoveredOver || pressed) 52 | { 53 | retval = 2; 54 | } 55 | 56 | return retval; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/GuiDistributionPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import org.lwjgl.opengl.GL11; 4 | 5 | import buildcraft.additionalpipes.network.PacketHandler; 6 | import buildcraft.additionalpipes.network.message.MessageDistPipe; 7 | import buildcraft.additionalpipes.pipes.PipeBehaviorDistribution; 8 | import buildcraft.additionalpipes.textures.Textures; 9 | import net.minecraft.client.gui.GuiButton; 10 | import net.minecraft.client.gui.inventory.GuiContainer; 11 | import net.minecraft.client.resources.I18n; 12 | import net.minecraftforge.fml.relauncher.Side; 13 | import net.minecraftforge.fml.relauncher.SideOnly; 14 | 15 | @SideOnly(Side.CLIENT) 16 | public class GuiDistributionPipe extends GuiContainer { 17 | 18 | protected int xSize; 19 | protected int ySize; 20 | private GuiButton[] buttons = new GuiButton[18]; 21 | public int guiX = 0; 22 | public int guiY = 0; 23 | private final PipeBehaviorDistribution pipe; 24 | 25 | public GuiDistributionPipe(PipeBehaviorDistribution pipe) { 26 | super(new ContainerDistributionPipe(pipe)); 27 | this.pipe = pipe; 28 | xSize = 117; 29 | ySize = 130; 30 | } 31 | 32 | @Override 33 | public void initGui() { 34 | super.initGui(); 35 | // int bw = this.xSize - 20; 36 | int guiX = (width - xSize) / 2 + 30; 37 | int guiY = (height - ySize) / 2 - 10; 38 | 39 | buttonList.add(buttons[0] = new GuiButton(1, guiX + 1, guiY + 24, 20, 17, "-")); 40 | buttonList.add(buttons[1] = new GuiButton(2, guiX + 3 + 20, guiY + 24, 30, 17, "0")); 41 | buttonList.add(buttons[2] = new GuiButton(3, guiX + 5 + 50, guiY + 24, 20, 17, "+")); 42 | 43 | buttonList.add(buttons[3] = new GuiButton(4, guiX + 1, guiY + 25 + 17, 20, 17, "-")); 44 | buttonList.add(buttons[4] = new GuiButton(5, guiX + 3 + 20, guiY + 25 + 17, 30, 17, "0")); 45 | buttonList.add(buttons[5] = new GuiButton(6, guiX + 5 + 50, guiY + 25 + 17, 20, 17, "+")); 46 | 47 | buttonList.add(buttons[6] = new GuiButton(7, guiX + 1, guiY + 26 + 17 * 2, 20, 17, "-")); 48 | buttonList.add(buttons[7] = new GuiButton(8, guiX + 3 + 20, guiY + 26 + 17 * 2, 30, 17, "0")); 49 | buttonList.add(buttons[8] = new GuiButton(9, guiX + 5 + 50, guiY + 26 + 17 * 2, 20, 17, "+")); 50 | 51 | buttonList.add(buttons[9] = new GuiButton(10, guiX + 1, guiY + 27 + 17 * 3, 20, 17, "-")); 52 | buttonList.add(buttons[10] = new GuiButton(11, guiX + 3 + 20, guiY + 27 + 17 * 3, 30, 17, "0")); 53 | buttonList.add(buttons[11] = new GuiButton(12, guiX + 5 + 50, guiY + 27 + 17 * 3, 20, 17, "+")); 54 | 55 | buttonList.add(buttons[12] = new GuiButton(13, guiX + 1, guiY + 28 + 17 * 4, 20, 17, "-")); 56 | buttonList.add(buttons[13] = new GuiButton(14, guiX + 3 + 20, guiY + 28 + 17 * 4, 30, 17, "0")); 57 | buttonList.add(buttons[14] = new GuiButton(15, guiX + 5 + 50, guiY + 28 + 17 * 4, 20, 17, "+")); 58 | 59 | buttonList.add(buttons[15] = new GuiButton(16, guiX + 1, guiY + 29 + 17 * 5, 20, 17, "-")); 60 | buttonList.add(buttons[16] = new GuiButton(17, guiX + 3 + 20, guiY + 29 + 17 * 5, 30, 17, "0")); 61 | buttonList.add(buttons[17] = new GuiButton(18, guiX + 5 + 50, guiY + 29 + 17 * 5, 20, 17, "+")); 62 | 63 | } 64 | 65 | @Override 66 | protected void drawGuiContainerForegroundLayer(int p1, int p2) 67 | { 68 | buttons[1].displayString = "" + pipe.distData[0]; 69 | buttons[4].displayString = "" + pipe.distData[1]; 70 | buttons[7].displayString = "" + pipe.distData[2]; 71 | buttons[10].displayString = "" + pipe.distData[3]; 72 | buttons[13].displayString = "" + pipe.distData[4]; 73 | buttons[16].displayString = "" + pipe.distData[5]; 74 | 75 | fontRenderer.drawString(I18n.format("gui.distribution_pipe.title"), guiX + 42, guiY + 22, 4210752); 76 | } 77 | 78 | @Override 79 | protected void actionPerformed(GuiButton guibutton) 80 | { 81 | int index = (guibutton.id - 1) / 3; 82 | 83 | int newData = pipe.distData[index]; 84 | if((guibutton.id - 1) % 3 == 0) 85 | { 86 | newData--; 87 | } 88 | else 89 | { 90 | newData++; 91 | } 92 | 93 | if(newData < 0) 94 | { 95 | return; 96 | } 97 | 98 | // make sure that one of the distData[] elements is at least 1 99 | boolean nonZeroFound = newData > 0; 100 | 101 | if(!nonZeroFound) 102 | { 103 | for(int i = 0; i < pipe.distData.length; i++) 104 | { 105 | if(i != index && pipe.distData[i] > 0) 106 | { 107 | nonZeroFound = true; 108 | } 109 | } 110 | } 111 | 112 | if(nonZeroFound) 113 | { 114 | // save data and send packet 115 | pipe.distData[index] = newData; 116 | MessageDistPipe message = new MessageDistPipe(pipe.getPos(), (byte) index, newData); 117 | PacketHandler.INSTANCE.sendToServer(message); 118 | } 119 | 120 | 121 | } 122 | 123 | @Override 124 | protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { 125 | 126 | GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 127 | mc.renderEngine.bindTexture(Textures.GUI_DISTRIBUTION); 128 | int j = (width - xSize) / 2; 129 | int k = (height - ySize) / 2; 130 | drawTexturedModalRect(j, k, 0, 0, xSize, ySize); 131 | 132 | } 133 | 134 | } 135 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/GuiHandler.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorAdvWood; 4 | import buildcraft.additionalpipes.pipes.PipeBehaviorClosed; 5 | import buildcraft.additionalpipes.pipes.PipeBehaviorDistribution; 6 | import buildcraft.additionalpipes.pipes.PipeBehaviorJeweled; 7 | import buildcraft.additionalpipes.pipes.PipeBehaviorPriorityInsertion; 8 | import buildcraft.additionalpipes.pipes.PipeBehaviorTeleport; 9 | import buildcraft.additionalpipes.utils.Log; 10 | import buildcraft.transport.tile.TilePipeHolder; 11 | import net.minecraft.entity.player.EntityPlayer; 12 | import net.minecraft.tileentity.TileEntity; 13 | import net.minecraft.util.math.BlockPos; 14 | import net.minecraft.world.World; 15 | import net.minecraftforge.fml.common.network.IGuiHandler; 16 | 17 | public class GuiHandler implements IGuiHandler { 18 | // Gui IDs 19 | public static final int PIPE_TP = 1; 20 | public static final int PIPE_DIST = 2; 21 | public static final int PIPE_WOODEN_ADV = 3; 22 | public static final int PIPE_CLOSED = 4; 23 | public static final int PIPE_PRIORITY = 5; 24 | public static final int PIPE_JEWELED = 6; 25 | 26 | 27 | @Override 28 | public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { 29 | TileEntity tile = world.getTileEntity(new BlockPos(x, y, z)); 30 | if(tile == null) { 31 | return null; 32 | } 33 | 34 | Log.debug("Opening Container " + ID + " on the server"); 35 | 36 | switch(ID) { 37 | case PIPE_TP: 38 | return new ContainerTeleportPipe(player, (PipeBehaviorTeleport) ((TilePipeHolder) tile).getPipe().getBehaviour()); 39 | case PIPE_DIST: 40 | return new ContainerDistributionPipe((PipeBehaviorDistribution) ((TilePipeHolder) tile).getPipe().getBehaviour()); 41 | case PIPE_WOODEN_ADV: 42 | return new ContainerAdvancedWoodPipe(player, player.inventory, (PipeBehaviorAdvWood) ((TilePipeHolder) tile).getPipe().getBehaviour()); 43 | case PIPE_CLOSED: 44 | return new ContainerPipeClosed(player, (PipeBehaviorClosed) ((TilePipeHolder) tile).getPipe().getBehaviour()); 45 | case PIPE_PRIORITY: 46 | return new ContainerPriorityInsertionPipe((PipeBehaviorPriorityInsertion) ((TilePipeHolder) tile).getPipe().getBehaviour()); 47 | case PIPE_JEWELED: 48 | return new ContainerJeweledPipe(player.inventory, ((PipeBehaviorJeweled)((TilePipeHolder) tile).getPipe().getBehaviour())); 49 | default: 50 | return null; 51 | } 52 | } 53 | 54 | @Override 55 | public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { 56 | TileEntity tile = world.getTileEntity(new BlockPos(x, y, z)); 57 | if(tile == null) { 58 | return null; 59 | } 60 | 61 | Log.debug("Opening GUI " + ID + " on the client"); 62 | 63 | switch(ID) 64 | { 65 | case PIPE_TP: 66 | return new GuiTeleportPipe(player, ((PipeBehaviorTeleport)((TilePipeHolder) tile).getPipe().getBehaviour())); 67 | case PIPE_DIST: 68 | return new GuiDistributionPipe((PipeBehaviorDistribution) ((TilePipeHolder) tile).getPipe().getBehaviour()); 69 | case PIPE_WOODEN_ADV: 70 | return new GuiAdvancedWoodPipe(player, player.inventory, (PipeBehaviorAdvWood) ((TilePipeHolder) tile).getPipe().getBehaviour()); 71 | case PIPE_CLOSED: 72 | return new GuiPipeClosed(player, (PipeBehaviorClosed) ((TilePipeHolder) tile).getPipe().getBehaviour()); 73 | case PIPE_PRIORITY: 74 | return new GuiPriorityInsertionPipe((PipeBehaviorPriorityInsertion) ((TilePipeHolder) tile).getPipe().getBehaviour()); 75 | case PIPE_JEWELED: 76 | return new GuiJeweledPipe(player.inventory, ((PipeBehaviorJeweled)((TilePipeHolder) tile).getPipe().getBehaviour())); 77 | default: 78 | return null; 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/GuiPipeClosed.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import org.lwjgl.opengl.GL11; 4 | 5 | import buildcraft.additionalpipes.pipes.PipeBehaviorClosed; 6 | import buildcraft.additionalpipes.textures.Textures; 7 | import buildcraft.lib.gui.GuiBC8; 8 | import net.minecraft.client.resources.I18n; 9 | import net.minecraft.entity.player.EntityPlayer; 10 | import net.minecraftforge.fml.relauncher.Side; 11 | import net.minecraftforge.fml.relauncher.SideOnly; 12 | 13 | @SideOnly(Side.CLIENT) 14 | public class GuiPipeClosed extends GuiBC8 { 15 | 16 | public GuiPipeClosed(EntityPlayer player, PipeBehaviorClosed pipe) 17 | { 18 | super(new ContainerPipeClosed(player, pipe)); 19 | } 20 | 21 | @Override 22 | protected void drawForegroundLayer() 23 | { 24 | fontRenderer.drawString(I18n.format("gui.closed_pipe.title"), guiLeft + 60, guiTop + 6, 4210752); 25 | fontRenderer.drawString(I18n.format("container.inventory"), guiLeft + 8, guiTop + ySize - 96 + 2, 4210752); 26 | } 27 | 28 | /** 29 | * Draw the background layer for the GuiContainer (everything behind the 30 | * items) 31 | */ 32 | @Override 33 | protected void drawBackgroundLayer(float partialTicks) 34 | { 35 | 36 | GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 37 | mc.renderEngine.bindTexture(Textures.DISPENSER); 38 | int var5 = (width - xSize) / 2; 39 | int var6 = (height - ySize) / 2; 40 | drawTexturedModalRect(var5, var6, 0, 0, xSize, ySize); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/gui/GuiPriorityInsertionPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.gui; 2 | 3 | import org.lwjgl.opengl.GL11; 4 | 5 | import buildcraft.additionalpipes.network.PacketHandler; 6 | import buildcraft.additionalpipes.network.message.MessagePriorityPipe; 7 | import buildcraft.additionalpipes.pipes.PipeBehaviorPriorityInsertion; 8 | import buildcraft.additionalpipes.textures.Textures; 9 | import net.minecraft.client.gui.GuiButton; 10 | import net.minecraft.client.gui.inventory.GuiContainer; 11 | import net.minecraft.client.resources.I18n; 12 | import net.minecraft.util.EnumFacing; 13 | import net.minecraftforge.fml.relauncher.Side; 14 | import net.minecraftforge.fml.relauncher.SideOnly; 15 | 16 | 17 | @SideOnly(Side.CLIENT) 18 | public class GuiPriorityInsertionPipe extends GuiContainer { 19 | 20 | protected int xSize; 21 | protected int ySize; 22 | private GuiButton[] buttons = new GuiButton[18]; 23 | public int guiX = 0; 24 | public int guiY = 0; 25 | private final PipeBehaviorPriorityInsertion pipe; 26 | 27 | public GuiPriorityInsertionPipe(PipeBehaviorPriorityInsertion pipe) { 28 | super(new ContainerPriorityInsertionPipe(pipe)); 29 | this.pipe = pipe; 30 | xSize = 132; 31 | ySize = 130; 32 | } 33 | 34 | @Override 35 | public void initGui() { 36 | super.initGui(); 37 | // int bw = this.xSize - 20; 38 | int guiX = (width - xSize) / 2 + 30; 39 | int guiY = (height - ySize) / 2 - 10; 40 | 41 | buttonList.add(buttons[0] = new GuiButton(1, guiX + 6, guiY + 24, 20, 17, "-")); 42 | buttonList.add(buttons[1] = new GuiButton(2, guiX + 8 + 20, guiY + 24, 30, 17, "0")); 43 | buttonList.add(buttons[2] = new GuiButton(3, guiX + 10 + 50, guiY + 24, 20, 17, "+")); 44 | 45 | buttonList.add(buttons[3] = new GuiButton(4, guiX + 6, guiY + 25 + 17, 20, 17, "-")); 46 | buttonList.add(buttons[4] = new GuiButton(5, guiX + 8 + 20, guiY + 25 + 17, 30, 17, "0")); 47 | buttonList.add(buttons[5] = new GuiButton(6, guiX + 10 + 50, guiY + 25 + 17, 20, 17, "+")); 48 | 49 | buttonList.add(buttons[6] = new GuiButton(7, guiX + 6, guiY + 26 + 17 * 2, 20, 17, "-")); 50 | buttonList.add(buttons[7] = new GuiButton(8, guiX + 8 + 20, guiY + 26 + 17 * 2, 30, 17, "0")); 51 | buttonList.add(buttons[8] = new GuiButton(9, guiX + 10 + 50, guiY + 26 + 17 * 2, 20, 17, "+")); 52 | 53 | buttonList.add(buttons[9] = new GuiButton(10, guiX + 6, guiY + 27 + 17 * 3, 20, 17, "-")); 54 | buttonList.add(buttons[10] = new GuiButton(11, guiX + 8 + 20, guiY + 27 + 17 * 3, 30, 17, "0")); 55 | buttonList.add(buttons[11] = new GuiButton(12, guiX + 10 + 50, guiY + 27 + 17 * 3, 20, 17, "+")); 56 | 57 | buttonList.add(buttons[12] = new GuiButton(13, guiX + 6, guiY + 28 + 17 * 4, 20, 17, "-")); 58 | buttonList.add(buttons[13] = new GuiButton(14, guiX + 8 + 20, guiY + 28 + 17 * 4, 30, 17, "0")); 59 | buttonList.add(buttons[14] = new GuiButton(15, guiX + 10 + 50, guiY + 28 + 17 * 4, 20, 17, "+")); 60 | 61 | buttonList.add(buttons[15] = new GuiButton(16, guiX + 6, guiY + 29 + 17 * 5, 20, 17, "-")); 62 | buttonList.add(buttons[16] = new GuiButton(17, guiX + 8 + 20, guiY + 29 + 17 * 5, 30, 17, "0")); 63 | buttonList.add(buttons[17] = new GuiButton(18, guiX + 10 + 50, guiY + 29 + 17 * 5, 20, 17, "+")); 64 | 65 | } 66 | 67 | @Override 68 | protected void drawGuiContainerForegroundLayer(int p1, int p2) 69 | { 70 | for(int side = 0; side < EnumFacing.VALUES.length; ++side) 71 | { 72 | int buttonIndex = 3 * side + 1; 73 | buttons[buttonIndex].displayString = "" + pipe.sidePriorities[side]; 74 | 75 | // display the button text in red if it is zero, indicating that the side is completely disabled 76 | buttons[buttonIndex].packedFGColour = pipe.sidePriorities[side] == 0 ? 0xa04e4e : 0xe0e0e0; 77 | } 78 | 79 | fontRenderer.drawString(I18n.format("gui.priority_insertion.title"), guiX + 33, guiY + 22, 4210752); 80 | } 81 | 82 | @Override 83 | protected void actionPerformed(GuiButton guibutton) { 84 | int index = (guibutton.id - 1) / 3; 85 | byte newData = pipe.sidePriorities[index]; 86 | if((guibutton.id - 1) % 3 == 0) { 87 | newData--; 88 | } else { 89 | newData++; 90 | } 91 | 92 | if(newData < 0 || newData > 6) 93 | return; 94 | 95 | MessagePriorityPipe message = new MessagePriorityPipe(pipe.getPos(), (byte) index, newData); 96 | PacketHandler.INSTANCE.sendToServer(message); 97 | } 98 | 99 | @Override 100 | protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { 101 | 102 | GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); 103 | mc.renderEngine.bindTexture(Textures.GUI_PRIORITY); 104 | int j = (width - xSize) / 2; 105 | int k = (height - ySize) / 2; 106 | drawTexturedModalRect(j, k, 0, 0, xSize, ySize); 107 | 108 | } 109 | 110 | } 111 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/item/ItemDogDeaggravator.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.item; 2 | 3 | import java.util.Iterator; 4 | import java.util.List; 5 | 6 | import javax.annotation.Nullable; 7 | 8 | import buildcraft.additionalpipes.AdditionalPipes; 9 | import buildcraft.additionalpipes.sound.APSounds; 10 | import buildcraft.additionalpipes.utils.Log; 11 | import net.minecraft.client.resources.I18n; 12 | import net.minecraft.client.util.ITooltipFlag; 13 | import net.minecraft.entity.passive.EntityWolf; 14 | import net.minecraft.entity.player.EntityPlayer; 15 | import net.minecraft.item.Item; 16 | import net.minecraft.item.ItemStack; 17 | import net.minecraft.util.ActionResult; 18 | import net.minecraft.util.EnumActionResult; 19 | import net.minecraft.util.EnumHand; 20 | import net.minecraft.util.SoundCategory; 21 | import net.minecraft.util.math.AxisAlignedBB; 22 | import net.minecraft.world.World; 23 | import net.minecraftforge.fml.relauncher.Side; 24 | import net.minecraftforge.fml.relauncher.SideOnly; 25 | 26 | public class ItemDogDeaggravator extends Item 27 | { 28 | public static final String NAME = "dog_deaggravator"; 29 | 30 | public ItemDogDeaggravator() 31 | { 32 | setRegistryName(NAME); 33 | setUnlocalizedName(NAME); 34 | setCreativeTab(AdditionalPipes.instance.creativeTab); 35 | setMaxStackSize(1); 36 | } 37 | 38 | @Override 39 | public ActionResult onItemRightClick(World world, EntityPlayer player, EnumHand hand) 40 | { 41 | //this code adapted from EntityAIHurtByTarget.startExecuting() 42 | double horizontalRange = 16; 43 | List list = world.getEntitiesWithinAABB(EntityWolf.class, new AxisAlignedBB(player.posX, player.posY, player.posZ, 44 | player.posX + 1.0D, player.posY + 1.0D, player.posZ + 1.0D).grow(horizontalRange, 10.0D, horizontalRange)); 45 | Iterator iterator = list.iterator(); 46 | int wolfCounter = 0; 47 | 48 | while(iterator.hasNext()) 49 | { 50 | EntityWolf wolf = iterator.next(); 51 | 52 | if(wolf.isTamed() && wolf.isOnSameTeam(player)) 53 | { 54 | ++wolfCounter; 55 | wolf.setAttackTarget(null); 56 | } 57 | } 58 | 59 | world.playSound(player, player.getPosition(), APSounds.dogDeaggravatorBell, SoundCategory.PLAYERS, 1, 1); 60 | Log.debug("Cleared attack target on " + wolfCounter + " wolves."); 61 | 62 | return ActionResult.newResult(EnumActionResult.SUCCESS, hand == EnumHand.MAIN_HAND ? player.getHeldItemMainhand() : player.getHeldItemOffhand()); 63 | 64 | } 65 | 66 | @Override 67 | @SideOnly(Side.CLIENT) 68 | public void addInformation(ItemStack stack, @Nullable World worldIn, List list, ITooltipFlag flagIn) 69 | { 70 | list.add(I18n.format("tooltip.dog_deaggravator")); 71 | } 72 | 73 | } -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/keyboard/KeyInputEventHandler.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.keyboard; 2 | 3 | import net.minecraftforge.fml.client.FMLClientHandler; 4 | import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; 5 | import net.minecraftforge.fml.common.gameevent.InputEvent; 6 | import net.minecraftforge.fml.relauncher.Side; 7 | import net.minecraftforge.fml.relauncher.SideOnly; 8 | 9 | 10 | @SideOnly(Side.CLIENT) 11 | public class KeyInputEventHandler 12 | { 13 | 14 | @SubscribeEvent 15 | public void handleKeyInputEvent(InputEvent.KeyInputEvent event) 16 | { 17 | if (FMLClientHandler.instance().getClient().inGameHasFocus) 18 | { 19 | if (FMLClientHandler.instance().getClientPlayerEntity() != null) 20 | { 21 | if(Keybindings.lasers.isPressed()) 22 | { 23 | /* 24 | ChunkLoadViewDataProxy viewer = AdditionalPipes.instance.chunkLoadViewer; 25 | if(!viewer.lasersActive()) 26 | { 27 | viewer.requestPersistentChunks(); 28 | } 29 | viewer.toggleLasers(); 30 | */ 31 | } 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/keyboard/Keybindings.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.keyboard; 2 | 3 | import net.minecraft.client.settings.KeyBinding; 4 | import net.minecraftforge.fml.relauncher.Side; 5 | import net.minecraftforge.fml.relauncher.SideOnly; 6 | 7 | @SideOnly(Side.CLIENT) 8 | public class Keybindings 9 | { 10 | public static KeyBinding lasers; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/PacketHandler.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network; 2 | 3 | import buildcraft.additionalpipes.AdditionalPipes; 4 | import buildcraft.additionalpipes.network.message.MessageAdvWoodPipe; 5 | import buildcraft.additionalpipes.network.message.MessageDistPipe; 6 | import buildcraft.additionalpipes.network.message.MessageJeweledPipeOptionsClient; 7 | import buildcraft.additionalpipes.network.message.MessageJeweledPipeOptionsServer; 8 | import buildcraft.additionalpipes.network.message.MessagePriorityPipe; 9 | import buildcraft.additionalpipes.network.message.MessageTelePipeData; 10 | import buildcraft.additionalpipes.network.message.MessageTelePipeUpdate; 11 | import net.minecraftforge.fml.common.network.NetworkRegistry; 12 | import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; 13 | import net.minecraftforge.fml.relauncher.Side; 14 | 15 | 16 | public class PacketHandler 17 | { 18 | public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(AdditionalPipes.MODID.toLowerCase()); 19 | 20 | public static void init() 21 | { 22 | INSTANCE.registerMessage(MessageDistPipe.class, MessageDistPipe.class, 0, Side.SERVER); 23 | INSTANCE.registerMessage(MessageTelePipeUpdate.class, MessageTelePipeUpdate.class, 1, Side.SERVER); 24 | INSTANCE.registerMessage(MessageAdvWoodPipe.class, MessageAdvWoodPipe.class, 2, Side.SERVER); 25 | INSTANCE.registerMessage(MessageTelePipeData.class, MessageTelePipeData.class, 3, Side.CLIENT); 26 | // INSTANCE.registerMessage(MessageChunkloadRequest.class, MessageChunkloadRequest.class, 4, Side.SERVER); 27 | // INSTANCE.registerMessage(MessageChunkloadData.class, MessageChunkloadData.class, 5, Side.CLIENT); 28 | INSTANCE.registerMessage(MessagePriorityPipe.class, MessagePriorityPipe.class, 6, Side.SERVER); 29 | INSTANCE.registerMessage(MessageJeweledPipeOptionsServer.class, MessageJeweledPipeOptionsServer.class, 7, Side.SERVER); 30 | INSTANCE.registerMessage(MessageJeweledPipeOptionsClient.class, MessageJeweledPipeOptionsClient.class, 8, Side.CLIENT); 31 | 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessageAdvWoodPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorAdvWood; 4 | import buildcraft.transport.tile.TilePipeHolder; 5 | import io.netty.buffer.ByteBuf; 6 | import net.minecraft.tileentity.TileEntity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 10 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 11 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 12 | 13 | /** 14 | * Message that signals an AdvWoodenPipe to change its include/exclude state 15 | * 16 | */ 17 | public class MessageAdvWoodPipe implements IMessage, IMessageHandler 18 | { 19 | public BlockPos position; 20 | public boolean exclude; 21 | 22 | public MessageAdvWoodPipe() 23 | { 24 | } 25 | 26 | public MessageAdvWoodPipe(BlockPos position, boolean exclude) 27 | { 28 | this.position = position; 29 | this.exclude = exclude; 30 | } 31 | 32 | @Override 33 | public void fromBytes(ByteBuf buf) 34 | { 35 | position = BlockPos.fromLong(buf.readLong()); 36 | exclude = buf.readBoolean(); 37 | } 38 | 39 | @Override 40 | public void toBytes(ByteBuf buf) 41 | { 42 | buf.writeLong(position.toLong()); 43 | buf.writeBoolean(exclude); 44 | } 45 | 46 | @Override 47 | public IMessage onMessage(MessageAdvWoodPipe message, MessageContext ctx) 48 | { 49 | World world = ctx.getServerHandler().player.getEntityWorld(); 50 | TileEntity te = world.getTileEntity(message.position); 51 | 52 | if(te instanceof TilePipeHolder) { 53 | PipeBehaviorAdvWood pipe = (PipeBehaviorAdvWood) ((TilePipeHolder) te).getPipe().getBehaviour(); 54 | 55 | pipe.setExclude(message.exclude); 56 | } 57 | 58 | return null; 59 | } 60 | 61 | @Override 62 | public String toString() 63 | { 64 | return "MessageAdvWoodPipe"; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessageChunkloadData.java.disabled: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import java.util.HashSet; 4 | 5 | import buildcraft.additionalpipes.AdditionalPipes; 6 | import io.netty.buffer.ByteBuf; 7 | import net.minecraft.util.math.ChunkPos; 8 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 9 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 10 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 11 | 12 | public class MessageChunkloadData implements IMessage, IMessageHandler 13 | { 14 | HashSet _chunksInRange; 15 | 16 | public MessageChunkloadData() 17 | { 18 | } 19 | 20 | public MessageChunkloadData(HashSet chunksInRange) 21 | { 22 | _chunksInRange = chunksInRange; 23 | } 24 | 25 | @Override 26 | public IMessage onMessage(MessageChunkloadData message, MessageContext ctx) 27 | { 28 | AdditionalPipes.instance.chunkLoadViewer.receivePersistentChunks(message._chunksInRange); 29 | 30 | return null; 31 | } 32 | 33 | @Override 34 | public String toString() 35 | { 36 | return "MessageChunkloadData"; 37 | } 38 | 39 | @Override 40 | public void fromBytes(ByteBuf buf) 41 | { 42 | int _chunksInRangeLength = buf.readInt(); 43 | 44 | _chunksInRange = new HashSet(_chunksInRangeLength); 45 | 46 | for(int counter = 0; counter < _chunksInRangeLength; ++counter) 47 | { 48 | _chunksInRange.add(new ChunkPos(buf.readInt(), buf.readInt())); 49 | } 50 | } 51 | 52 | @Override 53 | public void toBytes(ByteBuf buf) 54 | { 55 | buf.writeInt(_chunksInRange.size()); 56 | 57 | for(ChunkPos pair : _chunksInRange) 58 | { 59 | buf.writeInt(pair.chunkXPos); 60 | buf.writeInt(pair.chunkZPos); 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessageChunkloadRequest.java.disabled: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import io.netty.buffer.ByteBuf; 4 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 5 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 6 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 7 | import buildcraft.additionalpipes.AdditionalPipes; 8 | 9 | public class MessageChunkloadRequest implements IMessage, IMessageHandler 10 | { 11 | public MessageChunkloadRequest() 12 | { 13 | } 14 | 15 | @Override 16 | public IMessage onMessage(MessageChunkloadRequest message, MessageContext ctx) 17 | { 18 | AdditionalPipes.instance.chunkLoadViewer.sendPersistentChunksToPlayer(ctx.getServerHandler().playerEntity); 19 | 20 | return null; 21 | } 22 | 23 | @Override 24 | public String toString() 25 | { 26 | return "MessageChunkloadRequest"; 27 | } 28 | 29 | @Override 30 | public void fromBytes(ByteBuf buf) { 31 | //Empty 32 | 33 | } 34 | 35 | @Override 36 | public void toBytes(ByteBuf buf) { 37 | //Empty 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessageDistPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorDistribution; 4 | import buildcraft.transport.tile.TilePipeHolder; 5 | import io.netty.buffer.ByteBuf; 6 | import net.minecraft.tileentity.TileEntity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 10 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 11 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 12 | 13 | /** 14 | * Message that sets the properties of a Distribution Pipe from the GUI 15 | * 16 | */ 17 | public class MessageDistPipe implements IMessage, IMessageHandler 18 | { 19 | public BlockPos position; 20 | byte _index; 21 | int _newData; 22 | 23 | public MessageDistPipe() 24 | { 25 | } 26 | 27 | public MessageDistPipe(BlockPos position, byte index, int newData) 28 | { 29 | this.position = position; 30 | _index = index; 31 | _newData = newData; 32 | } 33 | 34 | @Override 35 | public void fromBytes(ByteBuf buf) 36 | { 37 | position = BlockPos.fromLong(buf.readLong()); 38 | _index = buf.readByte(); 39 | _newData = buf.readInt(); 40 | } 41 | 42 | @Override 43 | public void toBytes(ByteBuf buf) 44 | { 45 | buf.writeLong(position.toLong()); 46 | buf.writeByte(_index); 47 | buf.writeInt(_newData); 48 | } 49 | 50 | @Override 51 | public IMessage onMessage(MessageDistPipe message, MessageContext ctx) 52 | { 53 | 54 | World world = ctx.getServerHandler().player.getEntityWorld(); 55 | TileEntity te = world.getTileEntity(message.position); 56 | if(te instanceof TilePipeHolder) 57 | { 58 | PipeBehaviorDistribution pipe = (PipeBehaviorDistribution) ((TilePipeHolder) te).getPipe().getBehaviour(); 59 | 60 | if(message._newData >= 0 && message._index >= 0 && message._index < pipe.distData.length) 61 | { 62 | // make sure that there would still be a 1 in at least one distData element 63 | pipe.distData[message._index] = message._newData; 64 | boolean found = message._newData > 0; 65 | if(!found) { 66 | for(int i = 0; i < pipe.distData.length; i++) { 67 | if(pipe.distData[i] > 0) { 68 | found = true; 69 | } 70 | } 71 | } 72 | if(!found) { 73 | for(int i = 0; i < pipe.distData.length; i++) { 74 | pipe.distData[i] = 1; 75 | } 76 | } 77 | 78 | } 79 | } 80 | 81 | return null; 82 | } 83 | 84 | @Override 85 | public String toString() 86 | { 87 | return "MessageDistPipe"; 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessageJeweledPipeOptionsClient.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import buildcraft.additionalpipes.gui.GuiJeweledPipe; 4 | import buildcraft.additionalpipes.pipes.PipeBehaviorJeweled; 5 | import buildcraft.additionalpipes.pipes.SideFilterData; 6 | import buildcraft.additionalpipes.utils.NetworkUtils; 7 | import buildcraft.transport.tile.TilePipeHolder; 8 | import io.netty.buffer.ByteBuf; 9 | import net.minecraft.client.gui.GuiScreen; 10 | import net.minecraft.tileentity.TileEntity; 11 | import net.minecraft.util.math.BlockPos; 12 | import net.minecraftforge.fml.client.FMLClientHandler; 13 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 14 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 15 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 16 | 17 | 18 | /** 19 | * Message that sets the three option booleans of a Jeweled Pipe 20 | * 21 | */ 22 | public class MessageJeweledPipeOptionsClient implements IMessage, IMessageHandler 23 | { 24 | BlockPos position; 25 | boolean[] acceptUnsorted; 26 | boolean[] matchNBT; 27 | boolean[] matchMeta; 28 | 29 | public MessageJeweledPipeOptionsClient() 30 | { 31 | } 32 | 33 | public MessageJeweledPipeOptionsClient(BlockPos position, SideFilterData[] sideFilters) 34 | { 35 | this.position = position; 36 | 37 | acceptUnsorted = new boolean[GuiJeweledPipe.NUM_TABS]; 38 | matchNBT = new boolean[GuiJeweledPipe.NUM_TABS]; 39 | matchMeta = new boolean[GuiJeweledPipe.NUM_TABS]; 40 | 41 | for(int sideNumber = 0; sideNumber < GuiJeweledPipe.NUM_TABS; ++sideNumber) 42 | { 43 | acceptUnsorted[sideNumber] = sideFilters[sideNumber].acceptsUnsortedItems(); 44 | matchNBT[sideNumber] = sideFilters[sideNumber].matchNBT(); 45 | matchMeta[sideNumber] = sideFilters[sideNumber].matchMetadata(); 46 | } 47 | } 48 | 49 | @Override 50 | public void fromBytes(ByteBuf buf) 51 | { 52 | position = BlockPos.fromLong(buf.readLong()); 53 | acceptUnsorted = NetworkUtils.readBooleanArray(buf, GuiJeweledPipe.NUM_TABS); 54 | matchNBT = NetworkUtils.readBooleanArray(buf, GuiJeweledPipe.NUM_TABS); 55 | matchMeta = NetworkUtils.readBooleanArray(buf, GuiJeweledPipe.NUM_TABS); 56 | } 57 | 58 | @Override 59 | public void toBytes(ByteBuf buf) 60 | { 61 | buf.writeLong(position.toLong()); 62 | NetworkUtils.writeBooleanArray(buf, acceptUnsorted); 63 | NetworkUtils.writeBooleanArray(buf, matchNBT); 64 | NetworkUtils.writeBooleanArray(buf, matchMeta); 65 | } 66 | 67 | @Override 68 | public IMessage onMessage(MessageJeweledPipeOptionsClient message, MessageContext ctx) 69 | { 70 | 71 | TileEntity te = FMLClientHandler.instance().getClient().world.getTileEntity(message.position); 72 | if(te instanceof TilePipeHolder) 73 | { 74 | PipeBehaviorJeweled pipe = (PipeBehaviorJeweled) ((TilePipeHolder) te).getPipe().getBehaviour(); 75 | 76 | for(int sideNumber = 0; sideNumber < GuiJeweledPipe.NUM_TABS; ++sideNumber) 77 | { 78 | pipe.filterData[sideNumber].setAcceptUnsortedItems(message.acceptUnsorted[sideNumber]); 79 | pipe.filterData[sideNumber].setMatchNBT(message.matchNBT[sideNumber]); 80 | pipe.filterData[sideNumber].setMatchMetadata(message.matchMeta[sideNumber]); 81 | } 82 | 83 | //update client GUI to reflect the new options 84 | GuiScreen currentScreen = FMLClientHandler.instance().getClient().currentScreen; 85 | if(currentScreen != null && currentScreen instanceof GuiJeweledPipe) 86 | { 87 | ((GuiJeweledPipe)currentScreen).updateButtonsForTab(); 88 | } 89 | } 90 | 91 | return null; 92 | } 93 | 94 | @Override 95 | public String toString() 96 | { 97 | return "MessageJeweledPipe"; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessageJeweledPipeOptionsServer.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorJeweled; 4 | import buildcraft.additionalpipes.pipes.SideFilterData; 5 | import buildcraft.transport.tile.TilePipeHolder; 6 | import io.netty.buffer.ByteBuf; 7 | import net.minecraft.tileentity.TileEntity; 8 | import net.minecraft.util.math.BlockPos; 9 | import net.minecraft.world.World; 10 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 11 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 12 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 13 | 14 | /** 15 | * Message that sets the three option booleans of a Jeweled Pipe on the client for a single side 16 | * 17 | */ 18 | public class MessageJeweledPipeOptionsServer implements IMessage, IMessageHandler 19 | { 20 | public BlockPos position; 21 | byte index; //1-indexed index of filter data that we are updating 22 | 23 | boolean acceptUnsorted; 24 | boolean matchNBT; 25 | boolean matchMeta; 26 | public MessageJeweledPipeOptionsServer() 27 | { 28 | } 29 | 30 | public MessageJeweledPipeOptionsServer(BlockPos position, byte index, SideFilterData filterData) 31 | { 32 | this.position = position; 33 | this.index = index; 34 | 35 | acceptUnsorted = filterData.acceptsUnsortedItems(); 36 | matchMeta = filterData.matchMetadata(); 37 | matchNBT = filterData.matchNBT(); 38 | } 39 | 40 | @Override 41 | public void fromBytes(ByteBuf buf) 42 | { 43 | position = BlockPos.fromLong(buf.readLong()); 44 | index = buf.readByte(); 45 | acceptUnsorted = buf.readBoolean(); 46 | matchNBT = buf.readBoolean(); 47 | matchMeta = buf.readBoolean(); 48 | } 49 | 50 | @Override 51 | public void toBytes(ByteBuf buf) 52 | { 53 | buf.writeLong(position.toLong()); 54 | buf.writeByte(index); 55 | buf.writeBoolean(acceptUnsorted); 56 | buf.writeBoolean(matchNBT); 57 | buf.writeBoolean(matchMeta); 58 | } 59 | 60 | @Override 61 | public IMessage onMessage(MessageJeweledPipeOptionsServer message, MessageContext ctx) 62 | { 63 | 64 | World world = ctx.getServerHandler().player.getEntityWorld(); 65 | TileEntity te = world.getTileEntity(message.position); 66 | if(te instanceof TilePipeHolder) 67 | { 68 | PipeBehaviorJeweled pipe = (PipeBehaviorJeweled) ((TilePipeHolder) te).getPipe().getBehaviour(); 69 | 70 | SideFilterData dataToUpdate = pipe.filterData[message.index - 1]; 71 | dataToUpdate.setAcceptUnsortedItems(message.acceptUnsorted); 72 | dataToUpdate.setMatchNBT(message.matchNBT); 73 | dataToUpdate.setMatchMetadata(message.matchMeta); 74 | } 75 | 76 | return null; 77 | } 78 | 79 | @Override 80 | public String toString() 81 | { 82 | return "MessageJeweledPipeOptionsServer"; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessagePriorityPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorPriorityInsertion; 4 | import buildcraft.transport.tile.TilePipeHolder; 5 | import io.netty.buffer.ByteBuf; 6 | import net.minecraft.tileentity.TileEntity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 10 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 11 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 12 | 13 | 14 | /** 15 | * Message that sets the properties of a Distribution Pipe from the GUI 16 | * 17 | */ 18 | public class MessagePriorityPipe implements IMessage, IMessageHandler 19 | { 20 | public BlockPos position; 21 | byte _index; 22 | byte _newData; 23 | 24 | public MessagePriorityPipe() 25 | { 26 | } 27 | 28 | public MessagePriorityPipe(BlockPos position, byte index, byte newData) 29 | { 30 | this.position = position; 31 | _index = index; 32 | _newData = newData; 33 | } 34 | 35 | @Override 36 | public void fromBytes(ByteBuf buf) 37 | { 38 | position = BlockPos.fromLong(buf.readLong()); 39 | _index = buf.readByte(); 40 | _newData = buf.readByte(); 41 | } 42 | 43 | @Override 44 | public void toBytes(ByteBuf buf) 45 | { 46 | buf.writeLong(position.toLong()); 47 | buf.writeByte(_index); 48 | buf.writeByte(_newData); 49 | } 50 | 51 | @Override 52 | public IMessage onMessage(MessagePriorityPipe message, MessageContext ctx) 53 | { 54 | 55 | World world = ctx.getServerHandler().player.getEntityWorld(); 56 | TileEntity te = world.getTileEntity(message.position); 57 | if(te instanceof TilePipeHolder) 58 | { 59 | PipeBehaviorPriorityInsertion pipe = (PipeBehaviorPriorityInsertion) ((TilePipeHolder) te).getPipe().getBehaviour(); 60 | 61 | if(message._newData >= 0 && message._index >= 0 && message._index < pipe.sidePriorities.length) { 62 | pipe.sidePriorities[message._index] = message._newData; 63 | boolean found = message._newData > 0; 64 | if(!found) { 65 | for(int i = 0; i < pipe.sidePriorities.length; i++) { 66 | if(pipe.sidePriorities[i] > 0) { 67 | found = true; 68 | } 69 | } 70 | } 71 | if(!found) { 72 | for(int i = 0; i < pipe.sidePriorities.length; i++) { 73 | pipe.sidePriorities[i] = 1; 74 | } 75 | } 76 | 77 | } 78 | } 79 | 80 | return null; 81 | } 82 | 83 | @Override 84 | public String toString() 85 | { 86 | return "MessagePriorityPipe"; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessageTelePipeData.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import java.util.UUID; 4 | 5 | import buildcraft.additionalpipes.pipes.PipeBehaviorTeleport; 6 | import buildcraft.transport.tile.TilePipeHolder; 7 | import io.netty.buffer.ByteBuf; 8 | import net.minecraft.tileentity.TileEntity; 9 | import net.minecraft.util.math.BlockPos; 10 | import net.minecraftforge.fml.client.FMLClientHandler; 11 | import net.minecraftforge.fml.common.network.ByteBufUtils; 12 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 13 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 14 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 15 | 16 | public class MessageTelePipeData implements IMessage, IMessageHandler 17 | { 18 | public BlockPos position; 19 | public int[] locations; 20 | public String ownerUUID; 21 | public String ownerName; 22 | 23 | public MessageTelePipeData() 24 | { 25 | } 26 | 27 | public MessageTelePipeData(BlockPos position, int[] locations, UUID ownerUUID, String ownerName) 28 | { 29 | this.position = position; 30 | this.locations = locations; 31 | this.ownerUUID = ownerUUID.toString(); 32 | this.ownerName = ownerName; 33 | } 34 | 35 | @Override 36 | public void fromBytes(ByteBuf buf) 37 | { 38 | position = BlockPos.fromLong(buf.readLong()); 39 | int locationsLength = buf.readInt(); 40 | 41 | this.locations = new int[locationsLength]; 42 | 43 | for(int counter = 0; counter < locationsLength; ++counter) 44 | { 45 | locations[counter] = buf.readInt(); 46 | } 47 | 48 | ownerUUID = ByteBufUtils.readUTF8String(buf); 49 | ownerName = ByteBufUtils.readUTF8String(buf); 50 | } 51 | 52 | @Override 53 | public void toBytes(ByteBuf buf) 54 | { 55 | buf.writeLong(position.toLong()); 56 | buf.writeInt(locations.length); 57 | for(int location : locations) 58 | { 59 | buf.writeInt(location); 60 | } 61 | ByteBufUtils.writeUTF8String(buf, ownerUUID); 62 | ByteBufUtils.writeUTF8String(buf, ownerName); 63 | } 64 | 65 | @Override 66 | public IMessage onMessage(MessageTelePipeData message, MessageContext ctx) 67 | { 68 | TileEntity te = FMLClientHandler.instance().getClient().world.getTileEntity(message.position); 69 | 70 | PipeBehaviorTeleport pipe = (PipeBehaviorTeleport) ((TilePipeHolder) te).getPipe().getBehaviour(); 71 | pipe.ownerUUID = UUID.fromString(message.ownerUUID); 72 | pipe.ownerName = message.ownerName; 73 | pipe.network = message.locations; 74 | 75 | return null; 76 | } 77 | 78 | @Override 79 | public String toString() 80 | { 81 | return "MessageTelePipeData"; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/network/message/MessageTelePipeUpdate.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.network.message; 2 | 3 | import buildcraft.additionalpipes.pipes.PipeBehaviorTeleport; 4 | import buildcraft.transport.tile.TilePipeHolder; 5 | import io.netty.buffer.ByteBuf; 6 | import net.minecraft.entity.player.EntityPlayerMP; 7 | import net.minecraft.tileentity.TileEntity; 8 | import net.minecraft.util.math.BlockPos; 9 | import net.minecraft.util.text.TextComponentString; 10 | import net.minecraftforge.fml.common.network.simpleimpl.IMessage; 11 | import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; 12 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 13 | 14 | /** 15 | * Message that sets the properties of a Teleport Pipe from the GUI 16 | * 17 | */ 18 | public class MessageTelePipeUpdate implements IMessage, IMessageHandler 19 | { 20 | public BlockPos position; 21 | int _freq; 22 | boolean _isPublic; 23 | byte _state; 24 | int _newData; 25 | 26 | public MessageTelePipeUpdate() 27 | { 28 | } 29 | 30 | public MessageTelePipeUpdate(BlockPos position, int freq, boolean isPublic, byte index) 31 | { 32 | this.position = position; 33 | _freq = freq; 34 | _isPublic = isPublic; 35 | _state = index; 36 | } 37 | 38 | @Override 39 | public void fromBytes(ByteBuf buf) 40 | { 41 | position = BlockPos.fromLong(buf.readLong()); 42 | _freq = buf.readInt(); 43 | _isPublic = buf.readBoolean(); 44 | _state = buf.readByte(); 45 | } 46 | 47 | @Override 48 | public void toBytes(ByteBuf buf) 49 | { 50 | buf.writeLong(position.toLong()); 51 | buf.writeInt(_freq); 52 | buf.writeBoolean(_isPublic); 53 | buf.writeByte(_state); 54 | } 55 | 56 | @Override 57 | public IMessage onMessage(MessageTelePipeUpdate message, MessageContext ctx) 58 | { 59 | TileEntity te = ctx.getServerHandler().player.getEntityWorld().getTileEntity(message.position); 60 | if(te instanceof TilePipeHolder) { 61 | PipeBehaviorTeleport pipe = (PipeBehaviorTeleport) ((TilePipeHolder) te).getPipe().getBehaviour(); 62 | // only allow the owner to change pipe state 63 | EntityPlayerMP entityPlayer = (EntityPlayerMP) ctx.getServerHandler().player; 64 | if(!PipeBehaviorTeleport.canPlayerModifyPipe(entityPlayer, pipe)) 65 | { 66 | entityPlayer.sendMessage(new TextComponentString("Sorry, You may not change pipe state.")); 67 | return null; 68 | } 69 | int frequency = message._freq; 70 | if(frequency < 0) { 71 | frequency = 0; 72 | } 73 | pipe.setFrequency(frequency); 74 | pipe.state = (byte) message._state; 75 | pipe.isPublic = message._isPublic; 76 | } 77 | 78 | return null; 79 | } 80 | 81 | @Override 82 | public String toString() 83 | { 84 | return "MessageTelePipeUpdate"; 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/APPipe.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.pipes; 2 | 3 | import buildcraft.api.transport.pipe.IPipe; 4 | import buildcraft.api.transport.pipe.PipeBehaviour; 5 | import buildcraft.transport.pipe.flow.PipeFlowItems; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.nbt.NBTTagCompound; 8 | import net.minecraft.util.EnumFacing; 9 | import net.minecraft.util.math.BlockPos; 10 | 11 | public abstract class APPipe extends PipeBehaviour 12 | { 13 | public APPipe(IPipe pipe) { 14 | super(pipe); 15 | } 16 | 17 | public APPipe(IPipe pipe, NBTTagCompound nbt) { 18 | super(pipe, nbt); 19 | } 20 | 21 | /** 22 | * Inject an item into the pipe. Don't call this if the pipe isn't an item pipe! 23 | * 24 | * @param toInject the ItemStack to inject 25 | * @param fromSide the side that the item should come from. 26 | * @return the items that could not be injected for whatever reason 27 | */ 28 | protected ItemStack injectItem(ItemStack toInject, EnumFacing fromSide) 29 | { 30 | return ((PipeFlowItems)pipe.getFlow()).injectItem(toInject, true, fromSide.getOpposite(), null, .1f); 31 | } 32 | 33 | /** 34 | * Shorthand to get position of pipe 35 | */ 36 | public BlockPos getPos() 37 | { 38 | if(pipe!= null && pipe.getHolder() != null) 39 | { 40 | return pipe.getHolder().getPipePos(); 41 | } 42 | else 43 | { 44 | return null; 45 | } 46 | } 47 | 48 | /** 49 | * 50 | * @return The translation key for the localized name of the pipe 51 | */ 52 | public String getUnlocalizedName() 53 | { 54 | return "item.pipe.ap." + pipe.getDefinition().identifier.getResourcePath() + ".name"; 55 | } 56 | 57 | /** 58 | * Returns true if this behavior is instantiated on the client 59 | * @return 60 | */ 61 | protected boolean isClient() 62 | { 63 | if(pipe == null) 64 | { 65 | return false; 66 | } 67 | return pipe.getHolder().getPipeWorld().isRemote; 68 | } 69 | 70 | /** 71 | * Returns true if this behavior is instantiated on a dedicated or integrated server 72 | * @return 73 | */ 74 | protected boolean isServer() 75 | { 76 | if(pipe == null) 77 | { 78 | return false; 79 | } 80 | 81 | return !pipe.getHolder().getPipeWorld().isRemote; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/PipeBehaviorAddition.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BuildCraft is open-source. It is distributed under the terms of the 3 | * BuildCraft Open Source License. It grants rights to read, modify, compile 4 | * or run the code. It does *NOT* grant the right to redistribute this software 5 | * or its modifications in any form, binary or source, except if expressively 6 | * granted by the copyright holder. 7 | */ 8 | 9 | package buildcraft.additionalpipes.pipes; 10 | 11 | import buildcraft.api.inventory.IItemTransactor; 12 | import buildcraft.api.transport.pipe.IPipe; 13 | import buildcraft.api.transport.pipe.IPipe.ConnectedType; 14 | import buildcraft.api.transport.pipe.PipeEventHandler; 15 | import buildcraft.api.transport.pipe.PipeEventItem; 16 | import buildcraft.lib.inventory.ItemTransactorHelper; 17 | import buildcraft.lib.inventory.filter.ArrayStackFilter; 18 | import net.minecraft.item.ItemStack; 19 | import net.minecraft.nbt.NBTTagCompound; 20 | import net.minecraft.util.EnumFacing; 21 | 22 | public class PipeBehaviorAddition extends APPipe 23 | { 24 | 25 | public PipeBehaviorAddition(IPipe pipe) { 26 | super(pipe); 27 | } 28 | 29 | public PipeBehaviorAddition(IPipe pipe, NBTTagCompound nbt) { 30 | super(pipe, nbt); 31 | } 32 | 33 | @PipeEventHandler 34 | public void orderSides(PipeEventItem.SideCheck ordering) { 35 | for (EnumFacing face : EnumFacing.VALUES) 36 | { 37 | if(face != ordering.from) 38 | { 39 | ConnectedType type = pipe.getConnectedType(face); 40 | if (type == ConnectedType.TILE) 41 | { 42 | IItemTransactor trans = ItemTransactorHelper.getTransactor(pipe.getConnectedTile(face), face.getOpposite()); 43 | ItemStack possible = trans.extract(new ArrayStackFilter(ordering.stack), 1, 1, true); 44 | 45 | if(!possible.isEmpty()) 46 | { 47 | // cause the pipe to prefer this face above all others 48 | ordering.increasePriority(face, 100); 49 | } 50 | else 51 | { 52 | ordering.decreasePriority(face, 100); 53 | } 54 | 55 | 56 | } 57 | } 58 | 59 | } 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/PipeBehaviorAdvWood.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BuildCraft is open-source. It is distributed under the terms of the 3 | * BuildCraft Open Source License. It grants rights to read, modify, compile 4 | * or run the code. It does *NOT* grant the right to redistribute this software 5 | * or its modifications in any form, binary or source, except if expressively 6 | * granted by the copyright holder. 7 | */ 8 | 9 | package buildcraft.additionalpipes.pipes; 10 | 11 | import buildcraft.additionalpipes.AdditionalPipes; 12 | import buildcraft.additionalpipes.gui.GuiHandler; 13 | import buildcraft.additionalpipes.utils.InventoryUtils; 14 | import buildcraft.additionalpipes.utils.ItemHandlerPresenceFilter; 15 | import buildcraft.api.core.EnumPipePart; 16 | import buildcraft.api.core.IStackFilter; 17 | import buildcraft.api.transport.pipe.IFlowItems; 18 | import buildcraft.api.transport.pipe.IPipe; 19 | import buildcraft.api.transport.pipe.IPipeHolder.PipeMessageReceiver; 20 | import buildcraft.lib.misc.EntityUtil; 21 | import buildcraft.transport.pipe.behaviour.PipeBehaviourWood; 22 | import net.minecraft.entity.player.EntityPlayer; 23 | import net.minecraft.item.ItemStack; 24 | import net.minecraft.nbt.NBTTagCompound; 25 | import net.minecraft.util.EnumFacing; 26 | import net.minecraft.util.NonNullList; 27 | import net.minecraft.util.math.BlockPos; 28 | import net.minecraft.util.math.RayTraceResult; 29 | import net.minecraftforge.common.capabilities.Capability; 30 | import net.minecraftforge.common.capabilities.ICapabilityProvider; 31 | import net.minecraftforge.items.CapabilityItemHandler; 32 | import net.minecraftforge.items.ItemStackHandler; 33 | 34 | public class PipeBehaviorAdvWood extends PipeBehaviourWood implements ICapabilityProvider 35 | { 36 | public PipeBehaviorAdvWood(IPipe pipe) { 37 | super(pipe); 38 | initFilter(); 39 | } 40 | 41 | public PipeBehaviorAdvWood(IPipe pipe, NBTTagCompound nbt) { 42 | super(pipe, nbt); 43 | 44 | setExclude(nbt.getBoolean("exclude")); 45 | items.deserializeNBT(nbt.getCompoundTag("filterItems")); 46 | } 47 | 48 | public static final int INVENTORY_SIZE = 9; 49 | public ItemStackHandler items = new ItemStackHandler(INVENTORY_SIZE); 50 | private IStackFilter filter; 51 | 52 | private boolean exclude = false; 53 | 54 | /** 55 | * Creates the filter using the current value of exclude 56 | */ 57 | private void initFilter() 58 | { 59 | filter = new ItemHandlerPresenceFilter(items, exclude); 60 | } 61 | 62 | /** 63 | * Sets whether the pipe should be in exclude/blacklist mode, or include/whitelist mode 64 | * @param exclude 65 | */ 66 | public void setExclude(boolean exclude) 67 | { 68 | this.exclude = exclude; 69 | initFilter(); 70 | } 71 | 72 | public boolean getExclude() 73 | { 74 | return exclude; 75 | } 76 | 77 | 78 | @Override 79 | public NBTTagCompound writeToNbt() 80 | { 81 | NBTTagCompound nbttagcompound = super.writeToNbt(); 82 | 83 | nbttagcompound.setBoolean("exclude", exclude); 84 | 85 | nbttagcompound.setTag("filterItems", items.serializeNBT()); 86 | 87 | return nbttagcompound; 88 | } 89 | 90 | /** 91 | * Override the wooden pipe's extraction behavior to use our filter 92 | */ 93 | @Override 94 | protected int extractItems(IFlowItems flow, EnumFacing dir, int count, boolean simulate) { 95 | 96 | int extracted = flow.tryExtractItems(count, dir, null, filter, simulate); 97 | if (extracted > 0 && !simulate) { 98 | pipe.getHolder().scheduleNetworkUpdate(PipeMessageReceiver.BEHAVIOUR); 99 | } 100 | return extracted; 101 | } 102 | 103 | @Override 104 | public void addDrops(NonNullList toDrop, int fortune) 105 | { 106 | super.addDrops(toDrop, fortune); 107 | toDrop.addAll(InventoryUtils.getItems(items)); 108 | } 109 | 110 | @Override 111 | public boolean onPipeActivate(EntityPlayer player, RayTraceResult trace, float hitX, float hitY, float hitZ, EnumPipePart part) 112 | { 113 | if (EntityUtil.getWrenchHand(player) != null) 114 | { 115 | return super.onPipeActivate(player, trace, hitX, hitY, hitZ, part); 116 | } 117 | 118 | if (player.isServerWorld()) 119 | { 120 | BlockPos pipePos = pipe.getHolder().getPipePos(); 121 | player.openGui(AdditionalPipes.instance, GuiHandler.PIPE_WOODEN_ADV, pipe.getHolder().getPipeWorld(), pipePos.getX(), pipePos.getY(), pipePos.getZ()); 122 | } 123 | return true; 124 | } 125 | 126 | @SuppressWarnings("unchecked") 127 | @Override 128 | public T getCapability(Capability capability, EnumFacing facing) 129 | { 130 | if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) 131 | { 132 | return (T) items; 133 | } 134 | 135 | return super.getCapability(capability, facing); 136 | } 137 | 138 | @Override 139 | public boolean hasCapability(Capability capability, EnumFacing facing) 140 | { 141 | if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) 142 | { 143 | return true; 144 | } 145 | 146 | return super.hasCapability(capability, facing); 147 | } 148 | 149 | 150 | 151 | } 152 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/PipeBehaviorGravityFeed.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.pipes; 2 | 3 | import buildcraft.additionalpipes.APConfiguration; 4 | import buildcraft.api.transport.pipe.IPipe; 5 | import buildcraft.api.transport.pipe.IPipe.ConnectedType; 6 | import buildcraft.lib.inventory.filter.StackFilter; 7 | import buildcraft.transport.pipe.flow.PipeFlowItems; 8 | import net.minecraft.nbt.NBTTagCompound; 9 | import net.minecraft.util.EnumFacing; 10 | 11 | public class PipeBehaviorGravityFeed extends APPipe 12 | { 13 | 14 | private int ticksSincePull = 0; 15 | 16 | 17 | 18 | public PipeBehaviorGravityFeed(IPipe pipe, NBTTagCompound nbt) 19 | { 20 | super(pipe, nbt); 21 | 22 | ticksSincePull = nbt.getInteger("ticksSincePull"); 23 | } 24 | 25 | public PipeBehaviorGravityFeed(IPipe pipe) 26 | { 27 | super(pipe); 28 | } 29 | 30 | private boolean shouldTick() 31 | { 32 | return ticksSincePull >= APConfiguration.gravityFeedPipeTicksPerPull; 33 | } 34 | 35 | @Override 36 | public void onTick() 37 | { 38 | if(pipe.getHolder().getPipeWorld().isRemote) 39 | { 40 | return; 41 | } 42 | 43 | ticksSincePull++; 44 | 45 | if(shouldTick()) 46 | { 47 | if(pipe.isConnected(EnumFacing.UP) && pipe.getConnectedType(EnumFacing.UP) == ConnectedType.TILE) 48 | { 49 | ((PipeFlowItems)pipe.getFlow()).tryExtractItems(1, EnumFacing.UP, null, StackFilter.ALL, false); 50 | } 51 | ticksSincePull = 0; 52 | } 53 | } 54 | 55 | @Override 56 | public int getTextureIndex(EnumFacing direction) 57 | { 58 | if(direction == EnumFacing.UP) 59 | { 60 | return 0; 61 | } 62 | else 63 | { 64 | return 1; 65 | } 66 | } 67 | 68 | @Override 69 | public NBTTagCompound writeToNbt() 70 | { 71 | NBTTagCompound nbt = super.writeToNbt(); 72 | 73 | nbt.setInteger("ticksSincePull", ticksSincePull); 74 | 75 | return nbt; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/PipeBehaviorJeweled.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BuildCraft is open-source. It is distributed under the terms of the 3 | * BuildCraft Open Source License. It grants rights to read, modify, compile 4 | * or run the code. It does *NOT* grant the right to redistribute this software 5 | * or its modifications in any form, binary or source, except if expressively 6 | * granted by the copyright holder. 7 | */ 8 | 9 | package buildcraft.additionalpipes.pipes; 10 | 11 | import java.util.EnumSet; 12 | import java.util.List; 13 | 14 | import buildcraft.additionalpipes.AdditionalPipes; 15 | import buildcraft.additionalpipes.gui.GuiHandler; 16 | import buildcraft.additionalpipes.gui.GuiJeweledPipe; 17 | import buildcraft.additionalpipes.utils.InventoryUtils; 18 | import buildcraft.api.core.EnumPipePart; 19 | import buildcraft.api.tiles.IDebuggable; 20 | import buildcraft.api.transport.pipe.IPipe; 21 | import buildcraft.api.transport.pipe.PipeEventHandler; 22 | import buildcraft.api.transport.pipe.PipeEventItem; 23 | import buildcraft.lib.misc.EntityUtil; 24 | import net.minecraft.entity.player.EntityPlayer; 25 | import net.minecraft.item.ItemStack; 26 | import net.minecraft.nbt.NBTTagCompound; 27 | import net.minecraft.nbt.NBTTagList; 28 | import net.minecraft.util.EnumFacing; 29 | import net.minecraft.util.NonNullList; 30 | import net.minecraft.util.math.BlockPos; 31 | import net.minecraft.util.math.RayTraceResult; 32 | import net.minecraftforge.items.CapabilityItemHandler; 33 | 34 | public class PipeBehaviorJeweled extends APPipe implements IDebuggable { 35 | 36 | public SideFilterData[] filterData = new SideFilterData[GuiJeweledPipe.NUM_TABS]; 37 | 38 | public PipeBehaviorJeweled(IPipe pipe, NBTTagCompound nbt) 39 | { 40 | super(pipe, nbt); 41 | init(); 42 | 43 | NBTTagList filterList = nbt.getTagList("filterList", 10); 44 | for(int index = 0; index < filterData.length; ++index) 45 | { 46 | NBTTagCompound filterTag = filterList.getCompoundTagAt(index); 47 | filterData[index].readFromNBT(filterTag); 48 | } 49 | } 50 | 51 | public PipeBehaviorJeweled(IPipe pipe) 52 | { 53 | super(pipe); 54 | init(); 55 | } 56 | 57 | private void init() 58 | { 59 | for(int index = 0; index < filterData.length; ++index) 60 | { 61 | filterData[index] = new SideFilterData(); 62 | } 63 | } 64 | 65 | @Override 66 | public int getTextureIndex(EnumFacing connection) 67 | { 68 | if(connection == null) 69 | { 70 | return 0; 71 | } 72 | 73 | return connection.ordinal(); 74 | } 75 | 76 | @PipeEventHandler 77 | public void onSideCheck(PipeEventItem.SideCheck event) 78 | { 79 | EnumSet disallowedSides = EnumSet.noneOf(EnumFacing.class); 80 | 81 | for(EnumFacing dir : EnumFacing.VALUES) 82 | { 83 | SideFilterData data = filterData[dir.ordinal()]; 84 | 85 | if(!data.matchesStack(event.stack)) 86 | { 87 | disallowedSides.add(dir); 88 | } 89 | } 90 | 91 | // if no sides were allowed, find sides that accept unsorted items 92 | if(disallowedSides.size() == 6) 93 | { 94 | for(EnumFacing dir : EnumFacing.VALUES) 95 | { 96 | SideFilterData data = filterData[dir.ordinal()]; 97 | 98 | if(data.acceptsUnsortedItems()) 99 | { 100 | disallowedSides.remove(dir); 101 | } 102 | } 103 | } 104 | 105 | // pass results to event 106 | event.disallowAll(disallowedSides); 107 | } 108 | 109 | 110 | @Override 111 | public boolean onPipeActivate(EntityPlayer player, RayTraceResult trace, float hitX, float hitY, float hitZ, EnumPipePart part) 112 | { 113 | if (EntityUtil.getWrenchHand(player) != null) 114 | { 115 | return super.onPipeActivate(player, trace, hitX, hitY, hitZ, part); 116 | } 117 | 118 | if (!player.world.isRemote) 119 | { 120 | BlockPos pipePos = pipe.getHolder().getPipePos(); 121 | player.openGui(AdditionalPipes.instance, GuiHandler.PIPE_JEWELED, pipe.getHolder().getPipeWorld(), pipePos.getX(), pipePos.getY(), pipePos.getZ()); 122 | } 123 | return true; 124 | } 125 | 126 | @Override 127 | public NBTTagCompound writeToNbt() 128 | { 129 | NBTTagCompound nbt = super.writeToNbt(); 130 | 131 | NBTTagList filterList = new NBTTagList(); 132 | for(int index = 0; index < filterData.length; ++index) 133 | { 134 | NBTTagCompound filterTag = new NBTTagCompound(); 135 | filterData[index].writeToNBT(filterTag); 136 | filterList.appendTag(filterTag); 137 | } 138 | 139 | nbt.setTag("filterList", filterList); 140 | 141 | return nbt; 142 | } 143 | 144 | @Override 145 | public void addDrops(NonNullList toDrop, int fortune) 146 | { 147 | super.addDrops(toDrop, fortune); 148 | for(SideFilterData sideFilter : filterData) 149 | { 150 | toDrop.addAll(InventoryUtils.getItems(sideFilter.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null))); 151 | } 152 | } 153 | 154 | @Override 155 | public void getDebugInfo(List info, List param2, EnumFacing side) 156 | { 157 | SideFilterData clickedSide = filterData[side.ordinal()]; 158 | info.add("Accepts unsorted items: " + clickedSide.acceptsUnsortedItems()); 159 | info.add("Matches NBT: " + clickedSide.matchNBT()); 160 | info.add("Matches metadata: " + clickedSide.matchMetadata()); 161 | } 162 | 163 | } 164 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/PipeBehaviorSwitch.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.pipes; 2 | 3 | import buildcraft.api.transport.pipe.IPipe; 4 | import buildcraft.api.transport.pipe.IPipeHolder.PipeMessageReceiver; 5 | import buildcraft.api.transport.pipe.PipeBehaviour; 6 | import net.minecraft.nbt.NBTTagCompound; 7 | import net.minecraft.network.PacketBuffer; 8 | import net.minecraft.tileentity.TileEntity; 9 | import net.minecraft.util.EnumFacing; 10 | import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; 11 | import net.minecraftforge.fml.relauncher.Side; 12 | 13 | /** 14 | * Class for all 3 types of switch pipe 15 | * @author jamie 16 | * 17 | */ 18 | public class PipeBehaviorSwitch extends APPipe 19 | { 20 | 21 | private boolean canConnect; 22 | 23 | public PipeBehaviorSwitch(IPipe pipe, NBTTagCompound nbt) 24 | { 25 | super(pipe, nbt); 26 | } 27 | 28 | public PipeBehaviorSwitch(IPipe pipe) 29 | { 30 | super(pipe); 31 | } 32 | 33 | @Override 34 | public int getTextureIndex(EnumFacing direction) 35 | { 36 | return (canConnect ? 0 : 1); 37 | } 38 | 39 | public void onTick() 40 | { 41 | // run only on the server 42 | if(pipe.getHolder().getPipeWorld().isRemote) 43 | { 44 | return; 45 | } 46 | 47 | boolean newCanConnect = !pipe.getHolder().getPipeWorld().isBlockPowered(getPos()); 48 | 49 | if(canConnect != newCanConnect) 50 | { 51 | canConnect = newCanConnect; 52 | pipe.getHolder().scheduleNetworkUpdate(PipeMessageReceiver.BEHAVIOUR); 53 | } 54 | } 55 | 56 | 57 | 58 | /* 59 | @Override 60 | public boolean canConnectRedstone() { 61 | return true; 62 | } 63 | */ 64 | 65 | 66 | @Override 67 | public void writePayload(PacketBuffer buffer, Side side) 68 | { 69 | buffer.writeBoolean(canConnect); 70 | } 71 | 72 | @Override 73 | public void readPayload(PacketBuffer buffer, Side side, MessageContext ctx) 74 | { 75 | canConnect = buffer.readBoolean(); 76 | } 77 | 78 | @Override 79 | public boolean canConnect(EnumFacing face, PipeBehaviour other) 80 | { 81 | return canConnect; 82 | } 83 | 84 | @Override 85 | public boolean canConnect(EnumFacing face, TileEntity oTile) 86 | { 87 | return canConnect; 88 | } 89 | 90 | } 91 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/PipeBehaviorTeleportFluids.java: -------------------------------------------------------------------------------- 1 | /** 2 | * BuildCraft is open-source. It is distributed under the terms of the 3 | * BuildCraft Open Source License. It grants rights to read, modify, compile 4 | * or run the code. It does *NOT* grant the right to redistribute this software 5 | * or its modifications in any form, binary or source, except if expressively 6 | * granted by the copyright holder. 7 | */ 8 | 9 | package buildcraft.additionalpipes.pipes; 10 | 11 | import java.util.ArrayList; 12 | import java.util.Iterator; 13 | 14 | import buildcraft.additionalpipes.api.TeleportPipeType; 15 | import buildcraft.additionalpipes.utils.Log; 16 | import buildcraft.api.transport.pipe.IPipe; 17 | import buildcraft.api.transport.pipe.PipeEventFluid; 18 | import buildcraft.api.transport.pipe.PipeEventHandler; 19 | import buildcraft.transport.pipe.flow.PipeFlowFluids; 20 | import net.minecraft.nbt.NBTTagCompound; 21 | import net.minecraft.util.EnumFacing; 22 | import net.minecraftforge.fluids.Fluid; 23 | import net.minecraftforge.fluids.FluidStack; 24 | 25 | public class PipeBehaviorTeleportFluids extends PipeBehaviorTeleport 26 | { 27 | 28 | public PipeBehaviorTeleportFluids(IPipe pipe, NBTTagCompound tagCompound) 29 | { 30 | super(pipe, tagCompound, TeleportPipeType.FLUIDS); 31 | } 32 | 33 | public PipeBehaviorTeleportFluids(IPipe pipe) 34 | { 35 | super(pipe, TeleportPipeType.FLUIDS); 36 | } 37 | 38 | 39 | /** 40 | * Thsi event handler only allows as much fluid to move to the center as can move to other teleport pipes 41 | * @param event 42 | */ 43 | @SuppressWarnings({ "unchecked", "rawtypes" }) 44 | @PipeEventHandler 45 | public void preMoveCenter(PipeEventFluid.PreMoveToCentre event) 46 | { 47 | if(canSend()) 48 | { 49 | ArrayList connectedPipes = (ArrayList)TeleportManager.instance.getConnectedPipes(this, false, true); 50 | 51 | // make our request based off the total number of MB that other pipes have space for 52 | int totalMBNeeded = 0; 53 | for(PipeBehaviorTeleportFluids pipe : connectedPipes) 54 | { 55 | totalMBNeeded += pipe.getMaxAcceptableMB(event.fluid.getFluid()); 56 | } 57 | 58 | Log.debug("[FluidTeleportPipe] Requested " + totalMBNeeded + " MB of fluid"); 59 | 60 | for(EnumFacing side : EnumFacing.VALUES) 61 | { 62 | int fluidFromThisSide = Math.min(event.totalOffered[side.ordinal()], totalMBNeeded); 63 | 64 | event.actuallyOffered[side.ordinal()] = fluidFromThisSide; 65 | totalMBNeeded -= fluidFromThisSide; 66 | } 67 | } 68 | } 69 | 70 | @SuppressWarnings({ "unchecked", "rawtypes" }) 71 | @PipeEventHandler 72 | public void onMoveCenter(PipeEventFluid.OnMoveToCentre event) 73 | { 74 | if(canSend()) 75 | { 76 | ArrayList connectedPipes = (ArrayList)TeleportManager.instance.getConnectedPipes(this, false, true); 77 | 78 | Log.debug("[FluidTeleportPipe] Got " + event.fluid.amount + " MB of fluid"); 79 | 80 | FluidStack remaining = event.fluid.copy(); 81 | 82 | // loop until we're out of fluid, or until no pipes need it 83 | while(remaining.amount > 0 && connectedPipes.size() > 0) 84 | { 85 | 86 | // divide the fluid into apportionments for each pipe 87 | FluidStack maxPerIteration = remaining.copy(); 88 | maxPerIteration.amount /= connectedPipes.size(); // it's OK if we have rounding errors, it will get resolved eventually 89 | 90 | // insert one allocation into each pipe that needs it 91 | Iterator pipeIter = connectedPipes.iterator(); 92 | while(pipeIter.hasNext()) 93 | { 94 | PipeBehaviorTeleportFluids pipe = pipeIter.next(); 95 | 96 | int inserted = ((PipeFlowFluids) pipe.pipe.getFlow()).insertFluidsForce(maxPerIteration, null, false); 97 | 98 | if(inserted == 0) 99 | { 100 | // this pipe is done, remove it 101 | pipeIter.remove(); 102 | } 103 | else 104 | { 105 | remaining.amount -= inserted; 106 | } 107 | 108 | } 109 | } 110 | 111 | if(remaining.amount > 0) 112 | { 113 | Log.debug("PipeLiquidsTeleport's PreMoveToCentre event handler requested more fluid than can be handled! " + remaining.amount + " MB is left and will be rejected."); 114 | } 115 | 116 | // update event data 117 | for(EnumFacing side : EnumFacing.VALUES) 118 | { 119 | // allow no fluid to enter the center, regardless 120 | event.fluidEnteringCentre[side.ordinal()] = 0; 121 | 122 | if(remaining.amount > 0) 123 | { 124 | // decrease the amount of fluid entering the side to match what was actually consumed 125 | int fluidBlockedFromEntering = Math.min(event.fluidLeavingSide[side.ordinal()], remaining.amount); 126 | 127 | event.fluidLeavingSide[side.ordinal()] -= fluidBlockedFromEntering; 128 | remaining.amount -= fluidBlockedFromEntering; 129 | } 130 | } 131 | 132 | 133 | } 134 | } 135 | 136 | /** 137 | * Returns the number of millibuckets of the given fluid that this pipe's center tank can accept 138 | * @param fluid 139 | * @return 140 | */ 141 | public int getMaxAcceptableMB(Fluid fluid) 142 | { 143 | // try inserting an infinite amount, and see how much is returned 144 | return ((PipeFlowFluids) pipe.getFlow()).insertFluidsForce(new FluidStack(fluid, Integer.MAX_VALUE), null, true); 145 | } 146 | 147 | } 148 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/PipeBehaviorWaterPump.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.pipes; 2 | 3 | import buildcraft.additionalpipes.APConfiguration; 4 | import buildcraft.api.transport.pipe.IPipe; 5 | import buildcraft.api.transport.pipe.PipeBehaviour; 6 | import buildcraft.transport.pipe.flow.PipeFlowFluids; 7 | import net.minecraft.init.Blocks; 8 | import net.minecraft.nbt.NBTTagCompound; 9 | import net.minecraft.tileentity.TileEntity; 10 | import net.minecraft.util.EnumFacing; 11 | import net.minecraftforge.fluids.FluidRegistry; 12 | import net.minecraftforge.fluids.FluidStack; 13 | 14 | public class PipeBehaviorWaterPump extends APPipe 15 | { 16 | 17 | public PipeBehaviorWaterPump(IPipe pipe, NBTTagCompound nbt) 18 | { 19 | super(pipe, nbt); 20 | } 21 | 22 | public PipeBehaviorWaterPump(IPipe pipe) 23 | { 24 | super(pipe); 25 | } 26 | 27 | @Override 28 | public void onTick() 29 | { 30 | if(pipe.getHolder().getPipeWorld().getBlockState(getPos().down()).getBlock() == Blocks.WATER) 31 | { 32 | ((PipeFlowFluids)pipe.getFlow()).insertFluidsForce(new FluidStack(FluidRegistry.WATER, APConfiguration.waterPumpWaterPerTick), EnumFacing.DOWN, false); 33 | } 34 | } 35 | 36 | @Override 37 | public boolean canConnect(EnumFacing side, TileEntity tile) 38 | { 39 | return side != EnumFacing.DOWN; 40 | } 41 | 42 | @Override 43 | public boolean canConnect(EnumFacing side, PipeBehaviour tile) 44 | { 45 | return side != EnumFacing.DOWN; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/pipes/SideFilterData.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.pipes; 2 | 3 | import buildcraft.additionalpipes.utils.Log; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraft.nbt.NBTTagCompound; 6 | import net.minecraft.util.EnumFacing; 7 | import net.minecraftforge.common.capabilities.Capability; 8 | import net.minecraftforge.common.capabilities.ICapabilityProvider; 9 | import net.minecraftforge.items.CapabilityItemHandler; 10 | import net.minecraftforge.items.ItemStackHandler; 11 | 12 | /** 13 | * The purpose of this class is to store data for one of the sides of a Jeweled Transport Pipe. 14 | * @author Jamie 15 | * 16 | */ 17 | public class SideFilterData implements ICapabilityProvider 18 | { 19 | public static final int INVENTORY_SIZE = 27; 20 | 21 | private ItemStackHandler inventory; 22 | 23 | private boolean matchNBT; 24 | 25 | private boolean matchMetadata; 26 | 27 | private boolean acceptUnsortedItems; 28 | 29 | public boolean matchNBT() 30 | { 31 | return matchNBT; 32 | } 33 | 34 | public void setMatchNBT(boolean matchNBT) 35 | { 36 | this.matchNBT = matchNBT; 37 | } 38 | 39 | public boolean matchMetadata() 40 | { 41 | return matchMetadata; 42 | } 43 | 44 | public void setMatchMetadata(boolean matchMetadata) 45 | { 46 | this.matchMetadata = matchMetadata; 47 | } 48 | 49 | public boolean acceptsUnsortedItems() 50 | { 51 | return acceptUnsortedItems; 52 | } 53 | 54 | public void setAcceptUnsortedItems(boolean acceptUnsortedItems) 55 | { 56 | this.acceptUnsortedItems = acceptUnsortedItems; 57 | } 58 | 59 | 60 | public SideFilterData() 61 | { 62 | inventory = new ItemStackHandler(INVENTORY_SIZE); 63 | } 64 | 65 | public void writeToNBT(NBTTagCompound nbtTagCompound) 66 | { 67 | nbtTagCompound.setTag("inventory", inventory.serializeNBT()); 68 | 69 | nbtTagCompound.setBoolean("matchNBT", matchNBT); 70 | nbtTagCompound.setBoolean("matchMetadata", matchMetadata); 71 | nbtTagCompound.setBoolean("acceptUnsortedItems", acceptUnsortedItems); 72 | } 73 | 74 | public void readFromNBT(NBTTagCompound nbtTagCompound) 75 | { 76 | inventory.deserializeNBT(nbtTagCompound.getCompoundTag("inventory")); 77 | 78 | matchNBT = nbtTagCompound.getBoolean("matchNBT"); 79 | matchMetadata = nbtTagCompound.getBoolean("matchMetadata"); 80 | acceptUnsortedItems = nbtTagCompound.getBoolean("acceptUnsortedItems"); 81 | } 82 | 83 | /** 84 | * Returns true if this side can accept the given item. 85 | * @param stack 86 | * @return 87 | */ 88 | public boolean matchesStack(ItemStack stack) 89 | { 90 | if(stack == null) 91 | { 92 | Log.error("SideFilterData.matchesSide() called with null argument!"); 93 | return false; 94 | } 95 | 96 | if(stack == ItemStack.EMPTY) 97 | { 98 | Log.error("SideFilterData.matchesSide() called with empty argument!"); 99 | return false; 100 | } 101 | 102 | for(int index = 0; index < INVENTORY_SIZE; ++index) 103 | { 104 | ItemStack slotStack = inventory.getStackInSlot(index); 105 | if(slotStack != ItemStack.EMPTY) 106 | { 107 | if(slotStack.getItem() == stack.getItem()) 108 | { 109 | if(!matchMetadata || stack.getItemDamage() == slotStack.getItemDamage()) 110 | { 111 | if(!matchNBT || (!slotStack.hasTagCompound() && !stack.hasTagCompound())) 112 | { 113 | return true; 114 | } 115 | if((slotStack.hasTagCompound() && stack.hasTagCompound()) && slotStack.getTagCompound().equals(stack.getTagCompound())) 116 | { 117 | return true; 118 | } 119 | } 120 | } 121 | } 122 | } 123 | return false; 124 | } 125 | 126 | @Override 127 | public boolean hasCapability(Capability capability, EnumFacing facing) 128 | { 129 | if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) 130 | { 131 | return true; 132 | } 133 | else 134 | { 135 | return false; 136 | } 137 | } 138 | 139 | @SuppressWarnings("unchecked") 140 | @Override 141 | public T getCapability(Capability capability, EnumFacing facing) 142 | { 143 | if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) 144 | { 145 | return (T) inventory; 146 | } 147 | else 148 | { 149 | return null; 150 | } 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/sound/APSounds.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.sound; 2 | 3 | import net.minecraft.util.ResourceLocation; 4 | import net.minecraft.util.SoundEvent; 5 | import net.minecraftforge.registries.IForgeRegistry; 6 | 7 | /** 8 | * Class to hold AdditionalPipes' sounds. Currently just the Dog Deaggravator bell. 9 | * @author jamie 10 | * 11 | */ 12 | public class APSounds 13 | { 14 | public static SoundEvent dogDeaggravatorBell; 15 | 16 | public static void register(IForgeRegistry registry) 17 | { 18 | ResourceLocation bellResourceLoc = new ResourceLocation("additionalpipes:bellRing"); 19 | dogDeaggravatorBell = new SoundEvent(bellResourceLoc); 20 | dogDeaggravatorBell.setRegistryName(bellResourceLoc); 21 | registry.register(dogDeaggravatorBell); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/textures/Textures.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.textures; 2 | 3 | import buildcraft.additionalpipes.gui.GuiJeweledPipe; 4 | import buildcraft.api.core.render.ISprite; 5 | import buildcraft.lib.client.sprite.SpriteHolderRegistry; 6 | import net.minecraft.util.ResourceLocation; 7 | 8 | public class Textures { 9 | 10 | // textures 11 | public static final ResourceLocation ITEMS = new ResourceLocation("textures/atlas/items.png"); 12 | public static final ResourceLocation DISPENSER = new ResourceLocation("textures/gui/container/dispenser.png"); 13 | 14 | public static final String TEXTURE_PATH = "textures"; 15 | 16 | public static final ResourceLocation GUI_TELEPORT = new ResourceLocation("additionalpipes", TEXTURE_PATH + "/gui/background_generic.png"); 17 | public static final ResourceLocation GUI_ADVANCEDWOOD = new ResourceLocation("additionalpipes", TEXTURE_PATH + "/gui/background_adv_wood.png"); 18 | public static final ResourceLocation GUI_DISTRIBUTION = new ResourceLocation("additionalpipes", TEXTURE_PATH + "/gui/background_distribution.png"); 19 | public static final ResourceLocation GUI_PRIORITY = new ResourceLocation("additionalpipes", TEXTURE_PATH + "/gui/background_priority.png"); 20 | public static final ResourceLocation GUI_JEWELED = new ResourceLocation("additionalpipes", TEXTURE_PATH + "/gui/background_jeweled.png"); 21 | 22 | public static final ResourceLocation GUI_OUTLINE_JEWELED[] = new ResourceLocation[GuiJeweledPipe.NUM_TABS]; 23 | 24 | static 25 | { 26 | for(int tabNumber = 1; tabNumber <= GuiJeweledPipe.NUM_TABS; ++tabNumber) 27 | { 28 | GUI_OUTLINE_JEWELED[tabNumber - 1] = new ResourceLocation("additionalpipes", TEXTURE_PATH + "/gui/jeweled_gui_outline_" + tabNumber + ".png"); 29 | } 30 | } 31 | 32 | // gets set by MultiPlayerProxyClient.registerSprites() 33 | public static ISprite TRIGGER_PIPE_CLOSED = SpriteHolderRegistry.getHolder("additionalpipes:items/triggers/pipe_closed"); 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/utils/GeometryUtils.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.utils; 2 | 3 | import net.minecraft.util.EnumFacing; 4 | import net.minecraft.util.math.BlockPos; 5 | import net.minecraft.util.math.Vec3d; 6 | 7 | public class GeometryUtils 8 | { 9 | /** 10 | * From a block position and a 3D point, gets the side of the block closest to that position. 11 | * @param block 12 | * @param point 13 | * @return 14 | */ 15 | public static EnumFacing getNearestSide(BlockPos block, Vec3d point) 16 | { 17 | return EnumFacing.getFacingFromVector((float)(point.x - (block.getX() + 0.5)), (float)(point.y - (block.getY() + 0.5)), (float)(point.z - (block.getZ() + 0.5))); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/utils/InventoryUtils.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.utils; 2 | 3 | import net.minecraft.inventory.IInventory; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraft.util.NonNullList; 6 | import net.minecraftforge.items.IItemHandler; 7 | 8 | public class InventoryUtils 9 | { 10 | /** 11 | * Find the first free slot in an inventory 12 | * @param inventory 13 | * @return index of the first free slot, or -1 if the container is full 14 | */ 15 | public static int getFirstFreeSlot(IInventory inventory) 16 | { 17 | int size = inventory.getSizeInventory() - 1; 18 | for(int index = 0; index <= size; ++index) 19 | { 20 | if(inventory.getStackInSlot(index) == null) 21 | { 22 | return index; 23 | } 24 | } 25 | 26 | return -1; 27 | } 28 | 29 | /** 30 | * Test if an item can be added to an inventory 31 | * @param inventory 32 | * @return index of the first free slot, or -1 if the container is full 33 | */ 34 | public static boolean canItemFit(IInventory inventory, ItemStack stack) 35 | { 36 | int size = inventory.getSizeInventory() - 1; 37 | 38 | int stackLimit = inventory.getInventoryStackLimit(); 39 | int itemsLeftToAdd = stack.getCount(); 40 | for(int index = 0; index <= size; ++index) 41 | { 42 | ItemStack slotStack = inventory.getStackInSlot(index); 43 | if(slotStack == null) 44 | { 45 | return true; 46 | } 47 | else if(slotStack.getItem() == stack.getItem() && slotStack.getItemDamage() == stack.getItemDamage()) 48 | { 49 | if(slotStack.getCount() + itemsLeftToAdd <= stackLimit) 50 | { 51 | return true; 52 | } 53 | else 54 | { 55 | itemsLeftToAdd -= stackLimit - slotStack.getCount(); 56 | } 57 | } 58 | } 59 | 60 | return false; 61 | } 62 | 63 | /** 64 | * Check if the given inventory contains an item 65 | * @param matchMeta 66 | * @param matchNBT 67 | * @param stack 68 | * @param inventory 69 | * @return 70 | */ 71 | public static boolean containsItem(boolean matchMeta, boolean matchNBT, ItemStack stack, IItemHandler inventory) 72 | { 73 | int size = inventory.getSlots() - 1; 74 | for(int index = 0; index <= size; ++index) 75 | { 76 | ItemStack slotStack = inventory.getStackInSlot(index); 77 | if(slotStack != null) 78 | { 79 | if(slotStack.getItem() == stack.getItem()) 80 | { 81 | if(!matchMeta || stack.getItemDamage() == slotStack.getItemDamage()) 82 | { 83 | if(!matchNBT || (!slotStack.hasTagCompound() && !stack.hasTagCompound())) 84 | { 85 | return true; 86 | } 87 | if((slotStack.hasTagCompound() && stack.hasTagCompound()) && slotStack.getTagCompound().equals(stack.getTagCompound())) 88 | { 89 | return true; 90 | } 91 | } 92 | } 93 | } 94 | } 95 | return false; 96 | } 97 | 98 | /** 99 | * Returns an ordered list of all stacks in the ItemHandler. Includes empty itemstacks, but not null ones. 100 | * @param handler 101 | * @return 102 | */ 103 | public static NonNullList getItems(IItemHandler handler) 104 | { 105 | int invSize = handler.getSlots(); 106 | 107 | NonNullList stacks = NonNullList.create(); 108 | 109 | for(int index = 0; index < invSize; ++index) 110 | { 111 | ItemStack stack = handler.getStackInSlot(index); 112 | 113 | if(stack != null) 114 | { 115 | stacks.add(stack); 116 | } 117 | } 118 | 119 | return stacks; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/utils/ItemHandlerPresenceFilter.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.utils; 2 | 3 | import javax.annotation.Nonnull; 4 | 5 | import buildcraft.api.core.IStackFilter; 6 | import buildcraft.lib.misc.StackUtil; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraftforge.items.IItemHandler; 9 | 10 | /** 11 | * StackFilter that puses an ItemHandler as a whitelist or blacklist 12 | * @author jamie 13 | * 14 | */ 15 | public class ItemHandlerPresenceFilter implements IStackFilter 16 | { 17 | private IItemHandler handler; 18 | private boolean exclude; 19 | 20 | /** 21 | * 22 | * @param handler 23 | * @param exclude If true, the filter will accept any item but those contained in handler. If false, the filter will accept any item that is contained in handler. 24 | */ 25 | public ItemHandlerPresenceFilter(IItemHandler handler, boolean exclude) 26 | { 27 | this.handler = handler; 28 | this.exclude = exclude; 29 | } 30 | 31 | @Override 32 | public boolean matches(@Nonnull ItemStack stack) 33 | { 34 | for (int slot = 0; slot < handler.getSlots(); slot++) 35 | { 36 | if (StackUtil.isMatchingItem(handler.getStackInSlot(slot), stack)) 37 | { 38 | // if we are excluding, and we found a match, then return false 39 | // if we are not excluding, and we found a match, return true 40 | return !exclude; 41 | } 42 | } 43 | 44 | return exclude; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/utils/Log.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.utils; 2 | 3 | 4 | import org.apache.logging.log4j.Level; 5 | 6 | import buildcraft.additionalpipes.APConfiguration; 7 | import buildcraft.additionalpipes.AdditionalPipes; 8 | import net.minecraftforge.fml.common.FMLLog; 9 | 10 | public class Log 11 | { 12 | public static void log(Level logLevel, Object object) 13 | { 14 | FMLLog.log(AdditionalPipes.NAME, logLevel, String.valueOf(object)); 15 | } 16 | 17 | public static void all(Object object) 18 | { 19 | log(Level.ALL, object); 20 | } 21 | 22 | public static void debug(Object object) 23 | { 24 | if(APConfiguration.enableDebugLog) 25 | { 26 | log(Level.INFO, object); 27 | } 28 | } 29 | 30 | public static void error(Object object) 31 | { 32 | log(Level.ERROR, object); 33 | } 34 | 35 | public static void unexpected(Object object) 36 | { 37 | log(Level.ERROR, "...what? " + object); 38 | } 39 | 40 | public static void fatal(Object object) 41 | { 42 | log(Level.FATAL, object); 43 | } 44 | 45 | public static void info(Object object) 46 | { 47 | log(Level.INFO, object); 48 | } 49 | 50 | public static void trace(Object object) 51 | { 52 | log(Level.TRACE, object); 53 | } 54 | 55 | public static void warn(Object object) 56 | { 57 | log(Level.WARN, object); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/utils/NetworkUtils.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.utils; 2 | 3 | import io.netty.buffer.ByteBuf; 4 | 5 | public class NetworkUtils 6 | { 7 | /** 8 | * Write an array of booleans to a ByteBuf. Compacts the booleans into bytes. 9 | * 10 | * Use readBooleanArray() to deserialize. 11 | * @param buf 12 | * @param booleans 13 | */ 14 | public static void writeBooleanArray(ByteBuf buf, boolean[] booleans) 15 | { 16 | //transform to byte array 17 | byte[] bytes = new byte[(booleans.length / 8) + 1]; 18 | 19 | Log.debug("Fitting " + booleans.length + " booleans in " + bytes.length + " byte" + (bytes.length > 1 ? "s" : "")); 20 | 21 | for(int index = 0; index < booleans.length; ++index) 22 | { 23 | bytes[index / 8] |= (booleans[index] ? 1 : 0) << (index % 8); 24 | } 25 | 26 | buf.writeBytes(bytes); 27 | } 28 | 29 | /** 30 | * Reads an array of booleans read from the provided ByteBuf. 31 | * @param buf 32 | * @param len how many booleans you want to read. 33 | * @return 34 | */ 35 | public static boolean[] readBooleanArray(ByteBuf buf, int len) 36 | { 37 | byte[] bytes = new byte[(len / 8) + 1]; 38 | buf.readBytes(bytes); 39 | 40 | boolean[] booleans = new boolean[len]; 41 | for(int index = 0; index < len; ++index) 42 | { 43 | booleans[index] = ((bytes[index / 8] >> index % 8) & 1) == 1; 44 | } 45 | return booleans; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/utils/PipeCreator.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.utils; 2 | 3 | import buildcraft.additionalpipes.AdditionalPipes; 4 | import buildcraft.api.transport.pipe.PipeDefinition; 5 | import buildcraft.lib.registry.RegistrationHelper; 6 | import buildcraft.transport.item.ItemPipeHolder; 7 | 8 | public class PipeCreator 9 | { 10 | 11 | // saves items during preInit, then registers them during the RegisterEvent 12 | private static final RegistrationHelper regHelper = new RegistrationHelper(); 13 | 14 | 15 | /** 16 | * Creates and registers a buildcraft pipe from the provided definition. 17 | * @param clas 18 | * @return 19 | */ 20 | public static ItemPipeHolder createPipeItem(PipeDefinition pipeDef) 21 | { 22 | ItemPipeHolder item = ItemPipeHolder.create(pipeDef); 23 | item.setRegistryName(pipeDef.identifier.getResourcePath()); 24 | item.setUnlocalizedName("pipe.ap." + pipeDef.identifier.getResourcePath()); 25 | item.registerWithPipeApi(); 26 | item.setCreativeTab(AdditionalPipes.instance.creativeTab); 27 | 28 | regHelper.addItem(item); 29 | 30 | return item; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/buildcraft/additionalpipes/utils/PlayerUtils.java: -------------------------------------------------------------------------------- 1 | package buildcraft.additionalpipes.utils; 2 | 3 | import java.util.UUID; 4 | 5 | import net.minecraft.entity.player.EntityPlayer; 6 | 7 | public class PlayerUtils 8 | { 9 | /** 10 | * Get a player's UUID. 11 | * Calling this is easier than the more complicated default syntax. 12 | * @param player 13 | */ 14 | public static UUID getUUID(EntityPlayer player) 15 | { 16 | return EntityPlayer.getUUID(player.getGameProfile()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/assets/.gitignore: -------------------------------------------------------------------------------- 1 | /buildcraft 2 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/blockstates/teleport_tether.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "normal": { "model": "additionalpipes:teleport_tether" } 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/compat/buildcraft/guide/contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "entry_mask": ":compat/buildcraft/guide///", 3 | "default_tags": { 4 | "mod": "additionalpipes" 5 | }, 6 | "contents": [ 7 | { 8 | "title": "item.pipe.ap.pipe_items_teleport.name", 9 | "item_stack": "(additionalpipes:pipe_items_teleport)", 10 | "page": "pipe_items_teleport.md", 11 | "type_tags": { 12 | "type": "pipe", 13 | "sub_type": "pipe_item" 14 | } 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/compat/buildcraft/guide/en_us/pipe/pipe_items_teleport.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | Using a laser-charged microsingluarity contained through complex array of chipsets that create a magnetic field bottle, you have unlocked the secret of teleportation. 4 | The Item Teleport Pipe instantly transports items to and from other pipes with the same frequency. If a teleport pipe has no valid outputs, it will drop its items on the ground. 5 | Teleport Pipes also utilize advanced quantum plurifactor authentication based on the universal constant known only as the "UUID". When set to Private mode, they can only be adjusted by you, and can only send or recieve items from pipes also placed by you and set to Private. 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/lang/de_de.lang: -------------------------------------------------------------------------------- 1 | item.pipe.ap.pipe_items_priority.name=Priorität Einführungsrohr 2 | item.pipe.ap.pipe_items_adv_wood.name=Fortgeschr. Hölzernes Transportrohr 3 | item.pipe.ap.pipe_items_gravity_feed.name=Schwerkrafttransportrohr 4 | item.pipe.ap.pipe_items_distribution.name=Verteilung Transportrohr 5 | item.pipe.ap.pipe_items_closed.name=Geschlossene Transportrohr 6 | item.pipe.ap.pipe_items_teleport.name=Teleportierendes Transportrohr 7 | item.pipe.ap.pipe_fluids_teleport.name=Teleportierendes Wasserrohr 8 | item.pipe.ap.pipe_power_teleport.name=Teleportierende Energieleitung [WIP] 9 | item.pipe.ap.pipe_power_switch.name=Schaltbare Energieleitung 10 | item.pipe.ap.pipe_fluids_switch.name=Schaltbares Wasserrohr 11 | item.pipe.ap.pipe_items_switch.name=Schaltbares Transportrohr 12 | item.pipe.ap.pipe_fluids_water_pump.name=Wasserpumprohr 13 | item.pipe.ap.pipe_items_addition.name=Zusatztransportrohr 14 | item.pipe.ap.pipe_items_jeweled.name=Juwelenbesetzt Transportrohr 15 | 16 | #regular items & blocks 17 | item.dog_deaggravator.name=Dog Deaggravator 18 | tile.teleport_tether.name=Teleport Tether [WIP] 19 | 20 | # Priority Insertion Pipe 21 | gui.priority_insertion.title=Priorität Einführungsrohr 22 | 23 | #Distribution Pipe 24 | gui.distribution_pipe.title=Verteilung Transportrohr 25 | 26 | # Pipe Tooltips 27 | tip.pipe.ap.pipe_items_priority=Füllt jede verbundene Seite in einer benutzerdefinierten Reihenfolge 28 | tip.pipe.ap.pipe_items_adv_wood=Extraktionsrohr für einfaches Filtern von Gegenständen 29 | tip.pipe.ap.pipe_items_gravity_feed=Extrahiert Gegenstände langsam aus dem unteren Bereich eines Inventars, ohne dass Strom benötigt wird 30 | tip.pipe.ap.pipe_items_teleport=Transportiert Gegenstände sofort zwischen verbundenen Rohren 31 | tip.pipe.ap.pipe_items_distribution=Gibt ein konfigurierbares Verhältnis von Elementen zu jeder Seite aus 32 | tip.pipe.ap.pipe_items_closed=Speichert die Objekte in ihrem internen Inventar, anstatt sie zu löschen 33 | tip.pipe.ap.pipe_fluids_teleport=Instantly transports fluids between connected pipes 34 | tip.pipe.ap.pipe_power_teleport=Transportiert Flüssigkeiten sofort zwischen angeschlossenen Rohren 35 | tip.pipe.ap.pipe_power_switch=Trennt die Verbindung zu benachbarten Rohren, wenn ein Redstone-Signal empfangen wird 36 | tip.pipe.ap.pipe_fluids_switch=Trennt die Verbindung zu benachbarten Rohren, wenn ein Redstone-Signal empfangen wird 37 | tip.pipe.ap.pipe_items_switch=Trennt die Verbindung zu benachbarten Rohren, wenn ein Redstone-Signal empfangen wird 38 | tip.pipe.ap.pipe_fluids_water_pump=Gibt eine kleine Menge Wasser aus, wenn es über einem Wasserquellenblock platziert wird 39 | tip.pipe.ap.pipe_items_addition=Fügt Gegenstände nur dann zu benachbarten Inventaren hinzu, wenn sie bereits über diesen Gegenstand verfügen 40 | tip.pipe.ap.pipe_items_jeweled=Hochleistungsfähiges und konfigurierbares Sortierrohr 41 | 42 | # Jeweled Pipe GUI 43 | gui.jeweled_pipe.title=Juwelenbesetzt Transportrohr 44 | #tab names 45 | gui.jeweled_pipe.tab.up=Oben 46 | gui.jeweled_pipe.tab.down=Unten 47 | gui.jeweled_pipe.tab.north=Nord 48 | gui.jeweled_pipe.tab.south=Süd 49 | gui.jeweled_pipe.tab.east=Ost 50 | gui.jeweled_pipe.tab.west=West 51 | #buttons 52 | gui.jeweled_pipe.match=Match: 53 | gui.jeweled_pipe.NBT=NBT 54 | gui.jeweled_pipe.metadata=Meta 55 | gui.jeweled_pipe.acceptUnsorted=Akzept. unsortiert 56 | 57 | # Closed Pipe GUI 58 | gui.closed_pipe.title=Geschlossenes Rohr 59 | 60 | # Adv. Wood Pipe GUI 61 | gui.advwood_pipe.title=Fortgeschr. Hölzernes Transportrohr 62 | gui.advwood_pipe.blacklist=Diese Gegenstände sind ausgeschlossen 63 | gui.advwood_pipe.whitelist=Diese Gegenstände sind erforderlich 64 | 65 | # Teleport Pipe GUI 66 | # NOTE: "ledger" refers to the menu that expands on the side of the Teleport Pipe GUI when you click the icon 67 | gui.teleport.ledger.title=Verbundene Rohre 68 | gui.teleport.ledger.owner=Eigentümer: %s 69 | gui.teleport.ledger.outputs=Ausgang: %d 70 | gui.teleport.ledger.inputs=Eingang: %s 71 | gui.teleport.frequency=Häufigkeit: %d 72 | gui.teleport.coordPair=Koordinaten: (%d, %d, %d) 73 | gui.teleport.send_only=Nur senden 74 | gui.teleport.send_and_receive=Senden & empfangen 75 | gui.teleport.receive_only=Nur empfangen 76 | gui.teleport.disabled=Deaktiviert 77 | gui.teleport.public=Öffentlich 78 | gui.teleport.private=Privat 79 | 80 | # name of "closed pipe is closed" trigger 81 | trigger.pipe_closed=Rohr geschlossen (Gegenstände lagern) 82 | 83 | key.lasers=Chunk ladegrenze anzeigen 84 | 85 | #tooltips for teleport pipes 86 | tip.teleportPipe=Schluss mit langen Pipelines! 87 | 88 | tooltip.dog_deaggravator=Beruhigt deine Hunde 89 | 90 | itemGroup.apcreativetab=Zusätzliche Rohre 91 | 92 | # chat stuff 93 | command.ap.usage=Verwendung: /additionalpipes teleport 94 | command.ap.pipelist_header=Teleportierendes Rohr: 95 | message.ap.accessdenied=Zugriff verweigert! Diese Rohr gehört %s 96 | 97 | # Subtitle for when the Dog Deaggravator is used 98 | subtitle.ap.dog_deaggravator=Glocke läutet 99 | 100 | # Name of Additional Pipes chapter in the BC Guide 101 | buildcraft.guide.chapter.mod.additionalpipes=Additional Pipes 102 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/lang/en_us.lang: -------------------------------------------------------------------------------- 1 | item.pipe.ap.pipe_items_priority.name=Priority Insertion Pipe 2 | item.pipe.ap.pipe_items_adv_wood.name=Adv. Wooden Transport Pipe 3 | item.pipe.ap.pipe_items_gravity_feed.name=Gravity Feed Transport Pipe 4 | item.pipe.ap.pipe_items_distribution.name=Distribution Transport Pipe 5 | item.pipe.ap.pipe_items_closed.name=Closed Transport Pipe 6 | item.pipe.ap.pipe_items_teleport.name=Item Teleport Pipe 7 | item.pipe.ap.pipe_fluids_teleport.name=Fluid Teleport Pipe 8 | item.pipe.ap.pipe_power_teleport.name=Power Teleport Pipe [WIP] 9 | item.pipe.ap.pipe_power_switch.name=Switch Kinesis Pipe 10 | item.pipe.ap.pipe_fluids_switch.name=Switch Fluid Pipe 11 | item.pipe.ap.pipe_items_switch.name=Switch Transport Pipe 12 | item.pipe.ap.pipe_fluids_water_pump.name=Water Pump Pipe 13 | item.pipe.ap.pipe_items_addition.name=Addition Transport Pipe 14 | item.pipe.ap.pipe_items_jeweled.name=Jeweled Transport Pipe 15 | 16 | #regular items & blocks 17 | item.dog_deaggravator.name=Dog Deaggravator 18 | tile.teleport_tether.name=Teleport Tether 19 | 20 | # Priority Insertion Pipe 21 | gui.priority_insertion.title=Priority Insertion Pipe 22 | 23 | #Distribution Pipe 24 | gui.distribution_pipe.title=Distribution Pipe 25 | 26 | # Pipe Tooltips 27 | tip.pipe.ap.pipe_items_priority=Fills each connected side in a user-defined order 28 | tip.pipe.ap.pipe_items_adv_wood=Extraction pipe allowing simple item filtering 29 | tip.pipe.ap.pipe_items_gravity_feed=Extracts items slowly from the bottom of an inventory without needing power 30 | tip.pipe.ap.pipe_items_teleport=Instantly transports items between linked pipes 31 | tip.pipe.ap.pipe_items_distribution=Outputs a configurable ratio of items to each side 32 | tip.pipe.ap.pipe_items_closed=Instead of dropping items, stores them in its internal inventory 33 | tip.pipe.ap.pipe_fluids_teleport=Instantly transports fluids between connected pipes 34 | tip.pipe.ap.pipe_power_teleport=Instantly transports power between connected pipes 35 | tip.pipe.ap.pipe_power_switch=Disconnects from neighboring pipes if it receives a redstone signal 36 | tip.pipe.ap.pipe_fluids_switch=Disconnects from neighboring pipes if it receives a redstone signal 37 | tip.pipe.ap.pipe_items_switch=Disconnects from neighboring pipes if it receives a redstone signal 38 | tip.pipe.ap.pipe_fluids_water_pump=Outputs a small amount of water if placed over a water source block 39 | tip.pipe.ap.pipe_items_addition=Adds items to adjacent inventories only if they already have that item 40 | tip.pipe.ap.pipe_items_jeweled=Highly capable and configurable sorting pipe 41 | 42 | # Jeweled Pipe GUI 43 | gui.jeweled_pipe.title=Jeweled Pipe 44 | #tab names 45 | gui.jeweled_pipe.tab.up=Up 46 | gui.jeweled_pipe.tab.down=Down 47 | gui.jeweled_pipe.tab.north=North 48 | gui.jeweled_pipe.tab.south=South 49 | gui.jeweled_pipe.tab.east=East 50 | gui.jeweled_pipe.tab.west=West 51 | #buttons 52 | gui.jeweled_pipe.match=Match: 53 | gui.jeweled_pipe.NBT=NBT 54 | gui.jeweled_pipe.metadata=Meta 55 | gui.jeweled_pipe.acceptUnsorted=Accept Unsorted 56 | 57 | # Closed Pipe GUI 58 | gui.closed_pipe.title=Closed Pipe 59 | 60 | # Adv. Wood Pipe GUI 61 | gui.advwood_pipe.title=Advanced Wooden Pipe 62 | gui.advwood_pipe.blacklist=These items are excluded 63 | gui.advwood_pipe.whitelist=These items are required 64 | 65 | # Teleport Pipe GUI 66 | # NOTE: "ledger" refers to the menu that expands on the side of the Teleport Pipe GUI when you click the icon 67 | gui.teleport.ledger.title=Connected Pipes 68 | gui.teleport.ledger.owner=Owner: %s 69 | gui.teleport.ledger.outputs=Outputs: %d 70 | gui.teleport.ledger.inputs=Inputs: %s 71 | gui.teleport.frequency=Frequency: %d 72 | gui.teleport.coordPair=Coords: (%d, %d, %d) 73 | gui.teleport.send_only=Send Only 74 | gui.teleport.send_and_receive=Send & Receive 75 | gui.teleport.receive_only=Receive Only 76 | gui.teleport.disabled=Disabled 77 | gui.teleport.public=Public 78 | gui.teleport.private=Private 79 | 80 | # name of "closed pipe is closed" trigger 81 | trigger.pipe_closed=Pipe Closed (Storing Items) 82 | 83 | key.lasers=Show chunk load boundaries 84 | 85 | #tooltips for teleport pipes 86 | tip.teleportPipe=No more long pipelines! 87 | 88 | tooltip.dog_deaggravator=Calms down your dogs 89 | 90 | itemGroup.apcreativetab=Additional Pipes 91 | 92 | # chat stuff 93 | command.ap.usage=Usage: /additionalpipes teleport 94 | command.ap.pipelist_header=Teleport Pipes: 95 | message.ap.accessdenied=Access denied! This pipe belongs to %s 96 | 97 | # Subtitle for when the Dog Deaggravator is used 98 | subtitle.ap.dog_deaggravator=Bell ringing 99 | 100 | # Name of Additional Pipes chapter in the BC Guide 101 | buildcraft.guide.chapter.mod.additionalpipes=Additional Pipes 102 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/lang/es_es.lang: -------------------------------------------------------------------------------- 1 | tile.teleport_tether.name=Atadura de Teleportación 2 | item.PipeLiquidsRedstone.name=Tubería de Fluidos de Piedra Roja 3 | item.PipeItemsRedstone.name=Tubería de Transporte de Piedra Roja 4 | item.PipeItemsAdvancedInsertion.name=Tubería de Transporte de Inserción 5 | item.pipe.ap.pipe_items_adv_wood.name=Tubería de Transporte de Madera Avanzada 6 | item.pipe.ap.pipe_items_distribution.name=Tubería de Transporte de Distribución 7 | item.pipe.ap.pipe_items_closed.name=Tuberia de Transporte Cerrada 8 | item.pipe.ap.pipe_items_teleport.name=Tubería de Transporte Escalonada 9 | item.pipe.ap.pipe_fluids_teleport.name=Tubería de Fluidos Escalonada 10 | item.pipe.ap.pipe_power_teleport.name=Tubería Kinetica Escalonada 11 | item.pipe.ap.pipe_power_switch.name=Tubería Kinetica con Interruptor 12 | item.pipe.ap.pipe_fluids_switch.name=Tubería de Fluidos con Interruptor 13 | item.pipe.ap.pipe_items_switch.name=Tubería de Transporte con Interruptor 14 | item.pipe.ap.pipe_fluids_water_pump.name=Tubería de Fluidos con Bomba 15 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/lang/fr_fr.lang: -------------------------------------------------------------------------------- 1 | item.pipe.ap.pipe_items_priority.name=Tuyau de Insertion Priotaire 2 | item.pipe.ap.pipe_items_adv_wood.name=Tuyau de Transport en Bois Avancée 3 | item.pipe.ap.pipe_items_gravity_feed.name=Tuyau de Transport par Gravité 4 | item.pipe.ap.pipe_items_distribution.name=Tuyau de Transport Distributeur 5 | item.pipe.ap.pipe_items_closed.name=Tuyau de Transport Ferme 6 | item.pipe.ap.pipe_items_teleport.name=Tuyau de Téléportation d'Items 7 | item.pipe.ap.pipe_fluids_teleport.name=Tuyau de Téléportation de Fluide 8 | item.pipe.ap.pipe_power_teleport.name=Tuyau the Teleport d'Énergie [Travail en Progrès] 9 | item.pipe.ap.pipe_power_switch.name=Tuyau de Changement Cinétique 10 | item.pipe.ap.pipe_fluids_switch.name=Tuyau de Changement Fluide 11 | item.pipe.ap.pipe_items_switch.name=Tuyau Changement Transport 12 | item.pipe.ap.pipe_fluids_water_pump.name=Tuyau de Pompe d'Eau 13 | item.pipe.ap.pipe_items_addition.name=Tuyau d'Addition Transport 14 | item.PipeLiquidsObsidian.name=Tuyau Obsidienne de Fluide 15 | item.pipe.ap.pipe_items_jeweled.name=Tuyau de Transport Orné de Joyau 16 | 17 | #regular items & blocks 18 | item.dog_deaggravator.name=Anti-Aggravateur pour Chien 19 | tile.teleport_tether.name=Attache de Téléport 20 | 21 | # Priority Insertion Pipe 22 | gui.priority_insertion.title=Tuyau d'Insertion Prioritaire 23 | 24 | #Distribution Pipe 25 | gui.distribution_pipe.title=Tuyau de Distribution 26 | 27 | # Jeweled Pipe GUI 28 | gui.jeweled_pipe.title=Tuyau de Transport Orné de Joyau 29 | #tab names 30 | gui.jeweled_pipe.tab.up=En Haut 31 | gui.jeweled_pipe.tab.down=En Bas 32 | gui.jeweled_pipe.tab.north=Nord 33 | gui.jeweled_pipe.tab.south=Sud 34 | gui.jeweled_pipe.tab.east=Est 35 | gui.jeweled_pipe.tab.west=Ouest 36 | #buttons 37 | gui.jeweled_pipe.match=Égaler: 38 | gui.jeweled_pipe.NBT=NBT 39 | gui.jeweled_pipe.metadata=Meta 40 | gui.jeweled_pipe.acceptUnsorted=Acceptez Non Trié 41 | 42 | # Closed Pipe GUI 43 | gui.closed_pipe.title=Tuyau Ferme 44 | 45 | # Adv. Wood Pipe GUI 46 | gui.advwood_pipe.title=Advanced Wooden Pipe 47 | gui.advwood_pipe.blacklist=Ces Items Sont Exclu 48 | gui.advwood_pipe.whitelist=Ces Items Sont Exclu 49 | 50 | # Teleport Pipe GUI 51 | # NOTE: "ledger" refers to the menu that expands on the side of the Teleport Pipe GUI when you click the icon 52 | gui.teleport.ledger.title=Tuyau de Téléport 53 | gui.teleport.ledger.owner=Propriétaire: 54 | gui.teleport.ledger.outputs=Sorties: 55 | gui.teleport.ledger.inputs=Apport: 56 | gui.teleport.frequency=Fréquence: %d 57 | gui.teleport.send_only=Envoy Uniquement 58 | gui.teleport.send_and_receive=Envoy & Recoit 59 | gui.teleport.receive_only=Recoit Uniquement 60 | gui.teleport.disabled=Désactivée 61 | gui.teleport.public=Publique 62 | gui.teleport.private=Privé 63 | 64 | # name of "closed pipe is closed" trigger 65 | trigger.pipe_closed=Tuyau Ferme (Ranger Items) 66 | 67 | key.lasers=Révéler limite de tronçon chargement 68 | 69 | #tooltips for teleport pipes 70 | tip.teleportPipe=Pas plus de pipeline longues! 71 | 72 | tooltip.dog_deaggravator=Pacifier vos Chiens 73 | 74 | itemGroup.apcreativetab=Tuyau Additionel 75 | 76 | # chat stuff 77 | command.ap.usage=/tuyauadditonel teleport 78 | command.ap.pipelist_header=Tuyau Téléport: 79 | message.ap.accessdenied=Accès refusé! Ce tuyau appartien à %s 80 | 81 | # Subtitle for when the Dog Deaggravator is used 82 | subtitle.ap.dog_deaggravator=Dingdingding! 83 | 84 | #Translation by WingofTech 85 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/lang/ja_jp.lang: -------------------------------------------------------------------------------- 1 | #AdditionalPipes ver.4.7.6-jp by Ellen Kasacon 2 | tile.teleport_tether.name=テレポートテザー 3 | item.pipe.ap.pipe_items_priority.name=分配挿入パイプ(アイテム) 4 | item.PipeItemsAdvancedInsertion.name=[非推奨] 挿入パイプ(アイテム) 5 | item.pipe.ap.pipe_items_adv_wood.name=木パイプ改(アイテム) 6 | item.pipe.ap.pipe_items_gravity_feed.name=重力パイプ(アイテム) 7 | item.pipe.ap.pipe_items_distribution.name=分配パイプ(アイテム) 8 | item.pipe.ap.pipe_items_closed.name=閉鎖パイプ(アイテム) 9 | item.pipe.ap.pipe_items_teleport.name=テレポートパイプ(アイテム) 10 | item.pipe.ap.pipe_fluids_teleport.name=テレポートパイプ(液体) 11 | item.pipe.ap.pipe_power_teleport.name=テレポートパイプ(エネルギー) 12 | item.PipeLogisticsTeleport.name=Logistics接続パイプ [テスト版] 13 | item.pipe.ap.pipe_power_switch.name=絶縁パイプ(エネルギー) 14 | item.pipe.ap.pipe_fluids_switch.name=絶縁パイプ(液体) 15 | item.pipe.ap.pipe_items_switch.name=絶縁パイプ(アイテム) 16 | item.pipe.ap.pipe_fluids_water_pump.name=ポンプパイプ 17 | item.pipe.ap.pipe_items_addition.name=同種挿入パイプ(アイテム) 18 | item.PipeLiquidsObsidian.name=黒曜石パイプ(液体) 19 | item.pipe.ap.pipe_items_jeweled.name=宝石パイプ(アイテム) 20 | 21 | #その他のアイテム/ブロック 22 | item.dog_deaggravator.name=オオカミ威嚇装置 23 | tile.teleport_tether.name=テレポートテザー 24 | 25 | gui.pipeItemsDistributor=分配パイプ 26 | gui.pipeItemsPriorityInsertion=分配挿入パイプ 27 | gui.PipeItemsAdvancedWood=木パイプ改 28 | gui.jeweled_pipe=宝石パイプ 29 | 30 | #宝石パイプGUIのタブ名 31 | gui.tab.up=上 32 | gui.tab.down=下 33 | gui.tab.north=北 34 | gui.tab.south=南 35 | gui.tab.east=東 36 | gui.tab.west=西 37 | 38 | gui.match=一致: 39 | gui.NBT=タグ 40 | gui.metadata=メタ 41 | gui.acceptUnsorted=未指定を許可 42 | 43 | gate.pipeClosed=パイプが閉鎖(内部にアイテムを貯蔵) 44 | 45 | key.lasers=チャンクの境界を表示 46 | 47 | #ツールチップ 48 | tip.teleportPipe=長い配管ともおさらば! 49 | tip.teleportLogisticsPipe=Logistics Pipesと接続します。 50 | 51 | tooltip.dog_deaggravator=攻撃的なオオカミをおとなしくさせます 52 | 53 | itemGroup.apcreativetab=Additional Pipes 54 | 55 | command.ap.usage=/additionalpipes teleport <アイテム|液体|エネルギー> -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/lang/pt_br.lang: -------------------------------------------------------------------------------- 1 | item.pipe.ap.pipe_items_priority.name=Tubo de Inserção por Prioridade 2 | item.pipe.ap.pipe_items_adv_wood.name=Tubo de Transporte Avançado de Madeira 3 | item.pipe.ap.pipe_items_gravity_feed.name=Tubo de Alimentação por Gravidade 4 | item.pipe.ap.pipe_items_distribution.name=Tubo de Distribuição de Transporte 5 | item.pipe.ap.pipe_items_closed.name=Tubo de Transporte Fechado 6 | item.pipe.ap.pipe_items_teleport.name=Tubo de Teletransporte 7 | item.pipe.ap.pipe_fluids_teleport.name=Tubo de Teletransporte de Fluídos 8 | item.pipe.ap.pipe_power_teleport.name=Tubo de Teletransporte de Energia 9 | item.pipe.ap.pipe_power_switch.name=Tubo de Troca Kinético 10 | item.pipe.ap.pipe_fluids_switch.name=Tubo de Troca de Fluido 11 | item.pipe.ap.pipe_items_switch.name=Tubo de Troca de Transporte 12 | item.pipe.ap.pipe_fluids_water_pump.name=Tubo da Bomba d'água 13 | item.pipe.ap.pipe_items_addition.name=Addition Transport Pipe 14 | item.pipe.ap.pipe_items_jeweled.name=Tubo de Transporte de Diamante Avançado 15 | 16 | #regular items & blocks 17 | item.dog_deaggravator.name=Acalmador de Cães 18 | tile.teleport_tether.name=Fluxo de teletransporte 19 | 20 | # Priority Insertion Pipe 21 | gui.priority_insertion.title=Tubo de Inserção por Prioridade 22 | 23 | #Distribution Pipe 24 | gui.distribution_pipe.title=Distribution Pipe 25 | 26 | # Pipe Tooltips 27 | tip.pipe.ap.pipe_items_priority=Fills each connected side in a user-defined order 28 | tip.pipe.ap.pipe_items_adv_wood=Tubo de extração que permite uma simples filtragem de itens 29 | tip.pipe.ap.pipe_items_gravity_feed=Extrai itens devagar, do bloco acima deste tubo, sem precisar de energia 30 | tip.pipe.ap.pipe_items_teleport=Transporta itens entre os tubos ligados no mesmo canal 31 | tip.pipe.ap.pipe_items_distribution=Outputs a configurable ratio of items to each side 32 | tip.pipe.ap.pipe_items_closed=Ao invés de derrubar itens, armazena no inventório interno 33 | tip.pipe.ap.pipe_fluids_teleport=Transporta fluídos entre os tubos ligados no mesmo canal 34 | tip.pipe.ap.pipe_power_teleport=Transporta energia entre os tubos ligados no mesmo canal 35 | tip.pipe.ap.pipe_power_switch=Desconecta dos tubos vizinhos ao receber sinal de redstone 36 | tip.pipe.ap.pipe_fluids_switch=Desconecta dos tubos vizinhos ao receber sinal de redstone 37 | tip.pipe.ap.pipe_items_switch=Desconecta dos tubos vizinhos ao receber sinal de redstone 38 | tip.pipe.ap.pipe_fluids_water_pump=Libera uma pequena quantidade de água se posto abaixo de uma fonte de água 39 | tip.pipe.ap.pipe_items_addition=Adds items to adjacent inventories only if they already have that item 40 | tip.pipe.ap.pipe_items_jeweled=Tubo de diamante avançado, com alta capacidade de roteamento de itens 41 | 42 | # Jeweled Pipe GUI 43 | gui.jeweled_pipe.title=Tubo de Diamante Avançado 44 | #tab names 45 | gui.jeweled_pipe.tab.up=Topo 46 | gui.jeweled_pipe.tab.down=Baixo 47 | gui.jeweled_pipe.tab.north=Norte 48 | gui.jeweled_pipe.tab.south=Sul 49 | gui.jeweled_pipe.tab.east=Leste 50 | gui.jeweled_pipe.tab.west=Oeste 51 | #buttons 52 | gui.jeweled_pipe.match=Match: 53 | gui.jeweled_pipe.NBT=NBT 54 | gui.jeweled_pipe.metadata=Meta 55 | gui.jeweled_pipe.acceptUnsorted=Aceitar desord. 56 | 57 | # Closed Pipe GUI 58 | gui.closed_pipe.title=Closed Pipe 59 | 60 | # Adv. Wood Pipe GUI 61 | gui.advwood_pipe.title=Tubo de Madeira Avançado 62 | gui.advwood_pipe.blacklist=Itens excluídos 63 | gui.advwood_pipe.whitelist=Itens requeridos 64 | 65 | # Teleport Pipe GUI 66 | # NOTE: "ledger" refers to the menu that expands on the side of the Teleport Pipe GUI when you click the icon 67 | gui.teleport.ledger.title=Tubos conectados 68 | gui.teleport.ledger.owner=Dono: %s 69 | gui.teleport.ledger.outputs=Saídas: %d 70 | gui.teleport.ledger.inputs=Entradas: %s 71 | gui.teleport.frequency=Frequência: %d 72 | gui.teleport.coordPair=Coords: (%d, %d, %d) 73 | gui.teleport.send_only=Envio apenas 74 | gui.teleport.send_and_receive=Enviar e Receber 75 | gui.teleport.receive_only=Receber apenas 76 | gui.teleport.disabled=Desativado 77 | gui.teleport.public=Publico 78 | gui.teleport.private=Privado 79 | 80 | # name of "closed pipe is closed" trigger 81 | trigger.pipe_closed=Tubo fechado (armazenando items) 82 | 83 | key.lasers=Mostrar lasers de chunks 84 | 85 | #tooltips for teleport pipes 86 | tip.teleportPipe=Chega de longas tubulações! 87 | 88 | tooltip.dog_deaggravator=Acalma seus cães 89 | 90 | itemGroup.apcreativetab=Additional Pipes 91 | 92 | # chat stuff 93 | command.ap.usage=Usage: /additionalpipes teleport 94 | command.ap.pipelist_header=Teleport Pipes: 95 | message.ap.accessdenied=Acesso negado! Este tubo pertence a %s 96 | 97 | # Subtitle for when the Dog Deaggravator is used 98 | subtitle.ap.dog_deaggravator=Sininho tocando 99 | 100 | # Name of Additional Pipes chapter in the BC Guide 101 | buildcraft.guide.chapter.mod.additionalpipes=Additional Pipes 102 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/lang/ru_ru.lang: -------------------------------------------------------------------------------- 1 | item.pipe.ap.pipe_items_priority.name=Приоритетная вводящая труба 2 | item.pipe.ap.pipe_items_adv_wood.name=Продвинутая деревянная транспортная труба 3 | item.pipe.ap.pipe_items_gravity_feed.name=Гравитационная транспортная труба 4 | item.pipe.ap.pipe_items_distribution.name=Распределяющая транспортная труба 5 | item.pipe.ap.pipe_items_closed.name=Закрытая транспортная труба 6 | item.pipe.ap.pipe_items_teleport.name=Предметная телепортирующая труба 7 | item.pipe.ap.pipe_fluids_teleport.name=Жидкостная телепортирующая труба 8 | item.pipe.ap.pipe_power_teleport.name=Энергетическая телепортирующая труба [WIP] 9 | item.pipe.ap.pipe_power_switch.name=Переключающая энергетическая труба 10 | item.pipe.ap.pipe_fluids_switch.name=Переключающая жидкостная труба 11 | item.pipe.ap.pipe_items_switch.name=Переключающая транспортная труба 12 | item.pipe.ap.pipe_fluids_water_pump.name=Водяная помповая труба 13 | item.pipe.ap.pipe_items_addition.name=Дополнительная транспортная труба 14 | item.pipe.ap.pipe_items_jeweled.name=Драгоценная транспортная труба 15 | 16 | #regular items & blocks 17 | item.dog_deaggravator.name=Колокольчик 18 | tile.teleport_tether.name=Телепорт тизер [WIP] 19 | 20 | # Priority Insertion Pipe 21 | gui.priority_insertion.title=Приоритетная труба 22 | 23 | #Distribution Pipe 24 | gui.distribution_pipe.title=Распределяющая труба 25 | 26 | # Pipe Tooltips 27 | tip.pipe.ap.pipe_items_priority=Fills each connected side in a user-defined order 28 | tip.pipe.ap.pipe_items_adv_wood=Extraction pipe allowing simple item filtering 29 | tip.pipe.ap.pipe_items_gravity_feed=Медленно извлекает предметы из нижней части инвентаря, не нуждается в энергии 30 | tip.pipe.ap.pipe_items_teleport=Позволяет телепортировать предметы между двумя таким трубами настроенными на одну частоту 31 | tip.pipe.ap.pipe_items_distribution=Outputs a configurable ratio of items to each side 32 | tip.pipe.ap.pipe_items_closed=Вместо выкидывания предметов, хранит их во внутреннем инвентаре 33 | tip.pipe.ap.pipe_fluids_teleport=Позволяет телепортировать жидкости между двумя такими трубами, настроенными на одну частоту 34 | tip.pipe.ap.pipe_power_teleport=Позволяет телепортировать энергию BuildCraft между двумя такими трубами, настроенными на одну частоту. 35 | tip.pipe.ap.pipe_power_switch=Отключается от соседних труб, если получает красный сигнал 36 | tip.pipe.ap.pipe_fluids_switch=Отключается от соседних труб, если получает красный сигнал 37 | tip.pipe.ap.pipe_items_switch=Отключается от соседних труб, если получает красный сигнал 38 | tip.pipe.ap.pipe_fluids_water_pump=Outputs a small amount of water if placed over a water source block 39 | tip.pipe.ap.pipe_items_addition=Adds items to adjacent inventories only if they already have that item 40 | tip.pipe.ap.pipe_items_jeweled=Улучшеная сортирующая труба для предметов, имеет много настроек 41 | 42 | # Jeweled Pipe GUI 43 | gui.jeweled_pipe.title=Драгоценная труба 44 | #tab names 45 | gui.jeweled_pipe.tab.up=Верх 46 | gui.jeweled_pipe.tab.down=Низ 47 | gui.jeweled_pipe.tab.north=Север 48 | gui.jeweled_pipe.tab.south=Юг 49 | gui.jeweled_pipe.tab.east=Восток 50 | gui.jeweled_pipe.tab.west=Запал 51 | #buttons 52 | gui.jeweled_pipe.match=Match: 53 | gui.jeweled_pipe.NBT=NBT 54 | gui.jeweled_pipe.metadata=Meta 55 | gui.jeweled_pipe.acceptUnsorted=Accept Unsorted 56 | 57 | # Closed Pipe GUI 58 | gui.closed_pipe.title=Закрытая труба 59 | 60 | # Adv. Wood Pipe GUI 61 | gui.advwood_pipe.title=Продвинутая деревяная труба 62 | gui.advwood_pipe.blacklist=Эти предметы исключены 63 | gui.advwood_pipe.whitelist=Эти предметы требуются 64 | 65 | # Teleport Pipe GUI 66 | gui.teleport.ledger.title=Соединенные трубы 67 | gui.teleport.ledger.owner=Владелец: %s 68 | gui.teleport.ledger.outputs=Количество: %d 69 | gui.teleport.ledger.inputs=Количество: %s 70 | gui.teleport.frequency=Частота: %d 71 | gui.teleport.coordPair=Координаты: (%d, %d, %d) 72 | gui.teleport.send_only=Только отправить 73 | gui.teleport.send_and_receive=Отправить и получить 74 | gui.teleport.receive_only=Только получить 75 | gui.teleport.disabled=Отключено 76 | gui.teleport.public=Публичная 77 | gui.teleport.private=Приватная 78 | 79 | # name of "closed pipe is closed" trigger 80 | trigger.pipe_closed=Pipe Closed (Storing Items) 81 | 82 | key.lasers=Переключает отображение загрузки границ чанков 83 | 84 | #tooltips for teleport pipes 85 | tip.teleportPipe=No more long pipelines! 86 | 87 | tooltip.dog_deaggravator=Действует всем на нервы 88 | 89 | itemGroup.apcreativetab=Additional Pipes 90 | 91 | # chat stuff 92 | command.ap.usage=Использование: /additionalpipes teleport 93 | command.ap.pipelist_header=Телепортирующие трубы: 94 | message.ap.accessdenied=Доступ запрещен! Владелец трубы: %s 95 | 96 | # Subtitle for when the Dog Deaggravator is used 97 | subtitle.ap.dog_deaggravator=Звонок колокольчика 98 | 99 | # Name of Additional Pipes chapter in the BC Guide 100 | buildcraft.guide.chapter.mod.additionalpipes=Additional Pipes 101 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/lang/zh_cn.lang: -------------------------------------------------------------------------------- 1 | item.pipe.ap.pipe_items_priority.name=优先级嵌入管道 2 | item.pipe.ap.pipe_items_adv_wood.name=高级木质管道 3 | item.pipe.ap.pipe_items_gravity_feed.name=重力提供传送管道 4 | item.pipe.ap.pipe_items_distribution.name=分配传送管道 5 | item.pipe.ap.pipe_items_closed.name=闭合传送管道 6 | item.pipe.ap.pipe_items_teleport.name=物品隔空传输管道 7 | item.pipe.ap.pipe_fluids_teleport.name=流体隔空传输管道 8 | item.pipe.ap.pipe_power_teleport.name=能量隔空传输管道 [WIP] 9 | item.pipe.ap.pipe_power_switch.name=开关动力管道 10 | item.pipe.ap.pipe_fluids_switch.name=开关流体管道 11 | item.pipe.ap.pipe_items_switch.name=开关传送管道 12 | item.pipe.ap.pipe_fluids_water_pump.name=水泵管道 13 | item.pipe.ap.pipe_items_addition.name=添加传送管道 14 | item.pipe.ap.pipe_items_jeweled.name=宝石传送管道 15 | 16 | #regular items & blocks 17 | item.dog_deaggravator.name=缓和狗铃 18 | tile.teleport_tether.name=隔空传输链接 [WIP] 19 | 20 | # Priority Insertion Pipe 21 | gui.priority_insertion.title=优先级嵌入管道 22 | 23 | #Distribution Pipe 24 | gui.distribution_pipe.title=分配管道 25 | 26 | # Pipe Tooltips 27 | tip.pipe.ap.pipe_items_priority=以玩家定义的顺序传送到每一个连接的容器 28 | tip.pipe.ap.pipe_items_adv_wood=实现简单过滤的提取管道 29 | tip.pipe.ap.pipe_items_gravity_feed=从容器底部慢慢提取物品且不需要能量 30 | tip.pipe.ap.pipe_items_teleport=在链接的管道之间瞬时传送物品 31 | tip.pipe.ap.pipe_items_distribution=以设定的比例输出到每一边 32 | tip.pipe.ap.pipe_items_closed=把物品存储在内部而不是让物品掉落 33 | tip.pipe.ap.pipe_fluids_teleport=在链接的管道之间瞬时传送流体 34 | tip.pipe.ap.pipe_power_teleport=在链接的管道之间瞬时传送能量 35 | tip.pipe.ap.pipe_power_switch=如果接收到红石信号则与相邻管道断开连接 36 | tip.pipe.ap.pipe_fluids_switch=如果接收到红石信号则与相邻管道断开连接 37 | tip.pipe.ap.pipe_items_switch=如果接收到红石信号则与相邻管道断开连接 38 | tip.pipe.ap.pipe_fluids_water_pump=放在水源上方可以输出少量的水 39 | tip.pipe.ap.pipe_items_addition=只给连接的容器传送它们已有的物品 40 | tip.pipe.ap.pipe_items_jeweled=大容量可配置的分类管道 41 | 42 | # Jeweled Pipe GUI 43 | gui.jeweled_pipe.title=宝石管道 44 | #tab names 45 | gui.jeweled_pipe.tab.up=上 46 | gui.jeweled_pipe.tab.down=下 47 | gui.jeweled_pipe.tab.north=北 48 | gui.jeweled_pipe.tab.south=南 49 | gui.jeweled_pipe.tab.east=东 50 | gui.jeweled_pipe.tab.west=西 51 | #buttons 52 | gui.jeweled_pipe.match=匹配: 53 | gui.jeweled_pipe.NBT=NBT 54 | gui.jeweled_pipe.metadata=Meta 55 | gui.jeweled_pipe.acceptUnsorted=接收未分类物品 56 | 57 | # Closed Pipe GUI 58 | gui.closed_pipe.title=闭合管道 59 | 60 | # Adv. Wood Pipe GUI 61 | gui.advwood_pipe.title=高级木质管道 62 | gui.advwood_pipe.blacklist=排除这些物品 63 | gui.advwood_pipe.whitelist=请求这些物品 64 | 65 | # Teleport Pipe GUI 66 | # NOTE: "ledger" refers to the menu that expands on the side of the Teleport Pipe GUI when you click the icon 67 | gui.teleport.ledger.title=已链接的管道 68 | gui.teleport.ledger.owner=拥有者: %s 69 | gui.teleport.ledger.outputs=输出: %d 70 | gui.teleport.ledger.inputs=输入: %s 71 | gui.teleport.frequency=频率: %d 72 | gui.teleport.coordPair=坐标: (%d, %d, %d) 73 | gui.teleport.send_only=仅发送 74 | gui.teleport.send_and_receive=发送 & 接收 75 | gui.teleport.receive_only=仅接收 76 | gui.teleport.disabled=禁用 77 | gui.teleport.public=公用 78 | gui.teleport.private=私用 79 | 80 | # name of "closed pipe is closed" trigger 81 | trigger.pipe_closed=管道关闭 (存储物品) 82 | 83 | key.lasers=显示区块载入边界 84 | 85 | #tooltips for teleport pipes 86 | tip.teleportPipe=没有更长的管道线! 87 | 88 | tooltip.dog_deaggravator=让你的狗冷静下来 89 | 90 | itemGroup.apcreativetab=附加管道 91 | 92 | # chat stuff 93 | command.ap.usage=用法: /additionalpipes teleport 94 | command.ap.pipelist_header=隔空传送管道: 95 | message.ap.accessdenied=拒绝访问! 该管道属于 %s 96 | 97 | # Subtitle for when the Dog Deaggravator is used 98 | subtitle.ap.dog_deaggravator=铃响 99 | 100 | # Name of Additional Pipes chapter in the BC Guide 101 | buildcraft.guide.chapter.mod.additionalpipes=附加管道 102 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/models/block/teleport_tether.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "block/cube_all", 3 | "textures": { 4 | "all": "additionalpipes:blocks/teleport_tether" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/models/item/dog_deaggravator.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "builtin/generated", 3 | "textures": { 4 | "layer0": "additionalpipes:items/dog_deaggravator" 5 | }, 6 | "display": { 7 | "thirdperson": { 8 | "rotation": [ -90, 0, 0 ], 9 | "translation": [ 0, 1, -3 ], 10 | "scale": [ 0.55, 0.55, 0.55 ] 11 | }, 12 | "firstperson": { 13 | "rotation": [ 0, -135, 25 ], 14 | "translation": [ 0, 4, 2 ], 15 | "scale": [ 1.7, 1.7, 1.7 ] 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/models/item/teleport_tether.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "additionalpipes:block/teleport_tether", 3 | "display": { 4 | "thirdperson": { 5 | "rotation": [ 10, -45, 170 ], 6 | "translation": [ 0, 1.5, -2.75 ], 7 | "scale": [ 0.375, 0.375, 0.375 ] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/dog_deaggravator.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | "GSG", 5 | "GIG", 6 | "G G" 7 | ], 8 | "key": { 9 | "I": { 10 | "type": "forge:ore_dict", 11 | "ore": "ingotIron" 12 | }, 13 | "G": { 14 | "type": "forge:ore_dict", 15 | "ore": "ingotGold" 16 | }, 17 | "S": { 18 | "type": "forge:ore_dict", 19 | "ore": "stickWood" 20 | } 21 | }, 22 | "result": { 23 | "item": "additionalpipes:dog_deaggravator" 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_fluids_switch.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shapeless", 3 | "ingredients": [{ 4 | "item": "additionalpipes:pipe_items_switch", 5 | "data": 0 6 | }, 7 | { 8 | "item": "buildcrafttransport:waterproof" 9 | } 10 | ], 11 | "result": { 12 | "item": "additionalpipes:pipe_fluids_switch", 13 | "data": 0 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_fluids_teleport.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shapeless", 3 | "ingredients": [{ 4 | "item": "additionalpipes:pipe_items_teleport", 5 | "data": 0 6 | }, 7 | { 8 | "item": "buildcrafttransport:waterproof" 9 | } 10 | ], 11 | "result": { 12 | "item": "additionalpipes:pipe_fluids_teleport", 13 | "data": 0 14 | } 15 | 16 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_fluids_water_pump.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | " L ", 5 | "rPr", 6 | " W " 7 | ], 8 | "key": { 9 | "P": { 10 | "type": "forge:ore_dict", 11 | "ore": "gearIron" 12 | }, 13 | "L": { 14 | "item": "buildcrafttransport:pipe_gold_fluid", 15 | "data": 0 16 | }, 17 | "W": { 18 | "item": "buildcrafttransport:pipe_wood_fluid", 19 | "data": 0 20 | }, 21 | "r": { 22 | "type": "forge:ore_dict", 23 | "ore": "dustRedstone" 24 | } 25 | }, 26 | "result": { 27 | "item": "additionalpipes:pipe_fluids_water_pump", 28 | "count": 1, 29 | "data": 0 30 | } 31 | 32 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_items_addition.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | " R ", 5 | "RCR", 6 | " R " 7 | ], 8 | "key": { 9 | "C": { 10 | "item": "buildcrafttransport:pipe_clay_item", 11 | "data": 0 12 | }, 13 | "R": { 14 | "type": "forge:ore_dict", 15 | "ore": "dustRedstone" 16 | } 17 | }, 18 | "result": { 19 | "item": "additionalpipes:pipe_items_addition", 20 | "data": 0 21 | } 22 | 23 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_items_adv_wood.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | "WgW" 5 | ], 6 | "key": { 7 | "W": { 8 | "type": "forge:ore_dict", 9 | "ore": "gearWood" 10 | }, 11 | "g": { 12 | "type": "forge:ore_dict", 13 | "ore": "blockGlass" 14 | } 15 | }, 16 | "result": { 17 | "item": "additionalpipes:pipe_items_adv_wood", 18 | "count": 8, 19 | "data": 0 20 | } 21 | 22 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_items_closed.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shapeless", 3 | "ingredients": [{ 4 | "item": "buildcrafttransport:pipe_void_item", 5 | "data": 0 6 | }, 7 | { 8 | "type": "forge:ore_dict", 9 | "ore": "gearIron" 10 | } 11 | ], 12 | "result": { 13 | "item": "additionalpipes:pipe_items_closed", 14 | "data": 0 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_items_distribution.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | " r ", 5 | "IgI", 6 | " r " 7 | ], 8 | "key": { 9 | "I": { 10 | "type": "forge:ore_dict", 11 | "ore": "ingotIron" 12 | }, 13 | "g": { 14 | "type": "forge:ore_dict", 15 | "ore": "blockGlass" 16 | }, 17 | "r": { 18 | "type": "forge:ore_dict", 19 | "ore": "dustRedstone" 20 | } 21 | }, 22 | "result": { 23 | "item": "additionalpipes:pipe_items_distribution", 24 | "count": 1, 25 | "data": 0 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_items_gravity_feed.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | " S ", 5 | "IgI", 6 | " S " 7 | ], 8 | "key": { 9 | "I": { 10 | "type": "forge:ore_dict", 11 | "ore": "ingotIron" 12 | }, 13 | "g": { 14 | "type": "forge:ore_dict", 15 | "ore": "blockGlass" 16 | }, 17 | "S": { 18 | "type": "forge:ore_dict", 19 | "ore": "stone" 20 | } 21 | }, 22 | "result": { 23 | "item": "additionalpipes:pipe_items_gravity_feed", 24 | "count": 1, 25 | "data": 0 26 | } 27 | 28 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_items_jeweled.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | " D ", 5 | "DGD", 6 | " D " 7 | ], 8 | "key": { 9 | "D": { 10 | "item": "buildcrafttransport:pipe_diamond_item", 11 | "data": 0 12 | }, 13 | "G": { 14 | "item": "buildcraftsilicon:redstone_chipset", 15 | "data": 2 16 | } 17 | }, 18 | "result": { 19 | "item": "additionalpipes:pipe_items_jeweled", 20 | "count": 2, 21 | "data": 0 22 | } 23 | 24 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_items_priority.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shapeless", 3 | "ingredients": [{ 4 | "item": "buildcrafttransport:pipe_clay_item", 5 | "data": 0 6 | }, 7 | { 8 | "item": "additionalpipes:pipe_items_distribution", 9 | "data": 0 10 | } 11 | ], 12 | "result": { 13 | "item": "additionalpipes:pipe_items_priority", 14 | "count": 2, 15 | "data": 0 16 | } 17 | 18 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_items_switch.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shaped", 3 | "pattern": [ 4 | "GgI" 5 | ], 6 | "key": { 7 | "G": { 8 | "type": "forge:ore_dict", 9 | "ore": "gearGold" 10 | }, 11 | "I": { 12 | "type": "forge:ore_dict", 13 | "ore": "gearIron" 14 | }, 15 | "g": { 16 | "type": "forge:ore_dict", 17 | "ore": "blockGlass" 18 | } 19 | }, 20 | "result": { 21 | "item": "additionalpipes:pipe_items_switch", 22 | "count": 8, 23 | "data": 0 24 | } 25 | 26 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/recipes/pipe_power_switch.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "forge:ore_shapeless", 3 | "ingredients": [{ 4 | "item": "additionalpipes:pipe_items_switch", 5 | "data": 0 6 | }, 7 | { 8 | "type": "forge:ore_dict", 9 | "ore": "dustRedstone" 10 | } 11 | ], 12 | "result": { 13 | "item": "additionalpipes:pipe_power_switch", 14 | "data": 0 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/sounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "bellRing": { 3 | "category": "master", 4 | "sounds": [{ 5 | "name": "additionalpipes:copper-bell", 6 | "stream": false 7 | }], 8 | "subtitle": "subtitle.ap.dog_deaggravator" 9 | } 10 | } -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/sounds/copper-bell.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/sounds/copper-bell.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/blocks/jeweledPipeBase.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/blocks/jeweledPipeBase.pdn -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/blocks/teleport_tether.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/blocks/teleport_tether.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/background_adv_wood.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/background_adv_wood.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/background_distribution.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/background_distribution.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/background_generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/background_generic.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/background_jeweled.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/background_jeweled.pdn -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/background_jeweled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/background_jeweled.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/background_priority.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/background_priority.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_1.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_2.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_3.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_4.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_5.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/gui/jeweled_gui_outline_6.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/dog_deaggravator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/dog_deaggravator.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/1.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/2.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/3.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/4.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/5.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/6.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/7.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/8.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/items/triggers/pipe_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/items/triggers/pipe_closed.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/15.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/31.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/8.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/liquidsRedstonePipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/liquidsRedstonePipe.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/logisticsTeleportPipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/logisticsTeleportPipe.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_fluids_switch_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_fluids_switch_closed.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_fluids_switch_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_fluids_switch_open.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_fluids_teleport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_fluids_teleport.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_fluids_water_pump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_fluids_water_pump.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_addition.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_addition.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_adv_wood_input.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_adv_wood_input.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_adv_wood_output.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_adv_wood_output.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_closed_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_closed_closed.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_closed_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_closed_open.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_down.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_east.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_east.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_north.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_north.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_south.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_south.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_up.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_west.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_distribution_west.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_gravity_feed_sides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_gravity_feed_sides.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_gravity_feed_up.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_gravity_feed_up.pdn -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_gravity_feed_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_gravity_feed_up.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_down.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_east.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_east.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_north.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_north.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_south.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_south.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_up.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_west.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_jeweled_west.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_down.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_east.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_east.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_north.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_north.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_south.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_south.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_up.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_west.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_priority_west.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_switch_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_switch_closed.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_switch_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_switch_open.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_teleport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_items_teleport.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_power_switch_closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_power_switch_closed.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_power_switch_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_power_switch_open.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/pipe_power_teleport.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/pipe_power_teleport.png -------------------------------------------------------------------------------- /src/main/resources/assets/additionalpipes/textures/pipes/redstonePipeActive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tcooc/AdditionalPipesBC/HEAD/src/main/resources/assets/additionalpipes/textures/pipes/redstonePipeActive.png -------------------------------------------------------------------------------- /src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [{ 2 | "modid": "additionalpipes", 3 | "name": "Additional Pipes", 4 | "version": "${version}", 5 | "url": "https://github.com/tcooc/AdditionalPipesBC/", 6 | "updateUrl": "", 7 | "description": "Teleport, insertion, extraction, and other pipes.", 8 | "credits": "Zeldo, DaStormBringer, AlexIIL", 9 | "authorList": [ "Zeldo", "DaStormBringer", "MultipleMonomials", "Additional Pipes Contributors" ] 10 | }] 11 | -------------------------------------------------------------------------------- /src/main/resources/pack.mcmeta: -------------------------------------------------------------------------------- 1 | { 2 | "pack": { 3 | "pack_format": 3, 4 | "description": "Resources used for Additional Pipes" 5 | } 6 | } --------------------------------------------------------------------------------