Compare commits

..

89 Commits

Author SHA1 Message Date
PrototypeTrousers ebe3341bfe refactor AutoRotatingModel 2023-08-27 08:33:51 -03:00
PrototypeTrousers 7566b3e2fc update pattern terminal crafting result after crafting 2023-08-11 10:40:57 -03:00
PrototypeTrousers 30c074021b terminal woes 2023-08-11 10:27:15 -03:00
PrototypeTrousers e6586ac360 attempt to fix ore dict storage bus freezing the client 2023-08-08 00:29:52 -03:00
PrototypeTrousers 0429fe5f21 schedule a refreshed view when changing view cells in terminals 2023-08-05 19:16:02 -03:00
PrototypeTrousers e16d90333b fix channel display 2023-07-31 02:58:34 -03:00
0mega24 59c7dd1285 Configurable Channel Limits (#295)
* Channel Config Test

* Update AEConfig.java

* userDefinedChannelAmounts

config option added for the dense and normal channel amounts - will need to be refined to match everything but not sure what I would need to do to make it match the other config options

rebound all hard coded checks for channel amounts and linked them to the config options

redefined how the channel amounts are noted in all applicable api integrations
2023-07-28 10:26:41 -03:00
PrototypeTrousers 13ba399418 fix NPE. Fix fix gradle issue due to cofh dick move 2023-07-25 17:18:42 -03:00
PrototypeTrousers 8d152afcd3 actually add the access transformer to the jar 2023-07-14 23:20:38 -03:00
PrototypeTrousers 9fdfbbea54 more null checks 2023-07-13 21:57:39 -03:00
PrototypeTrousers f4303fc1ec add checks to 0 sized stacks 2023-07-12 15:00:59 -03:00
PrototypeTrousers 3c62ac79c3 bump version 2023-07-08 21:39:38 -03:00
PrototypeTrousers e42863643d crafting microoptimization 2023-07-08 21:35:27 -03:00
PrototypeTrousers ace7c7d660 Merge branch 'rfg' into origin/AE2-Omnifactory 2023-07-08 18:21:44 -03:00
PrototypeTrousers 35f2aa7d51 works so... 2023-07-08 17:56:31 -03:00
PrototypeTrousers 926a4a87c6 a few important files 2023-07-08 13:00:47 -03:00
PrototypeTrousers d1d2c415bf wip 2023-07-08 00:53:21 -03:00
PrototypeTrousers f631858be6 fix copy-pasting interfaces with memory cards between interfaces with differing amount of expansion cards 2023-07-04 23:57:12 -03:00
PrototypeTrousers d407ec4922 tweak JEI transfer handler a bit more 2023-07-04 22:36:07 -03:00
PrototypeTrousers 3587fce218 fix emitting crafts (level emitter + crafting card) not allowing already stored items to be used in autocrafting 2023-07-04 12:03:48 -03:00
PrototypeTrousers 7464647bb8 0.55.16 2023-07-03 20:22:54 -03:00
PrototypeTrousers 0848f5db70 Merge branch 'autocrafting-containeritem-fix' into AE2-Omnifactory 2023-07-03 20:22:09 -03:00
PrototypeTrousers 822e394966 Merge branch 'item-repo-sort' into AE2-Omnifactory 2023-07-03 20:22:06 -03:00
PrototypeTrousers 68ed4c9c0f Merge branch 'jei-fix' into AE2-Omnifactory 2023-07-03 20:22:03 -03:00
PrototypeTrousers f13d7f351d fix container items breaking not being taken into account during simulation properly
optimize crafting with container items by checking IF WE HAVE ANY of before LOOKING UP IF THE RECIPE MATCHES with the item we DONT HAVE
2023-07-03 15:30:05 -03:00
PrototypeTrousers 086ddd5a67 shady optimization 2023-06-29 15:21:33 -03:00
PrototypeTrousers acb1d00197 attempt to separate itens used simulation (threaded) from the main 2023-06-29 12:53:32 -03:00
PrototypeTrousers 4aaa3f8929 make container itens not arrive too late or early instead precisely when
they are meant to
2023-06-29 12:51:04 -03:00
PrototypeTrousers 793b8d6655 fix patterns not appearing on the terminal except on craftable-only view 2023-06-27 22:53:55 -03:00
PrototypeTrousers cba89b0323 fix damageable container items not being returned immediately for simulation 2023-06-27 11:47:23 -03:00
PrototypeTrousers 1f2cdfd843 improve GUI lag when displaying many items on terminals 2023-06-27 00:10:45 -03:00
PrototypeTrousers da39d81d5f optimize JEI transfer handler so it doesnt lock up the client 2023-06-26 16:13:33 -03:00
PrototypeTrousers 1442248ec3 bump version 2023-06-17 08:12:34 -03:00
PrototypeTrousers 1500661e43 fix wireless terminals duping and voiding issues.
fixes #270
2023-06-16 17:57:13 -03:00
PrototypeTrousers a7c2824624 replace ItemEncodedPattern cache with something that actually works 2023-06-15 21:43:27 -03:00
PrototypeTrousers 9d2549bdd8 bump version 2023-05-26 19:46:34 -03:00
PrototypeTrousers a37a2b4e89 blindly attempt to fix wireless terminal voiding/duping 2023-05-26 19:46:34 -03:00
miozune aa6bad7a72 Fix CPU Clusters consisting only of addon blocks not being recognized (#274) 2023-05-24 07:27:20 -03:00
Rongmario e2e5eed351 Properly discard caches when reloading models (#278)
* Properly discard caches when reloading models

* Singleton reloading multiple AutoRotatingModels
2023-05-24 07:26:24 -03:00
Caedis b6de4ebf18 Fix single slabs and stairs to allow chest opening (#268) 2023-05-24 07:25:56 -03:00
PrototypeTrousers 4545d78a51 bump version 2023-04-24 09:43:23 -03:00
PrototypeTrousers 6dc75fe26e attempt to fix #253 2023-04-24 09:29:10 -03:00
Florian Kostenzer 0552282d9d fix: fix crash when requester node is removed (#262) 2023-04-24 09:18:17 -03:00
Hikari_Nova 8be01dfb87 Try to fix https://github.com/PrototypeTrousers/Applied-Energistics-2/issues/265. (#266) 2023-04-24 09:17:53 -03:00
PrototypeTrousers 4c5803b986 check if baubles mod is installed when using keybinds to open terminals 2023-04-24 09:17:18 -03:00
PrototypeTrousers 3b4b9a1bd5 add recursion check to item p2ps 2023-04-15 08:32:27 -03:00
osimon 2c7959e399 Interface shift-clicking QOL improvements (#248) 2023-03-28 18:27:36 -03:00
PrototypeTrousers 4649841341 Use anatawa's fork of forgegradel 2.3 2023-03-28 18:25:22 -03:00
PrototypeTrousers 3d4cfb2ee8 add the quantum link card to the quantum chamber tooltip 2023-03-28 18:24:51 -03:00
PrototypeTrousers 8092d0d354 Allow the quantum linking card to be disabled by config
Clean up some wrong tooltip
2023-03-28 18:02:36 -03:00
PrototypeTrousers ceee1f181f bump version. copy/paste some lang entries 2023-03-20 16:07:47 -03:00
Domi eefb11544e Add craftable items QOL features (tooltips / hold ALT to toggle craft request) (#241) 2023-03-20 16:01:06 -03:00
Xikaro af5921f9e8 fix ME Chest rendering (#246)
* Update dependencies.gradle

* fix ME Chest rendering
2023-03-20 15:58:40 -03:00
Domi 75be2ff039 Refresh crafting plan when job submission fails (#243) 2023-03-20 15:53:23 -03:00
Domi b6f4bdb64d Fix being unable to clear selected text in number boxes (#242) 2023-03-20 15:53:11 -03:00
PrototypeTrousers b76c9f1371 null check 2023-03-07 14:54:38 -03:00
PrototypeTrousers 50bf591418 bump version 2023-03-05 14:07:36 -03:00
RuiXuqi b077aff1f8 New cells models (#227)
new cells
2023-03-05 14:06:15 -03:00
PrototypeTrousers 8debd6c499 fix invisible interface config slots on servers 2023-02-28 20:00:31 -03:00
PrototypeTrousers 53ad6c776b fix magnet card crashing servers 2023-02-21 20:33:27 -03:00
PrototypeTrousers e37f8ef65d bump version 2023-02-21 10:19:36 -03:00
PrototypeTrousers d8b20f53a9 fix portable cell not working 2023-02-21 10:09:31 -03:00
PrototypeTrousers bf1a3b7751 fix outputs in processing terminal slowly migrating upwards 2023-02-21 09:58:54 -03:00
PrototypeTrousers c8a6d50ce3 fix wireless crafting terminal not loading sorting configs properly 2023-02-20 01:16:41 -03:00
PrototypeTrousers 13af30f657 try to fix the fix 2023-02-18 23:11:43 -03:00
PrototypeTrousers 5d7f552643 attempt to fix wireless terminals overwriting items in hand 2023-02-18 21:06:41 -03:00
Roman Hubenkov 82be548fc7 Update ru_ru.lang (#223)
Small fix
2023-02-18 21:06:13 -03:00
Roman Hubenkov 38249608e4 Update ru_ru.lang (#222) 2023-02-14 20:26:49 -03:00
mczph 8f66765696 Update zh_cn.lang (#221) 2023-02-14 20:26:29 -03:00
PrototypeTrousers fd5f9263d8 fix wireless pattern terminal not encoding processing outputs from JEI
bump version
2023-02-14 20:25:09 -03:00
PrototypeTrousers 36d94a17aa close wireless terminals if they run out of power instead of not working 2023-02-14 19:10:42 -03:00
PrototypeTrousers ede2b4ce25 fix OOB crash 2023-02-13 01:02:59 -03:00
PrototypeTrousers e09ec8c420 bump version 2023-02-10 06:32:35 -03:00
tier940 3d4c03e184 Update ja_jp.lang (#220)
* Update ja_jp.lang

* 組立室から組立機に変更

* 表記揺れの修正

* 記載揺れと誤字脱字の修正
2023-02-10 06:29:15 -03:00
PrototypeTrousers 17119fd990 more gui fixes... 2023-02-10 06:28:44 -03:00
PrototypeTrousers 9a00185b6d backport some security changes 2023-02-10 06:21:39 -03:00
PrototypeTrousers 2c7b239914 bump version 2023-02-09 19:20:17 -03:00
PrototypeTrousers 4039188712 more fixes yay 2023-02-09 13:02:55 -03:00
PrototypeTrousers ecb697ab11 fix terminal/netwoork tool (please) 2023-02-09 12:16:40 -03:00
PrototypeTrousers ab1f519401 allow wireless pattern terminal to switch substitution modes 2023-02-08 21:17:56 -03:00
Roman Hubenkov d06a70ee22 Update ru_ru.lang (#218)
* Update ru_ru.lang
2023-02-08 13:58:54 -03:00
PrototypeTrousers 422f9faf76 fix jei and tall interface terminal button overlapping 2023-02-08 13:58:04 -03:00
PrototypeTrousers 96ab73001b fix craftables not working when wireless terminal not being held
remove wrong imports
add missing lang entries
2023-02-08 12:14:36 -03:00
PrototypeTrousers 854676a33c terminal fixes + better formatting 2023-02-06 18:38:44 -03:00
PrototypeTrousers 7f76723da5 Merge branch 'WiFi-Terminals' into AE2-Omnifactory 2023-02-06 13:28:27 -03:00
PrototypeTrousers 3fc7cf0247 Merge branch 'cell-tooltips' into AE2-Omnifactory 2023-02-06 13:28:23 -03:00
PrototypeTrousers b377dfdd69 Merge branch 'bogofix' into AE2-Omnifactory 2023-02-06 13:28:17 -03:00
PrototypeTrousers ff1091d252 add toolitps to cells 2023-02-06 13:26:59 -03:00
PrototypeTrousers 7ab89a0657 update bogosort compat 2023-02-05 23:03:34 -03:00
127 changed files with 4168 additions and 1935 deletions
+25
View File
@@ -0,0 +1,25 @@
name: Build mod
on: [ push, pull_request, workflow_dispatch ]
jobs:
build:
name: Build mod
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '8'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew -Pnet.minecraftforge.gradle.disableUpdateChecker=true build
- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: appliedenergistics2
path: build/libs
-15
View File
@@ -1,15 +0,0 @@
name: 'Lock threads'
on:
schedule:
- cron: '0 0 * * *'
jobs:
lock:
runs-on: ubuntu-latest
steps:
- uses: dessant/lock-threads@v2
with:
github-token: ${{ github.token }}
issue-lock-inactive-days: '180'
pr-lock-inactive-days: '180'
+1
View File
@@ -8,6 +8,7 @@
!gradlew.bat !gradlew.bat
!build.gradle !build.gradle
!gradle.properties !gradle.properties
!settings.gradle
!.travis.yml !.travis.yml
# include markdowns # include markdowns
+992 -89
View File
File diff suppressed because it is too large Load Diff
+119 -4
View File
@@ -3,8 +3,6 @@ aechannel=stable
aebuild=7 aebuild=7
aegroup=appeng aegroup=appeng
aebasename=appliedenergistics2 aebasename=appliedenergistics2
extended=extended_life
extendedversion=v0.54.20
######################################################### #########################################################
# Versions # # Versions #
######################################################### #########################################################
@@ -22,8 +20,7 @@ jei_version=4.16.1.302
tesla_version=1.0.63 tesla_version=1.0.63
ic2_version=2.8.73-ex112 ic2_version=2.8.73-ex112
top_version=1.12-1.4.23-16 top_version=1.12-1.4.23-16
cofhcore_version=1.12.2-4.5.2.19 crafttweaker_version=4.1.20.684
crafttweaker_version=4.1.8.9
ctm_version=MC1.12.2-0.3.1.16 ctm_version=MC1.12.2-0.3.1.16
forestry_version=5.8.2.387 forestry_version=5.8.2.387
######################################################### #########################################################
@@ -31,3 +28,121 @@ forestry_version=5.8.2.387
######################################################### #########################################################
website_version=1.12.2 website_version=1.12.2
curse_versions=1.12.2 curse_versions=1.12.2
mapping_channel=snapshot
mapping_version=20171003
# Run Configurations
minecraft_username=Developer
extra_jvm_args=
modName=Applied Energistics 2
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
modId=appliedenergistics2
modGroup=appeng
# Version of your mod.
# This field can be left empty if you want your mod's version to be determined by the latest git tag instead.
modVersion=rv6-stable-7-extended_life-v0.55.21
# Whether to use the old jar naming structure (modid-mcversion-version) instead of the new version (modid-version)
includeMCVersionJar=false
# The name of your jar when you produce builds, not including any versioning info
modArchivesBaseName=appliedenergistics2
# Will update your build.gradle automatically whenever an update is available
autoUpdateBuildScript=false
minecraftVersion=1.12.2
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
# restart Minecraft in development. Choose this dependent on your mod:
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
# Alternatively this can be set with the 'DEV_USERNAME' environment variable.
developmentEnvironmentUserName=Developer
# Enables using modern java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
# Using this requires that you use a Java 17 JDK for development.
enableModernJavaSyntax=true
# Generate a class with String fields for the mod id, name and version named with the fields below
generateGradleTokenClass=appeng.Tags
gradleTokenModId=
gradleTokenModName=
gradleTokenVersion=VERSION
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
apiPackage=api
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/
# There can be multiple files in a comma-separated list.
# Example value: mymodid_at.cfg,jei_at.cfg
accessTransformersFile=appliedenergistics2_at.cfg
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins=false
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
mixinsPackage=
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
coreModClass=core.AE2ELCore
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod (meaning that
# there is no class annotated with @Mod) you want this to be true. When in doubt: leave it on false!
containsMixinsAndOrCoreModOnly=false
# Enables Mixins even if this mod doesn't use them, useful if one of the dependencies uses mixins.
forceEnableMixins=false
# Adds CurseMaven, Modrinth Maven, BlameJared maven, and some more well-known 1.12.2 repositories
includeWellKnownRepositories=true
# Adds JEI and TheOneProbe to your development environment. Adds them as 'implementation', meaning they will
# be available at compiletime and runtime for your mod (in-game and in-code).
# Overrides the above setting to be always true, as these repositories are needed to fetch the mods
includeCommonDevEnvMods=true
# If enabled, you may use 'shadowCompile' for dependencies. They will be integrated in your jar. It is your
# responsibility check the licence and request permission for distribution, if required.
usesShadowedDependencies=false
# If disabled, won't remove unused classes from shaded dependencies. Some libraries use reflection to access
# their own classes, making the minimization unreliable.
minimizeShadowedDependencies=true
# If disabled, won't rename the shadowed classes.
relocateShadowedDependencies=true
# Publishing to modrinth requires you to set the MODRINTH_API_KEY environment variable to your current modrinth API token.
# The project's ID on Modrinth. Can be either the slug or the ID.
# Leave this empty if you don't want to publish on Modrinth.
# Alternatively this can be set with the 'MODRINTH_PROJECT_ID' environment variable.
modrinthProjectId=
# The project's relations on Modrinth. You can use this to refer to other projects on Modrinth.
# Syntax: scope1-type1:name1;scope2-type2:name2;...
# Where scope can be one of [required, optional, incompatible, embedded],
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:jei;optional-project:top;incompatible-project:gregtech
modrinthRelations=
# Publishing to CurseForge requires you to set the CURSEFORGE_API_KEY environment variable to one of your CurseForge API tokens.
# The project's numeric ID on CurseForge. You can find this in the About Project box.
# Leave this empty if you don't want to publish on CurseForge.
# Alternatively this can be set with the 'CURSEFORGE_PROJECT_ID' environment variable.
curseForgeProjectId=
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
# Syntax: type1:name1;type2:name2;...
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
# and the name is the CurseForge project slug of the other mod.
# Example: requiredDependency:railcraft;embeddedLibrary:cofhlib;incompatible:buildcraft
curseForgeRelations=
# This project's release type on CurseForge and/or Modrinth
# Allowed types: release, beta, alpha
releaseType=beta
# Generate a default changelog for releases. Requires git to be installed, as it uses it to generate a changelog of
# commits since the last tagged release.
generateDefaultChangelog=false
# Prevent the source code from being published
noPublishedSources=false
# Enable spotless checks
# Enforces code formatting on your source code
# By default this will use the files found here: https://github.com/GregTechCEu/Buildscripts/tree/master/spotless
# to format your code. However, you can create your own version of these files and place them in your project's
# root directory to apply your own formatting options instead.
enableSpotless=false
# Enable JUnit testing platform used for testing your code.
# Uses JUnit 5. See guide and documentation here: https://junit.org/junit5/docs/current/user-guide/
enableJUnit=true
# Deployment debug setting
# Uncomment this to test deployments to CurseForge and Modrinth
# Alternatively, you can set the 'DEPLOYMENT_DEBUG' environment variable.
deploymentDebug=false
# Gradle Settings
# Effectively applies the '--stacktrace' flag by default
org.gradle.logging.stacktrace=all
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
-75
View File
@@ -1,75 +0,0 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
// Suppresses warnings/errors when building javadocs
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
javadoc {
options.encoding = 'UTF-8'
options.charSet = 'UTF-8'
}
task javadocs(type: Javadoc) {
source = sourceSets.api.java
include "appeng/api/**"
// Due to ForgeGradle having to be a special snowflake,
// we have to add some custom configurations to the normal compile configuration and hope it does not break.
classpath = configurations.compile + configurations.forgeGradleMc + configurations.forgeGradleMcDeps
}
task javadocJar(type: Jar, dependsOn: javadocs) {
from javadoc.destinationDir
classifier = 'javadoc'
}
task apiJar(type: Jar) {
from sourceSets.api.java
include "appeng/api/**"
from sourceSets.api.output
include "appeng/api/**"
classifier = 'api'
}
task sourceJar(type: Jar, overwrite: true) {
from sourceSets.api.allSource
from sourceSets.main.allSource
classifier = 'sources'
}
task devJar(type: Jar, overwrite: true) {
from sourceSets.api.output
from sourceSets.main.output
classifier = 'dev'
}
artifacts {
archives apiJar
archives javadocJar
archives sourceJar
archives devJar
}
+8 -8
View File
@@ -81,11 +81,11 @@ configurations {
dependencies { dependencies {
// deobfCompile "gregtechce:gregtech:1.12.2:1.15.1.735" // deobfCompile "gregtechce:gregtech:1.12.2:1.15.1.735"
// installable runtime dependencies // installable runtime dependencies
deobfCompile "curse.maven:gregtechceu-557242:3949406" implementation rfg.deobf("curse.maven:gregtechceu-557242:4429261")
compileOnly "curse.maven:chisel-235279:2915375" compileOnly "curse.maven:chisel-235279:2915375"
deobfCompile "baubles:Baubles:1.12:1.5.2" implementation rfg.deobf("curse.maven:baubles-227083:2518667")
//mods "mcp.mobius.waila:Hwyla:${hwyla_version}" //mods "mcp.mobius.waila:Hwyla:${hwyla_version}"
mods "curse.maven:hwyla-253449:2568751" mods "curse.maven:hwyla-253449:2568751"
mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev" mods "net.industrial-craft:industrialcraft-2:${ic2_version}:dev"
@@ -96,7 +96,7 @@ dependencies {
//compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}" //compileOnly "mcp.mobius.waila:Hwyla:${hwyla_version}"
compileOnly "curse.maven:hwyla-253449:2568751" compileOnly "curse.maven:hwyla-253449:2568751"
//Code chicken lib, GTCE dependency //Code chicken lib, GTCE dependency
deobfCompile "curse.maven:CCL-242818:2779848" implementation rfg.deobf("curse.maven:CCL-242818:2779848")
compileOnly "curse.maven:recipe-stages-280554:3405072" compileOnly "curse.maven:recipe-stages-280554:3405072"
compileOnly "curse.maven:item-stages-280316:2696769" compileOnly "curse.maven:item-stages-280316:2696769"
@@ -104,17 +104,17 @@ dependencies {
compileOnly "net.darkhax.tesla:Tesla-1.12.2:${tesla_version}" compileOnly "net.darkhax.tesla:Tesla-1.12.2:${tesla_version}"
compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api" compileOnly "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
compileOnly "mcjty.theoneprobe:TheOneProbe-1.12:${top_version}:api" compileOnly "mcjty.theoneprobe:TheOneProbe-1.12:${top_version}:api"
compileOnly "cofh:CoFHCore:${cofhcore_version}:deobf" compileOnly "curse.maven:CoFHCore-69162:2920433"
compileOnly "CraftTweaker2:CraftTweaker2-API:${crafttweaker_version}" compileOnly "CraftTweaker2:CraftTweaker2-API:${crafttweaker_version}"
compileOnly "curse.maven:inventory-tweaks-223094:2482482" compileOnly "curse.maven:inventory-tweaks-223094:2482482"
compileOnly "curse.maven:inventory-bogo-sorter-632327:3975184" compileOnly "curse.maven:inventory-bogo-sorter-632327:4399738"
compileOnly "team.chisel.ctm:CTM:${ctm_version}" compileOnly "team.chisel.ctm:CTM:${ctm_version}"
compileOnly "de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.2-r152.16:api" compileOnly "de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.2-r152.16:api"
deobfCompile "net.sengir.forestry:forestry_${minecraft_version}:$forestry_version" implementation rfg.deobf("net.sengir.forestry:forestry_${minecraft_version}:$forestry_version")
// at runtime, use the full JEI jar // at runtime, use the full JEI jar
runtime "mezz.jei:jei_${minecraft_version}:${jei_version}" runtimeOnly "mezz.jei:jei_${minecraft_version}:${jei_version}"
// unit test dependencies // unit test dependencies
testCompile "junit:junit:4.12" testImplementation "junit:junit:4.12"
} }
+15 -16
View File
@@ -16,40 +16,39 @@
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>. * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/ */
task wrapper(type: Wrapper) {
gradleVersion = "2.14"
}
// HWYLA // HWYLA
task installHwyla(type: Copy, dependsOn: "deinstallHwyla") { tasks.register('installHwyla', Copy) {
dependsOn "deinstallHwyla"
from { configurations.mods } from { configurations.mods }
include "**/*Hwyla*.jar" include "**/*Hwyla*.jar"
into file(minecraft.runDir + "/mods") into file("/run/mods")
} }
task deinstallHwyla(type: Delete) { tasks.register('deinstallHwyla', Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*Hwyla*.jar") delete fileTree(dir: "/run/mods", include: "*Hwyla*.jar")
} }
// IC2 // IC2
task installIC2(type: Copy, dependsOn: "deinstallIC2") { tasks.register('installIC2', Copy) {
dependsOn "deinstallIC2"
from { configurations.mods } from { configurations.mods }
include "**/*industrialcraft-2*.jar" include "**/*industrialcraft-2*.jar"
into file(minecraft.runDir + "/mods") into file("/run/mods")
} }
task deinstallIC2(type: Delete) { tasks.register('deinstallIC2', Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*industrialcraft-2*.jar") delete fileTree(dir: "/run/mods", include: "*industrialcraft-2*.jar")
} }
// TOP // TOP
task installTop(type: Copy, dependsOn: ["deinstallTop"]) { tasks.register('installTop', Copy) {
dependsOn["deinstallTop"]
from { configurations.mods } from { configurations.mods }
include "**/*TheOneProbe*.jar" include "**/*TheOneProbe*.jar"
into file(minecraft.runDir + "/mods") into file("/run/mods")
} }
task deinstallTop(type: Delete) { tasks.register('deinstallTop', Delete) {
delete fileTree(dir: minecraft.runDir + "/mods", include: "*TheOneProbe*.jar") delete fileTree(dir: "/run/mods", include: "*TheOneProbe*.jar")
} }
Binary file not shown.
+2 -1
View File
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8-bin.zip
Vendored
+187 -115
View File
@@ -1,78 +1,129 @@
#!/usr/bin/env sh #!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
############################################################################## ##############################################################################
## #
## Gradle start up script for UN*X # Gradle start up script for POSIX generated by Gradle.
## #
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
############################################################################## ##############################################################################
# Attempt to set APP_HOME # Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle" # Resolve links: $0 may be a link
APP_BASE_NAME=`basename "$0"` app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS="" DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD=maximum
warn () { warn () {
echo "$*" echo "$*"
} } >&2
die () { die () {
echo echo
echo "$*" echo "$*"
echo echo
exit 1 exit 1
} } >&2
# OS specific support (must be 'true' or 'false'). # OS specific support (must be 'true' or 'false').
cygwin=false cygwin=false
msys=false msys=false
darwin=false darwin=false
nonstop=false nonstop=false
case "`uname`" in case "$( uname )" in #(
CYGWIN* ) CYGWIN* ) cygwin=true ;; #(
cygwin=true Darwin* ) darwin=true ;; #(
;; MSYS* | MINGW* ) msys=true ;; #(
Darwin* ) NONSTOP* ) nonstop=true ;;
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD=$JAVA_HOME/jre/sh/java
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD=$JAVA_HOME/bin/java
fi fi
if [ ! -x "$JAVACMD" ] ; then if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -81,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi fi
else else
JAVACMD="java" JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the Please set the JAVA_HOME variable in your environment to match the
@@ -89,84 +140,105 @@ location of your Java installation."
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
MAX_FD_LIMIT=`ulimit -H -n` case $MAX_FD in #(
if [ $? -eq 0 ] ; then max*)
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
MAX_FD="$MAX_FD_LIMIT" # shellcheck disable=SC3045
fi MAX_FD=$( ulimit -H -n ) ||
ulimit -n $MAX_FD warn "Could not query maximum file descriptor limit"
if [ $? -ne 0 ] ; then esac
warn "Could not set maximum file descriptor limit: $MAX_FD" case $MAX_FD in #(
fi '' | soft) :;; #(
else *)
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
fi # shellcheck disable=SC3045
fi ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac esac
fi fi
# Escape application args # Collect all arguments for the java command, stacking in reverse order:
save () { # * args from the command line
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done # * the main class name
echo " " # * -classpath
} # * -D...appname settings
APP_ARGS=$(save "$@") # * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules # For Cygwin or MSYS, switch paths to Windows format before running java
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong JAVACMD=$( cygpath --unix "$JAVACMD" )
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")" # Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@" exec "$JAVACMD" "$@"
+26
View File
@@ -0,0 +1,26 @@
pluginManagement {
repositories {
maven {
// RetroFuturaGradle
name 'GTNH Maven'
//noinspection HttpUrlsUsage
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
allowInsecureProtocol = true
//noinspection GroovyAssignabilityCheck
mavenContent {
includeGroup 'com.gtnewhorizons'
includeGroup 'com.gtnewhorizons.retrofuturagradle'
}
}
gradlePluginPortal()
mavenCentral()
mavenLocal()
}
}
plugins {
// Automatic toolchain provisioning
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0'
}
rootProject.name = rootProject.projectDir.getName()
+1 -1
View File
@@ -22,7 +22,7 @@
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/ */
@API( apiVersion = "@aeversion@", owner = "appliedenergistics2", provides = "appliedenergistics2|API" ) @API(apiVersion = "rv6", owner = "appliedenergistics2", provides = "appliedenergistics2|API")
package appeng.api; package appeng.api;
@@ -22,6 +22,12 @@ package appeng.block;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs; import net.minecraft.block.BlockStairs;
import net.minecraft.block.state.IBlockState;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import javax.annotation.Nonnull;
public abstract class AEBaseStairBlock extends BlockStairs { public abstract class AEBaseStairBlock extends BlockStairs {
@@ -43,4 +49,9 @@ public abstract class AEBaseStairBlock extends BlockStairs {
return this.getClass().getSimpleName() + "[" + regName + "]"; return this.getClass().getSimpleName() + "[" + regName + "]";
} }
@Override
public boolean doesSideBlockChestOpening(@Nonnull IBlockState blockState, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull EnumFacing side) {
return false;
}
} }
@@ -25,21 +25,31 @@ import appeng.bootstrap.components.StateMapperComponent;
import appeng.bootstrap.components.TesrComponent; import appeng.bootstrap.components.TesrComponent;
import appeng.client.render.model.AutoRotatingModel; import appeng.client.render.model.AutoRotatingModel;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ModelResourceLocation; import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.client.renderer.block.statemap.IStateMapper; import net.minecraft.client.renderer.block.statemap.IStateMapper;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.resources.IReloadableResourceManager;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.IResourceManagerReloadListener;
import net.minecraftforge.client.model.IModel; import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.resource.IResourceType;
import net.minecraftforge.client.resource.ISelectiveResourceReloadListener;
import net.minecraftforge.client.resource.VanillaResourceType;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.BiFunction; import java.util.function.BiFunction;
import java.util.function.Predicate;
class BlockRendering implements IBlockRendering { class BlockRendering implements IBlockRendering, ISelectiveResourceReloadListener {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private BiFunction<ModelResourceLocation, IBakedModel, IBakedModel> modelCustomizer; private BiFunction<ModelResourceLocation, IBakedModel, IBakedModel> modelCustomizer;
@@ -56,6 +66,13 @@ class BlockRendering implements IBlockRendering {
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private final Map<String, IModel> builtInModels = new HashMap<>(); private final Map<String, IModel> builtInModels = new HashMap<>();
@SideOnly(Side.CLIENT)
private final List<IResourceManagerReloadListener> reloads = new ArrayList<>();
BlockRendering() {
((IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager()).registerReloadListener(this);
}
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public IBlockRendering modelCustomizer(BiFunction<ModelResourceLocation, IBakedModel, IBakedModel> customizer) { public IBlockRendering modelCustomizer(BiFunction<ModelResourceLocation, IBakedModel, IBakedModel> customizer) {
@@ -103,7 +120,11 @@ class BlockRendering implements IBlockRendering {
} else if (block instanceof AEBaseTileBlock) { } else if (block instanceof AEBaseTileBlock) {
// This is a default rotating model if the base-block uses an AE tile entity which exposes UP/FRONT as // This is a default rotating model if the base-block uses an AE tile entity which exposes UP/FRONT as
// extended props // extended props
factory.addModelOverride(block.getRegistryName().getResourcePath(), (l, m) -> new AutoRotatingModel(m)); factory.addModelOverride(block.getRegistryName().getResourcePath(), (l, m) -> {
AutoRotatingModel model = new AutoRotatingModel(m);
BlockRendering.this.reloads.add(model);
return model;
});
} }
// TODO : 1.12 // TODO : 1.12
@@ -117,4 +138,13 @@ class BlockRendering implements IBlockRendering {
factory.addBootstrapComponent(new StateMapperComponent(block, this.stateMapper)); factory.addBootstrapComponent(new StateMapperComponent(block, this.stateMapper));
} }
} }
@Override
@SideOnly(Side.CLIENT)
public void onResourceManagerReload(IResourceManager resourceManager, Predicate<IResourceType> resourcePredicate) {
if (resourcePredicate.test(VanillaResourceType.MODELS)) {
this.reloads.forEach(listener -> listener.onResourceManagerReload(resourceManager));
}
}
} }
+4 -4
View File
@@ -9,10 +9,10 @@ import static appeng.client.ClientHelper.KEY_CATEGORY;
public enum KeyBindings { public enum KeyBindings {
WT(new KeyBinding("open_wireless_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_T, KEY_CATEGORY)), WT(new KeyBinding("key.open_wireless_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_T, KEY_CATEGORY)),
WCT(new KeyBinding("open_wireless_crafting_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_E, KEY_CATEGORY)), WCT(new KeyBinding("key.open_wireless_crafting_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_E, KEY_CATEGORY)),
WPT(new KeyBinding("open_wireless_pattern_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_R, KEY_CATEGORY)), WPT(new KeyBinding("key.open_wireless_pattern_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_R, KEY_CATEGORY)),
WFT(new KeyBinding("open_wireless_fluid_terminal", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_F, KEY_CATEGORY)); WFT(new KeyBinding("key.open_wireless_fluid_terminal.desc", KeyConflictContext.UNIVERSAL, KeyModifier.SHIFT, Keyboard.KEY_F, KEY_CATEGORY));
private KeyBinding keyBinding; private KeyBinding keyBinding;
@@ -49,6 +49,7 @@ import mezz.jei.api.gui.IGhostIngredientHandler;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.Gui; import net.minecraft.client.gui.Gui;
import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
@@ -568,7 +569,10 @@ public abstract class AEBaseGui extends GuiContainer implements IMTModGuiContain
action = (mouseButton == 1) ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN; action = (mouseButton == 1) ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
stack = ((SlotME) slot).getAEStack(); stack = ((SlotME) slot).getAEStack();
if (stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN && stack.getStackSize() == 0 && player.inventory.getItemStack().isEmpty()) { if (stack != null
&& action == InventoryAction.PICKUP_OR_SET_DOWN
&& (stack.getStackSize() == 0 || GuiScreen.isAltKeyDown())
&& player.inventory.getItemStack().isEmpty()) {
action = InventoryAction.AUTO_CRAFT; action = InventoryAction.AUTO_CRAFT;
} }
@@ -76,6 +76,11 @@ public abstract class AEBaseMEGui extends AEBaseGui {
currentToolTip.add(format); currentToolTip.add(format);
} }
if (myStack.isCraftable() && AEConfig.instance().isShowCraftableTooltip()) {
final String local = ButtonToolTips.ItemsCraftable.getLocal();
currentToolTip.add(TextFormatting.GRAY + local);
}
this.drawHoveringText(currentToolTip, x, y, this.fontRenderer); this.drawHoveringText(currentToolTip, x, y, this.fontRenderer);
return; return;
@@ -50,6 +50,7 @@ import net.minecraft.nbt.NBTUtil;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextComponentString; import net.minecraft.util.text.TextComponentString;
import net.minecraftforge.common.DimensionManager; import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.fml.common.Loader;
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
import java.awt.*; import java.awt.*;
@@ -75,6 +76,8 @@ public class GuiInterfaceTerminal extends AEBaseGui {
private final int offsetX = 21; private final int offsetX = 21;
private int maxRows = Integer.MAX_VALUE; private int maxRows = Integer.MAX_VALUE;
protected int jeiOffset = Loader.isModLoaded("jei") ? 24 : 0;
private int reservedSpace = 0; private int reservedSpace = 0;
private final HashMap<Long, ClientDCInternalInv> byId = new HashMap<>(); private final HashMap<Long, ClientDCInternalInv> byId = new HashMap<>();
@@ -177,9 +180,9 @@ public class GuiInterfaceTerminal extends AEBaseGui {
@Override @Override
public List<Rectangle> getJEIExclusionArea() { public List<Rectangle> getJEIExclusionArea() {
Rectangle craftingCPUArea = new Rectangle(this.guiLeft - 18, this.guiTop, 18, 18); Rectangle tallButton = new Rectangle(this.guiLeft - 18, this.guiTop + 24 + jeiOffset, 18, 18);
List<Rectangle> area = new ArrayList<>(); List<Rectangle> area = new ArrayList<>();
area.add(craftingCPUArea); area.add(tallButton);
return area; return area;
} }
@@ -195,7 +198,7 @@ public class GuiInterfaceTerminal extends AEBaseGui {
guiButtonHide = new GuiImgButton(guiLeft + 141, guiTop + 25, Settings.ACTIONS, this.partInterfaceTerminal.onlyInterfacesWithFreeSlots ? ActionItems.TOGGLE_SHOW_FULL_INTERFACES_OFF : ActionItems.TOGGLE_SHOW_FULL_INTERFACES_ON); guiButtonHide = new GuiImgButton(guiLeft + 141, guiTop + 25, Settings.ACTIONS, this.partInterfaceTerminal.onlyInterfacesWithFreeSlots ? ActionItems.TOGGLE_SHOW_FULL_INTERFACES_OFF : ActionItems.TOGGLE_SHOW_FULL_INTERFACES_ON);
this.buttonList.add(guiButtonHide); this.buttonList.add(guiButtonHide);
this.buttonList.add(this.terminalStyleBox = new GuiImgButton(this.guiLeft - 18, guiTop + 18, Settings.TERMINAL_STYLE, AEConfig.instance() this.buttonList.add(this.terminalStyleBox = new GuiImgButton(this.guiLeft - 18, guiTop + 24 + jeiOffset, Settings.TERMINAL_STYLE, AEConfig.instance()
.getConfigManager() .getConfigManager()
.getSetting(Settings.TERMINAL_STYLE))); .getSetting(Settings.TERMINAL_STYLE)));
@@ -319,7 +319,6 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
this.searchField.setText(memoryText); this.searchField.setText(memoryText);
this.searchField.selectAll(); this.searchField.selectAll();
this.repo.setSearchString(memoryText); this.repo.setSearchString(memoryText);
this.repo.updateView();
this.setScrollBar(); this.setScrollBar();
} }
@@ -381,7 +380,6 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if (btn == 1 && this.searchField.isMouseIn(xCoord, yCoord)) { if (btn == 1 && this.searchField.isMouseIn(xCoord, yCoord)) {
this.searchField.setText(""); this.searchField.setText("");
this.repo.setSearchString(""); this.repo.setSearchString("");
this.repo.updateView();
this.setScrollBar(); this.setScrollBar();
} }
@@ -476,7 +474,6 @@ public class GuiMEMonitorable extends AEBaseMEGui implements ISortSource, IConfi
if (this.searchField.textboxKeyTyped(character, key)) { if (this.searchField.textboxKeyTyped(character, key)) {
this.repo.setSearchString(this.searchField.getText()); this.repo.setSearchString(this.searchField.getText());
this.repo.updateView();
this.setScrollBar(); this.setScrollBar();
// tell forge the key event is handled and should not be sent out // tell forge the key event is handled and should not be sent out
this.keyHandled = mouseInGui; this.keyHandled = mouseInGui;
@@ -34,7 +34,7 @@ public class GuiOreDictStorageBus extends AEBaseGui {
private GuiImgButton partition; private GuiImgButton partition;
private GuiImgButton storageFilter; private GuiImgButton storageFilter;
private GuiImgButton rwMode; private GuiImgButton rwMode;
private static final Pattern ORE_DICTIONARY_FILTER = Pattern.compile("[(!]* *[0-9a-zA-Z*]* *\\)*( *[&|^]? *[(!]* *[0-9a-zA-Z*]* *\\)*)*"); private static final Pattern ORE_DICTIONARY_FILTER = Pattern.compile("[0-9a-zA-Z* &|^!()]*");
private MEGuiTextField searchFieldInputs; private MEGuiTextField searchFieldInputs;
public GuiOreDictStorageBus(final InventoryPlayer inventoryPlayer, final PartOreDicStorageBus te) { public GuiOreDictStorageBus(final InventoryPlayer inventoryPlayer, final PartOreDicStorageBus te) {
@@ -37,6 +37,9 @@ public class GuiNumberBox extends GuiTextField {
final String original = this.getText(); final String original = this.getText();
super.writeText(selectedText); super.writeText(selectedText);
if (this.getText().isEmpty()) {
return;
}
try { try {
if (this.type == int.class || this.type == Integer.class) { if (this.type == int.class || this.type == Integer.class) {
Integer.parseInt(this.getText()); Integer.parseInt(this.getText());
+125 -71
View File
@@ -37,7 +37,7 @@ import net.minecraft.item.ItemStack;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Comparator;
import java.util.List; import java.util.List;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@@ -45,7 +45,7 @@ import java.util.regex.Pattern;
public class ItemRepo { public class ItemRepo {
private final IItemList<IAEItemStack> list = AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class).createList(); private final IItemList<IAEItemStack> list = AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class).createList();
private final ArrayList<IAEItemStack> view = new ArrayList<>(); private List<IAEItemStack> view = new ArrayList<>();
private final IScrollSource src; private final IScrollSource src;
private final ISortSource sortSrc; private final ISortSource sortSrc;
@@ -56,6 +56,16 @@ public class ItemRepo {
private String innerSearch = ""; private String innerSearch = "";
private boolean hasPower; private boolean hasPower;
private Enum lastView;
private Enum lastSearchMode;
private Enum lastSortBy;
private Enum lastSortDir;
private String lastSearch = "";
private boolean resort = true;
private boolean changed = false;
public ItemRepo(final IScrollSource src, final ISortSource sortSrc) { public ItemRepo(final IScrollSource src, final ISortSource sortSrc) {
this.src = src; this.src = src;
this.sortSrc = sortSrc; this.sortSrc = sortSrc;
@@ -83,6 +93,8 @@ public class ItemRepo {
} else { } else {
this.list.add(is); this.list.add(is);
} }
changed = true;
} }
public long getItemCount(final IAEItemStack is) { public long getItemCount(final IAEItemStack is) {
@@ -92,22 +104,88 @@ public class ItemRepo {
public void setViewCell(final ItemStack[] list) { public void setViewCell(final ItemStack[] list) {
this.myPartitionList = ItemViewCell.createFilter(list); this.myPartitionList = ItemViewCell.createFilter(list);
this.updateView(); this.changed = true;
} }
public void updateView() { public void updateView() {
this.view.clear();
this.view.ensureCapacity(this.list.size());
final Enum viewMode = this.sortSrc.getSortDisplay(); final Enum viewMode = this.sortSrc.getSortDisplay();
if (lastView != viewMode) {
resort = true;
lastView = viewMode;
}
final Enum searchMode = AEConfig.instance().getConfigManager().getSetting(Settings.SEARCH_MODE); final Enum searchMode = AEConfig.instance().getConfigManager().getSetting(Settings.SEARCH_MODE);
final boolean needsZeroCopy = viewMode == ViewItems.CRAFTABLE; if (lastSearchMode != searchMode) {
resort = true;
lastSearchMode = searchMode;
}
if (searchMode == SearchBoxMode.JEI_AUTOSEARCH || searchMode == SearchBoxMode.JEI_MANUAL_SEARCH || searchMode == SearchBoxMode.JEI_AUTOSEARCH_KEEP || searchMode == SearchBoxMode.JEI_MANUAL_SEARCH_KEEP) { if (searchMode == SearchBoxMode.JEI_AUTOSEARCH || searchMode == SearchBoxMode.JEI_MANUAL_SEARCH || searchMode == SearchBoxMode.JEI_AUTOSEARCH_KEEP || searchMode == SearchBoxMode.JEI_MANUAL_SEARCH_KEEP) {
this.updateJEI(this.searchString); this.updateJEI(this.searchString);
} }
if (!lastSearch.equals(searchString)) {
resort = true;
lastSearch = searchString;
}
final Enum sortBy = this.sortSrc.getSortBy();
final Enum sortDir = this.sortSrc.getSortDir();
if (lastSortBy != sortBy) {
resort = true;
lastSortBy = sortBy;
}
if (lastSortDir != sortDir) {
resort = true;
lastSortDir = sortDir;
}
if (changed || resort) {
changed = false;
resort = false;
view = new ArrayList<>();
ItemSorters.setDirection((appeng.api.config.SortDir) sortDir);
ItemSorters.init();
Comparator<IAEItemStack> c = getComparator(sortBy);
for (IAEItemStack is : this.list) {
addIAE(is, viewMode);
}
view.sort(c);
}
}
private static Comparator<IAEItemStack> getComparator(Enum sortBy) {
Comparator<IAEItemStack> c;
if (sortBy == SortOrder.MOD) {
c = ItemSorters.CONFIG_BASED_SORT_BY_MOD;
} else if (sortBy == SortOrder.AMOUNT) {
c = ItemSorters.CONFIG_BASED_SORT_BY_SIZE;
} else if (sortBy == SortOrder.INVTWEAKS) {
if (InventoryBogoSortModule.isLoaded()) {
c = InventoryBogoSortModule.COMPARATOR;
} else {
c = ItemSorters.CONFIG_BASED_SORT_BY_INV_TWEAKS;
}
} else {
c = ItemSorters.CONFIG_BASED_SORT_BY_NAME;
}
return c;
}
private void addIAE(IAEItemStack is, Enum viewMode) {
final boolean needsZeroCopy = viewMode == ViewItems.CRAFTABLE;
final boolean terminalSearchToolTips = AEConfig.instance().getConfigManager().getSetting(Settings.SEARCH_TOOLTIPS) != YesNo.NO; final boolean terminalSearchToolTips = AEConfig.instance().getConfigManager().getSetting(Settings.SEARCH_TOOLTIPS) != YesNo.NO;
boolean searchMod = false; boolean searchMod = false;
@@ -129,76 +207,52 @@ public class ItemRepo {
} }
} }
boolean notDone = false; if (this.myPartitionList != null) {
for (IAEItemStack is : this.list) { if (!this.myPartitionList.isListed(is)) {
if (this.myPartitionList != null) { return;
if (!this.myPartitionList.isListed(is)) {
continue;
}
}
if (viewMode == ViewItems.CRAFTABLE && !is.isCraftable()) {
continue;
}
if (viewMode == ViewItems.STORED && is.getStackSize() == 0) {
continue;
}
final String dspName = (searchMod ? Platform.getModId(is) : Platform.getItemDisplayName(is)).toLowerCase();
boolean foundMatchingItemStack = true;
for (String term : innerSearch.split(" ")) {
if (term.length() > 1 && (term.startsWith("-") || term.startsWith("!"))) {
term = term.substring(1);
if (dspName.contains(term)) {
foundMatchingItemStack = false;
break;
}
} else if (!dspName.contains(term)) {
foundMatchingItemStack = false;
break;
}
}
if (terminalSearchToolTips && !foundMatchingItemStack) {
final List<String> tooltip = Platform.getTooltip(is);
for (final String line : tooltip) {
if (m.matcher(line).find()) {
foundMatchingItemStack = true;
break;
}
}
}
if (foundMatchingItemStack) {
if (needsZeroCopy) {
is = is.copy();
is.setStackSize(0);
}
this.view.add(is);
} }
} }
final Enum SortBy = this.sortSrc.getSortBy(); if (viewMode == ViewItems.CRAFTABLE && !is.isCraftable()) {
final Enum SortDir = this.sortSrc.getSortDir(); return;
}
ItemSorters.setDirection((appeng.api.config.SortDir) SortDir); if (viewMode == ViewItems.STORED && is.getStackSize() == 0) {
ItemSorters.init(); return;
}
if (SortBy == SortOrder.MOD) { final String dspName = (searchMod ? Platform.getModId(is) : Platform.getItemDisplayName(is)).toLowerCase();
Collections.sort(this.view, ItemSorters.CONFIG_BASED_SORT_BY_MOD); boolean foundMatchingItemStack = true;
} else if (SortBy == SortOrder.AMOUNT) {
Collections.sort(this.view, ItemSorters.CONFIG_BASED_SORT_BY_SIZE); for (String term : innerSearch.split(" ")) {
} else if (SortBy == SortOrder.INVTWEAKS) { if (term.length() > 1 && (term.startsWith("-") || term.startsWith("!"))) {
if (InventoryBogoSortModule.isLoaded()) { term = term.substring(1);
Collections.sort(this.view, InventoryBogoSortModule.COMPARATOR); if (dspName.contains(term)) {
} else { foundMatchingItemStack = false;
Collections.sort(this.view, ItemSorters.CONFIG_BASED_SORT_BY_INV_TWEAKS); break;
}
} else if (!dspName.contains(term)) {
foundMatchingItemStack = false;
break;
} }
} else { }
Collections.sort(this.view, ItemSorters.CONFIG_BASED_SORT_BY_NAME);
if (terminalSearchToolTips && !foundMatchingItemStack) {
final List<String> tooltip = Platform.getTooltip(is);
for (final String line : tooltip) {
if (m.matcher(line).find()) {
foundMatchingItemStack = true;
break;
}
}
}
if (foundMatchingItemStack) {
if (needsZeroCopy) {
is = is.copy();
is.setStackSize(0);
}
this.view.add(is);
} }
} }
@@ -26,6 +26,7 @@ import appeng.util.ISlimReadableNumberConverter;
import appeng.util.IWideReadableNumberConverter; import appeng.util.IWideReadableNumberConverter;
import appeng.util.ReadableNumberConverter; import appeng.util.ReadableNumberConverter;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
@@ -48,7 +49,7 @@ public class StackSizeRenderer {
final boolean unicodeFlag = fontRenderer.getUnicodeFlag(); final boolean unicodeFlag = fontRenderer.getUnicodeFlag();
fontRenderer.setUnicodeFlag(false); fontRenderer.setUnicodeFlag(false);
if (aeStack.getStackSize() == 0 && aeStack.isCraftable()) { if ((aeStack.getStackSize() == 0 || GuiScreen.isAltKeyDown()) && aeStack.isCraftable()) {
final String craftLabelText = AEConfig.instance().useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft final String craftLabelText = AEConfig.instance().useTerminalUseLargeFont() ? GuiText.LargeFontCraft.getLocal() : GuiText.SmallFontCraft
.getLocal(); .getLocal();
GlStateManager.disableLighting(); GlStateManager.disableLighting();
@@ -64,8 +65,7 @@ public class StackSizeRenderer {
GlStateManager.enableDepth(); GlStateManager.enableDepth();
GlStateManager.enableBlend(); GlStateManager.enableBlend();
} }
else if (aeStack.getStackSize() > 0) {
if (aeStack.getStackSize() > 0) {
final String stackSize = this.getToBeRenderedStackSize(aeStack.getStackSize()); final String stackSize = this.getToBeRenderedStackSize(aeStack.getStackSize());
GlStateManager.disableLighting(); GlStateManager.disableLighting();
@@ -22,6 +22,7 @@ package appeng.client.render.cablebus;
import appeng.api.util.AECableType; import appeng.api.util.AECableType;
import appeng.api.util.AEColor; import appeng.api.util.AEColor;
import appeng.core.AppEng; import appeng.core.AppEng;
import appeng.core.AEConfig;
import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.renderer.vertex.VertexFormat;
@@ -327,8 +328,8 @@ class CableBuilder {
TextureAtlasSprite texture = this.connectionTextures.get(AECableType.SMART).get(cableColor); TextureAtlasSprite texture = this.connectionTextures.get(AECableType.SMART).get(cableColor);
cubeBuilder.setTexture(texture); cubeBuilder.setTexture(texture);
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels(channels); TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels((int) (channels / (AEConfig.instance().getNormalChannelCapacity() / 8)));
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels(channels); TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels((int) (channels / (AEConfig.instance().getNormalChannelCapacity() / 8)));
// For to-machine connections, use a thicker end-cap for the connection // For to-machine connections, use a thicker end-cap for the connection
if (connectionType != AECableType.GLASS && !cableBusAdjacent) { if (connectionType != AECableType.GLASS && !cableBusAdjacent) {
@@ -374,8 +375,8 @@ class CableBuilder {
addStraightCoveredCableSizedCube(facing, cubeBuilder); addStraightCoveredCableSizedCube(facing, cubeBuilder);
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels(channels); TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels((int) (channels / (AEConfig.instance().getNormalChannelCapacity() / 8)));
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels(channels); TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels((int) (channels / (AEConfig.instance().getNormalChannelCapacity() / 8)));
// Render the channel indicators brightly lit at night // Render the channel indicators brightly lit at night
cubeBuilder.setRenderFullBright(true); cubeBuilder.setRenderFullBright(true);
@@ -403,8 +404,8 @@ class CableBuilder {
addCoveredCableSizedCube(facing, distanceFromEdge, cubeBuilder); addCoveredCableSizedCube(facing, distanceFromEdge, cubeBuilder);
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels(channels); TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels((int) (channels / (AEConfig.instance().getNormalChannelCapacity() / 8)));
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels(channels); TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels((int) (channels / (AEConfig.instance().getNormalChannelCapacity() / 8)));
// Render the channel indicators brightly lit at night // Render the channel indicators brightly lit at night
cubeBuilder.setRenderFullBright(true); cubeBuilder.setRenderFullBright(true);
@@ -464,7 +465,7 @@ class CableBuilder {
addDenseCableSizedCube(facing, cubeBuilder); addDenseCableSizedCube(facing, cubeBuilder);
// Dense cables show used channels in groups of 4, rounded up // Dense cables show used channels in groups of 4, rounded up
channels = (channels + 3) / 4; channels = (int) ((channels + 3) / 4) / (AEConfig.instance().getDenseChannelCapacity() / 32);
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels(channels); TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels(channels);
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels(channels); TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels(channels);
@@ -508,7 +509,7 @@ class CableBuilder {
addStraightDenseCableSizedCube(facing, cubeBuilder); addStraightDenseCableSizedCube(facing, cubeBuilder);
// Dense cables show used channels in groups of 4, rounded up // Dense cables show used channels in groups of 4, rounded up
channels = (channels + 3) / 4; channels = (int) ((channels + 3) / 4) / (AEConfig.instance().getDenseChannelCapacity() / 32);
TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels(channels); TextureAtlasSprite oddChannel = this.smartCableTextures.getOddTextureForChannels(channels);
TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels(channels); TextureAtlasSprite evenChannel = this.smartCableTextures.getEvenTextureForChannels(channels);
@@ -45,7 +45,7 @@ import java.util.Map.Entry;
public class CableBusBakedModel implements IBakedModel { public class CableBusBakedModel implements IBakedModel {
private static final Map<CableBusRenderState, List<BakedQuad>> CABLE_MODEL_CACHE = new HashMap<>(); static final Map<CableBusRenderState, List<BakedQuad>> CABLE_MODEL_CACHE = new HashMap<>();
private final CableBuilder cableBuilder; private final CableBuilder cableBuilder;
@@ -27,21 +27,26 @@ import com.google.common.collect.ImmutableMap;
import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModel; import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.ModelLoaderRegistry; import net.minecraftforge.client.model.ModelLoaderRegistry;
import net.minecraftforge.client.resource.IResourceType;
import net.minecraftforge.client.resource.ISelectiveResourceReloadListener;
import net.minecraftforge.client.resource.VanillaResourceType;
import net.minecraftforge.common.model.IModelState; import net.minecraftforge.common.model.IModelState;
import net.minecraftforge.common.model.TRSRTransformation; import net.minecraftforge.common.model.TRSRTransformation;
import java.util.Collection; import java.util.Collection;
import java.util.Map; import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
import java.util.function.Predicate;
/** /**
* The built-in model for the cable bus block. * The built-in model for the cable bus block.
*/ */
public class CableBusModel implements IModel { public class CableBusModel implements IModel, ISelectiveResourceReloadListener {
private final PartModels partModels; private final PartModels partModels;
@@ -101,4 +106,12 @@ public class CableBusModel implements IModel {
public IModelState getDefaultState() { public IModelState getDefaultState() {
return TRSRTransformation.identity(); return TRSRTransformation.identity();
} }
@Override
public void onResourceManagerReload(IResourceManager resourceManager, Predicate<IResourceType> resourcePredicate) {
if (resourcePredicate.test(VanillaResourceType.MODELS)) {
CableBusBakedModel.CABLE_MODEL_CACHE.clear();
}
}
} }
@@ -21,7 +21,6 @@ package appeng.client.render.model;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.client.render.FacingToRotation; import appeng.client.render.FacingToRotation;
import com.google.common.base.Objects;
import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader; import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache; import com.google.common.cache.LoadingCache;
@@ -31,22 +30,21 @@ import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms; import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.block.model.ItemOverrideList; import net.minecraft.client.renderer.block.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat; import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.renderer.vertex.VertexFormatElement; import net.minecraft.client.resources.IResourceManagerReloadListener;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.Vec3i;
import net.minecraftforge.client.model.pipeline.IVertexConsumer;
import net.minecraftforge.client.model.pipeline.QuadGatheringTransformer;
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
import net.minecraftforge.common.property.IExtendedBlockState; import net.minecraftforge.common.property.IExtendedBlockState;
import javax.vecmath.Vector3f; import javax.vecmath.Matrix4f;
import javax.vecmath.Tuple4f;
import javax.vecmath.Vector4f; import javax.vecmath.Vector4f;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import static net.minecraft.util.EnumFacing.DOWN;
public class AutoRotatingModel implements IBakedModel {
public class AutoRotatingModel implements IBakedModel, IResourceManagerReloadListener {
private final IBakedModel parent; private final IBakedModel parent;
private final LoadingCache<AutoRotatingCacheKey, List<BakedQuad>> quadCache; private final LoadingCache<AutoRotatingCacheKey, List<BakedQuad>> quadCache;
@@ -66,34 +64,171 @@ public class AutoRotatingModel implements IBakedModel {
FacingToRotation f2r = FacingToRotation.get(forward, up); FacingToRotation f2r = FacingToRotation.get(forward, up);
List<BakedQuad> original = AutoRotatingModel.this.parent.getQuads(state, f2r.resultingRotate(side), 0); List<BakedQuad> original = AutoRotatingModel.this.parent.getQuads(state, f2r.resultingRotate(side), 0);
List<BakedQuad> rotated = new ArrayList<>(original.size()); List<BakedQuad> rotated = new ArrayList<>(original.size());
for (BakedQuad quad : original) {
VertexFormat format = quad.getFormat();
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder(format);
VertexRotator rot = new VertexRotator(f2r, quad.getFace());
rot.setParent(builder);
quad.pipe(rot);
if (quad.getFace() != null) {
builder.setQuadOrientation(f2r.rotate(quad.getFace()));
} else {
builder.setQuadOrientation(null);
} final Matrix4f transformMatrix = new Matrix4f();
BakedQuad unpackedQuad = builder.build(); final Tuple4f vertexTransformingVec = new Vector4f();
// Make a copy of it to resolve the vertex data and throw away the unpacked stuff // Transform the matrix so the top and front facings of the model matches the block in-world
// This also fixes a bug in Forge's UnpackedBakedQuad, which unpacks a byte-based normal like 0,0,-1 transformMatrixByFacings(transformMatrix, up, forward);
// to 0,0,-0.99607843. We replace these normals with the proper 0,0,-1 when rotation, which
// causes a bug in the AO lighter, if an unpacked quad pipes this value back to it. for (BakedQuad b : original) {
// Packing it back to the vanilla vertex format will fix this inconsistency because it converts EnumFacing newFace = f2r.rotate(b.getFace());
// the normal back to a byte-based format, which then re-applies Forge's own bug when piping it rotated.add(rebakeQuad(b, newFace, transformMatrix, vertexTransformingVec));
// to the AO lighter, thus fixing our problem.
BakedQuad packedQuad = new BakedQuad(unpackedQuad.getVertexData(), quad.getTintIndex(), unpackedQuad.getFace(), quad.getSprite(), quad
.shouldApplyDiffuseLighting(), quad.getFormat());
rotated.add(packedQuad);
} }
return rotated; return rotated;
} }
private void transformMatrixByFacings(Matrix4f transformMatrix, EnumFacing topFacing, EnumFacing frontFacing) {
Matrix4f intermediaryMatrix = new Matrix4f();
transformMatrix.setIdentity();
moveToPivot(transformMatrix, intermediaryMatrix, true);
if (topFacing.getAxis() == EnumFacing.Axis.Y) {
switch (frontFacing) {
case NORTH:
rotateY(transformMatrix, intermediaryMatrix, (float) (0));
break;
case SOUTH:
rotateY(transformMatrix, intermediaryMatrix, (float) (-Math.PI));
break;
case EAST:
rotateY(transformMatrix, intermediaryMatrix, (float) (-Math.PI / 2));
break;
case WEST:
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI / 2));
break;
}
if (topFacing == DOWN) {
rotateX(transformMatrix, intermediaryMatrix, (float) (Math.PI));
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI));
}
} else {
switch (topFacing) {
case WEST:
rotateZ(transformMatrix, intermediaryMatrix, (float) (Math.PI / 2));
switch (frontFacing) {
case DOWN:
rotateY(transformMatrix, intermediaryMatrix, (float) (-Math.PI / 2));
break;
case UP:
rotateY(transformMatrix, intermediaryMatrix, (float) (+Math.PI / 2));
break;
case SOUTH:
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI));
}
break;
case EAST:
rotateZ(transformMatrix, intermediaryMatrix, (float) (-Math.PI / 2));
switch (frontFacing) {
case DOWN:
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI / 2));
break;
case UP:
rotateY(transformMatrix, intermediaryMatrix, (float) (-Math.PI / 2));
break;
case SOUTH:
rotateY(transformMatrix, intermediaryMatrix, (float) (-Math.PI));
}
break;
case NORTH:
rotateX(transformMatrix, intermediaryMatrix, (float) (-Math.PI / 2));
switch (frontFacing) {
case DOWN:
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI));
break;
case EAST:
rotateY(transformMatrix, intermediaryMatrix, (float) (-Math.PI / 2));
break;
case WEST:
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI / 2));
}
break;
default:
rotateX(transformMatrix, intermediaryMatrix, (float) (Math.PI / 2));
switch (frontFacing) {
case UP:
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI));
break;
case EAST:
rotateY(transformMatrix, intermediaryMatrix, (float) (-Math.PI / 2));
break;
case SOUTH:
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI / 2));
break;
case WEST:
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI / 2));
break;
}
}
if (frontFacing.getAxis() == EnumFacing.Axis.Y) {
//rotateX(transformMatrix, intermediaryMatrix, (float) (Math.PI));
rotateY(transformMatrix, intermediaryMatrix, (float) (Math.PI));
}
}
moveToPivot(transformMatrix, intermediaryMatrix, false);
}
private void moveToPivot(Matrix4f matrix, Matrix4f intermediary, boolean positive) {
intermediary.setIdentity();
float pivot = positive ? .5F : -.5F;
intermediary.m03 = pivot;
intermediary.m13 = pivot;
intermediary.m23 = pivot;
matrix.mul(intermediary);
}
private void rotateX(Matrix4f matrix, Matrix4f intermediary, float angle) {
intermediary.setIdentity();
intermediary.rotX(angle);
matrix.mul(intermediary);
}
private void rotateY(Matrix4f matrix, Matrix4f intermediary, float angle) {
intermediary.setIdentity();
intermediary.rotY(angle);
matrix.mul(intermediary);
}
private void rotateZ(Matrix4f matrix, Matrix4f intermediary, float angle) {
intermediary.setIdentity();
intermediary.rotZ(angle);
matrix.mul(intermediary);
}
private BakedQuad rebakeQuad(BakedQuad b, EnumFacing newFacing, Matrix4f transformMatrix, Tuple4f vertexTransformingVec) {
int[] newQuad = new int[28];
int[] quadData = b.getVertexData();
for (int k = 0; k < 4; ++k) {
// Getting the offset for the current vertex.
int vertexIndex = k * 7;
vertexTransformingVec.x = Float.intBitsToFloat(quadData[vertexIndex]);
vertexTransformingVec.y = Float.intBitsToFloat(quadData[vertexIndex + 1]);
vertexTransformingVec.z = Float.intBitsToFloat(quadData[vertexIndex + 2]);
vertexTransformingVec.w = 1;
// Transforming it by the model matrix.
transformMatrix.transform(vertexTransformingVec);
// Converting the new data to ints.
int x = Float.floatToRawIntBits(vertexTransformingVec.x);
int y = Float.floatToRawIntBits(vertexTransformingVec.y);
int z = Float.floatToRawIntBits(vertexTransformingVec.z);
// Vertex position data
newQuad[vertexIndex] = x;
newQuad[vertexIndex + 1] = y;
newQuad[vertexIndex + 2] = z;
newQuad[vertexIndex + 3] = quadData[vertexIndex + 3];
newQuad[vertexIndex + 4] = quadData[vertexIndex + 4]; //texture
newQuad[vertexIndex + 5] = quadData[vertexIndex + 5];
// Vertex brightness
newQuad[vertexIndex + 6] = 0x81818181;
}
return new BakedQuad(newQuad, b.getTintIndex(), newFacing, b.getSprite(), b.shouldApplyDiffuseLighting(), b.getFormat());
}
@Override @Override
public boolean isAmbientOcclusion() { public boolean isAmbientOcclusion() {
return this.parent.isAmbientOcclusion(); return this.parent.isAmbientOcclusion();
@@ -152,140 +287,9 @@ public class AutoRotatingModel implements IBakedModel {
return this.quadCache.getUnchecked(key); return this.quadCache.getUnchecked(key);
} }
public static class VertexRotator extends QuadGatheringTransformer { @Override
private final FacingToRotation f2r; public void onResourceManagerReload(IResourceManager resourceManager) {
private final EnumFacing face; this.quadCache.invalidateAll();
public VertexRotator(FacingToRotation f2r, EnumFacing face) {
this.f2r = f2r;
this.face = face;
}
@Override
public void setParent(IVertexConsumer parent) {
super.setParent(parent);
if (Objects.equal(this.getVertexFormat(), parent.getVertexFormat())) {
return;
}
this.setVertexFormat(parent.getVertexFormat());
}
@Override
protected void processQuad() {
VertexFormat format = this.parent.getVertexFormat();
int count = format.getElementCount();
for (int v = 0; v < 4; v++) {
for (int e = 0; e < count; e++) {
VertexFormatElement element = format.getElement(e);
if (element.getUsage() == VertexFormatElement.EnumUsage.POSITION) {
this.parent.put(e, this.transform(this.quadData[e][v]));
} else if (element.getUsage() == VertexFormatElement.EnumUsage.NORMAL) {
this.parent.put(e, this.transformNormal(this.quadData[e][v]));
} else {
this.parent.put(e, this.quadData[e][v]);
}
}
}
}
private float[] transform(float[] fs) {
switch (fs.length) {
case 3:
Vector3f vec = new Vector3f(fs[0], fs[1], fs[2]);
vec.x -= 0.5f;
vec.y -= 0.5f;
vec.z -= 0.5f;
this.f2r.getMat().transform(vec);
vec.x += 0.5f;
vec.y += 0.5f;
vec.z += 0.5f;
return new float[]{vec.x, vec.y, vec.z
};
case 4:
Vector4f vecc = new Vector4f(fs[0], fs[1], fs[2], fs[3]);
vecc.x -= 0.5f;
vecc.y -= 0.5f;
vecc.z -= 0.5f;
this.f2r.getMat().transform(vecc);
vecc.x += 0.5f;
vecc.y += 0.5f;
vecc.z += 0.5f;
return new float[]{vecc.x, vecc.y, vecc.z, vecc.w
};
default:
return fs;
}
}
private float[] transformNormal(float[] fs) {
if (this.face == null) {
switch (fs.length) {
case 3:
Vector3f vec = new Vector3f(fs);
this.f2r.getMat().transform(vec);
return new float[]{
vec.getX(),
vec.getY(),
vec.getZ()
};
case 4:
Vector4f vec4 = new Vector4f(fs);
this.f2r.getMat().transform(vec4);
return new float[]{
vec4.getX(),
vec4.getY(),
vec4.getZ(),
0
};
default:
return fs;
}
} else {
switch (fs.length) {
case 3:
Vec3i vec = this.f2r.rotate(this.face).getDirectionVec();
return new float[]{
vec.getX(),
vec.getY(),
vec.getZ()
};
case 4:
Vector4f veccc = new Vector4f(fs[0], fs[1], fs[2], fs[3]);
Vec3i vecc = this.f2r.rotate(this.face).getDirectionVec();
return new float[]{
vecc.getX(),
vecc.getY(),
vecc.getZ(),
veccc.w
};
default:
return fs;
}
}
}
@Override
public void setQuadTint(int tint) {
this.parent.setQuadTint(tint);
}
@Override
public void setQuadOrientation(EnumFacing orientation) {
this.parent.setQuadOrientation(orientation);
}
@Override
public void setApplyDiffuseLighting(boolean diffuse) {
this.parent.setApplyDiffuseLighting(diffuse);
}
@Override
public void setTexture(TextureAtlasSprite texture) {
this.parent.setTexture(texture);
}
} }
} }
@@ -18,31 +18,36 @@
package appeng.client.render.model; package appeng.client.render.model;
import appeng.block.storage.BlockDrive; import appeng.block.storage.BlockDrive;
import appeng.block.storage.DriveSlotState; import appeng.block.storage.DriveSlotState;
import appeng.block.storage.DriveSlotsState; import appeng.block.storage.DriveSlotsState;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.BakedQuad; import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.client.renderer.block.model.IBakedModel; import net.minecraft.client.renderer.block.model.IBakedModel;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms; import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.renderer.block.model.ItemOverrideList; import net.minecraft.client.renderer.block.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.IResourceManagerReloadListener;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
import net.minecraftforge.common.property.IExtendedBlockState; import net.minecraftforge.common.property.IExtendedBlockState;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import javax.vecmath.Matrix4f; import javax.vecmath.Matrix4f;
import javax.vecmath.Tuple4f;
import javax.vecmath.Vector3f; import javax.vecmath.Vector3f;
import javax.vecmath.Vector4f;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
public class DriveBakedModel implements IBakedModel, IResourceManagerReloadListener {
public class DriveBakedModel implements IBakedModel {
private final IBakedModel bakedBase; private final IBakedModel bakedBase;
private final Map<DriveSlotState, IBakedModel> bakedCells; private final Map<DriveSlotState, IBakedModel> bakedCells;
private final Int2ObjectMap<Map<DriveSlotState, List<BakedQuad>>> slot2DSMap = new Int2ObjectOpenHashMap<>();
public DriveBakedModel(IBakedModel bakedBase, Map<DriveSlotState, IBakedModel> bakedCells) { public DriveBakedModel(IBakedModel bakedBase, Map<DriveSlotState, IBakedModel> bakedCells) {
this.bakedBase = bakedBase; this.bakedBase = bakedBase;
@@ -54,8 +59,7 @@ public class DriveBakedModel implements IBakedModel {
List<BakedQuad> result = new ArrayList<>(this.bakedBase.getQuads(state, side, rand)); List<BakedQuad> result = new ArrayList<>(this.bakedBase.getQuads(state, side, rand));
if (side == null && state instanceof IExtendedBlockState) { if (side == null && state instanceof IExtendedBlockState extState) {
IExtendedBlockState extState = (IExtendedBlockState) state;
if (!extState.getUnlistedNames().contains(BlockDrive.SLOTS_STATE)) { if (!extState.getUnlistedNames().contains(BlockDrive.SLOTS_STATE)) {
return result; return result;
@@ -63,30 +67,38 @@ public class DriveBakedModel implements IBakedModel {
DriveSlotsState slotsState = extState.getValue(BlockDrive.SLOTS_STATE); DriveSlotsState slotsState = extState.getValue(BlockDrive.SLOTS_STATE);
for (int row = 0; row < 5; row++) { for (int row = 0; row < 5; row++) {
for (int col = 0; col < 2; col++) { for (int col = 0; col < 2; col++) {
DriveSlotState slotState = slotsState.getState(row * 2 + col); int slot = row * 2 + col;
IBakedModel bakedCell = this.bakedCells.get(slotState); DriveSlotState slotState = slotsState.getState(slot);
Matrix4f transform = new Matrix4f(); slot2DSMap.putIfAbsent(slot, new Object2ObjectOpenHashMap<>());
transform.setIdentity(); int finalCol = col;
int finalRow = row;
List<BakedQuad> lbq = slot2DSMap.get(slot).computeIfAbsent(slotState, q -> {
List<BakedQuad> res = new ArrayList<>();
IBakedModel bakedCell = this.bakedCells.get(slotState);
// Position this drive model copy at the correct slot. The transform is based on the final Matrix4f transformMatrix = new Matrix4f();
// cell-model being in slot 0,0 at the top left of the drive. transformMatrix.setIdentity();
float xOffset = -col * 7 / 16.0f; final Tuple4f transform = new Vector4f();
float yOffset = -row * 3 / 16.0f;
transform.setTranslation(new Vector3f(xOffset, yOffset, 0)); // Position this drive model copy at the correct slot. The transform is based on
// the
// cell-model being in slot 0,0 at the top left of the drive.
float xOffset = -finalCol * 8 / 16.0f;
float yOffset = -finalRow * 3 / 16.0f;
MatrixVertexTransformer transformer = new MatrixVertexTransformer(transform); transformMatrix.setTranslation(new Vector3f(xOffset, yOffset, 0));
for (BakedQuad bakedQuad : bakedCell.getQuads(state, null, rand)) {
UnpackedBakedQuad.Builder builder = new UnpackedBakedQuad.Builder(bakedQuad.getFormat()); for (BakedQuad bakedQuad : bakedCell.getQuads(state, null, rand)) {
transformer.setParent(builder); res.add(rebakeQuad(bakedQuad, transformMatrix, transform));
transformer.setVertexFormat(builder.getVertexFormat()); }
bakedQuad.pipe(transformer); return res;
result.add(builder.build()); });
} result.addAll(lbq);
} }
} }
} }
@@ -94,6 +106,41 @@ public class DriveBakedModel implements IBakedModel {
return result; return result;
} }
private BakedQuad rebakeQuad(BakedQuad b, Matrix4f transformMatrix, Tuple4f vertexTransformingVec) {
int[] newQuad = new int[28];
int[] quadData = b.getVertexData();
for (int k = 0; k < 4; ++k) {
// Getting the offset for the current vertex.
int vertexIndex = k * 7;
vertexTransformingVec.x = Float.intBitsToFloat(quadData[vertexIndex]);
vertexTransformingVec.y = Float.intBitsToFloat(quadData[vertexIndex + 1]);
vertexTransformingVec.z = Float.intBitsToFloat(quadData[vertexIndex + 2]);
vertexTransformingVec.w = 1;
// Transforming it by the model matrix.
transformMatrix.transform(vertexTransformingVec);
// Converting the new data to ints.
int x = Float.floatToRawIntBits(vertexTransformingVec.x);
int y = Float.floatToRawIntBits(vertexTransformingVec.y);
int z = Float.floatToRawIntBits(vertexTransformingVec.z);
// Vertex position data
newQuad[vertexIndex] = x;
newQuad[vertexIndex + 1] = y;
newQuad[vertexIndex + 2] = z;
newQuad[vertexIndex + 3] = quadData[vertexIndex + 3];
newQuad[vertexIndex + 4] = quadData[vertexIndex + 4]; //texture
newQuad[vertexIndex + 5] = quadData[vertexIndex + 5];
// Vertex brightness
newQuad[vertexIndex + 6] = 0x81818181;
}
return new BakedQuad(newQuad, b.getTintIndex(), b.getFace(), b.getSprite(), b.shouldApplyDiffuseLighting(), b.getFormat());
}
@Override @Override
public boolean isAmbientOcclusion() { public boolean isAmbientOcclusion() {
return this.bakedBase.isAmbientOcclusion(); return this.bakedBase.isAmbientOcclusion();
@@ -123,4 +170,9 @@ public class DriveBakedModel implements IBakedModel {
public ItemOverrideList getOverrides() { public ItemOverrideList getOverrides() {
return this.bakedBase.getOverrides(); return this.bakedBase.getOverrides();
} }
@Override
public void onResourceManagerReload(IResourceManager resourceManager) {
slot2DSMap.clear();
}
} }
@@ -32,6 +32,7 @@ import net.minecraft.client.resources.IResourceManager;
import net.minecraft.util.EnumFacing; import net.minecraft.util.EnumFacing;
import net.minecraft.util.JsonUtils; import net.minecraft.util.JsonUtils;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.EnumHelperClient;
import net.minecraftforge.client.model.ICustomModelLoader; import net.minecraftforge.client.model.ICustomModelLoader;
import net.minecraftforge.client.model.IModel; import net.minecraftforge.client.model.IModel;
import net.minecraftforge.client.model.ModelLoader; import net.minecraftforge.client.model.ModelLoader;
@@ -54,7 +55,6 @@ import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodHandles;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
@@ -74,11 +74,7 @@ public enum UVLModelLoader implements ICustomModelLoader {
static { static {
try { try {
Field modifiers = Field.class.getDeclaredField("modifiers");
modifiers.setAccessible(true);
faceBakery = ReflectionHelper.findField(ModelBakery.class, "faceBakery", "field_177607_l"); faceBakery = ReflectionHelper.findField(ModelBakery.class, "faceBakery", "field_177607_l");
modifiers.set(faceBakery, faceBakery.getModifiers() & (~Modifier.FINAL));
Class clas = Class.forName(ModelLoader.class.getName() + "$VanillaModelWrapper"); Class clas = Class.forName(ModelLoader.class.getName() + "$VanillaModelWrapper");
vanillaModelWrapper = clas.getDeclaredConstructor(ModelLoader.class, ResourceLocation.class, ModelBlock.class, boolean.class, vanillaModelWrapper = clas.getDeclaredConstructor(ModelLoader.class, ResourceLocation.class, ModelBlock.class, boolean.class,
@@ -118,7 +114,7 @@ public enum UVLModelLoader implements ICustomModelLoader {
private static void setFaceBakery(ModelBakery modelBakery, FaceBakery faceBakery) { private static void setFaceBakery(ModelBakery modelBakery, FaceBakery faceBakery) {
try { try {
UVLModelLoader.faceBakery.set(modelBakery, faceBakery); EnumHelperClient.setFailsafeFieldValue(UVLModelLoader.faceBakery, modelBakery, faceBakery);
} catch (Exception e) { } catch (Exception e) {
throw Throwables.propagate(e); throw Throwables.propagate(e);
} }
@@ -22,6 +22,7 @@ package appeng.container;
import appeng.api.AEApi; import appeng.api.AEApi;
import appeng.api.config.Actionable; import appeng.api.config.Actionable;
import appeng.api.config.SecurityPermissions; import appeng.api.config.SecurityPermissions;
import appeng.api.definitions.IItemDefinition;
import appeng.api.implementations.guiobjects.IGuiItemObject; import appeng.api.implementations.guiobjects.IGuiItemObject;
import appeng.api.networking.IGrid; import appeng.api.networking.IGrid;
import appeng.api.networking.IGridNode; import appeng.api.networking.IGridNode;
@@ -37,6 +38,7 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.client.me.SlotME; import appeng.client.me.SlotME;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.guisync.SyncData; import appeng.container.guisync.SyncData;
import appeng.container.implementations.ContainerInterface;
import appeng.container.slot.AppEngSlot; import appeng.container.slot.AppEngSlot;
import appeng.container.slot.SlotCraftingMatrix; import appeng.container.slot.SlotCraftingMatrix;
import appeng.container.slot.SlotCraftingTerm; import appeng.container.slot.SlotCraftingTerm;
@@ -45,6 +47,8 @@ import appeng.container.slot.SlotFake;
import appeng.container.slot.SlotInaccessible; import appeng.container.slot.SlotInaccessible;
import appeng.container.slot.SlotPlayerHotBar; import appeng.container.slot.SlotPlayerHotBar;
import appeng.container.slot.SlotPlayerInv; import appeng.container.slot.SlotPlayerInv;
import appeng.container.slot.SlotRestrictedInput;
import appeng.container.slot.SlotRestrictedInput.PlacableItemType;
import appeng.core.AELog; import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketInventoryAction; import appeng.core.sync.packets.PacketInventoryAction;
@@ -84,7 +88,7 @@ public abstract class AEBaseContainer extends Container {
private final HashSet<Integer> locked = new HashSet<>(); private final HashSet<Integer> locked = new HashSet<>();
private final TileEntity tileEntity; private final TileEntity tileEntity;
private final IPart part; private final IPart part;
private final IGuiItemObject obj; protected final IGuiItemObject obj;
private final HashMap<Integer, SyncData> syncData = new HashMap<>(); private final HashMap<Integer, SyncData> syncData = new HashMap<>();
private boolean isContainerValid = true; private boolean isContainerValid = true;
private String customName; private String customName;
@@ -323,6 +327,9 @@ public abstract class AEBaseContainer extends Container {
return ItemStack.EMPTY; return ItemStack.EMPTY;
} }
IItemDefinition expansionCard = AEApi.instance().definitions().materials().cardPatternExpansion();
ContainerInterface casted;
final List<Slot> selectedSlots = new ArrayList<>(); final List<Slot> selectedSlots = new ArrayList<>();
/** /**
@@ -332,6 +339,10 @@ public abstract class AEBaseContainer extends Container {
tis = this.transferStackToContainer(tis); tis = this.transferStackToContainer(tis);
if (!tis.isEmpty()) { if (!tis.isEmpty()) {
if (this instanceof ContainerInterface && expansionCard.isSameAs(tis) && (casted = (ContainerInterface) this).getPatternUpgrades() == casted.availableUpgrades() - 1) {
return ItemStack.EMPTY; // Don't insert more pattern expansions than maximum useful
}
// target slots in the container... // target slots in the container...
for (final Object inventorySlot : this.inventorySlots) { for (final Object inventorySlot : this.inventorySlots) {
final AppEngSlot cs = (AppEngSlot) inventorySlot; final AppEngSlot cs = (AppEngSlot) inventorySlot;
@@ -394,6 +405,10 @@ public abstract class AEBaseContainer extends Container {
if (Platform.itemComparisons().isSameItem(tis, t)) // t.isItemEqual(tis)) if (Platform.itemComparisons().isSameItem(tis, t)) // t.isItemEqual(tis))
{ {
if (d instanceof SlotRestrictedInput && ((SlotRestrictedInput) d).getPlaceableItemType() == PlacableItemType.ENCODED_PATTERN) {
return ItemStack.EMPTY; // don't insert duplicate encoded patterns to interfaces
}
int maxSize = t.getMaxStackSize(); int maxSize = t.getMaxStackSize();
if (maxSize > d.getSlotStackLimit()) { if (maxSize > d.getSlotStackLimit()) {
maxSize = d.getSlotStackLimit(); maxSize = d.getSlotStackLimit();
@@ -455,6 +470,13 @@ public abstract class AEBaseContainer extends Container {
return ItemStack.EMPTY; return ItemStack.EMPTY;
} else { } else {
this.updateSlot(d); this.updateSlot(d);
if (
(d instanceof SlotRestrictedInput && ((SlotRestrictedInput) d).getPlaceableItemType() == PlacableItemType.ENCODED_PATTERN) ||
(this instanceof ContainerInterface && expansionCard.isSameAs(tis) && (casted = (ContainerInterface) this).getPatternUpgrades() == casted.availableUpgrades() - 1)
) {
break; // Only insert one pattern when shift-clicking into interfaces, and don't insert more pattern expansions than maximum useful
}
} }
} }
} }
@@ -23,6 +23,7 @@ import appeng.api.AEApi;
import appeng.api.config.Actionable; import appeng.api.config.Actionable;
import appeng.api.config.SecurityPermissions; import appeng.api.config.SecurityPermissions;
import appeng.api.networking.IGrid; import appeng.api.networking.IGrid;
import appeng.api.networking.IGridNode;
import appeng.api.networking.crafting.ICraftingCPU; import appeng.api.networking.crafting.ICraftingCPU;
import appeng.api.networking.crafting.ICraftingGrid; import appeng.api.networking.crafting.ICraftingGrid;
import appeng.api.networking.crafting.ICraftingJob; import appeng.api.networking.crafting.ICraftingJob;
@@ -38,6 +39,7 @@ import appeng.api.storage.data.IItemList;
import appeng.client.gui.implementations.GuiCraftConfirm; import appeng.client.gui.implementations.GuiCraftConfirm;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.guisync.GuiSync; import appeng.container.guisync.GuiSync;
import appeng.container.interfaces.IInventorySlotAware;
import appeng.core.AELog; import appeng.core.AELog;
import appeng.core.sync.GuiBridge; import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
@@ -124,7 +126,19 @@ public class ContainerCraftConfirm extends AEBaseContainer {
return; return;
} }
final ICraftingGrid cc = this.getGrid().getCache(ICraftingGrid.class); final IActionHost h = ((IActionHost) this.getTarget());
if (h == null) {
this.setValidContainer(false);
return;
}
IGridNode node = h.getActionableNode();
if (node == null) {
this.setValidContainer(false);
return;
}
IGrid grid = node.getGrid();
final ICraftingGrid cc = grid.getCache(ICraftingGrid.class);
final ImmutableSet<ICraftingCPU> cpuSet = cc.getCpus(); final ImmutableSet<ICraftingCPU> cpuSet = cc.getCpus();
int matches = 0; int matches = 0;
@@ -198,7 +212,7 @@ public class ContainerCraftConfirm extends AEBaseContainer {
p.reset(); p.reset();
p.setStackSize(out.getCountRequestable()); p.setStackSize(out.getCountRequestable());
final IStorageGrid sg = this.getGrid().getCache(IStorageGrid.class); final IStorageGrid sg = grid.getCache(IStorageGrid.class);
final IMEInventory<IAEItemStack> items = sg.getInventory(AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class)); final IMEInventory<IAEItemStack> items = sg.getInventory(AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class));
IAEItemStack m = null; IAEItemStack m = null;
@@ -251,11 +265,6 @@ public class ContainerCraftConfirm extends AEBaseContainer {
this.verifyPermissions(SecurityPermissions.CRAFT, false); this.verifyPermissions(SecurityPermissions.CRAFT, false);
} }
private IGrid getGrid() {
final IActionHost h = ((IActionHost) this.getTarget());
return h.getActionableNode().getGrid();
}
private boolean cpuMatches(final ICraftingCPU c) { private boolean cpuMatches(final ICraftingCPU c) {
return c.getAvailableStorage() >= this.getUsedBytes() && !c.isBusy(); return c.getAvailableStorage() >= this.getUsedBytes() && !c.isBusy();
} }
@@ -300,13 +309,32 @@ public class ContainerCraftConfirm extends AEBaseContainer {
originalGui = GuiBridge.GUI_EXPANDED_PROCESSING_PATTERN_TERMINAL; originalGui = GuiBridge.GUI_EXPANDED_PROCESSING_PATTERN_TERMINAL;
} }
final IActionHost h = ((IActionHost) this.getTarget());
if (h == null) {
return;
}
IGridNode node = h.getActionableNode();
if (node == null) {
return;
}
IGrid grid = node.getGrid();
if (this.result != null && !this.isSimulation()) { if (this.result != null && !this.isSimulation()) {
final ICraftingGrid cc = this.getGrid().getCache(ICraftingGrid.class); final ICraftingGrid cc = grid.getCache(ICraftingGrid.class);
final ICraftingLink g = cc.submitJob(this.result, null, this.getSelectedCpu() == -1 ? null : this.cpus.get(this.getSelectedCpu()).getCpu(), true, this.getActionSrc()); final ICraftingLink g = cc.submitJob(this.result, null, this.getSelectedCpu() == -1 ? null : this.cpus.get(this.getSelectedCpu()).getCpu(), true, this.getActionSrc());
this.setAutoStart(false); this.setAutoStart(false);
if (g != null && originalGui != null && this.getOpenContext() != null) { if (g == null) {
this.setJob(cc.beginCraftingJob(this.getWorld(), grid, this.getActionSrc(), this.result.getOutput(), null));
} else if (originalGui != null && this.getOpenContext() != null) {
final TileEntity te = this.getOpenContext().getTile(); final TileEntity te = this.getOpenContext().getTile();
Platform.openGUI(this.getInventoryPlayer().player, te, this.getOpenContext().getSide(), originalGui); if (te != null) {
Platform.openGUI(this.getInventoryPlayer().player, te, this.getOpenContext().getSide(), originalGui);
} else {
if (ah instanceof IInventorySlotAware) {
IInventorySlotAware i = ((IInventorySlotAware) ah);
Platform.openGUI(this.getInventoryPlayer().player, i.getInventorySlot(), originalGui, i.isBaubleSlot());
}
}
} }
} }
} }
@@ -21,43 +21,25 @@ package appeng.container.implementations;
import appeng.api.config.Actionable; import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier; import appeng.api.config.PowerMultiplier;
import appeng.api.implementations.IUpgradeableCellContainer; import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.api.networking.security.IActionHost;
import appeng.container.interfaces.IInventorySlotAware; import appeng.container.interfaces.IInventorySlotAware;
import appeng.container.slot.SlotRestrictedInput;
import appeng.core.AEConfig;
import appeng.core.localization.PlayerMessages;
import appeng.helpers.WirelessTerminalGuiObject;
import appeng.parts.automation.StackUpgradeInventory;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.util.Platform;
import appeng.util.inv.IAEAppEngInventory; import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.InvOperation;
import baubles.api.BaublesApi;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ClickType;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.items.IItemHandler;
public class ContainerMEPortableCell extends ContainerMEMonitorable implements IUpgradeableCellContainer, IAEAppEngInventory, IInventorySlotAware { public class ContainerMEPortableCell extends ContainerMEMonitorable implements IInventorySlotAware {
protected final WirelessTerminalGuiObject wirelessTerminalGUIObject; protected final IPortableCell portableCell;
private final int slot; private final int slot;
private double powerMultiplier = 0.5; private double powerMultiplier = 0.5;
private int ticks = 0; private int ticks = 0;
protected AppEngInternalInventory upgrades; public ContainerMEPortableCell(InventoryPlayer ip, IPortableCell guiObject) {
protected SlotRestrictedInput magnetSlot; super(ip, guiObject, guiObject, false);
if (guiObject != null) {
public ContainerMEPortableCell(InventoryPlayer ip, WirelessTerminalGuiObject monitorable, boolean bindInventory) { final int slotIndex = ((IInventorySlotAware) guiObject).getInventorySlot();
super(ip, monitorable, bindInventory); if (!((IInventorySlotAware) guiObject).isBaubleSlot()) {
if (monitorable != null) {
final int slotIndex = ((IInventorySlotAware) monitorable).getInventorySlot();
if (!((IInventorySlotAware) monitorable).isBaubleSlot()) {
this.lockPlayerInventorySlot(slotIndex); this.lockPlayerInventorySlot(slotIndex);
} }
this.slot = slotIndex; this.slot = slotIndex;
@@ -65,82 +47,31 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable implements I
this.slot = -1; this.slot = -1;
this.lockPlayerInventorySlot(ip.currentItem); this.lockPlayerInventorySlot(ip.currentItem);
} }
this.wirelessTerminalGUIObject = monitorable;
this.upgrades = new StackUpgradeInventory(wirelessTerminalGUIObject.getItemStack(), this, 2); this.bindPlayerInventory(ip, 0, 0);
this.loadFromNBT();
this.setupUpgrades(); this.portableCell = guiObject;
} }
@Override @Override
public void detectAndSendChanges() { public void detectAndSendChanges() {
if (Platform.isServer()) { final ItemStack currentItem = this.slot < 0 ? this.getPlayerInv().getCurrentItem() : this.getPlayerInv().getStackInSlot(this.slot);
final ItemStack currentItem; if (this.portableCell == null || currentItem.isEmpty()) {
if (wirelessTerminalGUIObject.isBaubleSlot()) { this.setValidContainer(false);
currentItem = BaublesApi.getBaublesHandler(this.getPlayerInv().player).getStackInSlot(this.slot); } else if (!this.portableCell.getItemStack().isEmpty() && currentItem != this.portableCell.getItemStack()) {
} else { if (!ItemStack.areItemsEqual(this.portableCell.getItemStack(), currentItem)) {
currentItem = this.slot < 0 ? this.getPlayerInv().getCurrentItem() : this.getPlayerInv().getStackInSlot(this.slot);
}
if (currentItem.isEmpty()) {
this.setValidContainer(false); this.setValidContainer(false);
} else if (!this.wirelessTerminalGUIObject.getItemStack().isEmpty() && currentItem != this.wirelessTerminalGUIObject.getItemStack()) {
if (ItemStack.areItemsEqual(this.wirelessTerminalGUIObject.getItemStack(), currentItem)) {
this.getPlayerInv().setInventorySlotContents(this.getPlayerInv().currentItem, this.wirelessTerminalGUIObject.getItemStack());
} else {
this.setValidContainer(false);
}
}
// drain 1 ae t
this.ticks++;
if (this.ticks > 10) {
this.wirelessTerminalGUIObject.extractAEPower(this.getPowerMultiplier() * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG);
this.ticks = 0;
}
if (!this.wirelessTerminalGUIObject.rangeCheck()) {
if (Platform.isServer() && this.isValidContainer()) {
this.getPlayerInv().player.sendMessage(PlayerMessages.OutOfRange.get());
}
this.setValidContainer(false);
} else {
this.setPowerMultiplier(AEConfig.instance().wireless_getDrainRate(this.wirelessTerminalGUIObject.getRange()));
}
super.detectAndSendChanges();
}
}
@Override
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
if (clickTypeIn == ClickType.PICKUP && dragType == 1) {
if (this.inventorySlots.get(slotId) == magnetSlot) {
ItemStack itemStack = magnetSlot.getStack();
if (!magnetSlot.getStack().isEmpty()) {
NBTTagCompound tag = itemStack.getTagCompound();
if (tag == null) {
tag = new NBTTagCompound();
}
if (tag.hasKey("enabled")) {
boolean e = tag.getBoolean("enabled");
tag.setBoolean("enabled", !e);
} else {
tag.setBoolean("enabled", false);
}
magnetSlot.getStack().setTagCompound(tag);
magnetSlot.onSlotChanged();
return ItemStack.EMPTY;
}
} }
} }
return super.slotClick(slotId, dragType, clickTypeIn, player);
}
@Override // drain 1 ae t
protected IActionHost getActionHost() { this.ticks++;
return this.wirelessTerminalGUIObject; if (this.ticks > 10) {
this.portableCell.extractAEPower(this.getPowerMultiplier() * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG);
this.ticks = 0;
}
super.detectAndSendChanges();
} }
private double getPowerMultiplier() { private double getPowerMultiplier() {
@@ -151,56 +82,8 @@ public class ContainerMEPortableCell extends ContainerMEMonitorable implements I
this.powerMultiplier = powerMultiplier; this.powerMultiplier = powerMultiplier;
} }
@Override
public int availableUpgrades() {
return 1;
}
@Override
public void setupUpgrades() {
if (wirelessTerminalGUIObject != null) {
for (int upgradeSlot = 0; upgradeSlot < availableUpgrades(); upgradeSlot++) {
this.magnetSlot = new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, upgradeSlot, 206, 135 + upgradeSlot * 18, this.getInventoryPlayer());
this.magnetSlot.setNotDraggable();
this.addSlotToContainer(magnetSlot);
}
}
}
@Override
public void onSlotChange(Slot s) {
super.detectAndSendChanges();
}
@Override
public void saveChanges() {
if (Platform.isServer()) {
NBTTagCompound tag = new NBTTagCompound();
this.upgrades.writeToNBT(tag, "upgrades");
this.wirelessTerminalGUIObject.saveChanges(tag);
}
}
protected void loadFromNBT() {
NBTTagCompound data = wirelessTerminalGUIObject.getItemStack().getTagCompound();
if (data != null) {
upgrades.readFromNBT(wirelessTerminalGUIObject.getItemStack().getTagCompound().getCompoundTag("upgrades"));
}
}
@Override
public void onChangeInventory(IItemHandler inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack) {
}
@Override @Override
public int getInventorySlot() { public int getInventorySlot() {
return wirelessTerminalGUIObject.getInventorySlot(); return this.slot;
}
@Override
public boolean isBaubleSlot() {
return wirelessTerminalGUIObject.isBaubleSlot();
} }
} }
@@ -0,0 +1,235 @@
/*
* This file is part of Applied Energistics 2.
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
*
* Applied Energistics 2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Applied Energistics 2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
*/
package appeng.container.implementations;
import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier;
import appeng.api.implementations.IUpgradeableCellContainer;
import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.api.networking.security.IActionHost;
import appeng.container.interfaces.IInventorySlotAware;
import appeng.container.slot.SlotRestrictedInput;
import appeng.core.AEConfig;
import appeng.core.localization.PlayerMessages;
import appeng.helpers.WirelessTerminalGuiObject;
import appeng.parts.automation.StackUpgradeInventory;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.util.Platform;
import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.InvOperation;
import baubles.api.BaublesApi;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ClickType;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.items.IItemHandler;
public class ContainerMEPortableTerminal extends ContainerMEMonitorable implements IUpgradeableCellContainer, IAEAppEngInventory, IInventorySlotAware {
protected final WirelessTerminalGuiObject wirelessTerminalGUIObject;
private final int slot;
private double powerMultiplier = 0.5;
private int ticks = 0;
protected AppEngInternalInventory upgrades;
protected SlotRestrictedInput magnetSlot;
public ContainerMEPortableTerminal(InventoryPlayer ip, WirelessTerminalGuiObject guiObject, boolean bindInventory) {
super(ip, guiObject, guiObject, bindInventory);
if (guiObject != null) {
final int slotIndex = ((IInventorySlotAware) guiObject).getInventorySlot();
if (!((IInventorySlotAware) guiObject).isBaubleSlot()) {
this.lockPlayerInventorySlot(slotIndex);
}
this.slot = slotIndex;
} else {
this.slot = -1;
this.lockPlayerInventorySlot(ip.currentItem);
}
this.bindPlayerInventory(ip, 0, 0);
this.wirelessTerminalGUIObject = guiObject;
this.upgrades = new StackUpgradeInventory(wirelessTerminalGUIObject.getItemStack(), this, 2);
this.loadFromNBT();
this.setupUpgrades();
}
public ContainerMEPortableTerminal(InventoryPlayer ip, IPortableCell guiObject) {
super(ip, guiObject, guiObject, true);
if (guiObject != null) {
final int slotIndex = ((IInventorySlotAware) guiObject).getInventorySlot();
if (!((IInventorySlotAware) guiObject).isBaubleSlot()) {
this.lockPlayerInventorySlot(slotIndex);
}
this.slot = slotIndex;
} else {
this.slot = -1;
this.lockPlayerInventorySlot(ip.currentItem);
}
this.wirelessTerminalGUIObject = (WirelessTerminalGuiObject) guiObject;
this.upgrades = new StackUpgradeInventory(wirelessTerminalGUIObject.getItemStack(), this, 2);
this.loadFromNBT();
this.setupUpgrades();
}
@Override
public void detectAndSendChanges() {
if (Platform.isServer()) {
final ItemStack currentItem;
if (wirelessTerminalGUIObject.isBaubleSlot()) {
currentItem = BaublesApi.getBaublesHandler(this.getPlayerInv().player).getStackInSlot(this.slot);
} else {
currentItem = this.slot < 0 ? this.getPlayerInv().getCurrentItem() : this.getPlayerInv().getStackInSlot(this.slot);
}
if (currentItem.isEmpty()) {
this.setValidContainer(false);
} else if (!this.wirelessTerminalGUIObject.getItemStack().isEmpty() && currentItem != this.wirelessTerminalGUIObject.getItemStack()) {
if (ItemStack.areItemsEqual(this.wirelessTerminalGUIObject.getItemStack(), currentItem)) {
if (wirelessTerminalGUIObject.isBaubleSlot()) {
BaublesApi.getBaublesHandler(this.getPlayerInv().player).setStackInSlot(this.slot, this.wirelessTerminalGUIObject.getItemStack());
} else {
this.getPlayerInv().setInventorySlotContents(this.slot, this.wirelessTerminalGUIObject.getItemStack());
}
} else {
this.setValidContainer(false);
}
}
// drain 1 ae t
this.ticks++;
if (this.ticks > 10) {
double ext = this.wirelessTerminalGUIObject.extractAEPower(this.getPowerMultiplier() * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG);
if (ext < this.getPowerMultiplier() * this.ticks) {
if (Platform.isServer() && this.isValidContainer()) {
this.getPlayerInv().player.sendMessage(PlayerMessages.DeviceNotPowered.get());
}
this.setValidContainer(false);
}
this.ticks = 0;
}
if (!this.wirelessTerminalGUIObject.rangeCheck()) {
if (Platform.isServer() && this.isValidContainer()) {
this.getPlayerInv().player.sendMessage(PlayerMessages.OutOfRange.get());
}
this.setValidContainer(false);
} else {
this.setPowerMultiplier(AEConfig.instance().wireless_getDrainRate(this.wirelessTerminalGUIObject.getRange()));
}
super.detectAndSendChanges();
}
}
@Override
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
if (slotId >= 0 && slotId < this.inventorySlots.size()) {
if (clickTypeIn == ClickType.PICKUP && dragType == 1) {
if (this.inventorySlots.get(slotId) == magnetSlot) {
ItemStack itemStack = magnetSlot.getStack();
if (!magnetSlot.getStack().isEmpty()) {
NBTTagCompound tag = itemStack.getTagCompound();
if (tag == null) {
tag = new NBTTagCompound();
}
if (tag.hasKey("enabled")) {
boolean e = tag.getBoolean("enabled");
tag.setBoolean("enabled", !e);
} else {
tag.setBoolean("enabled", false);
}
magnetSlot.getStack().setTagCompound(tag);
magnetSlot.onSlotChanged();
return ItemStack.EMPTY;
}
}
}
}
return super.slotClick(slotId, dragType, clickTypeIn, player);
}
@Override
protected IActionHost getActionHost() {
return this.wirelessTerminalGUIObject;
}
private double getPowerMultiplier() {
return this.powerMultiplier;
}
void setPowerMultiplier(final double powerMultiplier) {
this.powerMultiplier = powerMultiplier;
}
@Override
public int availableUpgrades() {
return 1;
}
@Override
public void setupUpgrades() {
if (wirelessTerminalGUIObject != null) {
for (int upgradeSlot = 0; upgradeSlot < availableUpgrades(); upgradeSlot++) {
this.magnetSlot = new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, upgradeSlot, 206, 135 + upgradeSlot * 18, this.getInventoryPlayer());
this.magnetSlot.setNotDraggable();
this.addSlotToContainer(magnetSlot);
}
}
}
@Override
public void saveChanges() {
if (Platform.isServer()) {
NBTTagCompound tag = new NBTTagCompound();
this.upgrades.writeToNBT(tag, "upgrades");
this.wirelessTerminalGUIObject.saveChanges(tag);
}
}
protected void loadFromNBT() {
NBTTagCompound data = wirelessTerminalGUIObject.getItemStack().getTagCompound();
if (data != null) {
upgrades.readFromNBT(wirelessTerminalGUIObject.getItemStack().getTagCompound().getCompoundTag("upgrades"));
}
}
@Override
public void onChangeInventory(IItemHandler inv, int slot, InvOperation mc, ItemStack removedStack, ItemStack newStack) {
}
@Override
public int getInventorySlot() {
return wirelessTerminalGUIObject.getInventorySlot();
}
@Override
public boolean isBaubleSlot() {
return wirelessTerminalGUIObject.isBaubleSlot();
}
}
@@ -191,6 +191,9 @@ public abstract class ContainerPatternEncoder extends ContainerMEMonitorable imp
} }
this.detectAndSendChanges(); this.detectAndSendChanges();
} }
if (s == this.craftSlot && Platform.isClient()) {
this.getAndUpdateOutput();
}
} }
public void encodeAndMoveToInventory() { public void encodeAndMoveToInventory() {
@@ -533,6 +536,14 @@ public abstract class ContainerPatternEncoder extends ContainerMEMonitorable imp
public void setSubstitute(final boolean substitute) { public void setSubstitute(final boolean substitute) {
this.substitute = substitute; this.substitute = substitute;
if (getPart() != null) {
getPart().setSubstitution(substitute);
} else if (iGuiItemObject != null) {
NBTTagCompound nbtTagCompound = iGuiItemObject.getItemStack().getTagCompound();
if (nbtTagCompound != null) {
nbtTagCompound.setBoolean("isSubstitute", substitute);
}
}
} }
@Override @Override
@@ -39,7 +39,7 @@ import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.wrapper.PlayerInvWrapper; import net.minecraftforge.items.wrapper.PlayerInvWrapper;
public class ContainerWirelessCraftingTerminal extends ContainerMEPortableCell implements IContainerCraftingPacket { public class ContainerWirelessCraftingTerminal extends ContainerMEPortableTerminal implements IContainerCraftingPacket {
private final AppEngInternalInventory output = new AppEngInternalInventory(this, 1); private final AppEngInternalInventory output = new AppEngInternalInventory(this, 1);
private final SlotCraftingMatrix[] craftingSlots = new SlotCraftingMatrix[9]; private final SlotCraftingMatrix[] craftingSlots = new SlotCraftingMatrix[9];
@@ -50,7 +50,7 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEPortableCell i
private IRecipe currentRecipe; private IRecipe currentRecipe;
public ContainerWirelessCraftingTerminal(final InventoryPlayer ip, final WirelessTerminalGuiObject gui) { public ContainerWirelessCraftingTerminal(final InventoryPlayer ip, final WirelessTerminalGuiObject gui) {
super(ip, gui, true); super(ip, gui, false);
final IItemHandler crafting = this.craftingGrid; final IItemHandler crafting = this.craftingGrid;
@@ -63,6 +63,8 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEPortableCell i
this.addSlotToContainer(this.outputSlot = new SlotCraftingTerm(this.getPlayerInv().player, this.getActionSource(), this this.addSlotToContainer(this.outputSlot = new SlotCraftingTerm(this.getPlayerInv().player, this.getActionSource(), this
.getPowerSource(), this.wirelessTerminalGUIObject, crafting, crafting, this.output, 131, -72 + 18, this)); .getPowerSource(), this.wirelessTerminalGUIObject, crafting, crafting, this.output, 131, -72 + 18, this));
this.bindPlayerInventory(ip, 0, 0);
this.onCraftMatrixChanged(new WrapperInvItemHandler(crafting)); this.onCraftMatrixChanged(new WrapperInvItemHandler(crafting));
} }
@@ -86,6 +88,8 @@ public class ContainerWirelessCraftingTerminal extends ContainerMEPortableCell i
this.outputSlot.putStack(craftingResult); this.outputSlot.putStack(craftingResult);
} }
this.saveChanges();
} }
@Override @Override
@@ -135,7 +135,11 @@ public class ContainerWirelessPatternTerminal extends ContainerPatternEncoder im
this.setValidContainer(false); this.setValidContainer(false);
} else if (!this.wirelessTerminalGUIObject.getItemStack().isEmpty() && currentItem != this.wirelessTerminalGUIObject.getItemStack()) { } else if (!this.wirelessTerminalGUIObject.getItemStack().isEmpty() && currentItem != this.wirelessTerminalGUIObject.getItemStack()) {
if (ItemStack.areItemsEqual(this.wirelessTerminalGUIObject.getItemStack(), currentItem)) { if (ItemStack.areItemsEqual(this.wirelessTerminalGUIObject.getItemStack(), currentItem)) {
this.getPlayerInv().setInventorySlotContents(this.getPlayerInv().currentItem, this.wirelessTerminalGUIObject.getItemStack()); if (wirelessTerminalGUIObject.isBaubleSlot()) {
BaublesApi.getBaublesHandler(this.getPlayerInv().player).setStackInSlot(this.slot, this.wirelessTerminalGUIObject.getItemStack());
} else {
this.getPlayerInv().setInventorySlotContents(this.slot, this.wirelessTerminalGUIObject.getItemStack());
}
} else { } else {
this.setValidContainer(false); this.setValidContainer(false);
} }
@@ -144,7 +148,14 @@ public class ContainerWirelessPatternTerminal extends ContainerPatternEncoder im
// drain 1 ae t // drain 1 ae t
this.ticks++; this.ticks++;
if (this.ticks > 10) { if (this.ticks > 10) {
this.wirelessTerminalGUIObject.extractAEPower(this.getPowerMultiplier() * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG); double ext = this.wirelessTerminalGUIObject.extractAEPower(this.getPowerMultiplier() * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG);
if (ext < this.getPowerMultiplier() * this.ticks) {
if (Platform.isServer() && this.isValidContainer()) {
this.getPlayerInv().player.sendMessage(PlayerMessages.DeviceNotPowered.get());
}
this.setValidContainer(false);
}
this.ticks = 0; this.ticks = 0;
} }
@@ -164,23 +175,25 @@ public class ContainerWirelessPatternTerminal extends ContainerPatternEncoder im
@Override @Override
public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) { public ItemStack slotClick(int slotId, int dragType, ClickType clickTypeIn, EntityPlayer player) {
if (clickTypeIn == ClickType.PICKUP && dragType == 1) { if (slotId >= 0 && slotId < this.inventorySlots.size()) {
if (this.inventorySlots.get(slotId) == magnetSlot) { if (clickTypeIn == ClickType.PICKUP && dragType == 1) {
ItemStack itemStack = magnetSlot.getStack(); if (this.inventorySlots.get(slotId) == magnetSlot) {
if (!magnetSlot.getStack().isEmpty()) { ItemStack itemStack = magnetSlot.getStack();
NBTTagCompound tag = itemStack.getTagCompound(); if (!magnetSlot.getStack().isEmpty()) {
if (tag == null) { NBTTagCompound tag = itemStack.getTagCompound();
tag = new NBTTagCompound(); if (tag == null) {
tag = new NBTTagCompound();
}
if (tag.hasKey("enabled")) {
boolean e = tag.getBoolean("enabled");
tag.setBoolean("enabled", !e);
} else {
tag.setBoolean("enabled", false);
}
magnetSlot.getStack().setTagCompound(tag);
magnetSlot.onSlotChanged();
return ItemStack.EMPTY;
} }
if (tag.hasKey("enabled")) {
boolean e = tag.getBoolean("enabled");
tag.setBoolean("enabled", !e);
} else {
tag.setBoolean("enabled", false);
}
magnetSlot.getStack().setTagCompound(tag);
magnetSlot.onSlotChanged();
return ItemStack.EMPTY;
} }
} }
} }
@@ -255,8 +268,13 @@ public class ContainerWirelessPatternTerminal extends ContainerPatternEncoder im
ItemHandlerUtil.setStackInSlot(this.crafting, x, item == null ? ItemStack.EMPTY : item.createItemStack()); ItemHandlerUtil.setStackInSlot(this.crafting, x, item == null ? ItemStack.EMPTY : item.createItemStack());
} }
for (int x = 0; x < this.output.getSlots() && x < details.getOutputs().length; x++) { for (int x = 0; x < this.output.getSlots(); x++) {
final IAEItemStack item = details.getOutputs()[x]; final IAEItemStack item;
if (x < details.getOutputs().length) {
item = details.getOutputs()[x];
} else {
item = null;
}
this.output.setStackInSlot(x, item == null ? ItemStack.EMPTY : item.createItemStack()); this.output.setStackInSlot(x, item == null ? ItemStack.EMPTY : item.createItemStack());
} }
} }
@@ -269,6 +287,8 @@ public class ContainerWirelessPatternTerminal extends ContainerPatternEncoder im
public IItemHandler getInventoryByName(String name) { public IItemHandler getInventoryByName(String name) {
if (name.equals("crafting")) { if (name.equals("crafting")) {
return this.crafting; return this.crafting;
} else if (name.equals("output")) {
return this.output;
} }
return super.getInventoryByName(name); return super.getInventoryByName(name);
} }
@@ -23,9 +23,9 @@ import appeng.helpers.WirelessTerminalGuiObject;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
public class ContainerWirelessTerm extends ContainerMEPortableCell { public class ContainerWirelessTerm extends ContainerMEPortableTerminal {
public ContainerWirelessTerm(final InventoryPlayer ip, final WirelessTerminalGuiObject gui) { public ContainerWirelessTerm(final InventoryPlayer ip, final WirelessTerminalGuiObject gui) {
super(ip, gui, true); super(ip, gui, false);
} }
} }
@@ -65,6 +65,10 @@ public class SlotRestrictedInput extends AppEngSlot {
this.p = p; this.p = p;
} }
public PlacableItemType getPlaceableItemType() {
return which;
}
@Override @Override
public int getSlotStackLimit() { public int getSlotStackLimit() {
if (this.stackLimit != -1) { if (this.stackLimit != -1) {
+23 -2
View File
@@ -43,8 +43,8 @@ import java.util.stream.Stream;
public final class AEConfig extends Configuration implements IConfigurableObject, IConfigManagerHost { public final class AEConfig extends Configuration implements IConfigurableObject, IConfigManagerHost {
public static final String VERSION = "@version@"; public static final String VERSION = appeng.Tags.VERSION;
public static final String CHANNEL = "@aechannel@"; public static final String CHANNEL = appeng.Tags.AECHANNEL;
public static final String PACKET_CHANNEL = "AE"; public static final String PACKET_CHANNEL = "AE";
// Tunnels // Tunnels
public static final double TUNNEL_POWER_LOSS = 0.05; public static final double TUNNEL_POWER_LOSS = 0.05;
@@ -82,6 +82,8 @@ public final class AEConfig extends Configuration implements IConfigurableObject
private boolean disableColoredCableRecipesInJEI = true; private boolean disableColoredCableRecipesInJEI = true;
private int craftingCalculationTimePerTick = 5; private int craftingCalculationTimePerTick = 5;
private PowerUnits selectedPowerUnit = PowerUnits.AE; private PowerUnits selectedPowerUnit = PowerUnits.AE;
private boolean showCraftableTooltip = true;
// Spatial IO/Dimension // Spatial IO/Dimension
private int storageProviderID = -1; private int storageProviderID = -1;
private int storageDimensionID = -1; private int storageDimensionID = -1;
@@ -121,6 +123,9 @@ public final class AEConfig extends Configuration implements IConfigurableObject
private int maxControllerSizeY = 7; private int maxControllerSizeY = 7;
private int maxControllerSizeZ = 7; private int maxControllerSizeZ = 7;
private int normalChannelCapacity = 8;
private int denseChannelCapacity = 32;
private AEConfig(final File configFile) { private AEConfig(final File configFile) {
super(configFile); super(configFile);
this.configFile = configFile; this.configFile = configFile;
@@ -138,6 +143,8 @@ public final class AEConfig extends Configuration implements IConfigurableObject
CondenserOutput.SINGULARITY.requiredPower = this.get("Condenser", "Singularity", 256000).getInt(256000); CondenserOutput.SINGULARITY.requiredPower = this.get("Condenser", "Singularity", 256000).getInt(256000);
this.removeCrashingItemsOnLoad = this.get("general", "removeCrashingItemsOnLoad", false, "Will auto-remove items that crash when being loaded from storage. This will destroy those items instead of crashing the game!").getBoolean(); this.removeCrashingItemsOnLoad = this.get("general", "removeCrashingItemsOnLoad", false, "Will auto-remove items that crash when being loaded from storage. This will destroy those items instead of crashing the game!").getBoolean();
this.normalChannelCapacity = Math.min(this.get("general", "normalChannelCapacity", this.normalChannelCapacity, "Max channel number may not exceed 256").getInt(this.normalChannelCapacity), 256);
this.denseChannelCapacity = Math.min(this.get("general", "denseChannelCapacity", this.denseChannelCapacity, "Max channel number may not exceed 256").getInt(this.denseChannelCapacity), 256);
this.setCategoryComment("BlockingMode", "Map of items to not block when blockingmode is enabled.\n[modid]\nmodid:item:metadata(optional,default:0)\nSupports more than one modid, so you can block different things between, for example, gregtech or enderio"); this.setCategoryComment("BlockingMode", "Map of items to not block when blockingmode is enabled.\n[modid]\nmodid:item:metadata(optional,default:0)\nSupports more than one modid, so you can block different things between, for example, gregtech or enderio");
this.nonBlockingItems = this.get("BlockingMode", "nonBlockingItems", nonBlockingItems, "NonBlockingItems").getStringList(); this.nonBlockingItems = this.get("BlockingMode", "nonBlockingItems", nonBlockingItems, "NonBlockingItems").getStringList();
@@ -188,6 +195,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
this.maxControllerSizeY = Math.min(Math.max(this.get("ControllerSize", "maxControllerSizeY", this.maxControllerSizeY).getInt(this.maxControllerSizeY), 1), 63); this.maxControllerSizeY = Math.min(Math.max(this.get("ControllerSize", "maxControllerSizeY", this.maxControllerSizeY).getInt(this.maxControllerSizeY), 1), 63);
this.maxControllerSizeZ = Math.min(Math.max(this.get("ControllerSize", "maxControllerSizeZ", this.maxControllerSizeZ).getInt(this.maxControllerSizeZ), 1), 63); this.maxControllerSizeZ = Math.min(Math.max(this.get("ControllerSize", "maxControllerSizeZ", this.maxControllerSizeZ).getInt(this.maxControllerSizeZ), 1), 63);
this.clientSync(); this.clientSync();
this.addCustomCategoryComment("features", "Warning: Disabling a feature may disable other features depending on it."); this.addCustomCategoryComment("features", "Warning: Disabling a feature may disable other features depending on it.");
@@ -248,6 +256,7 @@ public final class AEConfig extends Configuration implements IConfigurableObject
this.enableEffects = this.get("Client", "enableEffects", true).getBoolean(true); this.enableEffects = this.get("Client", "enableEffects", true).getBoolean(true);
this.useLargeFonts = this.get("Client", "useTerminalUseLargeFont", false).getBoolean(false); this.useLargeFonts = this.get("Client", "useTerminalUseLargeFont", false).getBoolean(false);
this.useColoredCraftingStatus = this.get("Client", "useColoredCraftingStatus", true).getBoolean(true); this.useColoredCraftingStatus = this.get("Client", "useColoredCraftingStatus", true).getBoolean(true);
this.showCraftableTooltip = this.get("Client", "showCraftableTooltip", true, "Whether to add \"Craftable\" to item tooltips when they can be crafted automatically.").getBoolean(true);
// load buttons.. // load buttons..
for (int btnNum = 0; btnNum < 4; btnNum++) { for (int btnNum = 0; btnNum < 4; btnNum++) {
@@ -501,6 +510,10 @@ public final class AEConfig extends Configuration implements IConfigurableObject
return this.useColoredCraftingStatus; return this.useColoredCraftingStatus;
} }
public boolean isShowCraftableTooltip() {
return this.showCraftableTooltip;
}
public boolean isDisableColoredCableRecipesInJEI() { public boolean isDisableColoredCableRecipesInJEI() {
return this.disableColoredCableRecipesInJEI; return this.disableColoredCableRecipesInJEI;
} }
@@ -670,4 +683,12 @@ public final class AEConfig extends Configuration implements IConfigurableObject
public int getMaxControllerSizeZ() { public int getMaxControllerSizeZ() {
return this.maxControllerSizeZ; return this.maxControllerSizeZ;
} }
public int getNormalChannelCapacity() {
return this.normalChannelCapacity;
}
public int getDenseChannelCapacity() {
return this.denseChannelCapacity;
}
} }
+5 -1
View File
@@ -72,7 +72,11 @@ public final class AppEng {
private static final String FORGE_CURRENT_VERSION = ForgeVersion.majorVersion + "." + ForgeVersion.minorVersion + "." + ForgeVersion.revisionVersion + "." + ForgeVersion.buildVersion; private static final String FORGE_CURRENT_VERSION = ForgeVersion.majorVersion + "." + ForgeVersion.minorVersion + "." + ForgeVersion.revisionVersion + "." + ForgeVersion.buildVersion;
private static final String FORGE_MAX_VERSION = (ForgeVersion.majorVersion + 1) + ".0.0.0"; private static final String FORGE_MAX_VERSION = (ForgeVersion.majorVersion + 1) + ".0.0.0";
public static final String MOD_DEPENDENCIES = "required-after:forge@[" + FORGE_CURRENT_VERSION + "," + FORGE_MAX_VERSION + ");after:ctm@[" + CTM.VERSION + ",);after:itemstages;after:recipestages"; public static final String MOD_DEPENDENCIES = "required-after:forge@[" + FORGE_CURRENT_VERSION + "," + FORGE_MAX_VERSION + ");" +
"after:ctm@[" + CTM.VERSION + ",);" +
"after:itemstages;" +
"after:recipestages;" +
"before:bogosorter@[1.2.2,);";
@Nonnull @Nonnull
private static final AppEng INSTANCE = new AppEng(); private static final AppEng INSTANCE = new AppEng();
+3 -5
View File
@@ -409,6 +409,8 @@ final class Registration {
// Inscriber // Inscriber
Upgrades.SPEED.registerItem(blocks.inscriber(), 3); Upgrades.SPEED.registerItem(blocks.inscriber(), 3);
Upgrades.QUANTUM_LINK.registerItem(blocks.quantumLink(), 1);
// Wireless Terminal Handler // Wireless Terminal Handler
ArrayList<IItemDefinition> iids = new ArrayList<>(); ArrayList<IItemDefinition> iids = new ArrayList<>();
iids.add(items.wirelessTerminal()); iids.add(items.wirelessTerminal());
@@ -418,14 +420,10 @@ final class Registration {
for (IItemDefinition id : iids) { for (IItemDefinition id : iids) {
id.maybeItem().ifPresent(terminal -> { id.maybeItem().ifPresent(terminal -> {
registries.wireless().registerWirelessHandler((IWirelessTermHandler) terminal); registries.wireless().registerWirelessHandler((IWirelessTermHandler) terminal);
Upgrades.QUANTUM_LINK.registerItem(id, 1);
Upgrades.MAGNET.registerItem(id, 1); Upgrades.MAGNET.registerItem(id, 1);
}); });
} }
items.wirelessFluidTerminal().maybeItem().ifPresent(terminal -> { items.wirelessFluidTerminal().maybeItem().ifPresent(terminal -> registries.wireless().registerWirelessHandler((IWirelessTermHandler) terminal));
registries.wireless().registerWirelessHandler((IWirelessTermHandler) terminal);
Upgrades.QUANTUM_LINK.registerItem(items.wirelessFluidTerminal(), 1);
});
// Charge Rates // Charge Rates
items.chargedStaff().maybeItem().ifPresent(chargedStaff -> registries.charger().addChargeRate(chargedStaff, 320d)); items.chargedStaff().maybeItem().ifPresent(chargedStaff -> registries.charger().addChargeRate(chargedStaff, 320d));
@@ -4,14 +4,36 @@ package appeng.core.api;
import appeng.api.config.IncludeExclude; import appeng.api.config.IncludeExclude;
import appeng.api.storage.ICellInventory; import appeng.api.storage.ICellInventory;
import appeng.api.storage.ICellInventoryHandler; import appeng.api.storage.ICellInventoryHandler;
import appeng.api.storage.channels.IFluidStorageChannel;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack; import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
import appeng.api.util.IClientHelper; import appeng.api.util.IClientHelper;
import appeng.core.localization.GuiText; import appeng.core.localization.GuiText;
import appeng.fluids.items.FluidDummyItem;
import appeng.fluids.util.AEFluidStack;
import appeng.util.ReadableNumberConverter;
import appeng.util.item.AEItemStack;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidUtil;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.oredict.OreDictionary;
import org.lwjgl.input.Keyboard;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.Collection;
import java.util.List; import java.util.List;
public class ApiClientHelper implements IClientHelper { public class ApiClientHelper implements IClientHelper {
private static final String[] NUMBER_FORMATS = new String[]{"#.000", "#.00", "#.0", "#"};
@Override @Override
public <T extends IAEStack<T>> void addCellInformation(ICellInventoryHandler<T> handler, List<String> lines) { public <T extends IAEStack<T>> void addCellInformation(ICellInventoryHandler<T> handler, List<String> lines) {
if (handler == null) { if (handler == null) {
@@ -27,16 +49,95 @@ public class ApiClientHelper implements IClientHelper {
.getLocal()); .getLocal());
} }
IItemList<?> itemList = cellInventory.getChannel().createList();
if (handler.isPreformatted()) { if (handler.isPreformatted()) {
final String list = (handler.getIncludeExcludeMode() == IncludeExclude.WHITELIST ? GuiText.Included : GuiText.Excluded).getLocal(); final String list = (handler.getIncludeExcludeMode() == IncludeExclude.WHITELIST ? GuiText.Included : GuiText.Excluded).getLocal();
if (handler.isFuzzy()) { if (handler.isFuzzy()) {
lines.add(GuiText.Partitioned.getLocal() + " - " + list + ' ' + GuiText.Fuzzy.getLocal()); lines.add("[" + GuiText.Partitioned.getLocal() + "]" + " - " + list + ' ' + GuiText.Fuzzy.getLocal());
} else { } else {
lines.add(GuiText.Partitioned.getLocal() + " - " + list + ' ' + GuiText.Precise.getLocal()); lines.add("[" + GuiText.Partitioned.getLocal() + "]" + " - " + list + ' ' + GuiText.Precise.getLocal());
}
if (Minecraft.getMinecraft().gameSettings.advancedItemTooltips || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
IItemHandler inv = cellInventory.getConfigInventory();
cellInventory.getAvailableItems((IItemList) itemList);
for (int i = 0; i < inv.getSlots(); i++) {
final ItemStack is = inv.getStackInSlot(i);
if (!is.isEmpty()) {
if (cellInventory.getChannel() instanceof IItemStorageChannel) {
if (!handler.isFuzzy()) {
final IAEItemStack ais = AEItemStack.fromItemStack(is);
IAEItemStack stocked = ((IItemList<IAEItemStack>) itemList).findPrecise(ais);
lines.add("[" + is.getDisplayName() + "]" + ": " + (stocked == null ? "0" : ReadableNumberConverter.INSTANCE.toWideReadableForm(stocked.getStackSize())));
} else {
final IAEItemStack ais = AEItemStack.fromItemStack(is);
Collection<IAEItemStack> stocked = ((IItemList<IAEItemStack>) itemList).findFuzzy(ais, handler.getCellInv().getFuzzyMode());
int[] ids = OreDictionary.getOreIDs(is);
long size = 0;
for (IAEItemStack ist : stocked) {
size += ist.getStackSize();
}
if (is.getItem().isDamageable()) {
lines.add("[" + is.getDisplayName() + "]" + ": " + size);
} else if (ids.length > 0) {
StringBuilder sb = new StringBuilder();
for (int j : ids) {
sb.append(OreDictionary.getOreName(j)).append(", ");
}
lines.add("[{" + sb.substring(0, sb.length() - 2) + "}]" + ": " + ReadableNumberConverter.INSTANCE.toWideReadableForm(size));
}
}
} else if (cellInventory.getChannel() instanceof IFluidStorageChannel) {
final AEFluidStack ais;
if (is.getItem() instanceof FluidDummyItem) {
ais = AEFluidStack.fromFluidStack(((FluidDummyItem) is.getItem()).getFluidStack(is));
} else {
ais = AEFluidStack.fromFluidStack(FluidUtil.getFluidContained(is));
}
IAEFluidStack stocked = ((IItemList<IAEFluidStack>) itemList).findPrecise(ais);
lines.add("[" + is.getDisplayName() + "]" + ": " + (stocked == null ? "0" : fluidStackSize(stocked.getStackSize())));
}
}
}
}
} else {
if (Minecraft.getMinecraft().gameSettings.advancedItemTooltips || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
cellInventory.getAvailableItems((IItemList) itemList);
for (IAEStack<?> s : itemList) {
if (s instanceof IAEItemStack) {
lines.add(((IAEItemStack) s).getDefinition().getDisplayName() + ": " + ReadableNumberConverter.INSTANCE.toWideReadableForm(s.getStackSize()));
} else if (s instanceof IAEFluidStack) {
lines.add(((IAEFluidStack) s).getFluidStack().getLocalizedName() + ": " + fluidStackSize(s.getStackSize()));
}
}
} }
} }
} }
private String fluidStackSize(long size) {
String unit;
if (size >= 1000) {
unit = "B";
} else {
unit = "mB";
}
final int log = (int) Math.floor(Math.log10(size)) / 2;
final int index = Math.max(0, Math.min(3, log));
final DecimalFormatSymbols symbols = new DecimalFormatSymbols();
symbols.setDecimalSeparator('.');
final DecimalFormat format = new DecimalFormat(NUMBER_FORMATS[index]);
format.setDecimalFormatSymbols(symbols);
format.setRoundingMode(RoundingMode.DOWN);
String formatted = format.format(size / 1000d);
return formatted.concat(unit);
}
} }
+2 -2
View File
@@ -41,8 +41,8 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter; import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.commons.ClassRemapper;
import org.objectweb.asm.commons.Remapper; import org.objectweb.asm.commons.Remapper;
import org.objectweb.asm.commons.RemappingClassAdapter;
import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.AbstractInsnNode;
import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodInsnNode; import org.objectweb.asm.tree.MethodInsnNode;
@@ -150,7 +150,7 @@ public class ApiPart implements IPartHelper {
final DefaultPackageClassNameRemapper remapper = new DefaultPackageClassNameRemapper(); final DefaultPackageClassNameRemapper remapper = new DefaultPackageClassNameRemapper();
remapper.inputOutput.put("appeng/api/parts/LayerBase", n.superName); remapper.inputOutput.put("appeng/api/parts/LayerBase", n.superName);
remapper.inputOutput.put(originalName, n.name); remapper.inputOutput.put(originalName, n.name);
n.accept(new RemappingClassAdapter(cw, remapper)); n.accept(new ClassRemapper(cw, remapper));
// n.accept( cw ); // n.accept( cw );
// n.accept( new TraceClassVisitor( new PrintWriter( System.out ) ) ); // n.accept( new TraceClassVisitor( new PrintWriter( System.out ) ) );
@@ -521,6 +521,10 @@ public final class ApiBlocks implements IBlocks {
.disableItem() .disableItem()
.build(); .build();
if (!doubleSlabDef.maybeBlock().isPresent()) {
return new BlockDefinition(slabId, null, null);
}
Verify.verify(doubleSlabDef.maybeBlock().isPresent()); Verify.verify(doubleSlabDef.maybeBlock().isPresent());
BlockSlab doubleSlabBlock = (BlockSlab) doubleSlabDef.maybeBlock().get(); BlockSlab doubleSlabBlock = (BlockSlab) doubleSlabDef.maybeBlock().get();
@@ -530,6 +534,10 @@ public final class ApiBlocks implements IBlocks {
.features(AEFeature.DECORATIVE_BLOCKS) .features(AEFeature.DECORATIVE_BLOCKS)
.build(); .build();
if (!itemDef.maybeItem().isPresent()) {
return new BlockDefinition(slabId, null, null);
}
Verify.verify(itemDef.maybeItem().isPresent()); Verify.verify(itemDef.maybeItem().isPresent());
// Return a new composite block definition that combines the single slab block with the slab item // Return a new composite block definition that combines the single slab block with the slab item
@@ -74,6 +74,7 @@ public enum AEFeature {
SECURITY("Security", Constants.CATEGORY_NETWORK_FEATURES), SECURITY("Security", Constants.CATEGORY_NETWORK_FEATURES),
SPATIAL_IO("SpatialIO", Constants.CATEGORY_NETWORK_FEATURES), SPATIAL_IO("SpatialIO", Constants.CATEGORY_NETWORK_FEATURES),
QUANTUM_NETWORK_BRIDGE("QuantumNetworkBridge", Constants.CATEGORY_NETWORK_FEATURES), QUANTUM_NETWORK_BRIDGE("QuantumNetworkBridge", Constants.CATEGORY_NETWORK_FEATURES),
QUANTUM_LINKING_CARD("QuantumLinkingCard", Constants.CATEGORY_NETWORK_FEATURES),
CHANNELS("Channels", Constants.CATEGORY_NETWORK_FEATURES), CHANNELS("Channels", Constants.CATEGORY_NETWORK_FEATURES),
INTERFACE("Interface", Constants.CATEGORY_NETWORK_BUSES), INTERFACE("Interface", Constants.CATEGORY_NETWORK_BUSES),
@@ -161,6 +161,7 @@ public enum ButtonToolTips {
// Used in the tooltips of the items in the terminal, when moused over // Used in the tooltips of the items in the terminal, when moused over
ItemsStored, ItemsStored,
ItemsRequestable, ItemsRequestable,
ItemsCraftable,
SchedulingMode, SchedulingMode,
SchedulingModeDefault, SchedulingModeDefault,
+15 -27
View File
@@ -232,24 +232,17 @@ public enum GuiBridge implements IGuiHandler {
public Object getServerGuiElement(final int ordinal, final EntityPlayer player, final World w, final int x, final int y, final int z) { public Object getServerGuiElement(final int ordinal, final EntityPlayer player, final World w, final int x, final int y, final int z) {
final AEPartLocation side = AEPartLocation.fromOrdinal(ordinal & 0x07); final AEPartLocation side = AEPartLocation.fromOrdinal(ordinal & 0x07);
final GuiBridge ID = values()[ordinal >> 4]; final GuiBridge ID = values()[ordinal >> 4];
final boolean stem = ((ordinal >> 3) & 1) == 1; final boolean usingItemOnTile = ((ordinal >> 3) & 1) == 1;
if (ID.type.isItem()) { if (ID.type.isItem()) {
ItemStack it = ItemStack.EMPTY; ItemStack it = ItemStack.EMPTY;
if (y == 0) { if (usingItemOnTile) {
if (stem) { it = player.inventory.getCurrentItem();
it = player.inventory.getCurrentItem(); } else if (y == 0) {
} else if (x >= 0 && x < player.inventory.mainInventory.size()) { if (x >= 0 && x < player.inventory.mainInventory.size()) {
it = player.inventory.getStackInSlot(x); it = player.inventory.getStackInSlot(x);
} }
} else if (y == 1 && z == Integer.MIN_VALUE) { } else if (y == 1 && z == Integer.MIN_VALUE) {
if (stem) { it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
if (player.openContainer instanceof IInventorySlotAware) {
int slot = ((IInventorySlotAware) player.openContainer).getInventorySlot();
it = BaublesApi.getBaublesHandler(player).getStackInSlot(slot);
}
} else {
it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
}
} }
final Object myItem = this.getGuiObject(it, player, w, x, y, z); final Object myItem = this.getGuiObject(it, player, w, x, y, z);
if (myItem != null && ID.CorrectTileOrPart(myItem)) { if (myItem != null && ID.CorrectTileOrPart(myItem)) {
@@ -354,24 +347,19 @@ public enum GuiBridge implements IGuiHandler {
public Object getClientGuiElement(final int ordinal, final EntityPlayer player, final World w, final int x, final int y, final int z) { public Object getClientGuiElement(final int ordinal, final EntityPlayer player, final World w, final int x, final int y, final int z) {
final AEPartLocation side = AEPartLocation.fromOrdinal(ordinal & 0x07); final AEPartLocation side = AEPartLocation.fromOrdinal(ordinal & 0x07);
final GuiBridge ID = values()[ordinal >> 4]; final GuiBridge ID = values()[ordinal >> 4];
final boolean stem = ((ordinal >> 3) & 1) == 1; final boolean usingItemOnTile = ((ordinal >> 3) & 1) == 1;
if (ID.type.isItem()) { if (ID.type.isItem()) {
ItemStack it = ItemStack.EMPTY; ItemStack it = ItemStack.EMPTY;
if (y == 0) { if (usingItemOnTile) {
if (stem) { it = player.inventory.getCurrentItem();
it = player.inventory.getCurrentItem(); } else if (y == 0) {
} else if (x >= 0 && x < player.inventory.mainInventory.size()) { if (x >= 0 && x < player.inventory.mainInventory.size()) {
it = player.inventory.getStackInSlot(x); it = player.inventory.getStackInSlot(x);
} }
} else if (y == 1 && z == Integer.MIN_VALUE) { }
if (stem) { if (y == 1 && z == Integer.MIN_VALUE) {
if (player.openContainer instanceof IInventorySlotAware) { it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
int slot = ((IInventorySlotAware) player.openContainer).getInventorySlot();
it = BaublesApi.getBaublesHandler(player).getStackInSlot(slot);
}
} else {
it = BaublesApi.getBaublesHandler(player).getStackInSlot(x);
}
} }
final Object myItem = this.getGuiObject(it, player, w, x, y, z); final Object myItem = this.getGuiObject(it, player, w, x, y, z);
if (myItem != null && ID.CorrectTileOrPart(myItem)) { if (myItem != null && ID.CorrectTileOrPart(myItem)) {
@@ -27,6 +27,7 @@ import appeng.api.networking.security.IActionHost;
import appeng.container.ContainerOpenContext; import appeng.container.ContainerOpenContext;
import appeng.container.implementations.ContainerCraftAmount; import appeng.container.implementations.ContainerCraftAmount;
import appeng.container.implementations.ContainerCraftConfirm; import appeng.container.implementations.ContainerCraftConfirm;
import appeng.container.interfaces.IInventorySlotAware;
import appeng.core.AELog; import appeng.core.AELog;
import appeng.core.sync.AppEngPacket; import appeng.core.sync.AppEngPacket;
import appeng.core.sync.GuiBridge; import appeng.core.sync.GuiBridge;
@@ -91,7 +92,14 @@ public class PacketCraftRequest extends AppEngPacket {
final ContainerOpenContext context = cca.getOpenContext(); final ContainerOpenContext context = cca.getOpenContext();
if (context != null) { if (context != null) {
final TileEntity te = context.getTile(); final TileEntity te = context.getTile();
Platform.openGUI(player, te, cca.getOpenContext().getSide(), GuiBridge.GUI_CRAFTING_CONFIRM); if (te != null) {
Platform.openGUI(player, te, cca.getOpenContext().getSide(), GuiBridge.GUI_CRAFTING_CONFIRM);
} else {
if (ah instanceof IInventorySlotAware) {
IInventorySlotAware i = ((IInventorySlotAware) ah);
Platform.openGUI(player, i.getInventorySlot(), GuiBridge.GUI_CRAFTING_CONFIRM, i.isBaubleSlot());
}
}
if (player.openContainer instanceof ContainerCraftConfirm) { if (player.openContainer instanceof ContainerCraftConfirm) {
final ContainerCraftConfirm ccc = (ContainerCraftConfirm) player.openContainer; final ContainerCraftConfirm ccc = (ContainerCraftConfirm) player.openContainer;
@@ -200,6 +200,9 @@ public class PacketJEIRecipe extends AppEngPacket {
if (request.getItem().isDamageable() || Platform.isGTDamageableItem(request.getItem())) { if (request.getItem().isDamageable() || Platform.isGTDamageableItem(request.getItem())) {
Collection<IAEItemStack> outList = inv.getInventory(AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class)).getStorageList().findFuzzy(request, FuzzyMode.IGNORE_ALL); Collection<IAEItemStack> outList = inv.getInventory(AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class)).getStorageList().findFuzzy(request, FuzzyMode.IGNORE_ALL);
for (IAEItemStack is : outList) { for (IAEItemStack is : outList) {
if (is.getStackSize() == 0) {
continue;
}
if (Platform.isGTDamageableItem(request.getItem())) { if (Platform.isGTDamageableItem(request.getItem())) {
if (!(is.getDefinition().getMetadata() == request.getDefinition().getMetadata())) { if (!(is.getDefinition().getMetadata() == request.getDefinition().getMetadata())) {
continue; continue;
@@ -19,8 +19,10 @@
package appeng.core.sync.packets; package appeng.core.sync.packets;
import appeng.api.networking.security.IActionHost;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.ContainerOpenContext; import appeng.container.ContainerOpenContext;
import appeng.container.interfaces.IInventorySlotAware;
import appeng.core.sync.AppEngPacket; import appeng.core.sync.AppEngPacket;
import appeng.core.sync.GuiBridge; import appeng.core.sync.GuiBridge;
import appeng.core.sync.network.INetworkInfo; import appeng.core.sync.network.INetworkInfo;
@@ -60,8 +62,21 @@ public class PacketSwitchGuis extends AppEngPacket {
final AEBaseContainer bc = (AEBaseContainer) c; final AEBaseContainer bc = (AEBaseContainer) c;
final ContainerOpenContext context = bc.getOpenContext(); final ContainerOpenContext context = bc.getOpenContext();
if (context != null) { if (context != null) {
final TileEntity te = context.getTile(); final Object target = bc.getTarget();
Platform.openGUI(player, te, context.getSide(), this.newGui); if (target instanceof IActionHost) {
final IActionHost ah = (IActionHost) target;
final TileEntity te = context.getTile();
if (te != null) {
Platform.openGUI(player, te, bc.getOpenContext().getSide(), this.newGui);
} else {
if (ah instanceof IInventorySlotAware) {
IInventorySlotAware i = ((IInventorySlotAware) ah);
Platform.openGUI(player, i.getInventorySlot(), this.newGui, i.isBaubleSlot());
}
}
}
} }
} }
} }
@@ -1,6 +1,9 @@
package appeng.core.sync.packets; package appeng.core.sync.packets;
import appeng.api.util.AEPartLocation; import appeng.api.AEApi;
import appeng.api.features.ILocatable;
import appeng.api.features.IWirelessTermHandler;
import appeng.core.localization.PlayerMessages;
import appeng.core.sync.AppEngPacket; import appeng.core.sync.AppEngPacket;
import appeng.core.sync.network.INetworkInfo; import appeng.core.sync.network.INetworkInfo;
import appeng.items.tools.powered.Terminal; import appeng.items.tools.powered.Terminal;
@@ -11,6 +14,8 @@ import io.netty.buffer.Unpooled;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Optional;
public class PacketTerminalUse extends AppEngPacket { public class PacketTerminalUse extends AppEngPacket {
Terminal terminal; Terminal terminal;
@@ -35,16 +40,50 @@ public class PacketTerminalUse extends AppEngPacket {
for (int i = 0; i < mainInventory.size(); i++) { for (int i = 0; i < mainInventory.size(); i++) {
ItemStack is = mainInventory.get(i); ItemStack is = mainInventory.get(i);
if (terminal.getItemDefinition().isSameAs(is)) { if (terminal.getItemDefinition().isSameAs(is)) {
Platform.openGUI(player, i, terminal.getBridge(), false); openGui(is, i, player, false);
return; return;
} }
} }
if (Loader.isModLoaded("baubles")) {
tryOpenBauble(player);
}
}
@Optional.Method(modid = "baubles")
void tryOpenBauble(EntityPlayer player) {
for (int i = 0; i < BaublesApi.getBaublesHandler(player).getSlots(); i++) { for (int i = 0; i < BaublesApi.getBaublesHandler(player).getSlots(); i++) {
ItemStack is = BaublesApi.getBaublesHandler(player).getStackInSlot(i); ItemStack is = BaublesApi.getBaublesHandler(player).getStackInSlot(i);
if (terminal.getItemDefinition().isSameAs(is)) { if (terminal.getItemDefinition().isSameAs(is)) {
Platform.openGUI(player, i, terminal.getBridge(), true); openGui(is, i, player, true);
break; break;
} }
} }
} }
void openGui(ItemStack itemStack, int slotIdx, EntityPlayer player, boolean isBauble) {
final IWirelessTermHandler handler = AEApi.instance().registries().wireless().getWirelessTerminalHandler(itemStack);
if (handler == null) {
return;
}
final String unparsedKey = handler.getEncryptionKey(itemStack);
if (unparsedKey.isEmpty()) {
player.sendMessage(PlayerMessages.DeviceNotLinked.get());
return;
}
final long parsedKey = Long.parseLong(unparsedKey);
final ILocatable securityStation = AEApi.instance().registries().locatable().getLocatableBy(parsedKey);
if (securityStation == null) {
player.sendMessage(PlayerMessages.StationCanNotBeLocated.get());
return;
}
if (handler.hasPower(player, 0.5, itemStack)) {
Platform.openGUI(player, slotIdx, terminal.getBridge(), isBauble);
} else {
player.sendMessage(PlayerMessages.DeviceNotPowered.get());
}
}
} }
@@ -19,32 +19,53 @@
package appeng.core.transformer; package appeng.core.transformer;
import appeng.core.AE2ELCore;
import com.google.common.collect.Lists;
import com.google.common.collect.Sets;
import com.google.common.io.ByteStreams;
import net.minecraft.launchwrapper.IClassTransformer; import net.minecraft.launchwrapper.IClassTransformer;
import net.minecraftforge.fml.common.Loader;
import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter; import org.objectweb.asm.ClassWriter;
import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.ClassRemapper;
import org.objectweb.asm.commons.Remapper;
import org.objectweb.asm.tree.*;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
import java.util.function.Consumer; import java.util.function.Consumer;
public class AE2ELTransformer implements IClassTransformer { public class AE2ELTransformer implements IClassTransformer {
@Override @Override
public byte[] transform(String name, String transformedName, byte[] basicClass) { public byte[] transform(String name, String transformedName, byte[] basicClass) {
if (Loader.instance().getIndexedModList().get("stackup") != null) {
return basicClass;
}
transformedName = transformedName.replace('/', '.'); transformedName = transformedName.replace('/', '.');
byte[] data = basicClass;
Consumer<ClassNode> consumer = (n) -> { Consumer<ClassNode> consumer = (n) -> {
}; };
Consumer<ClassNode> emptyConsumer = consumer; Consumer<ClassNode> emptyConsumer = consumer;
if ("net.minecraft.item.ItemStack".equals(transformedName)) { if ("net.minecraft.item.ItemStack".equals(transformedName)) {
consumer = consumer.andThen(ItemStackPatch::patchCountGetSet); consumer = consumer.andThen(ItemStackPatch::patchCountGetSet);
} else if ("net.minecraft.network.PacketBuffer".equals(transformedName)) {
consumer = consumer.andThen((node) -> {
spliceClasses(node, "appeng.core.transformer.PacketBufferPatch",
"readItemStack", "func_150791_c",
"writeItemStack", "func_150788_a");
});
} }
if (consumer != emptyConsumer) { if (consumer != emptyConsumer) {
return processNode(basicClass, consumer); return processNode(basicClass, consumer);
} else { } else {
return data; return basicClass;
} }
} }
@@ -58,4 +79,106 @@ public class AE2ELTransformer implements IClassTransformer {
return writer.toByteArray(); return writer.toByteArray();
} }
public static void spliceClasses(final ClassNode data, final String className, final String... methods) {
try (InputStream stream = AE2ELCore.class.getClassLoader().getResourceAsStream(className.replace('.', '/') + ".class")) {
spliceClasses(data, ByteStreams.toByteArray(stream), className, methods);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
public static void spliceClasses(final ClassNode nodeData, final byte[] dataSplice, final String className, final String... methods) {
// System.out.println("Splicing from " + className + " to " + targetClassName)
if (dataSplice == null) {
throw new RuntimeException("Class " + className + " not found! This is a AE2EL bug!");
}
final Set<String> methodSet = Sets.newHashSet(methods);
final List<String> methodList = Lists.newArrayList(methods);
final ClassReader readerSplice = new ClassReader(dataSplice);
final String className2 = className.replace('.', '/');
final String targetClassName2 = nodeData.name;
final String targetClassName = targetClassName2.replace('/', '.');
final Remapper remapper = new Remapper() {
public String map(final String name) {
return className2.equals(name) ? targetClassName2 : name;
}
};
ClassNode nodeSplice = new ClassNode();
readerSplice.accept(new ClassRemapper(nodeSplice, remapper), ClassReader.EXPAND_FRAMES);
for (String s : nodeSplice.interfaces) {
if (methodSet.contains(s)) {
nodeData.interfaces.add(s);
System.out.println("Added INTERFACE: " + s);
}
}
for (int i = 0; i < nodeSplice.methods.size(); i++) {
if (methodSet.contains(nodeSplice.methods.get(i).name)) {
MethodNode mn = nodeSplice.methods.get(i);
boolean added = false;
for (int j = 0; j < nodeData.methods.size(); j++) {
if (nodeData.methods.get(j).name.equals(mn.name)
&& nodeData.methods.get(j).desc.equals(mn.desc)) {
MethodNode oldMn = nodeData.methods.get(j);
System.out.println("Spliced in METHOD: " + targetClassName + "." + mn.name);
nodeData.methods.set(j, mn);
if (nodeData.name.equals(nodeSplice.superName)) {
ListIterator<AbstractInsnNode> nodeListIterator = mn.instructions.iterator();
while (nodeListIterator.hasNext()) {
AbstractInsnNode node = nodeListIterator.next();
if (node instanceof MethodInsnNode
&& node.getOpcode() == Opcodes.INVOKESPECIAL) {
MethodInsnNode methodNode = (MethodInsnNode) node;
if (targetClassName2.equals(methodNode.owner)) {
methodNode.owner = nodeData.superName;
}
}
}
}
oldMn.name = methodList.get((methodList.indexOf(oldMn.name)) & (~1)) + "_ae2el_old";
nodeData.methods.add(oldMn);
added = true;
break;
}
}
if (!added) {
System.out.println("Added METHOD: " + targetClassName + "." + mn.name);
nodeData.methods.add(mn);
added = true;
}
}
}
for (int i = 0; i < nodeSplice.fields.size(); i++) {
if (methodSet.contains(nodeSplice.fields.get(i).name)) {
FieldNode mn = nodeSplice.fields.get(i);
boolean added = false;
for (int j = 0; j < nodeData.fields.size(); j++) {
if (nodeData.fields.get(j).name.equals(mn.name)
&& nodeData.fields.get(j).desc.equals(mn.desc)) {
System.out.println("Spliced in FIELD: " + targetClassName + "." + mn.name);
nodeData.fields.set(j, mn);
added = true;
break;
}
}
if (!added) {
System.out.println("Added FIELD: " + targetClassName + "." + mn.name);
nodeData.fields.add(mn);
added = true;
}
}
}
}
} }
@@ -20,11 +20,7 @@
package appeng.core.transformer; package appeng.core.transformer;
import org.objectweb.asm.Opcodes; import org.objectweb.asm.Opcodes;
import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.*;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.LdcInsnNode;
import org.objectweb.asm.tree.MethodInsnNode;
import org.objectweb.asm.tree.MethodNode;
import java.util.ListIterator; import java.util.ListIterator;
@@ -0,0 +1,78 @@
package appeng.core.transformer;
/*
* Copyright (c) 2018, 2020 Adrian Siekierka
*
* This file is part of StackUp.
*
* StackUp is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* StackUp is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with StackUp. If not, see <http://www.gnu.org/licenses/>.
*/
import io.netty.buffer.ByteBuf;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.network.PacketBuffer;
import java.io.IOException;
public class PacketBufferPatch extends PacketBuffer {
public PacketBufferPatch(ByteBuf wrapped) {
super(wrapped);
}
@Override
public ItemStack readItemStack() throws IOException {
int id = this.readShort();
if (id < 0) {
return ItemStack.EMPTY;
} else {
int count = this.readByte();
if (count == -42) {
count = this.readInt();
}
int damage = this.readShort();
ItemStack itemstack = new ItemStack(Item.getItemById(id), count, damage);
itemstack.getItem().readNBTShareTag(itemstack, this.readCompoundTag());
return itemstack;
}
}
@Override
public PacketBuffer writeItemStack(ItemStack stack) {
if (stack.isEmpty()) {
this.writeShort(-1);
} else {
this.writeShort(Item.getIdFromItem(stack.getItem()));
if (stack.getCount() >= 0 && stack.getCount() <= 64) {
this.writeByte(stack.getCount());
} else {
this.writeByte(-42);
this.writeInt(stack.getCount());
}
this.writeShort(stack.getMetadata());
NBTTagCompound tag = null;
if (stack.getItem().isDamageable() || stack.getItem().getShareTag()) {
tag = stack.getItem().getNBTShareTag(stack);
}
this.writeCompoundTag(tag);
}
return this;
}
}
@@ -21,6 +21,8 @@ package appeng.crafting;
import appeng.api.networking.IGrid; import appeng.api.networking.IGrid;
import appeng.api.networking.IGridHost; import appeng.api.networking.IGridHost;
import appeng.api.networking.IGridNode;
import appeng.api.networking.crafting.ICraftingRequester;
import appeng.me.cache.CraftingGridCache; import appeng.me.cache.CraftingGridCache;
@@ -42,11 +44,15 @@ public class CraftingLinkNexus {
return true; return true;
} }
if (this.getRequest() == null || this.cpu == null) { CraftingLink req = this.getRequest();
if (req == null || this.cpu == null) {
this.tickOfDeath++; this.tickOfDeath++;
} else { } else {
final boolean hasCpu = craftingGridCache.hasCpu(this.cpu.getCpu()); final boolean hasCpu = craftingGridCache.hasCpu(this.cpu.getCpu());
final boolean hasMachine = this.getRequest().getRequester().getActionableNode().getGrid() == g; final ICraftingRequester requester = req.getRequester();
final IGridNode actionableNode = requester != null ? requester.getActionableNode() : null;
final IGrid grid = actionableNode != null ? actionableNode.getGrid() : null;
final boolean hasMachine = grid != null && grid == g;
if (hasCpu && hasMachine) { if (hasCpu && hasMachine) {
this.tickOfDeath = 0; this.tickOfDeath = 0;
@@ -32,13 +32,16 @@ import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketInformPlayer; import appeng.core.sync.packets.PacketInformPlayer;
import appeng.me.cluster.implementations.CraftingCPUCluster; import appeng.me.cluster.implementations.CraftingCPUCluster;
import appeng.util.Platform; import appeng.util.Platform;
import appeng.util.item.AEItemStack;
import appeng.util.item.MeaningfulItemIterator;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.common.Optional;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Iterator;
import java.util.LinkedList;
import java.util.List; import java.util.List;
public class CraftingTreeNode { public class CraftingTreeNode {
@@ -95,15 +98,6 @@ public class CraftingTreeNode {
IAEItemStack request(final MECraftingInventory inv, long l, final IActionSource src) throws CraftBranchFailure, InterruptedException { IAEItemStack request(final MECraftingInventory inv, long l, final IActionSource src) throws CraftBranchFailure, InterruptedException {
addNode(); addNode();
this.job.handlePausing(); this.job.handlePausing();
if (this.canEmit) {
final IAEItemStack wat = this.what.copy();
wat.setStackSize(l);
this.howManyEmitted = wat.getStackSize();
this.bytes += wat.getStackSize();
return wat;
}
final IItemList<IAEItemStack> inventoryList = inv.getItemList(); final IItemList<IAEItemStack> inventoryList = inv.getItemList();
final List<IAEItemStack> thingsUsed = new ArrayList<>(); final List<IAEItemStack> thingsUsed = new ArrayList<>();
@@ -111,39 +105,60 @@ public class CraftingTreeNode {
this.what.setStackSize(l); this.what.setStackSize(l);
if (this.getSlot() >= 0 && this.parent != null && this.parent.details.isCraftable()) { if (this.getSlot() >= 0 && this.parent != null && this.parent.details.isCraftable()) {
Collection<IAEItemStack> itemList = new ArrayList<>(); LinkedList<IAEItemStack> itemList = new LinkedList<>();
boolean damageableItem = this.what.getItem().isDamageable() || Platform.isGTDamageableItem(this.what.getItem()); boolean damageableItem = this.what.getItem().isDamageable() || Platform.isGTDamageableItem(this.what.getItem());
if (this.parent.details.canSubstitute()) { if (this.parent.details.canSubstitute()) {
for (IAEItemStack subs : this.parent.details.getSubstituteInputs(this.slot)) { for (IAEItemStack subs : this.parent.details.getSubstituteInputs(this.slot)) {
if (damageableItem) { if (damageableItem) {
itemList.addAll(inventoryList.findFuzzy(subs, FuzzyMode.IGNORE_ALL)); Iterator<IAEItemStack> it = new MeaningfulItemIterator<>(inventoryList.findFuzzy(this.what, FuzzyMode.IGNORE_ALL));
while (it.hasNext()) {
IAEItemStack i = it.next();
if (i.getStackSize() > 0) {
itemList.add(i);
}
}
} }
subs = inventoryList.findPrecise(subs); subs = inventoryList.findPrecise(subs);
if (subs != null) { if (subs != null && subs.getStackSize() > 0) {
itemList.add(subs); itemList.add(subs);
} }
} }
} else { } else {
if (damageableItem) { if (damageableItem) {
itemList.addAll(inventoryList.findFuzzy(this.what, FuzzyMode.IGNORE_ALL)); Iterator<IAEItemStack> it = new MeaningfulItemIterator<>(inventoryList.findFuzzy(this.what, FuzzyMode.IGNORE_ALL));
while (it.hasNext()) {
IAEItemStack i = it.next();
if (i.getStackSize() > 0) {
itemList.add(i);
}
}
} else { } else {
final IAEItemStack item = inventoryList.findPrecise(this.what); final IAEItemStack item = inventoryList.findPrecise(this.what);
if (item != null) { if (item != null && item.getStackSize() > 0) {
itemList.add(item); itemList.add(item);
} }
} }
} }
for (IAEItemStack fuzz : itemList) { for (IAEItemStack fuzz : itemList) {
if (this.parent.details.isValidItemForSlot(this.getSlot(), fuzz.copy().getCachedItemStack(1), this.world)) { if (this.parent.details.isValidItemForSlot(this.getSlot(), fuzz.getDefinition(), this.world)) {
fuzz = fuzz.copy(); fuzz = fuzz.copy();
fuzz.setStackSize(l); fuzz.setStackSize(l);
final IAEItemStack available = inv.extractItems(fuzz, Actionable.MODULATE, src); final IAEItemStack available = inv.extractItems(fuzz, Actionable.MODULATE, src);
if (available != null) { if (available != null) {
if (available.getItem().hasContainerItem(available.getDefinition())) {
final ItemStack is2 = Platform.getContainerItem(available.createItemStack());
final IAEItemStack o = AEItemStack.fromItemStack(is2);
if (o != null) {
this.parent.addContainers(o);
}
}
if (!this.exhausted) { if (!this.exhausted) {
final IAEItemStack is = this.job.checkUse(available); final IAEItemStack is = this.job.checkUse(available);
@@ -184,6 +199,16 @@ public class CraftingTreeNode {
} }
} }
if (this.canEmit) {
final IAEItemStack wat = this.what.copy();
wat.setStackSize(l);
this.howManyEmitted = wat.getStackSize();
this.bytes += wat.getStackSize();
return wat;
}
this.exhausted = true; this.exhausted = true;
if (this.nodes.size() == 1) { if (this.nodes.size() == 1) {
@@ -197,6 +222,16 @@ public class CraftingTreeNode {
final IAEItemStack available = inv.extractItems(madeWhat, Actionable.MODULATE, src); final IAEItemStack available = inv.extractItems(madeWhat, Actionable.MODULATE, src);
if (available != null) { if (available != null) {
if (parent != null && available.getItem().hasContainerItem(available.getDefinition())) {
final ItemStack is2 = Platform.getContainerItem(available.createItemStack());
final IAEItemStack o = AEItemStack.fromItemStack(is2);
if (o != null) {
this.parent.addContainers(o);
}
}
this.bytes += available.getStackSize(); this.bytes += available.getStackSize();
l -= available.getStackSize(); l -= available.getStackSize();
@@ -240,6 +275,14 @@ public class CraftingTreeNode {
if (job.isSimulation()) { if (job.isSimulation()) {
this.bytes += l; this.bytes += l;
if (parent != null && this.what.getItem().hasContainerItem(this.what.getDefinition())) {
final ItemStack is2 = Platform.getContainerItem(this.what.copy().setStackSize(1).createItemStack());
final IAEItemStack o = AEItemStack.fromItemStack(is2);
if (o != null) {
this.parent.addContainers(o);
}
}
this.missing += l; this.missing += l;
final IAEItemStack rv = this.what.copy(); final IAEItemStack rv = this.what.copy();
rv.setStackSize(l); rv.setStackSize(l);
@@ -27,15 +27,11 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList; import appeng.api.storage.data.IItemList;
import appeng.core.AEConfig; import appeng.core.AEConfig;
import appeng.me.cluster.implementations.CraftingCPUCluster; import appeng.me.cluster.implementations.CraftingCPUCluster;
import appeng.util.Platform;
import appeng.util.item.AEItemStack;
import com.google.common.collect.ImmutableCollection; import com.google.common.collect.ImmutableCollection;
import it.unimi.dsi.fastutil.objects.Object2LongArrayMap; import it.unimi.dsi.fastutil.objects.Object2LongArrayMap;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List;
import java.util.Map.Entry; import java.util.Map.Entry;
@@ -50,6 +46,7 @@ public class CraftingTreeProcess {
boolean possible = true; boolean possible = true;
private long crafts = 0; private long crafts = 0;
private long bytes = 0; private long bytes = 0;
private ArrayList<IAEItemStack> containers;
public CraftingTreeProcess(final ICraftingGrid cc, final CraftingJob job, final ICraftingPatternDetails details, final CraftingTreeNode craftingTreeNode, final int depth) { public CraftingTreeProcess(final ICraftingGrid cc, final CraftingJob job, final ICraftingPatternDetails details, final CraftingTreeNode craftingTreeNode, final int depth) {
this.parent = craftingTreeNode; this.parent = craftingTreeNode;
@@ -198,32 +195,18 @@ public class CraftingTreeProcess {
void request(final MECraftingInventory inv, final long amountOfTimes, final IActionSource src) throws CraftBranchFailure, InterruptedException { void request(final MECraftingInventory inv, final long amountOfTimes, final IActionSource src) throws CraftBranchFailure, InterruptedException {
addProcess(); addProcess();
this.job.handlePausing(); this.job.handlePausing();
List<IAEItemStack> containerItems = null;
// request and remove inputs... // request and remove inputs...
for (final Entry<CraftingTreeNode, Long> entry : this.nodes.object2LongEntrySet()) { for (final Entry<CraftingTreeNode, Long> entry : this.nodes.object2LongEntrySet()) {
final IAEItemStack stack = entry.getKey().request(inv, entry.getValue() * amountOfTimes, src); final IAEItemStack stack = entry.getKey().request(inv, entry.getValue() * amountOfTimes, src);
if (this.details.isCraftable() && stack.getItem().hasContainerItem(stack.getDefinition())) {
final ItemStack is = Platform.getContainerItem(stack.createItemStack());
final IAEItemStack o = AEItemStack.fromItemStack(is);
if (o != null) {
if (containerItems == null) {
containerItems = new ArrayList<>();
}
this.bytes++;
o.setCachedItemStack(is);
containerItems.add(o);
}
}
} }
if (containerItems != null) { if (this.containers != null) {
for (IAEItemStack i : containerItems) { for (IAEItemStack iae : containers) {
inv.injectItems(i, Actionable.MODULATE, src); inv.injectItems(iae, Actionable.MODULATE, src);
} }
containers = null;
} }
// assume its possible. // assume its possible.
// add crafting results.. // add crafting results..
@@ -235,6 +218,13 @@ public class CraftingTreeProcess {
this.crafts += amountOfTimes; this.crafts += amountOfTimes;
} }
public void addContainers(IAEItemStack container) {
if (this.containers == null) {
this.containers = new ArrayList<>();
}
this.containers.add(container);
}
void dive(final CraftingJob job) { void dive(final CraftingJob job) {
job.addTask(this.getAmountCrafted(this.parent.getStack(1)), this.crafts, this.details, this.depth); job.addTask(this.getAmountCrafted(this.parent.getStack(1)), this.crafts, this.details, this.depth);
for (final Entry<CraftingTreeNode, Long> entry : this.nodes.object2LongEntrySet()) { for (final Entry<CraftingTreeNode, Long> entry : this.nodes.object2LongEntrySet()) {
@@ -10,10 +10,13 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IStringSerializable; import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Random; import java.util.Random;
@@ -97,6 +100,8 @@ public abstract class BlockSlabCommon extends BlockSlab {
return Variant.DEFAULT; return Variant.DEFAULT;
} }
public static class Double extends BlockSlabCommon { public static class Double extends BlockSlabCommon {
private final Block halfSlabBlock; private final Block halfSlabBlock;
@@ -134,6 +139,11 @@ public abstract class BlockSlabCommon extends BlockSlab {
public boolean isDouble() { public boolean isDouble() {
return false; return false;
} }
@Override
public boolean doesSideBlockChestOpening(@Nonnull IBlockState blockState, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull EnumFacing side) {
return false;
}
} }
public enum Variant implements IStringSerializable { public enum Variant implements IStringSerializable {
@@ -158,11 +158,16 @@ public class ContainerMEPortableFluidCell extends AEBaseContainer implements IAE
} else { } else {
currentItem = this.slot < 0 ? this.getPlayerInv().getCurrentItem() : this.getPlayerInv().getStackInSlot(this.slot); currentItem = this.slot < 0 ? this.getPlayerInv().getCurrentItem() : this.getPlayerInv().getStackInSlot(this.slot);
} }
if (currentItem.isEmpty()) { if (currentItem.isEmpty()) {
this.setValidContainer(false); this.setValidContainer(false);
} else if (!this.wirelessTerminalGUIObject.getItemStack().isEmpty() && currentItem != this.wirelessTerminalGUIObject.getItemStack()) { } else if (!this.wirelessTerminalGUIObject.getItemStack().isEmpty() && currentItem != this.wirelessTerminalGUIObject.getItemStack()) {
if (ItemStack.areItemsEqual(this.wirelessTerminalGUIObject.getItemStack(), currentItem)) { if (ItemStack.areItemsEqual(this.wirelessTerminalGUIObject.getItemStack(), currentItem)) {
this.getPlayerInv().setInventorySlotContents(this.getPlayerInv().currentItem, this.wirelessTerminalGUIObject.getItemStack()); if (wirelessTerminalGUIObject.isBaubleSlot()) {
BaublesApi.getBaublesHandler(this.getPlayerInv().player).setStackInSlot(this.slot, this.wirelessTerminalGUIObject.getItemStack());
} else {
this.getPlayerInv().setInventorySlotContents(this.slot, this.wirelessTerminalGUIObject.getItemStack());
}
} else { } else {
this.setValidContainer(false); this.setValidContainer(false);
} }
@@ -171,9 +176,16 @@ public class ContainerMEPortableFluidCell extends AEBaseContainer implements IAE
// drain 1 ae t // drain 1 ae t
this.ticks++; this.ticks++;
if (this.ticks > 10) { if (this.ticks > 10) {
double power = this.wirelessTerminalGUIObject.extractAEPower(this.getPowerMultiplier() * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG); double ext = this.wirelessTerminalGUIObject.extractAEPower(this.getPowerMultiplier() * this.ticks, Actionable.MODULATE, PowerMultiplier.CONFIG);
if (ext < this.getPowerMultiplier() * this.ticks) {
if (Platform.isServer() && this.isValidContainer()) {
this.getPlayerInv().player.sendMessage(PlayerMessages.DeviceNotPowered.get());
}
this.setValidContainer(false);
}
this.ticks = 0; this.ticks = 0;
this.hasPower = power > 0.001; this.hasPower = ext > 0.001;
} }
if (!this.wirelessTerminalGUIObject.rangeCheck()) { if (!this.wirelessTerminalGUIObject.rangeCheck()) {
@@ -471,11 +483,6 @@ public class ContainerMEPortableFluidCell extends AEBaseContainer implements IAE
} }
} }
@Override
public void onSlotChange(Slot s) {
detectAndSendChanges();
}
private void queueInventory(final IContainerListener c) { private void queueInventory(final IContainerListener c) {
if (Platform.isServer() && c instanceof EntityPlayer && this.monitor != null) { if (Platform.isServer() && c instanceof EntityPlayer && this.monitor != null) {
try { try {
@@ -74,13 +74,11 @@ public class MultiCraftingTracker {
public boolean handleCrafting(final int x, final long itemToCraft, final IAEItemStack ais, final InventoryAdaptor d, final World w, final IGrid g, final ICraftingGrid cg, final IActionSource mySrc) { public boolean handleCrafting(final int x, final long itemToCraft, final IAEItemStack ais, final InventoryAdaptor d, final World w, final IGrid g, final ICraftingGrid cg, final IActionSource mySrc) {
if (ais != null) { if (ais != null) {
ItemStack inputStack = ais.getCachedItemStack(ais.getStackSize()); ItemStack inputStack = ais.createItemStack();
ItemStack remaining = d.simulateAdd(inputStack); ItemStack remaining = d.simulateAdd(inputStack);
if (remaining.isEmpty()) { if (remaining.isEmpty()) {
ais.setCachedItemStack(inputStack);
final Future<ICraftingJob> craftingJob = this.getJob(x); final Future<ICraftingJob> craftingJob = this.getJob(x);
if (this.getLink(x) != null) { if (this.getLink(x) != null) {
@@ -117,8 +115,6 @@ public class MultiCraftingTracker {
this.setJob(x, cg.beginCraftingJob(w, g, mySrc, aisC, null)); this.setJob(x, cg.beginCraftingJob(w, g, mySrc, aisC, null));
} }
} }
} else {
ais.setCachedItemStack(remaining);
} }
} }
return false; return false;
@@ -9,7 +9,7 @@ import java.util.Comparator;
public class InventoryBogoSortModule { public class InventoryBogoSortModule {
private static final boolean loaded = Loader.isModLoaded("bogosorter"); private static final boolean loaded = Loader.isModLoaded("bogosorter");
public static final Comparator<IAEItemStack> COMPARATOR = (o1, o2) -> SortHandler.ITEM_COMPARATOR.compare(o1.getDefinition(), o2.getDefinition()); public static final Comparator<IAEItemStack> COMPARATOR = (o1, o2) -> SortHandler.getClientItemComparator().compare(o1.getDefinition(), o2.getDefinition());
public static boolean isLoaded() { public static boolean isLoaded() {
@@ -2,26 +2,23 @@ package appeng.integration.modules.jei;
import appeng.api.AEApi; import appeng.api.AEApi;
import appeng.api.config.FuzzyMode; import appeng.api.config.FuzzyMode;
import appeng.api.implementations.tiles.ISegmentedInventory;
import appeng.api.storage.channels.IItemStorageChannel; import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList; import appeng.api.storage.data.IItemList;
import appeng.client.gui.implementations.GuiCraftingTerm;
import appeng.client.gui.implementations.GuiWirelessCraftingTerminal;
import appeng.container.implementations.ContainerCraftingTerm;
import appeng.container.implementations.ContainerMEMonitorable; import appeng.container.implementations.ContainerMEMonitorable;
import appeng.container.implementations.ContainerWirelessCraftingTerminal;
import appeng.helpers.IContainerCraftingPacket; import appeng.helpers.IContainerCraftingPacket;
import appeng.util.IConfigManagerHost;
import appeng.util.Platform; import appeng.util.Platform;
import appeng.util.item.AEItemStack; import appeng.util.item.AEItemStack;
import mezz.jei.api.gui.IGuiIngredient; import mezz.jei.api.gui.IGuiIngredient;
import mezz.jei.api.gui.IRecipeLayout; import mezz.jei.api.gui.IRecipeLayout;
import mezz.jei.api.recipe.transfer.IRecipeTransferError; import mezz.jei.api.recipe.transfer.IRecipeTransferError;
import mezz.jei.gui.TooltipRenderer;
import mezz.jei.gui.recipes.RecipeLayout; import mezz.jei.gui.recipes.RecipeLayout;
import mezz.jei.gui.recipes.RecipeTransferButton;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.inventory.Container; import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.text.translation.I18n;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.wrapper.PlayerMainInvWrapper; import net.minecraftforge.items.wrapper.PlayerMainInvWrapper;
@@ -57,7 +54,7 @@ public class JEIMissingItem implements IRecipeTransferError {
IItemList<IAEItemStack> used = AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class).createList(); IItemList<IAEItemStack> used = AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class).createList();
for (IGuiIngredient<?> i : recipeLayout.getItemStacks().getGuiIngredients().values()) { for (IGuiIngredient<?> i : recipeLayout.getItemStacks().getGuiIngredients().values()) {
found = false; found = false;
if (i.isInput() && i.getAllIngredients().size() > 0) { if (i.isInput() && !i.getAllIngredients().isEmpty()) {
List<?> allIngredients = i.getAllIngredients(); List<?> allIngredients = i.getAllIngredients();
for (Object allIngredient : allIngredients) { for (Object allIngredient : allIngredients) {
if (allIngredient instanceof ItemStack) { if (allIngredient instanceof ItemStack) {
@@ -66,7 +63,7 @@ public class JEIMissingItem implements IRecipeTransferError {
IAEItemStack search = AEItemStack.fromItemStack(stack); IAEItemStack search = AEItemStack.fromItemStack(stack);
if (stack.getItem().isDamageable() || Platform.isGTDamageableItem(stack.getItem())) { if (stack.getItem().isDamageable() || Platform.isGTDamageableItem(stack.getItem())) {
Collection<IAEItemStack> fuzzy = available.findFuzzy(search, FuzzyMode.IGNORE_ALL); Collection<IAEItemStack> fuzzy = available.findFuzzy(search, FuzzyMode.IGNORE_ALL);
if (fuzzy.size() > 0) { if (!fuzzy.isEmpty()) {
for (IAEItemStack itemStack : fuzzy) { for (IAEItemStack itemStack : fuzzy) {
if (itemStack.getStackSize() > 0) { if (itemStack.getStackSize() > 0) {
if (Platform.isGTDamageableItem(stack.getItem())) { if (Platform.isGTDamageableItem(stack.getItem())) {
@@ -112,11 +109,12 @@ public class JEIMissingItem implements IRecipeTransferError {
@Override @Override
public void showError(Minecraft minecraft, int mouseX, int mouseY, @Nonnull IRecipeLayout recipeLayout, int recipeX, int recipeY) { public void showError(Minecraft minecraft, int mouseX, int mouseY, @Nonnull IRecipeLayout recipeLayout, int recipeX, int recipeY) {
Container c = minecraft.player.openContainer; Container c = minecraft.player.openContainer;
if (c instanceof ContainerMEMonitorable) { if (c instanceof ContainerMEMonitorable container) {
ContainerMEMonitorable container = (ContainerMEMonitorable) c;
IItemList<IAEItemStack> ir = ((ContainerMEMonitorable) c).items; IItemList<IAEItemStack> ir = ((ContainerMEMonitorable) c).items;
boolean found; boolean found = false;
boolean craftable; boolean foundAny = false;
boolean craftable = false;
boolean foundAnyCraftable = false;
int currentSlot = 0; int currentSlot = 0;
this.errored = false; this.errored = false;
@@ -145,17 +143,16 @@ public class JEIMissingItem implements IRecipeTransferError {
for (IGuiIngredient<?> i : recipeLayout.getItemStacks().getGuiIngredients().values()) { for (IGuiIngredient<?> i : recipeLayout.getItemStacks().getGuiIngredients().values()) {
found = false; found = false;
craftable = false; craftable = false;
ArrayList<ItemStack> valid = new ArrayList<>(); IItemList<IAEItemStack> valid = AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class).createList();
if (i.isInput()) { if (i.isInput()) {
List<?> allIngredients = i.getAllIngredients(); List<?> allIngredients = i.getAllIngredients();
for (Object allIngredient : allIngredients) { for (Object allIngredient : allIngredients) {
if (allIngredient instanceof ItemStack) { if (allIngredient instanceof ItemStack stack) {
ItemStack stack = (ItemStack) allIngredient;
if (!stack.isEmpty()) { if (!stack.isEmpty()) {
IAEItemStack search = AEItemStack.fromItemStack(stack); IAEItemStack search = AEItemStack.fromItemStack(stack);
if (stack.getItem().isDamageable() || Platform.isGTDamageableItem(stack.getItem())) { if (stack.getItem().isDamageable() || Platform.isGTDamageableItem(stack.getItem())) {
Collection<IAEItemStack> fuzzy = available.findFuzzy(search, FuzzyMode.IGNORE_ALL); Collection<IAEItemStack> fuzzy = available.findFuzzy(search, FuzzyMode.IGNORE_ALL);
if (fuzzy.size() > 0) { if (!fuzzy.isEmpty()) {
for (IAEItemStack itemStack : fuzzy) { for (IAEItemStack itemStack : fuzzy) {
if (itemStack.getStackSize() > 0) { if (itemStack.getStackSize() > 0) {
if (Platform.isGTDamageableItem(stack.getItem())) { if (Platform.isGTDamageableItem(stack.getItem())) {
@@ -165,7 +162,7 @@ public class JEIMissingItem implements IRecipeTransferError {
} }
found = true; found = true;
used.add(itemStack.copy().setStackSize(1)); used.add(itemStack.copy().setStackSize(1));
valid.add(itemStack.copy().setStackSize(1).createItemStack()); valid.add(itemStack.copy().setStackSize(1));
} else { } else {
if (itemStack.isCraftable()) { if (itemStack.isCraftable()) {
craftable = true; craftable = true;
@@ -180,12 +177,12 @@ public class JEIMissingItem implements IRecipeTransferError {
if (ext.getStackSize() > 0 && (usedStack == null || usedStack.getStackSize() < ext.getStackSize())) { if (ext.getStackSize() > 0 && (usedStack == null || usedStack.getStackSize() < ext.getStackSize())) {
used.add(ext.copy().setStackSize(1)); used.add(ext.copy().setStackSize(1));
if (craftable) { if (craftable) {
valid.clear(); valid.resetStatus();
} }
valid.add(ext.copy().setStackSize(1).createItemStack()); valid.add(ext.copy().setStackSize(1));
found = true; found = true;
} else if (ext.isCraftable()) { } else if (ext.isCraftable()) {
valid.add(ext.copy().setStackSize(1).createItemStack()); valid.add(ext.copy().setStackSize(1));
craftable = true; craftable = true;
} }
} }
@@ -195,27 +192,52 @@ public class JEIMissingItem implements IRecipeTransferError {
} }
} }
} }
if (i.getAllIngredients().size() == 0) { if (i.getAllIngredients().isEmpty()) {
found = true; currentSlot++;
continue;
} }
ArrayList<ItemStack> validStacks = new ArrayList<>();
valid.forEach(v -> {
if (v.getStackSize() > 0) {
ItemStack validStack = v.createItemStack();
validStack.setCount(1);
validStacks.add(validStack);
}
});
if (!found) { if (!found) {
if (craftable) { if (craftable) {
i.drawHighlight(minecraft, new Color(0.0f, 0.0f, 1.0f, 0.4f), recipeX, recipeY); i.drawHighlight(minecraft, new Color(0.0f, 0.0f, 1.0f, 0.4f), recipeX, recipeY);
this.craftableSlots.add(currentSlot); this.craftableSlots.add(currentSlot);
recipeLayout.getItemStacks().set(currentSlot, valid); recipeLayout.getItemStacks().set(currentSlot, validStacks);
foundAnyCraftable = true;
} else { } else {
i.drawHighlight(minecraft, new Color(1.0f, 0.0f, 0.0f, 0.4f), recipeX, recipeY); i.drawHighlight(minecraft, new Color(1.0f, 0.0f, 0.0f, 0.4f), recipeX, recipeY);
} }
this.errored = true; this.errored = true;
} else { } else {
foundAny = true;
this.foundSlots.add(currentSlot); this.foundSlots.add(currentSlot);
recipeLayout.getItemStacks().set(currentSlot, valid); recipeLayout.getItemStacks().set(currentSlot, validStacks);
} }
} }
currentSlot++; currentSlot++;
} }
if (!this.errored) { RecipeTransferButton b = ((RecipeLayout) recipeLayout).getRecipeTransferButton();
((RecipeLayout) recipeLayout).getRecipeTransferButton().init(Minecraft.getMinecraft().player.openContainer, Minecraft.getMinecraft().player); if (b != null) {
List<String> tooltipLines = new ArrayList<>();
b.init(c, minecraft.player);
if (errored && foundAny) {
tooltipLines.add(I18n.translateToLocal("gui.tooltips.appliedenergistics2.PartialTransfer"));
b.enabled = true;
b.visible = true;
}
if (errored) {
tooltipLines.add(I18n.translateToLocal("gui.tooltips.appliedenergistics2.MissingItem"));
}
if (foundAnyCraftable) {
tooltipLines.add(I18n.translateToLocal("gui.tooltips.appliedenergistics2.CraftableItem"));
}
TooltipRenderer.drawHoveringText(minecraft, tooltipLines, mouseX, mouseY);
} }
} }
} }
@@ -21,7 +21,6 @@ package appeng.integration.modules.jei;
import appeng.container.implementations.ContainerCraftingTerm; import appeng.container.implementations.ContainerCraftingTerm;
import appeng.container.implementations.ContainerPatternEncoder; import appeng.container.implementations.ContainerPatternEncoder;
import appeng.container.implementations.ContainerPatternTerm;
import appeng.container.implementations.ContainerWirelessCraftingTerminal; import appeng.container.implementations.ContainerWirelessCraftingTerminal;
import appeng.container.slot.SlotCraftingMatrix; import appeng.container.slot.SlotCraftingMatrix;
import appeng.container.slot.SlotFakeCraftingMatrix; import appeng.container.slot.SlotFakeCraftingMatrix;
@@ -43,12 +43,12 @@ public class ChannelInfoProvider implements IPartProbInfoProvider {
} }
if (part instanceof PartDenseCableSmart || part instanceof PartCableSmart) { if (part instanceof PartDenseCableSmart || part instanceof PartCableSmart) {
final int usedChannels; final int usedChannels;
final int maxChannels = (part instanceof PartDenseCableSmart) ? 32 : 8; final int maxChannels = (part instanceof PartDenseCableSmart) ? AEConfig.instance().getDenseChannelCapacity() : AEConfig.instance().getNormalChannelCapacity();
if (part.getGridNode().isActive()) { if (part.getGridNode().isActive()) {
final NBTTagCompound tmp = new NBTTagCompound(); final NBTTagCompound tmp = new NBTTagCompound();
part.writeToNBT(tmp); part.writeToNBT(tmp);
usedChannels = tmp.getByte("usedChannels"); usedChannels = tmp.getInteger("usedChannels");
} else { } else {
usedChannels = 0; usedChannels = 0;
} }
@@ -26,7 +26,8 @@ import appeng.core.localization.WailaText;
import appeng.parts.networking.PartCableSmart; import appeng.parts.networking.PartCableSmart;
import appeng.parts.networking.PartDenseCableSmart; import appeng.parts.networking.PartDenseCableSmart;
import it.unimi.dsi.fastutil.objects.Object2ByteMap; import it.unimi.dsi.fastutil.objects.Object2ByteMap;
import it.unimi.dsi.fastutil.objects.Object2ByteOpenHashMap; import it.unimi.dsi.fastutil.objects.Object2IntMap;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import mcp.mobius.waila.api.IWailaConfigHandler; import mcp.mobius.waila.api.IWailaConfigHandler;
import mcp.mobius.waila.api.IWailaDataAccessor; import mcp.mobius.waila.api.IWailaDataAccessor;
import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.entity.player.EntityPlayerMP;
@@ -59,7 +60,7 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider {
* <p/> * <p/>
* The cache will be updated from the server. * The cache will be updated from the server.
*/ */
private final Object2ByteMap<IPart> cache = new Object2ByteOpenHashMap<>(); private final Object2IntMap<IPart> cache = new Object2IntOpenHashMap<>();
/** /**
* Adds the used and max channel to the tool tip * Adds the used and max channel to the tool tip
@@ -78,10 +79,10 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider {
if (part instanceof PartCableSmart || part instanceof PartDenseCableSmart) { if (part instanceof PartCableSmart || part instanceof PartDenseCableSmart) {
final NBTTagCompound tag = accessor.getNBTData(); final NBTTagCompound tag = accessor.getNBTData();
final byte usedChannels = this.getUsedChannels(part, tag, this.cache); final int usedChannels = this.getUsedChannels(part, tag, this.cache);
if (usedChannels >= 0) { if (usedChannels >= 0) {
final byte maxChannels = (byte) ((part instanceof PartDenseCableSmart) ? 32 : 8); final int maxChannels = ((part instanceof PartDenseCableSmart) ? AEConfig.instance().getDenseChannelCapacity() : AEConfig.instance().getNormalChannelCapacity());
final String formattedToolTip = String.format(WailaText.Channels.getLocal(), usedChannels, maxChannels); final String formattedToolTip = String.format(WailaText.Channels.getLocal(), usedChannels, maxChannels);
currentToolTip.add(formattedToolTip); currentToolTip.add(formattedToolTip);
@@ -102,11 +103,11 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider {
* @param cache cache with previous knowledge * @param cache cache with previous knowledge
* @return used channels on the cable * @return used channels on the cable
*/ */
private byte getUsedChannels(final IPart part, final NBTTagCompound tag, final Object2ByteMap<IPart> cache) { private int getUsedChannels(final IPart part, final NBTTagCompound tag, final Object2IntMap<IPart> cache) {
final byte usedChannels; final int usedChannels;
if (tag.hasKey(ID_USED_CHANNELS)) { if (tag.hasKey(ID_USED_CHANNELS)) {
usedChannels = tag.getByte(ID_USED_CHANNELS); usedChannels = tag.getInteger(ID_USED_CHANNELS);
this.cache.put(part, usedChannels); this.cache.put(part, usedChannels);
} else if (this.cache.containsKey(part)) { } else if (this.cache.containsKey(part)) {
usedChannels = this.cache.get(part); usedChannels = this.cache.get(part);
@@ -139,9 +140,9 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider {
part.writeToNBT(tempTag); part.writeToNBT(tempTag);
if (tempTag.hasKey(ID_USED_CHANNELS)) { if (tempTag.hasKey(ID_USED_CHANNELS)) {
final byte usedChannels = tempTag.getByte(ID_USED_CHANNELS); final int usedChannels = tempTag.getInteger(ID_USED_CHANNELS);
tag.setByte(ID_USED_CHANNELS, usedChannels); tag.setInteger(ID_USED_CHANNELS, usedChannels);
} }
} }
@@ -119,7 +119,7 @@ public enum MaterialType {
FLUID_CELL64K_PART(57, "material_fluid_cell64k_part", EnumSet.of(AEFeature.STORAGE_CELLS)), FLUID_CELL64K_PART(57, "material_fluid_cell64k_part", EnumSet.of(AEFeature.STORAGE_CELLS)),
CARD_PATTERN_EXPANSION(58, "material_card_pattern_expansion", EnumSet.of(AEFeature.ADVANCED_CARDS)), CARD_PATTERN_EXPANSION(58, "material_card_pattern_expansion", EnumSet.of(AEFeature.ADVANCED_CARDS)),
CARD_QUANTUM_LINK(59, "material_card_quantum_link", EnumSet.of(AEFeature.ADVANCED_CARDS)), CARD_QUANTUM_LINK(59, "material_card_quantum_link", EnumSet.of(AEFeature.ADVANCED_CARDS, AEFeature.QUANTUM_LINKING_CARD)),
CARD_MAGNET(60, "material_card_magnet", EnumSet.of(AEFeature.BASIC_CARDS)); CARD_MAGNET(60, "material_card_magnet", EnumSet.of(AEFeature.BASIC_CARDS));
@@ -29,6 +29,8 @@ import appeng.helpers.InvalidPatternHelper;
import appeng.helpers.PatternHelper; import appeng.helpers.PatternHelper;
import appeng.items.AEBaseItem; import appeng.items.AEBaseItem;
import appeng.util.Platform; import appeng.util.Platform;
import appeng.util.item.ItemStackHashStrategy;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap;
import net.minecraft.client.util.ITooltipFlag; import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
@@ -45,12 +47,12 @@ import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.WeakHashMap;
public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternItem { public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternItem {
private static final ItemStackHashStrategy hashStrategy = ItemStackHashStrategy.comparingAllButCount();
// rather simple client side caching. // rather simple client side caching.
private static final Map<ItemStack, ItemStack> SIMPLE_CACHE = new WeakHashMap<>(); private static final Map<ItemStack, ItemStack> SIMPLE_CACHE = new Object2ObjectOpenCustomHashMap<>(hashStrategy);
public ItemEncodedPattern() { public ItemEncodedPattern() {
this.setMaxStackSize(64); this.setMaxStackSize(64);
@@ -70,6 +72,7 @@ public class ItemEncodedPattern extends AEBaseItem implements ICraftingPatternIt
private boolean clearPattern(final ItemStack stack, final EntityPlayer player) { private boolean clearPattern(final ItemStack stack, final EntityPlayer player) {
if (player.isSneaking()) { if (player.isSneaking()) {
SIMPLE_CACHE.remove(stack);
if (Platform.isClient()) { if (Platform.isClient()) {
return false; return false;
} }
@@ -209,9 +209,11 @@ public class ToolWirelessTerminal extends AEBasePoweredItem implements IWireless
} }
boolean inverted = u.getInstalledUpgrades(Upgrades.INVERTER) == 1; boolean inverted = u.getInstalledUpgrades(Upgrades.INVERTER) == 1;
List<EntityItem> ei = worldIn.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB( List<EntityItem> ei = worldIn.getEntitiesWithinAABB(EntityItem.class,
new Vec3d(entityIn.posX + 5, entityIn.posY + 5, entityIn.posZ + 5), new AxisAlignedBB(
new Vec3d(entityIn.posX - 5, entityIn.posY - 5, entityIn.posZ - 5))); entityIn.posX - 5, entityIn.posY - 5, entityIn.posZ - 5,
entityIn.posX + 5, entityIn.posY + 5, entityIn.posZ + 5
));
boolean emptyFilter = true; boolean emptyFilter = true;
for (EntityItem i : ei) { for (EntityItem i : ei) {
if (i.isDead) { if (i.isDead) {
+8 -8
View File
@@ -47,7 +47,8 @@ public class GridConnection implements IGridConnection, IPathItem {
private static final String EXISTING_CONNECTION_MESSAGE = "Connection between node [machine=%s, %s] and [machine=%s, %s] on [%s] already exists."; private static final String EXISTING_CONNECTION_MESSAGE = "Connection between node [machine=%s, %s] and [machine=%s, %s] on [%s] already exists.";
private static final MENetworkChannelsChanged EVENT = new MENetworkChannelsChanged(); private static final MENetworkChannelsChanged EVENT = new MENetworkChannelsChanged();
private int channelData = 0; private int usedChannels = 0;
private int lastUsedChannels = 0;
private Object visitorIterationNumber = null; private Object visitorIterationNumber = null;
private GridNode sideA; private GridNode sideA;
private AEPartLocation fromAtoB; private AEPartLocation fromAtoB;
@@ -118,7 +119,7 @@ public class GridConnection implements IGridConnection, IPathItem {
@Override @Override
public int getUsedChannels() { public int getUsedChannels() {
return (this.channelData >> 8) & 0xff; return usedChannels;
} }
@Override @Override
@@ -132,7 +133,7 @@ public class GridConnection implements IGridConnection, IPathItem {
@Override @Override
public void setControllerRoute(final IPathItem fast, final boolean zeroOut) { public void setControllerRoute(final IPathItem fast, final boolean zeroOut) {
if (zeroOut) { if (zeroOut) {
this.channelData &= ~0xff; this.lastUsedChannels = 0;
} }
if (this.sideB == fast) { if (this.sideB == fast) {
@@ -145,7 +146,7 @@ public class GridConnection implements IGridConnection, IPathItem {
@Override @Override
public boolean canSupportMoreChannels() { public boolean canSupportMoreChannels() {
return this.getLastUsedChannels() < 32; // max, PERIOD. return this.getLastUsedChannels() < AEConfig.instance().getDenseChannelCapacity(); // max, PERIOD.
} }
@Override @Override
@@ -155,7 +156,7 @@ public class GridConnection implements IGridConnection, IPathItem {
@Override @Override
public void incrementChannelCount(final int usedChannels) { public void incrementChannelCount(final int usedChannels) {
this.channelData += usedChannels; this.lastUsedChannels += usedChannels;
} }
@Override @Override
@@ -166,8 +167,7 @@ public class GridConnection implements IGridConnection, IPathItem {
@Override @Override
public void finalizeChannels() { public void finalizeChannels() {
if (this.getUsedChannels() != this.getLastUsedChannels()) { if (this.getUsedChannels() != this.getLastUsedChannels()) {
this.channelData &= 0xff; this.usedChannels = this.lastUsedChannels;
this.channelData |= this.channelData << 8;
if (this.sideA.getInternalGrid() != null) { if (this.sideA.getInternalGrid() != null) {
this.sideA.getInternalGrid().postEventTo(this.sideA, EVENT); this.sideA.getInternalGrid().postEventTo(this.sideA, EVENT);
@@ -180,7 +180,7 @@ public class GridConnection implements IGridConnection, IPathItem {
} }
private int getLastUsedChannels() { private int getLastUsedChannels() {
return this.channelData & 0xff; return lastUsedChannels;
} }
Object getVisitorIterationNumber() { Object getVisitorIterationNumber() {
+3 -7
View File
@@ -48,7 +48,7 @@ import java.util.*;
public class GridNode implements IGridNode, IPathItem { public class GridNode implements IGridNode, IPathItem {
private static final MENetworkChannelsChanged EVENT = new MENetworkChannelsChanged(); private static final MENetworkChannelsChanged EVENT = new MENetworkChannelsChanged();
private static final int[] CHANNEL_COUNT = {0, 8, 32}; private static final int[] CHANNEL_COUNT = {0, AEConfig.instance().getNormalChannelCapacity(), AEConfig.instance().getDenseChannelCapacity()};
private final List<IGridConnection> connections = new ArrayList<>(); private final List<IGridConnection> connections = new ArrayList<>();
private final IGridBlock gridProxy; private final IGridBlock gridProxy;
@@ -77,7 +77,7 @@ public class GridNode implements IGridNode, IPathItem {
} }
public int usedChannels() { public int usedChannels() {
return this.lastUsedChannels; return this.usedChannels;
} }
Class<? extends IGridHost> getMachineClass() { Class<? extends IGridHost> getMachineClass() {
@@ -545,7 +545,7 @@ public class GridNode implements IGridNode, IPathItem {
return; return;
} }
if (this.getLastUsedChannels() != this.getUsedChannels()) { if (this.lastUsedChannels != this.usedChannels) {
this.lastUsedChannels = this.usedChannels; this.lastUsedChannels = this.usedChannels;
if (this.getInternalGrid() != null) { if (this.getInternalGrid() != null) {
@@ -554,10 +554,6 @@ public class GridNode implements IGridNode, IPathItem {
} }
} }
private int getLastUsedChannels() {
return this.lastUsedChannels;
}
public long getLastSecurityKey() { public long getLastSecurityKey() {
return this.lastSecurityKey; return this.lastSecurityKey;
} }
+10 -7
View File
@@ -63,6 +63,7 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors; import java.util.concurrent.Executors;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadFactory;
import java.util.stream.StreamSupport;
public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper, ICellProvider, IMEInventoryHandler<IAEItemStack> { public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper, ICellProvider, IMEInventoryHandler<IAEItemStack> {
@@ -285,14 +286,16 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
private void updateCPUClusters() { private void updateCPUClusters() {
this.craftingCPUClusters.clear(); this.craftingCPUClusters.clear();
for (final IGridNode cst : this.grid.getMachines(TileCraftingStorageTile.class)) { for (Object cls: StreamSupport.stream(grid.getMachinesClasses().spliterator(), false).filter(TileCraftingStorageTile.class::isAssignableFrom).toArray()) {
final TileCraftingStorageTile tile = (TileCraftingStorageTile) cst.getMachine(); for (final IGridNode cst : this.grid.getMachines((Class<? extends IGridHost>) cls)) {
final CraftingCPUCluster cluster = (CraftingCPUCluster) tile.getCluster(); final TileCraftingStorageTile tile = (TileCraftingStorageTile) cst.getMachine();
if (cluster != null) { final CraftingCPUCluster cluster = (CraftingCPUCluster) tile.getCluster();
this.craftingCPUClusters.add(cluster); if (cluster != null) {
this.craftingCPUClusters.add(cluster);
if (cluster.getLastCraftingLink() != null) { if (cluster.getLastCraftingLink() != null) {
this.addLink((CraftingLink) cluster.getLastCraftingLink()); this.addLink((CraftingLink) cluster.getLastCraftingLink());
}
} }
} }
} }
+1 -1
View File
@@ -83,7 +83,7 @@ public class PathGridCache implements IPathingGrid {
if (this.controllerState == ControllerState.NO_CONTROLLER) { if (this.controllerState == ControllerState.NO_CONTROLLER) {
final int requiredChannels = this.calculateRequiredChannels(); final int requiredChannels = this.calculateRequiredChannels();
int used = requiredChannels; int used = requiredChannels;
if (AEConfig.instance().isFeatureEnabled(AEFeature.CHANNELS) && requiredChannels > 8) { if (AEConfig.instance().isFeatureEnabled(AEFeature.CHANNELS) && requiredChannels > AEConfig.instance().getNormalChannelCapacity()) {
used = 0; used = 0;
} }
+6
View File
@@ -81,8 +81,11 @@ public class SecurityCache implements ISecurityGrid {
private void updateSecurityKey() { private void updateSecurityKey() {
final long lastCode = this.securityKey; final long lastCode = this.securityKey;
int newOwner = -1;
if (this.securityProvider.size() == 1) { if (this.securityProvider.size() == 1) {
this.securityKey = this.securityProvider.get(0).getSecurityKey(); this.securityKey = this.securityProvider.get(0).getSecurityKey();
ISecurityProvider securityProvider = this.securityProvider.get(0);
newOwner = securityProvider.getOwner();
} else { } else {
this.securityKey = -1; this.securityKey = -1;
} }
@@ -91,6 +94,9 @@ public class SecurityCache implements ISecurityGrid {
this.getGrid().postEvent(new MENetworkSecurityChange()); this.getGrid().postEvent(new MENetworkSecurityChange());
for (final IGridNode n : this.getGrid().getNodes()) { for (final IGridNode n : this.getGrid().getNodes()) {
((GridNode) n).setLastSecurityKey(this.securityKey); ((GridNode) n).setLastSecurityKey(this.securityKey);
if (n.getPlayerID() != newOwner) {
n.setPlayerID(newOwner);
}
} }
} }
} }
@@ -34,6 +34,7 @@ import appeng.client.render.cablebus.CableBusRenderState;
import appeng.client.render.cablebus.CableCoreType; import appeng.client.render.cablebus.CableCoreType;
import appeng.client.render.cablebus.FacadeRenderState; import appeng.client.render.cablebus.FacadeRenderState;
import appeng.core.AELog; import appeng.core.AELog;
import appeng.core.AEConfig;
import appeng.facade.FacadeContainer; import appeng.facade.FacadeContainer;
import appeng.helpers.AEMultiTile; import appeng.helpers.AEMultiTile;
import appeng.me.GridConnection; import appeng.me.GridConnection;
@@ -1022,7 +1023,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
} }
int length = (int) part.getCableConnectionLength(null); int length = (int) part.getCableConnectionLength(null);
if (length > 0 && length <= 8) { if (length > 0 && length <= AEConfig.instance().getNormalChannelCapacity()) {
renderState.getAttachmentConnections().put(facing, length); renderState.getAttachmentConnections().put(facing, length);
} }
} }
@@ -132,23 +132,25 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
continue; continue;
} }
if( this.craftOnly() ) if (this.craftOnly()) {
{ this.didSomething = this.craftingTracker.handleCrafting(slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc) || this.didSomething;
this.didSomething = this.craftingTracker.handleCrafting( slotToExport, this.itemToSend, ais, destination, this.getTile().getWorld(), this.getProxy().getGrid(), cg, this.mySrc ) || this.didSomething; continue;
continue; }
}
final long before = this.itemToSend; final long before = this.itemToSend;
if (this.getInstalledUpgrades(Upgrades.FUZZY) > 0) { if (this.getInstalledUpgrades(Upgrades.FUZZY) > 0) {
for (final IAEItemStack o : ImmutableList.copyOf(inv.getStorageList().findFuzzy(ais, fzMode))) { for (final IAEItemStack o : ImmutableList.copyOf(inv.getStorageList().findFuzzy(ais, fzMode))) {
this.pushItemIntoTarget(destination, energy, inv, o); if (o.getStackSize() > 0) {
if (this.itemToSend <= 0) { this.pushItemIntoTarget(destination, energy, inv, o);
break; if (this.itemToSend <= 0) {
break;
}
} }
} }
} else { } else {
if (inv.getStorageList().findPrecise(ais) != null) { final IAEItemStack o = inv.getStorageList().findPrecise(ais);
if (o != null && o.getStackSize() > 0) {
this.pushItemIntoTarget(destination, energy, inv, ais); this.pushItemIntoTarget(destination, energy, inv, ais);
} }
} }
@@ -305,6 +305,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
PlayerMainInvWrapper playerInv = new PlayerMainInvWrapper(player.inventory); PlayerMainInvWrapper playerInv = new PlayerMainInvWrapper(player.inventory);
final IMaterials materials = AEApi.instance().definitions().materials(); final IMaterials materials = AEApi.instance().definitions().materials();
int missingPatternsToEncode = 0; int missingPatternsToEncode = 0;
int amountPatternSlots = 8 + this.getInstalledUpgrades(Upgrades.PATTERN_EXPANSION) * 9;
for (int i = 0; i < inv.getSlots(); i++) { for (int i = 0; i < inv.getSlots(); i++) {
if (target.getStackInSlot(i).getItem() instanceof ItemEncodedPattern) { if (target.getStackInSlot(i).getItem() instanceof ItemEncodedPattern) {
@@ -316,7 +317,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
} }
} }
for (int x = 0; x < tmp.getSlots(); x++) { for (int x = 0; x < amountPatternSlots; x++) {
if (!tmp.getStackInSlot(x).isEmpty()) { if (!tmp.getStackInSlot(x).isEmpty()) {
boolean found = false; boolean found = false;
for (int i = 0; i < playerInv.getSlots(); i++) { for (int i = 0; i < playerInv.getSlots(); i++) {
@@ -234,7 +234,7 @@ public class PartCable extends AEBasePart implements IPartCable {
howMany = Math.max(gc.getUsedChannels(), howMany); howMany = Math.max(gc.getUsedChannels(), howMany);
} }
data.setByte("usedChannels", (byte) howMany); data.setInteger("usedChannels", howMany);
} }
} }
} }
@@ -48,6 +48,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IItemHa
private static final float POWER_DRAIN = 2.0f; private static final float POWER_DRAIN = 2.0f;
private static final P2PModels MODELS = new P2PModels("part/p2p/p2p_tunnel_items"); private static final P2PModels MODELS = new P2PModels("part/p2p/p2p_tunnel_items");
private boolean partVisited = false; private boolean partVisited = false;
private int depth;
@PartModels @PartModels
public static List<IPartModel> getModels() { public static List<IPartModel> getModels() {
@@ -195,7 +196,13 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IItemHa
@Override @Override
public ItemStack insertItem(final int slot, final ItemStack stack, boolean simulate) { public ItemStack insertItem(final int slot, final ItemStack stack, boolean simulate) {
return this.getDestination().insertItem(slot, stack, simulate); if (depth == 1) {
return stack;
}
this.depth += 1;
ItemStack ret = this.getDestination().insertItem(slot, stack, simulate);
this.depth -= 1;
return ret;
} }
@Override @Override
@@ -69,8 +69,13 @@ public abstract class AbstractPartEncoder extends AbstractPartTerminal {
this.crafting.setStackInSlot(x, item == null ? ItemStack.EMPTY : item.createItemStack()); this.crafting.setStackInSlot(x, item == null ? ItemStack.EMPTY : item.createItemStack());
} }
for (int x = 0; x < this.output.getSlots() && x < details.getOutputs().length; x++) { for (int x = 0; x < this.output.getSlots(); x++) {
final IAEItemStack item = details.getOutputs()[x]; final IAEItemStack item;
if (x < details.getOutputs().length) {
item = details.getOutputs()[x];
} else {
item = null;
}
this.output.setStackInSlot(x, item == null ? ItemStack.EMPTY : item.createItemStack()); this.output.setStackInSlot(x, item == null ? ItemStack.EMPTY : item.createItemStack());
} }
} }
@@ -343,6 +343,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
PlayerMainInvWrapper playerInv = new PlayerMainInvWrapper(player.inventory); PlayerMainInvWrapper playerInv = new PlayerMainInvWrapper(player.inventory);
final IMaterials materials = AEApi.instance().definitions().materials(); final IMaterials materials = AEApi.instance().definitions().materials();
int missingPatternsToEncode = 0; int missingPatternsToEncode = 0;
int amountPatternSlots = 8 + this.getInstalledUpgrades(Upgrades.PATTERN_EXPANSION) * 9;
for (int i = 0; i < inv.getSlots(); i++) { for (int i = 0; i < inv.getSlots(); i++) {
if (target.getStackInSlot(i).getItem() instanceof ItemEncodedPattern) { if (target.getStackInSlot(i).getItem() instanceof ItemEncodedPattern) {
@@ -354,8 +355,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
} }
} }
for (int x = 0; x < amountPatternSlots; x++) {
for (int x = 0; x < tmp.getSlots(); x++) {
if (!tmp.getStackInSlot(x).isEmpty()) { if (!tmp.getStackInSlot(x).isEmpty()) {
boolean found = false; boolean found = false;
for (int i = 0; i < playerInv.getSlots(); i++) { for (int i = 0; i < playerInv.getSlots(); i++) {
@@ -371,6 +371,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
} }
} }
} }
if (Platform.isServer() && missingPatternsToEncode > 0) { if (Platform.isServer() && missingPatternsToEncode > 0) {
player.sendMessage(PlayerMessages.MissingPatternsToEncode.get()); player.sendMessage(PlayerMessages.MissingPatternsToEncode.get());
} }
@@ -74,8 +74,8 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
private final ConfigManager manager; private final ConfigManager manager;
private final AppEngInternalInventory inputCells = new AppEngInternalInventory(this, NUMBER_OF_CELL_SLOTS); private final AppEngInternalInventory inputCells = new AppEngInternalInventory(this, NUMBER_OF_CELL_SLOTS, 1);
private final AppEngInternalInventory outputCells = new AppEngInternalInventory(this, NUMBER_OF_CELL_SLOTS); private final AppEngInternalInventory outputCells = new AppEngInternalInventory(this, NUMBER_OF_CELL_SLOTS, 1);
private final IItemHandler combinedInventory = new WrapperChainedItemHandler(this.inputCells, this.outputCells); private final IItemHandler combinedInventory = new WrapperChainedItemHandler(this.inputCells, this.outputCells);
private final IItemHandler inputCellsExt = new WrapperFilteredItemHandler(this.inputCells, AEItemFilters.INSERT_ONLY); private final IItemHandler inputCellsExt = new WrapperFilteredItemHandler(this.inputCells, AEItemFilters.INSERT_ONLY);
+14 -5
View File
@@ -331,13 +331,24 @@ public class Platform {
x = tile.getPos().getX(); x = tile.getPos().getX();
y = tile.getPos().getY(); y = tile.getPos().getY();
z = tile.getPos().getZ(); z = tile.getPos().getZ();
} else {
if (p.openContainer instanceof IInventorySlotAware) {
x = ((IInventorySlotAware) p.openContainer).getInventorySlot();
y = ((IInventorySlotAware) p.openContainer).isBaubleSlot() ? 1 : 0;
} else {
x = p.inventory.currentItem;
}
} }
if ((type.getType().isItem() && tile == null) || type.hasPermissions(tile, x, y, z, side, p)) { if ((type.getType().isItem() && tile == null) || type.hasPermissions(tile, x, y, z, side, p)) {
if (tile == null && type.getType() == GuiHostType.ITEM) { if (tile == null && type.getType() == GuiHostType.ITEM) {
p.openGui(AppEng.instance(), type.ordinal() << 4, p.getEntityWorld(), x, y, z); p.openGui(AppEng.instance(), type.ordinal() << 4, p.getEntityWorld(), x, 0, 0);
} else if (tile == null || type.getType() == GuiHostType.ITEM) { } else if (tile == null || type.getType() == GuiHostType.ITEM) {
p.openGui(AppEng.instance(), type.ordinal() << 4 | (1 << 3), p.getEntityWorld(), x, y, z); if (tile != null) {
p.openGui(AppEng.instance(), type.ordinal() << 4 | (1 << 3), p.getEntityWorld(), x, y, z);
} else {
p.openGui(AppEng.instance(), type.ordinal() << 4, p.getEntityWorld(), x, y, z);
}
} else { } else {
p.openGui(AppEng.instance(), type.ordinal() << 4 | (side.ordinal()), tile.getWorld(), x, y, z); p.openGui(AppEng.instance(), type.ordinal() << 4 | (side.ordinal()), tile.getWorld(), x, y, z);
} }
@@ -350,9 +361,7 @@ public class Platform {
} }
if (type.getType().isItem()) { if (type.getType().isItem()) {
if (type.getType() == GuiHostType.ITEM) { p.openGui(AppEng.instance(), type.ordinal() << 4, p.getEntityWorld(), slot, isBauble ? 1 : 0, Integer.MIN_VALUE);
p.openGui(AppEng.instance(), type.ordinal() << 4, p.getEntityWorld(), slot, isBauble ? 1 : 0, Integer.MIN_VALUE);
}
} }
} }
@@ -113,7 +113,7 @@ public class IMEAdaptor extends InventoryAdaptor {
IAEItemStack out = null; IAEItemStack out = null;
for (final IAEItemStack req : ImmutableList.copyOf(this.getList().findFuzzy(reqFilter, fuzzyMode))) { for (final IAEItemStack req : ImmutableList.copyOf(this.getList().findFuzzy(reqFilter, fuzzyMode))) {
if (req != null) { if (req != null && req.getStackSize() > 0) {
req.setStackSize(amount); req.setStackSize(amount);
out = this.target.extractItems(req, type, this.src); out = this.target.extractItems(req, type, this.src);
if (out != null) { if (out != null) {
@@ -0,0 +1,101 @@
package appeng.util.item;
import it.unimi.dsi.fastutil.Hash;
import net.minecraft.item.ItemStack;
import javax.annotation.Nullable;
import java.util.Objects;
/**
* Original code by Eutro, butchered by Prototypetrousers.
* A configurable generator of hashing strategies, allowing for consideration of select properties of ItemStacks when
* considering equality.
*/
public interface ItemStackHashStrategy extends Hash.Strategy<ItemStack> {
/**
* @return a builder object for producing a custom ItemStackHashStrategy.
*/
static ItemStackHashStrategyBuilder builder() {
return new ItemStackHashStrategyBuilder();
}
/**
* Generates an ItemStackHash configured to compare every aspect of ItemStacks except the number
* of items in the stack.
*
* @return the ItemStackHashStrategy as described above.
*/
static ItemStackHashStrategy comparingAllButCount() {
return builder().compareItem(true)
.compareDamage(true)
.compareTag(true)
.build();
}
/**
* Builder pattern class for generating customized ItemStackHashStrategy
*/
class ItemStackHashStrategyBuilder {
private boolean item, damage, tag;
/**
* Defines whether the Item type should be considered for equality.
*
* @param choice {@code true} to consider this property, {@code false} to ignore it.
* @return {@code this}
*/
public ItemStackHashStrategyBuilder compareItem(boolean choice) {
item = choice;
return this;
}
/**
* Defines whether damage values should be considered for equality.
*
* @param choice {@code true} to consider this property, {@code false} to ignore it.
* @return {@code this}
*/
public ItemStackHashStrategyBuilder compareDamage(boolean choice) {
damage = choice;
return this;
}
/**
* Defines whether NBT Tags should be considered for equality.
*
* @param choice {@code true} to consider this property, {@code false} to ignore it.
* @return {@code this}
*/
public ItemStackHashStrategyBuilder compareTag(boolean choice) {
tag = choice;
return this;
}
/**
* @return the ItemStackHashStrategy as configured by "compare" methods.
*/
public ItemStackHashStrategy build() {
return new ItemStackHashStrategy() {
@Override
public int hashCode(@Nullable ItemStack o) {
return o == null || o.isEmpty() ? 0 : Objects.hash(
item ? o.getItem() : null,
damage ? o.getItemDamage() : null,
tag ? o.getTagCompound() : null
);
}
@Override
public boolean equals(@Nullable ItemStack a, @Nullable ItemStack b) {
if (a == null || a.isEmpty()) return b == null || b.isEmpty();
if (b == null || b.isEmpty()) return false;
return (!item || a.getItem() == b.getItem()) &&
(!damage || a.getItemDamage() == b.getItemDamage()) &&
(!tag || Objects.equals(a.getTagCompound(), b.getTagCompound()));
}
};
}
}
}
@@ -135,6 +135,9 @@ public class OreHelper {
List<OreDictFilterMatcher.MatchRule> rulesList = OreDictFilterMatcher.parseExpression(oreExp); List<OreDictFilterMatcher.MatchRule> rulesList = OreDictFilterMatcher.parseExpression(oreExp);
for (String ore : OreDictionary.getOreNames()) { for (String ore : OreDictionary.getOreNames()) {
if (ore == null) {
continue;
}
if (OreDictFilterMatcher.matches(rulesList, ore)) { if (OreDictFilterMatcher.matches(rulesList, ore)) {
matchingIds.add(OreDictionary.getOreID(ore)); matchingIds.add(OreDictionary.getOreID(ore));
} }
@@ -1,60 +1,60 @@
{ {
"forge_marker": 1, "forge_marker": 1,
"defaults": { "defaults": {
"model": "appliedenergistics2:chest/base" "model": "appliedenergistics2:chest/base"
}, },
"variants": { "variants": {
"slot_state": { "slot_state": {
"empty": { "empty": {
"submodel": { "submodel": {
"lights": { "lights": {
"model": "appliedenergistics2:chest/lights_off" "model": "appliedenergistics2:chest/lights_off"
}, },
"state": { "state": {
"model": "appliedenergistics2:chest/cell_state_empty" "model": "appliedenergistics2:chest/cell_state_empty"
} }
}
},
"offline": {
"submodel": {
"lights": {
"model": "appliedenergistics2:chest/lights_off"
},
"state": {
"model": "appliedenergistics2:chest/cell_state_offline"
}
}
},
"online": {
"submodel": {
"lights": {
"model": "appliedenergistics2:chest/lights_on"
},
"state": {
"model": "appliedenergistics2:chest/cell_state_online"
}
}
},
"types_full": {
"submodel": {
"lights": {
"model": "appliedenergistics2:chest/lights_on"
},
"state": {
"model": "appliedenergistics2:chest/cell_state_types_full"
}
}
},
"full": {
"submodel": {
"lights": {
"model": "appliedenergistics2:chest/lights_on"
},
"state": {
"model": "appliedenergistics2:chest/cell_state_full"
}
}
}
} }
},
"offline": {
"submodel": {
"lights": {
"model": "appliedenergistics2:chest/lights_off"
},
"state": {
"model": "appliedenergistics2:chest/cell_state_offline"
}
}
},
"online": {
"submodel": {
"lights": {
"model": "appliedenergistics2:chest/lights_on"
},
"state": {
"model": "appliedenergistics2:chest/cell_state_online"
}
}
},
"types_full": {
"submodel": {
"lights": {
"model": "appliedenergistics2:chest/lights_on"
},
"state": {
"model": "appliedenergistics2:chest/cell_state_types_full"
}
}
},
"full": {
"submodel": {
"lights": {
"model": "appliedenergistics2:chest/lights_on"
},
"state": {
"model": "appliedenergistics2:chest/cell_state_full"
}
}
}
} }
}
} }
@@ -323,6 +323,7 @@ gui.tooltips.appliedenergistics2.SchedulingModeRoundRobin=Exportiere im Round-Ro
gui.tooltips.appliedenergistics2.SchedulingModeRandom=Exportiere im Zufallsmodus. gui.tooltips.appliedenergistics2.SchedulingModeRandom=Exportiere im Zufallsmodus.
gui.tooltips.appliedenergistics2.ItemsStored=Items gespeichert: %s gui.tooltips.appliedenergistics2.ItemsStored=Items gespeichert: %s
gui.tooltips.appliedenergistics2.ItemsRequestable=Anfragbare Items: %s gui.tooltips.appliedenergistics2.ItemsRequestable=Anfragbare Items: %s
gui.tooltips.appliedenergistics2.ItemsCraftable=Herstellbar
// Units // Units
gui.appliedenergistics2.units.appliedenergstics=AE gui.appliedenergistics2.units.appliedenergstics=AE
@@ -354,6 +354,7 @@ gui.tooltips.appliedenergistics2.FilterModeKeep=Restore previous search filter.
gui.tooltips.appliedenergistics2.FilterModeClear=Clear on each opening. gui.tooltips.appliedenergistics2.FilterModeClear=Clear on each opening.
gui.tooltips.appliedenergistics2.ItemsStored=Items Stored: %s gui.tooltips.appliedenergistics2.ItemsStored=Items Stored: %s
gui.tooltips.appliedenergistics2.ItemsRequestable=Items Requestable: %s gui.tooltips.appliedenergistics2.ItemsRequestable=Items Requestable: %s
gui.tooltips.appliedenergistics2.ItemsCraftable=Craftable
gui.tooltips.appliedenergistics2.P2PFrequency=Frequency: %s gui.tooltips.appliedenergistics2.P2PFrequency=Frequency: %s
gui.tooltips.appliedenergistics2.MultiplyByTwo=Double the items set gui.tooltips.appliedenergistics2.MultiplyByTwo=Double the items set
gui.tooltips.appliedenergistics2.MultiplyByTwoDesc=Will try to double the items set in the crafting slots gui.tooltips.appliedenergistics2.MultiplyByTwoDesc=Will try to double the items set in the crafting slots
@@ -375,6 +376,9 @@ gui.tooltips.appliedenergistics2.ToggleShowFullInterfaces=Toggles showing interf
gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOnDesc=Showing all interfaces gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOnDesc=Showing all interfaces
gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOffDesc=Showing only interfaces with free slots gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOffDesc=Showing only interfaces with free slots
gui.tooltips.appliedenergistics2.HighlightInterface=Highlight interface gui.tooltips.appliedenergistics2.HighlightInterface=Highlight interface
gui.tooltips.appliedenergistics2.PartialTransfer=Move stored items into the crafting grid
gui.tooltips.appliedenergistics2.MissingItem=§cMissing item
gui.tooltips.appliedenergistics2.CraftableItem=§9Craftable item
// Units // Units
gui.appliedenergistics2.units.appliedenergstics=AE gui.appliedenergistics2.units.appliedenergstics=AE
@@ -668,3 +672,7 @@ stat.ae2.TurnedCranks=Turned Cranks
//Keys //Keys
key.appliedenergistics2.category=Applied Energistics 2 key.appliedenergistics2.category=Applied Energistics 2
key.toggle_focus.desc=Toggle search box focus key.toggle_focus.desc=Toggle search box focus
key.open_wireless_terminal.desc=Open Wireless Terminal
key.open_wireless_crafting_terminal.desc=Open Wireless Crafting Terminal
key.open_wireless_pattern_terminal.desc=Open Wireless Pattern Terminal
key.open_wireless_fluid_terminal.desc=Open Wireless Fluid Terminal
@@ -1,7 +1,7 @@
# Japanese translate by tier940 & Quarri6343 # Japanese translate by GTModpackTeam
# 日本語ローカライズ担当: tier940 & Quarri6343 # 日本語ローカライズ担当: GTModpackTeam
# Corresponding Version: v0.52.3 # Corresponding Version: v0.54.20
# 対応バージョン: v0.52.3 # 対応バージョン: v0.54.20
// Blocks // Blocks
tile.appliedenergistics2.cable_bus.name=AE2ケーブル または バス tile.appliedenergistics2.cable_bus.name=AE2ケーブル または バス
@@ -55,7 +55,7 @@ tile.appliedenergistics2.crafting_storage_16k.name=16k クラフティングス
tile.appliedenergistics2.crafting_storage_64k.name=64k クラフティングストレージ tile.appliedenergistics2.crafting_storage_64k.name=64k クラフティングストレージ
tile.appliedenergistics2.crafting_accelerator.name=クラフティング並列処理ユニット tile.appliedenergistics2.crafting_accelerator.name=クラフティング並列処理ユニット
tile.appliedenergistics2.crafting_unit.name=クラフティングユニット tile.appliedenergistics2.crafting_unit.name=クラフティングユニット
tile.appliedenergistics2.molecular_assembler.name=分子組立 tile.appliedenergistics2.molecular_assembler.name=分子組立
// Stairs // Stairs
tile.appliedenergistics2.fluix_stairs.name=フルーシュの階段 tile.appliedenergistics2.fluix_stairs.name=フルーシュの階段
@@ -70,30 +70,31 @@ tile.appliedenergistics2.sky_stone_stairs.name=スカイストーンの階段
// Slabs // Slabs
tile.appliedenergistics2.chiseled_quartz_slab.name=柱状ケルタスクォーツのハーフブロック tile.appliedenergistics2.chiseled_quartz_slab.name=柱状ケルタスクォーツのハーフブロック
tile.appliedenergistics2.fluix_slab.name=フルーシュのハーフブロック tile.appliedenergistics2.fluix_slab.name=フルーシュのハーフブロック
tile.appliedenergistics2.quartz_pillar_slab.name=様入りケルタスクォーツのハーフブロック
tile.appliedenergistics2.quartz_slab.name=ケルタスクォーツのハーフブロック tile.appliedenergistics2.quartz_slab.name=ケルタスクォーツのハーフブロック
tile.appliedenergistics2.smooth_sky_stone_slab.name=スカイストーンブロックのハーフブロック tile.appliedenergistics2.smooth_sky_stone_slab.name=スカイストーンブロックのハーフブロック
tile.appliedenergistics2.quartz_pillar_slab.name=様入りケルタスクォーツのハーフブロック
tile.appliedenergistics2.sky_stone_brick_slab.name=スカイストーンレンガのハーフブロック tile.appliedenergistics2.sky_stone_brick_slab.name=スカイストーンレンガのハーフブロック
tile.appliedenergistics2.sky_stone_small_brick_slab.name=小さなスカイストーンレンガのハーフブロック tile.appliedenergistics2.sky_stone_small_brick_slab.name=小さなスカイストーンレンガのハーフブロック
tile.appliedenergistics2.sky_stone_slab.name=スカイストーンのハーフブロック tile.appliedenergistics2.sky_stone_slab.name=スカイストーンのハーフブロック
// Chat Messages // Chat Messages
chat.appliedenergistics2.ChestCannotReadStorageCell=MEチェストがストレージセルを読み取れませんでした chat.appliedenergistics2.ChestCannotReadStorageCell=MEチェストがストレージセルを読み取れませんでした
chat.appliedenergistics2.SettingCleared=メモリカードを初期化 chat.appliedenergistics2.SettingCleared=メモリカードを初期化
chat.appliedenergistics2.OutOfRange=無線範囲外です chat.appliedenergistics2.MissingPatternsToEncode=コピーし終わるまでのパターン数が少ないです
chat.appliedenergistics2.InvalidMachine=無効な操作です chat.appliedenergistics2.OutOfRange=無線範囲外です
chat.appliedenergistics2.LoadedSettings=正常に設定を読み込みました。 chat.appliedenergistics2.InvalidMachine=無効な操作です
chat.appliedenergistics2.DeviceNotPowered=端末の充電が切れました chat.appliedenergistics2.LoadedSettings=設定を正常に読み込みました
chat.appliedenergistics2.DeviceNotWirelessTerminal=端末は無線端末ではありません。 chat.appliedenergistics2.DeviceNotPowered=利用中の端末が充電切れです
chat.appliedenergistics2.DeviceNotLinked=端末はリンクされていません chat.appliedenergistics2.DeviceNotWirelessTerminal=利用中の端末は無線端末ではありません
chat.appliedenergistics2.StationCanNotBeLocated=セキュリティーステーションの位置を見つけられません chat.appliedenergistics2.DeviceNotLinked=利用中の端末はまだリンクされていません
chat.appliedenergistics2.MachineNotPowered=機械にエネルギーがありません。 chat.appliedenergistics2.StationCanNotBeLocated=MEセキュリティターミナルの位置が不明です
chat.appliedenergistics2.CommunicationError=ネットワークとの通信エラーが発生しました。 chat.appliedenergistics2.MachineNotPowered=機械にエネルギーがありません
chat.appliedenergistics2.SavedSettings=正常に設定を保存しました chat.appliedenergistics2.CommunicationError=ネットワークとの通信エラーが発生しました
chat.appliedenergistics2.ResetSettings=新しい端末を設定してメモリカードにコピーしました chat.appliedenergistics2.SavedSettings=設定を正常に保存しました
chat.appliedenergistics2.AmmoDepleted=マターボールを使い切りました chat.appliedenergistics2.ResetSettings=新しい端末をメモリカードに設定しました
chat.appliedenergistics2.isNowLocked=モニターはロックされています。 chat.appliedenergistics2.AmmoDepleted=マターボールを使い切りました
chat.appliedenergistics2.isNowUnlocked=モニターはロックされていません。 chat.appliedenergistics2.isNowLocked=モニターはロックされていま
chat.appliedenergistics2.isNowUnlocked=モニターはロックされていません
// Creative Tabs // Creative Tabs
itemGroup.appliedenergistics2=Applied Energistics 2 itemGroup.appliedenergistics2=Applied Energistics 2
@@ -118,11 +119,11 @@ gui.appliedenergistics2.security.craft.name=クラフト
gui.appliedenergistics2.security.build.name=設置 gui.appliedenergistics2.security.build.name=設置
gui.appliedenergistics2.security.security.name=セキュリティ gui.appliedenergistics2.security.security.name=セキュリティ
gui.appliedenergistics2.security.extract.tip=ユーザーはストレージからアイテムを引き出すことができます gui.appliedenergistics2.security.extract.tip=ユーザーはストレージからアイテムを引き出すことができます
gui.appliedenergistics2.security.inject.tip=ユーザーはストレージに新しいアイテムを入れることができます gui.appliedenergistics2.security.inject.tip=ユーザーはストレージに新しいアイテムを入れることができます
gui.appliedenergistics2.security.craft.tip=ユーザーは新しいクラフトを開始することができます gui.appliedenergistics2.security.craft.tip=ユーザーは新しいクラフトを開始することができます
gui.appliedenergistics2.security.build.tip=ユーザはネットワークの変更や設置などを行うことができます gui.appliedenergistics2.security.build.tip=ユーザはネットワークの変更や設置などを行うことができます
gui.appliedenergistics2.security.security.tip=ユーザーはセキュリティターミナルの設定変更を行うことができます gui.appliedenergistics2.security.security.tip=ユーザーはセキュリティターミナルの設定変更を行うことができます
gui.appliedenergistics2.Efficiency=効率 gui.appliedenergistics2.Efficiency=効率
gui.appliedenergistics2.SCSSize=SCSサイズ gui.appliedenergistics2.SCSSize=SCSサイズ
@@ -134,7 +135,7 @@ gui.appliedenergistics2.QuartzCuttingKnife=クォーツナイフ
gui.appliedenergistics2.Inscriber=刻印機 gui.appliedenergistics2.Inscriber=刻印機
gui.appliedenergistics2.Wireless=無線アクセスポイント gui.appliedenergistics2.Wireless=無線アクセスポイント
gui.appliedenergistics2.WirelessTerminal=無線ターミナル gui.appliedenergistics2.WirelessTerminal=無線ターミナル
gui.appliedenergistics2.NoPermissions=アクセス権が選択されていません gui.appliedenergistics2.NoPermissions=アクセス権が選択されていません
gui.appliedenergistics2.SecurityCardEditor=生体認証カードエディタ gui.appliedenergistics2.SecurityCardEditor=生体認証カードエディタ
gui.appliedenergistics2.Encoded=エンコード済 gui.appliedenergistics2.Encoded=エンコード済
gui.appliedenergistics2.Priority=優先度 gui.appliedenergistics2.Priority=優先度
@@ -173,6 +174,8 @@ gui.appliedenergistics2.StoredFluids=貯蔵液体
gui.appliedenergistics2.Terminal=ターミナル gui.appliedenergistics2.Terminal=ターミナル
gui.appliedenergistics2.InterfaceTerminal=インターフェースターミナル gui.appliedenergistics2.InterfaceTerminal=インターフェースターミナル
gui.appliedenergistics2.InterfaceTerminalHint=インターフェースターミナルから表示または非表示 gui.appliedenergistics2.InterfaceTerminalHint=インターフェースターミナルから表示または非表示
gui.appliedenergistics2.InterfaceConfigurationTerminal=インターフェース設定用ターミナル
gui.appliedenergistics2.FluidInterfaceConfigurationTerminal=液体インターフェース設定用ターミナル
gui.appliedenergistics2.FormationPlane=形成プレーン gui.appliedenergistics2.FormationPlane=形成プレーン
gui.appliedenergistics2.FluidFormationPlane=液体形成プレーン gui.appliedenergistics2.FluidFormationPlane=液体形成プレーン
gui.appliedenergistics2.VibrationChamber=振動チャンバー gui.appliedenergistics2.VibrationChamber=振動チャンバー
@@ -180,7 +183,6 @@ gui.appliedenergistics2.NetworkDetails=ネットワークの詳細
gui.appliedenergistics2.StorageCells=MEストレージセル gui.appliedenergistics2.StorageCells=MEストレージセル
gui.appliedenergistics2.IOBuses=ME入力/出力バス gui.appliedenergistics2.IOBuses=ME入力/出力バス
gui.appliedenergistics2.IOBusesFluids=ME液体入力/出力バス gui.appliedenergistics2.IOBusesFluids=ME液体入力/出力バス
gui.appliedenergistics2.Stores=Stores
gui.appliedenergistics2.Stores=削除 gui.appliedenergistics2.Stores=削除
gui.appliedenergistics2.BytesUsed=バイト使用済み gui.appliedenergistics2.BytesUsed=バイト使用済み
gui.appliedenergistics2.Types=タイプ gui.appliedenergistics2.Types=タイプ
@@ -188,11 +190,12 @@ gui.appliedenergistics2.Blank=空
gui.appliedenergistics2.Unlinked=リンクされていない gui.appliedenergistics2.Unlinked=リンクされていない
gui.appliedenergistics2.Linked=リンクされた gui.appliedenergistics2.Linked=リンクされた
gui.appliedenergistics2.StoredSize=格納サイズ gui.appliedenergistics2.StoredSize=格納サイズ
gui.appliedenergistics2.CellId=セルID
gui.appliedenergistics2.SkyChest=スカイストーンチェスト gui.appliedenergistics2.SkyChest=スカイストーンチェスト
gui.appliedenergistics2.PatternTerminal=パターンターミナル gui.appliedenergistics2.PatternTerminal=パターンターミナル
gui.appliedenergistics2.CraftingPattern=クラフティングパターン gui.appliedenergistics2.CraftingPattern=クラフティングパターン
gui.appliedenergistics2.MolecularAssembler=分子組立 gui.appliedenergistics2.MolecularAssembler=分子組立
gui.appliedenergistics2.ProcessingPattern=プロセッシングパターン gui.appliedenergistics2.ProcessingPattern=加工パターン
gui.appliedenergistics2.Crafts=クラフト gui.appliedenergistics2.Crafts=クラフト
gui.appliedenergistics2.And=と gui.appliedenergistics2.And=と
gui.appliedenergistics2.Creates=作成 gui.appliedenergistics2.Creates=作成
@@ -209,11 +212,11 @@ gui.appliedenergistics2.inWorldSingularity=作る為には一個のシンギュ
gui.appliedenergistics2.ChargedQuartz=チャージドケルタスクォーツは普通のケルタスクォーツをチャージ機にセットし、電力を供給することで作製されます。 gui.appliedenergistics2.ChargedQuartz=チャージドケルタスクォーツは普通のケルタスクォーツをチャージ機にセットし、電力を供給することで作製されます。
gui.appliedenergistics2.ChargedQuartzFind=チャージドケルタスクォーツは輝くことを除いて通常のケルタスクォーツに非常に似ています。見分け方は青い靄です。 gui.appliedenergistics2.ChargedQuartzFind=チャージドケルタスクォーツは輝くことを除いて通常のケルタスクォーツに非常に似ています。見分け方は青い靄です。
gui.appliedenergistics2.NoSecondOutput=副産物なし gui.appliedenergistics2.NoSecondOutput=副産物なし
gui.appliedenergistics2.OfSecondOutput=%1$d%%の確率で副産物 gui.appliedenergistics2.OfSecondOutput=%1$d%%の確率で副産物を搬出
gui.appliedenergistics2.MultipleOutputs=%1$d%%の確率で副産物%2$d%%の確率で第二副産物 gui.appliedenergistics2.MultipleOutputs=%1$d%%の確率で副産物を搬出し%2$d%%の確率で第二副産物を搬出
gui.appliedenergistics2.SelectAmount=数を選択 gui.appliedenergistics2.SelectAmount=数を選択
gui.appliedenergistics2.CopyMode=コピーモード gui.appliedenergistics2.CopyMode=コピーモード
gui.appliedenergistics2.CopyModeDesc=ストレージセルを取り外したとき設定パネルの内容を消去するかどうか gui.appliedenergistics2.CopyModeDesc=ストレージセルを取り外したとき設定パネルの内容を消去するかどうか
gui.appliedenergistics2.Next=次 gui.appliedenergistics2.Next=次
gui.appliedenergistics2.Lumen=ルーメン gui.appliedenergistics2.Lumen=ルーメン
gui.appliedenergistics2.Empty=空 gui.appliedenergistics2.Empty=空
@@ -233,15 +236,15 @@ gui.appliedenergistics2.Bytes=ストレージ
gui.appliedenergistics2.Simulation=シミュレーション gui.appliedenergistics2.Simulation=シミュレーション
gui.appliedenergistics2.CoProcessors=Coプロセッサ gui.appliedenergistics2.CoProcessors=Coプロセッサ
gui.appliedenergistics2.CraftingCPU=クラフティングCPU gui.appliedenergistics2.CraftingCPU=クラフティングCPU
gui.appliedenergistics2.NoCraftingCPUs=利用可能なCPUがありません gui.appliedenergistics2.NoCraftingCPUs=利用可能なCPUがありません
gui.appliedenergistics2.CalculatingWait=計算中ですお待ちください... gui.appliedenergistics2.CalculatingWait=計算中ですのでお待ちください...
gui.appliedenergistics2.Clean=クリーン gui.appliedenergistics2.Clean=クリーン
gui.appliedenergistics2.InvalidPattern=無効なパターン gui.appliedenergistics2.InvalidPattern=無効なパターン
gui.appliedenergistics2.Range=範囲 gui.appliedenergistics2.Range=範囲
gui.appliedenergistics2.TransparentFacades=透明な偽装版 gui.appliedenergistics2.TransparentFacades=透明な偽装版
gui.appliedenergistics2.TransparentFacadesHint=ネットワークツールがツールバーにあるとき偽装版の表示/非表示を切り替えられる。 gui.appliedenergistics2.TransparentFacadesHint=ネットワークツールがツールバーにあるとき偽装版の表示/非表示を切り替えられる。
gui.appliedenergistics2.CPUs=CPU gui.appliedenergistics2.CPUs=CPU
gui.appliedenergistics2.NoCraftingJobs=クラフティングが実行されていない gui.appliedenergistics2.NoCraftingJobs=クラフティングが実行されていない
gui.appliedenergistics2.FacadeCrafting=偽装版クラフト gui.appliedenergistics2.FacadeCrafting=偽装版クラフト
gui.appliedenergistics2.inWorldCraftingPresses=金型は世界中に散らばっている隕石の中心にあります。隕石は隕石探知コンパスで探せます。 gui.appliedenergistics2.inWorldCraftingPresses=金型は世界中に散らばっている隕石の中心にあります。隕石は隕石探知コンパスで探せます。
gui.appliedenergistics2.Included=含める gui.appliedenergistics2.Included=含める
@@ -251,23 +254,24 @@ gui.appliedenergistics2.Precise=精密マッチ
gui.appliedenergistics2.Fuzzy=抽象マッチ gui.appliedenergistics2.Fuzzy=抽象マッチ
gui.appliedenergistics2.SmallFontCraft=クラフト gui.appliedenergistics2.SmallFontCraft=クラフト
gui.appliedenergistics2.LargeFontCraft=+ gui.appliedenergistics2.LargeFontCraft=+
gui.appliedenergistics2.Renamer=カスタム名称: (Enterで設定)
gui.appliedenergistics2.Nothing=なし gui.appliedenergistics2.Nothing=なし
// GUI Tooltips // GUI Tooltips
gui.tooltips.appliedenergistics2.Stash=アイテムを保存 gui.tooltips.appliedenergistics2.Stash=アイテムを保存
gui.tooltips.appliedenergistics2.StashDesc=グリッド上のアイテムをネットワークに戻す gui.tooltips.appliedenergistics2.StashDesc=グリッド上のアイテムをネットワークに戻す
gui.tooltips.appliedenergistics2.Substitutions=鉱石辞書の置換 gui.tooltips.appliedenergistics2.Substitutions=鉱石辞書の置換
gui.tooltips.appliedenergistics2.SubstitutionsDescEnabled=材料を鉱石辞書で置換させる gui.tooltips.appliedenergistics2.SubstitutionsDescEnabled=材料を鉱石辞書で置換させる
gui.tooltips.appliedenergistics2.SubstitutionsDescDisabled=材料を鉱石辞書で置換させない gui.tooltips.appliedenergistics2.SubstitutionsDescDisabled=材料を鉱石辞書で置換させない
gui.tooltips.appliedenergistics2.SubstitutionsOn=置換は有効です gui.tooltips.appliedenergistics2.SubstitutionsOn=置換は有効です
gui.tooltips.appliedenergistics2.SubstitutionsOff=置換は無効です gui.tooltips.appliedenergistics2.SubstitutionsOff=置換は無効です
gui.tooltips.appliedenergistics2.Encode=パターンエンコーダ gui.tooltips.appliedenergistics2.Encode=パターンエンコーダ
gui.tooltips.appliedenergistics2.EncodeDescription=現在エンコードされているパターン、または使用できるブランクパターンに入力されたパターンを書き込みます。 gui.tooltips.appliedenergistics2.EncodeDescription=入力されたパターンをエンコード済みのパターン、または使用可能なブランクパターンに書き込みます。
gui.tooltips.appliedenergistics2.FuzzyMode=ファジー比較 gui.tooltips.appliedenergistics2.FuzzyMode=ファジー比較
gui.tooltips.appliedenergistics2.FZPercent_25=25%%の分離損失 gui.tooltips.appliedenergistics2.FZPercent_25=§a25%§rの分離損失
gui.tooltips.appliedenergistics2.FZPercent_50=50%%の分離損失 gui.tooltips.appliedenergistics2.FZPercent_50=§e50%§rの分離損失
gui.tooltips.appliedenergistics2.FZPercent_75=75%%の分離損失 gui.tooltips.appliedenergistics2.FZPercent_75=§675%§rの分離損失
gui.tooltips.appliedenergistics2.FZPercent_99=99%%の分離損失 gui.tooltips.appliedenergistics2.FZPercent_99=§499%§rの分離損失
gui.tooltips.appliedenergistics2.SortOrder=昇順/降順 gui.tooltips.appliedenergistics2.SortOrder=昇順/降順
gui.tooltips.appliedenergistics2.SortBy=並び替え方法 gui.tooltips.appliedenergistics2.SortBy=並び替え方法
gui.tooltips.appliedenergistics2.FZIgnoreAll=すべてマッチする gui.tooltips.appliedenergistics2.FZIgnoreAll=すべてマッチする
@@ -291,8 +295,8 @@ gui.tooltips.appliedenergistics2.TrashController=Shift/Spaceで有効
gui.tooltips.appliedenergistics2.InterfaceBlockingMode=ブロッキングモード gui.tooltips.appliedenergistics2.InterfaceBlockingMode=ブロッキングモード
gui.tooltips.appliedenergistics2.InterfaceCraftingMode=クラフティングモード gui.tooltips.appliedenergistics2.InterfaceCraftingMode=クラフティングモード
gui.tooltips.appliedenergistics2.Trash=アイテムを破棄する gui.tooltips.appliedenergistics2.Trash=アイテムを破棄する
gui.tooltips.appliedenergistics2.MatterBalls=\n%s個のアイテムごとにマターボール変換する gui.tooltips.appliedenergistics2.MatterBalls=§a%s§r個のアイテムごとにマターボール変換する
gui.tooltips.appliedenergistics2.Singularity=\n%s個のアイテムごとにシンギュラリティ変換する gui.tooltips.appliedenergistics2.Singularity=§a%s§r個のアイテムごとにシンギュラリティ変換する
gui.tooltips.appliedenergistics2.Read=出力のみ gui.tooltips.appliedenergistics2.Read=出力のみ
gui.tooltips.appliedenergistics2.Write=入力のみ gui.tooltips.appliedenergistics2.Write=入力のみ
gui.tooltips.appliedenergistics2.ReadWrite=入出力可能 gui.tooltips.appliedenergistics2.ReadWrite=入出力可能
@@ -355,26 +359,27 @@ gui.tooltips.appliedenergistics2.FilterModeKeep=以前の検索フィルター
gui.tooltips.appliedenergistics2.FilterModeClear=GUIを開くたびにリセットする gui.tooltips.appliedenergistics2.FilterModeClear=GUIを開くたびにリセットする
gui.tooltips.appliedenergistics2.ItemsStored=在庫アイテム: %s gui.tooltips.appliedenergistics2.ItemsStored=在庫アイテム: %s
gui.tooltips.appliedenergistics2.ItemsRequestable=要求可能なアイテム: %s gui.tooltips.appliedenergistics2.ItemsRequestable=要求可能なアイテム: %s
gui.tooltips.appliedenergistics2.ItemsCraftable=クラフト可能
gui.tooltips.appliedenergistics2.P2PFrequency=周波数: %s gui.tooltips.appliedenergistics2.P2PFrequency=周波数: %s
gui.tooltips.appliedenergistics2.MultiplyByTwo=アイテムを倍にする gui.tooltips.appliedenergistics2.MultiplyByTwo=アイテムを倍にする
gui.tooltips.appliedenergistics2.MultiplyByTwoDesc=スロットのアイテム数を倍にすることを試みる gui.tooltips.appliedenergistics2.MultiplyByTwoDesc=スロットのアイテム数を倍にすることを試みる
gui.tooltips.appliedenergistics2.MultiplyByThree=アイテムを3倍にする gui.tooltips.appliedenergistics2.MultiplyByThree=アイテムを3倍にする
gui.tooltips.appliedenergistics2.MultiplyByThreeDesc=スロットのアイテム数を3倍にすることを試みる gui.tooltips.appliedenergistics2.MultiplyByThreeDesc=スロットのアイテム数を3倍にすることを試みる
gui.tooltips.appliedenergistics2.IncreaseByOne=1個追加 gui.tooltips.appliedenergistics2.IncreaseByOne=1個追加
gui.tooltips.appliedenergistics2.IncreaseByOneDesc=スロットのアイテム数を1個増やすことを試みる。材料の比率は保持されない。 gui.tooltips.appliedenergistics2.IncreaseByOneDesc=スロットのアイテム数を1個増やすことを試みる
gui.tooltips.appliedenergistics2.DivideByTwo=2で割る gui.tooltips.appliedenergistics2.DivideByTwo=2で割る
gui.tooltips.appliedenergistics2.DivideByTwoDesc=スロットのアイテム数を2で割ることを試みる gui.tooltips.appliedenergistics2.DivideByTwoDesc=スロットのアイテム数を2で割ることを試みる
gui.tooltips.appliedenergistics2.DivideByThree=3で割る gui.tooltips.appliedenergistics2.DivideByThree=3で割る
gui.tooltips.appliedenergistics2.DivideByThreeDesc=スロットのアイテム数を3で割ることを試みる gui.tooltips.appliedenergistics2.DivideByThreeDesc=スロットのアイテム数を3で割ることを試みる
gui.tooltips.appliedenergistics2.DecreaseByOne=1個減らす gui.tooltips.appliedenergistics2.DecreaseByOne=1個減らす
gui.tooltips.appliedenergistics2.DecreaseByOneDesc=スロットのアイテム数を1個減らすことを試みる。材料の比率は保持されない。 gui.tooltips.appliedenergistics2.DecreaseByOneDesc=スロットのアイテム数を1個減らすことを試みる
gui.tooltips.appliedenergistics2.MaxCount=スロットのアイテム数を最大化 gui.tooltips.appliedenergistics2.MaxCount=スロットのアイテム数を最大化
gui.tooltips.appliedenergistics2.MaxCountDesc=材料アイテムの比率を保ったままスロットのアイテム数を最大化する gui.tooltips.appliedenergistics2.MaxCountDesc=材料アイテムの比率を保ったままスロットのアイテム数を最大化する
gui.tooltips.appliedenergistics2.FreeMolecularSlotShortcut=スロットが空いているインターフェースを表示する gui.tooltips.appliedenergistics2.FreeMolecularSlotShortcut=スロットが空いているインターフェースを表示する
gui.tooltips.appliedenergistics2.FreeMolecularSlotShortcutDesc=スロットが空いているインターフェースを切り替えて分子組立を検索するショートカット。 gui.tooltips.appliedenergistics2.FreeMolecularSlotShortcutDesc=スロットが空いているインターフェースを切り替えて分子組立を検索する
gui.tooltips.appliedenergistics2.ToggleShowFullInterfaces=スロットが一杯になっているインターフェースの表示切り替え gui.tooltips.appliedenergistics2.ToggleShowFullInterfaces=スロットが一杯になっているインターフェースの表示切り替え
gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOnDesc=全てのインターフェースを表示 gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOnDesc=全てのインターフェースを表示
gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOffDesc=空きがあるインターフェースのみを表示 gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOffDesc=空きがあるインターフェースのみを表示
gui.tooltips.appliedenergistics2.HighlightInterface=インターフェースを強調表示 gui.tooltips.appliedenergistics2.HighlightInterface=インターフェースを強調表示
// Units // Units
@@ -414,13 +419,13 @@ waila.appliedenergistics2.Contains=格納
waila.appliedenergistics2.Channels=%2$d中%1$dチャンネル使用中 waila.appliedenergistics2.Channels=%2$d中%1$dチャンネル使用中
waila.appliedenergistics2.P2PUnlinked=設定待機中 waila.appliedenergistics2.P2PUnlinked=設定待機中
waila.appliedenergistics2.p2p_input_one_output=1個接続中 (接続元) waila.appliedenergistics2.p2p_input_one_output=1個接続中 (接続元)
waila.appliedenergistics2.p2p_input_many_outputs=%d個接続中 (接続元) waila.appliedenergistics2.p2p_input_many_outputs=§4%d§r個接続中 (接続元)
waila.appliedenergistics2.p2p_output_one_input=1個接続中 (接続先) waila.appliedenergistics2.p2p_output_one_input=1個接続中 (接続先)
waila.appliedenergistics2.p2p_output_many_inputs=%d個接続中 (接続先) waila.appliedenergistics2.p2p_output_many_inputs=§2%d§r個接続中 (接続先)
waila.appliedenergistics2.P2POutput=接続中 (接続先) waila.appliedenergistics2.P2POutput=接続中 (接続先)
// TheOneProbe // TheOneProbe
theoneprobe.appliedenergistics2.crafting=クラフト中: %1$s theoneprobe.appliedenergistics2.crafting=クラフト中: §2%1$s§r
theoneprobe.appliedenergistics2.device_online=装置はオンラインです theoneprobe.appliedenergistics2.device_online=装置はオンラインです
theoneprobe.appliedenergistics2.device_offline=装置はオフラインです theoneprobe.appliedenergistics2.device_offline=装置はオフラインです
theoneprobe.appliedenergistics2.device_missing_channel=装置のチャンネルが見つかりません theoneprobe.appliedenergistics2.device_missing_channel=装置のチャンネルが見つかりません
@@ -428,25 +433,25 @@ theoneprobe.appliedenergistics2.locked=ロックされています
theoneprobe.appliedenergistics2.unlocked=ロックされてません theoneprobe.appliedenergistics2.unlocked=ロックされてません
theoneprobe.appliedenergistics2.showing=表示中 theoneprobe.appliedenergistics2.showing=表示中
theoneprobe.appliedenergistics2.contains=格納 theoneprobe.appliedenergistics2.contains=格納
theoneprobe.appliedenergistics2.channels=%2$d%1$dチャンネル使用中 theoneprobe.appliedenergistics2.channels=§4%2$d§r中§2%1$d§rチャンネル使用中
theoneprobe.appliedenergistics2.p2p_unlinked=設定待機中 theoneprobe.appliedenergistics2.p2p_unlinked=設定待機中
theoneprobe.appliedenergistics2.p2p_input_one_output=1個接続中 (接続元) theoneprobe.appliedenergistics2.p2p_input_one_output=1個接続中 (接続元)
theoneprobe.appliedenergistics2.p2p_input_many_outputs=%d個接続中 (接続元) theoneprobe.appliedenergistics2.p2p_input_many_outputs=%d個接続中 (接続元)
theoneprobe.appliedenergistics2.p2p_output_one_input=1個接続中 (接続先) theoneprobe.appliedenergistics2.p2p_output_one_input=1個接続中 (接続先)
theoneprobe.appliedenergistics2.p2p_output_many_inputs=%d個接続中 (接続先) theoneprobe.appliedenergistics2.p2p_output_many_inputs=%d個接続中 (接続先)
theoneprobe.appliedenergistics2.p2p_output=接続中 (接続先) theoneprobe.appliedenergistics2.p2p_output=接続中 (接続先)
theoneprobe.appliedenergistics2.p2p_frequency=周波数: %1$s theoneprobe.appliedenergistics2.p2p_frequency=周波数: §5%1$s§r
theoneprobe.appliedenergistics2.stored_energy=%1$d / %2$d theoneprobe.appliedenergistics2.stored_energy=§2%1$d§к / §4%2$d§r
// Items // Items
item.appliedenergistics2.storage_cell_1k.name=1k MEストレージセル item.appliedenergistics2.storage_cell_1k.name=§61k§r MEストレージセル
item.appliedenergistics2.storage_cell_4k.name=4k MEストレージセル item.appliedenergistics2.storage_cell_4k.name=§e4k§r MEストレージセル
item.appliedenergistics2.storage_cell_16k.name=16k MEストレージセル item.appliedenergistics2.storage_cell_16k.name=§a16k§r MEストレージセル
item.appliedenergistics2.storage_cell_64k.name=64k MEストレージセル item.appliedenergistics2.storage_cell_64k.name=§b64k§r MEストレージセル
item.appliedenergistics2.fluid_storage_cell_1k.name=1k ME液体セル item.appliedenergistics2.fluid_storage_cell_1k.name=§61k§r ME液体セル
item.appliedenergistics2.fluid_storage_cell_4k.name=4k ME液体セル item.appliedenergistics2.fluid_storage_cell_4k.name=§e4k§r ME液体セル
item.appliedenergistics2.fluid_storage_cell_16k.name=16k ME液体セル item.appliedenergistics2.fluid_storage_cell_16k.name=§a16k§r ME液体セル
item.appliedenergistics2.fluid_storage_cell_64k.name=64k ME液体セル item.appliedenergistics2.fluid_storage_cell_64k.name=§b64k§r ME液体セル
item.appliedenergistics2.creative_storage_cell.name=クリエイティブ用MEストレージセル item.appliedenergistics2.creative_storage_cell.name=クリエイティブ用MEストレージセル
item.appliedenergistics2.encoded_pattern.name=エンコード済みパターン item.appliedenergistics2.encoded_pattern.name=エンコード済みパターン
item.appliedenergistics2.view_cell.name=セルを表示 item.appliedenergistics2.view_cell.name=セルを表示
@@ -463,21 +468,25 @@ item.appliedenergistics2.material.blank_pattern.name=ブランクパターン
item.appliedenergistics2.material.calculation_processor.name=発展プロセッサ item.appliedenergistics2.material.calculation_processor.name=発展プロセッサ
item.appliedenergistics2.material.card_capacity.name=容量カード item.appliedenergistics2.material.card_capacity.name=容量カード
item.appliedenergistics2.material.card_pattern_expansion.name=パターン拡張カード item.appliedenergistics2.material.card_pattern_expansion.name=パターン拡張カード
item.appliedenergistics2.material.card_magnet.name=マグネットカード
item.appliedenergistics2.material.card_magnet.usage=端末に装備した状態で空中へ右クリックするとON/OFFを切り替えられる
item.appliedenergistics2.material.card_magnet.partition=セル作業台にて設定変更ができます
item.appliedenergistics2.material.card_quantum_link.name=量子リンクカード
item.appliedenergistics2.material.card_fuzzy.name=ファジーカード item.appliedenergistics2.material.card_fuzzy.name=ファジーカード
item.appliedenergistics2.material.card_inverter.name=反転カード item.appliedenergistics2.material.card_inverter.name=反転カード
item.appliedenergistics2.material.card_redstone.name=レッドストーンカード item.appliedenergistics2.material.card_redstone.name=レッドストーンカード
item.appliedenergistics2.material.card_speed.name=加速カード item.appliedenergistics2.material.card_speed.name=加速カード
item.appliedenergistics2.material.cell2_spatial_part.name=2³空間ストレージ item.appliedenergistics2.material.cell2_spatial_part.name=§62³§r空間コンポーネント
item.appliedenergistics2.material.cell16_spatial_part.name=16³空間ストレージ item.appliedenergistics2.material.cell16_spatial_part.name=§916³空間コンポーネント
item.appliedenergistics2.material.cell128_spatial_part.name=128³空間ストレージ item.appliedenergistics2.material.cell128_spatial_part.name=§d128³空間コンポーネント
item.appliedenergistics2.material.cell1k_part.name=1k MEストレージコンポーネント item.appliedenergistics2.material.cell1k_part.name=§61k§r MEストレージコンポーネント
item.appliedenergistics2.material.cell4k_part.name=4k MEストレージコンポーネント item.appliedenergistics2.material.cell4k_part.name=§e4k§r MEストレージコンポーネント
item.appliedenergistics2.material.cell16k_part.name=16k MEストレージコンポーネント item.appliedenergistics2.material.cell16k_part.name=§a16k§r MEストレージコンポーネント
item.appliedenergistics2.material.cell64k_part.name=64k MEストレージコンポーネント item.appliedenergistics2.material.cell64k_part.name=§b64k§r MEストレージコンポーネント
item.appliedenergistics2.material.fluid_cell1k_part.name=1k ME液体コンポーネント item.appliedenergistics2.material.fluid_cell1k_part.name=§61k§r ME液体コンポーネント
item.appliedenergistics2.material.fluid_cell4k_part.name=4k ME液体コンポーネント item.appliedenergistics2.material.fluid_cell4k_part.name=§e4k§r ME液体コンポーネント
item.appliedenergistics2.material.fluid_cell16k_part.name=16k ME液体コンポーネント item.appliedenergistics2.material.fluid_cell16k_part.name=§a16k§r ME液体コンポーネント
item.appliedenergistics2.material.fluid_cell64k_part.name=64k ME液体コンポーネント item.appliedenergistics2.material.fluid_cell64k_part.name=§b64k§r ME液体コンポーネント
item.appliedenergistics2.material.certus_quartz_crystal.name=ケルタスクォーツ item.appliedenergistics2.material.certus_quartz_crystal.name=ケルタスクォーツ
item.appliedenergistics2.material.certus_quartz_crystal_charged.name=チャージドケルタスクォーツ item.appliedenergistics2.material.certus_quartz_crystal_charged.name=チャージドケルタスクォーツ
item.appliedenergistics2.material.certus_quartz_dust.name=ケルタスクォーツの粉 item.appliedenergistics2.material.certus_quartz_dust.name=ケルタスクォーツの粉
@@ -543,7 +552,7 @@ item.appliedenergistics2.multi_part.level_emitter.name=MEレベルエミッタ
item.appliedenergistics2.multi_part.fluid_level_emitter.name=ME液体レベルエミッタ item.appliedenergistics2.multi_part.fluid_level_emitter.name=ME液体レベルエミッタ
item.appliedenergistics2.multi_part.p2p_tunnel.name=P2Pトンネル item.appliedenergistics2.multi_part.p2p_tunnel.name=P2Pトンネル
item.appliedenergistics2.multi_part.pattern_terminal.name=MEパターンターミナル item.appliedenergistics2.multi_part.pattern_terminal.name=MEパターンターミナル
item.appliedenergistics2.multi_part.expanded_processing_pattern_terminal.name=ME拡張パターンターミナル item.appliedenergistics2.multi_part.expanded_processing_pattern_terminal.name=ME拡張加工パターンターミナル
item.appliedenergistics2.multi_part.quartz_fiber.name=クォーツファイバー item.appliedenergistics2.multi_part.quartz_fiber.name=クォーツファイバー
item.appliedenergistics2.multi_part.storage_bus.name=MEストレージバス item.appliedenergistics2.multi_part.storage_bus.name=MEストレージバス
item.appliedenergistics2.multi_part.oredict_storage_bus.name=ME鉱石辞書ストレージバス item.appliedenergistics2.multi_part.oredict_storage_bus.name=ME鉱石辞書ストレージバス
@@ -553,12 +562,14 @@ item.appliedenergistics2.multi_part.inverted_toggle_bus.name=ME反転切替バ
item.appliedenergistics2.multi_part.toggle_bus.name=ME切替バス item.appliedenergistics2.multi_part.toggle_bus.name=ME切替バス
item.appliedenergistics2.multi_part.crafting_monitor.name=MEクラフティングモニター item.appliedenergistics2.multi_part.crafting_monitor.name=MEクラフティングモニター
item.appliedenergistics2.multi_part.interface_terminal.name=MEインターフェースターミナル item.appliedenergistics2.multi_part.interface_terminal.name=MEインターフェースターミナル
item.appliedenergistics2.multi_part.fluid_terminal.name=ME液体インターフェースターミナル item.appliedenergistics2.multi_part.interface_configuration_terminal.name=インターフェース設定用ターミナル
item.appliedenergistics2.multi_part.fluid_interface_configuration_terminal.name=液体インターフェース設定用ターミナル
item.appliedenergistics2.multi_part.fluid_terminal.name=ME液体ターミナル
item.appliedenergistics2.multi_part.invalid_type.name=無効アイテム item.appliedenergistics2.multi_part.invalid_type.name=無効アイテム
item.appliedenergistics2.spatial_storage_cell_128_cubed.name=128³空間ストレージセル item.appliedenergistics2.spatial_storage_cell_128_cubed.name=§d128³§r空間ストレージセル
item.appliedenergistics2.spatial_storage_cell_16_cubed.name=16³空間ストレージセル item.appliedenergistics2.spatial_storage_cell_16_cubed.name=§916³§r空間ストレージセル
item.appliedenergistics2.spatial_storage_cell_2_cubed.name=空間ストレージセル item.appliedenergistics2.spatial_storage_cell_2_cubed.name=§62³§r空間ストレージセル
item.appliedenergistics2.certus_quartz_axe.name=ケルタスクォーツの斧 item.appliedenergistics2.certus_quartz_axe.name=ケルタスクォーツの斧
item.appliedenergistics2.certus_quartz_cutting_knife.name=ケルタスクォーツのナイフ item.appliedenergistics2.certus_quartz_cutting_knife.name=ケルタスクォーツのナイフ
@@ -585,6 +596,9 @@ item.appliedenergistics2.matter_cannon.name=マターキャノン
item.appliedenergistics2.memory_card.name=メモリーカード item.appliedenergistics2.memory_card.name=メモリーカード
item.appliedenergistics2.color_applicator.name=カラーアプリケーター item.appliedenergistics2.color_applicator.name=カラーアプリケーター
item.appliedenergistics2.wireless_terminal.name=無線アクセスターミナル item.appliedenergistics2.wireless_terminal.name=無線アクセスターミナル
item.appliedenergistics2.wireless_crafting_terminal.name=無線クラフティングターミナル
item.appliedenergistics2.wireless_pattern_terminal.name=無線パターンターミナル
item.appliedenergistics2.wireless_fluid_terminal.name=無線液体ターミナル
item.appliedenergistics2.biometric_card.name=生体認証カード item.appliedenergistics2.biometric_card.name=生体認証カード
item.appliedenergistics2.debug_card.name=開発用.デバッグ用カード item.appliedenergistics2.debug_card.name=開発用.デバッグ用カード
@@ -592,43 +606,43 @@ item.appliedenergistics2.debug_replicator_card.name=開発用.反復子カード
// Commands // Commands
commands.ae2.usage=Applied Energistics 2のコマンド - リストが必要な場合は /ae2 list を使用し、コマンドのヘルプが必要な場合は /ae2 help _____ を使用します。 commands.ae2.usage=Applied Energistics 2のコマンド - リストが必要な場合は /ae2 list を使用し、コマンドのヘルプが必要な場合は /ae2 help _____ を使用します。
commands.ae2.permissions=このコマンドを実行するための必要な権限を持っていません commands.ae2.permissions=このコマンドを実行するための必要な権限を持っていません
commands.ae2.ChunkLogger=チャンクロードとアンロードに関するサーバーログへの書き込みを切り替えます commands.ae2.ChunkLogger=チャンクロードとアンロードに関するサーバーログへの書き込みを切り替えます
commands.ae2.ChunkLoggerOn=チャンクロギングを開始しました。 commands.ae2.ChunkLoggerOn=チャンクロギングを開始しま
commands.ae2.ChunkLoggerOff=チャンクロギングを終了しました commands.ae2.ChunkLoggerOff=チャンクロギングを終了しました
commands.ae2.Supporters=AE2サポーターの一覧を表示します commands.ae2.Supporters=AE2サポーターの一覧を表示します
// Achievements // Achievements
achievement.ae2.Root=Applied Energistics 2 achievement.ae2.Root=Applied Energistics
achievement.ae2.Root.desc=チェストだけでは物足りない achievement.ae2.Root.desc=チェストだけでは物足りない?
achievement.ae2.Compass=隕石ハンター achievement.ae2.Compass=隕石ハンター
achievement.ae2.Compass.desc=隕石探知コンパスを作る。 achievement.ae2.Compass.desc=隕石探知コンパスを作成する。
achievement.ae2.Presses=未知なる技術 achievement.ae2.Presses=未知なる技術
achievement.ae2.Presses.desc=プロセッサの金型を見つける。 achievement.ae2.Presses.desc=プロセッサの金型を見つける。
achievement.ae2.SpatialIO=空間の調整 achievement.ae2.SpatialIO=空間の調整
achievement.ae2.SpatialIO.desc=空間IOポートを作る。 achievement.ae2.SpatialIO.desc=空間IOポートを作成する。
achievement.ae2.SpatialIOExplorer=大胆に移動したい achievement.ae2.SpatialIOExplorer=大胆に移動したい?
achievement.ae2.SpatialIOExplorer.desc=空間ストレージセルに格納する。 achievement.ae2.SpatialIOExplorer.desc=空間ストレージセルに格納する。
achievement.ae2.StorageCell=チェストより優れたもの achievement.ae2.StorageCell=チェストより優れたもの
achievement.ae2.StorageCell.desc=ストレージセルを作る。 achievement.ae2.StorageCell.desc=ストレージセルを作成する。
achievement.ae2.IOPort=ストレージセルをシャッフル achievement.ae2.IOPort=ストレージセルをシャッフル
achievement.ae2.IOPort.desc=入出力ポートを作る。 achievement.ae2.IOPort.desc=入出力ポートを作成する。
achievement.ae2.CraftingTerminal=もっと大きな作業台 achievement.ae2.CraftingTerminal=もっと大きな作業台
achievement.ae2.CraftingTerminal.desc=クラフティングターミナルを作る。 achievement.ae2.CraftingTerminal.desc=クラフティングターミナルを作成する。
achievement.ae2.PatternTerminal=クラフティングの巨匠 achievement.ae2.PatternTerminal=クラフティングの巨匠
achievement.ae2.PatternTerminal.desc=パターンターミナルを作る。 achievement.ae2.PatternTerminal.desc=パターンターミナルを作成する。
achievement.ae2.ChargedQuartz=ショッキング achievement.ae2.ChargedQuartz=ショッキング
achievement.ae2.ChargedQuartz.desc=チャージドケルタスクォーツを見つける。 achievement.ae2.ChargedQuartz.desc=チャージドケルタスクォーツを見つける。
achievement.ae2.Fluix=なんだか不自然ですね achievement.ae2.Fluix=なんだか不自然ですね
achievement.ae2.Fluix.desc=フルーシュクリスタルを作成する。 achievement.ae2.Fluix.desc=フルーシュクリスタルを作成する。
achievement.ae2.Charger=フルーシュの生産 achievement.ae2.Charger=フルーシュの生産
achievement.ae2.Charger.desc=チャージ機を作る。 achievement.ae2.Charger.desc=チャージ機を作成する。
achievement.ae2.CrystalGrowthAccelerator=加速なんてものじゃない achievement.ae2.CrystalGrowthAccelerator=加速なんてものじゃない
achievement.ae2.CrystalGrowthAccelerator.desc=クリスタル成長加速機を作る。 achievement.ae2.CrystalGrowthAccelerator.desc=クリスタル成長加速機を作成する。
achievement.ae2.GlassCable=フルーシュエネルギーの接続 achievement.ae2.GlassCable=フルーシュエネルギーの接続
achievement.ae2.GlassCable.desc=MEケーブルを作る。 achievement.ae2.GlassCable.desc=MEケーブルを作成する。
achievement.ae2.Controller=ネットワークの配電盤 achievement.ae2.Controller=ネットワークの配電盤
achievement.ae2.Controller.desc=コントローラを作る。 achievement.ae2.Controller.desc=コントローラを作成する。
achievement.ae2.Networking1=ネットワークの実習生 achievement.ae2.Networking1=ネットワークの実習生
achievement.ae2.Networking1.desc=ネットワーク上のチャンネルが8個に到達する。 achievement.ae2.Networking1.desc=ネットワーク上のチャンネルが8個に到達する。
achievement.ae2.Networking2=ネットワークの設計者 achievement.ae2.Networking2=ネットワークの設計者
@@ -636,27 +650,31 @@ achievement.ae2.Networking2.desc=ネットワーク上のチャンネルが128
achievement.ae2.Networking3=ネットワークの管理者 achievement.ae2.Networking3=ネットワークの管理者
achievement.ae2.Networking3.desc=ネットワーク上のチャンネルが2048個に到達する。 achievement.ae2.Networking3.desc=ネットワーク上のチャンネルが2048個に到達する。
achievement.ae2.P2P=ポイント・トゥ・ポイント(ピア・トゥ・ピアではない) achievement.ae2.P2P=ポイント・トゥ・ポイント(ピア・トゥ・ピアではない)
achievement.ae2.P2P.desc=P2Pトンネルを作る。 achievement.ae2.P2P.desc=P2Pトンネルを作成する。
achievement.ae2.Recursive=再帰的なネットワーク achievement.ae2.Recursive=再帰的なネットワーク
achievement.ae2.Recursive.desc=ストレージバスにインターフェースを配置する。 achievement.ae2.Recursive.desc=ストレージバスにインターフェースを配置する。
achievement.ae2.CraftingCPU=次世代のクラフティング achievement.ae2.CraftingCPU=次世代のクラフティング
achievement.ae2.CraftingCPU.desc=クラフティングユニットを作る。 achievement.ae2.CraftingCPU.desc=クラフティングユニットを作成する。
achievement.ae2.Facade=ネットワークの美意識 achievement.ae2.Facade=ネットワークの美意識
achievement.ae2.Facade.desc=偽装板を作る。 achievement.ae2.Facade.desc=偽装板を作成する。
achievement.ae2.NetworkTool=ネットワークの診断 achievement.ae2.NetworkTool=ネットワークの診断
achievement.ae2.NetworkTool.desc=ネットワークツールを作る。 achievement.ae2.NetworkTool.desc=ネットワークツールを作成する。
achievement.ae2.PortableCell=ストレージの放浪者 achievement.ae2.PortableCell=ストレージの放浪者
achievement.ae2.PortableCell.desc=ポータブルセルを作る。 achievement.ae2.PortableCell.desc=ポータブルセルを作成する。
achievement.ae2.StorageBus=無限大の可能性 achievement.ae2.StorageBus=無限大の可能性
achievement.ae2.StorageBus.desc=ストレージバスを作る。 achievement.ae2.StorageBus.desc=ストレージバスを作成する。
achievement.ae2.QNB=量子トンネル achievement.ae2.QNB=量子トンネル
achievement.ae2.QNB.desc=量子リンクを作る。 achievement.ae2.QNB.desc=量子リンクを作成する。
// Stats // Stats
stat.ae2.ItemsInserted=MEストレージセルに搬入したアイテム数 stat.ae2.ItemsInserted=MEストレージに搬入したアイテム数
stat.ae2.ItemsExtracted=MEストレージセルから搬出したアイテム数 stat.ae2.ItemsExtracted=MEストレージから搬出したアイテム数
stat.ae2.TurnedCranks=クランクを回した回数 stat.ae2.TurnedCranks=クランクを回した回数
// Keys // Keys
key.appliedenergistics2.category=Applied Energistics 2 key.appliedenergistics2.category=Applied Energistics 2
key.toggle_focus.desc=検索ボックスの切り替え key.toggle_focus.desc=検索ボックスの切り替え
key.open_wireless_terminal.desc=無線ターミナルを開く
key.open_wireless_crafting_terminal.desc=無線クラフティングターミナルを開く
key.open_wireless_pattern_terminal.desc=無線パターンターミナルを開く
key.open_wireless_fluid_terminal.desc=無線液体ターミナルを開く
@@ -354,6 +354,7 @@ gui.tooltips.appliedenergistics2.FilterModeKeep=Восстановить пре
gui.tooltips.appliedenergistics2.FilterModeClear=Очищать при каждом открытии. gui.tooltips.appliedenergistics2.FilterModeClear=Очищать при каждом открытии.
gui.tooltips.appliedenergistics2.ItemsStored=Хранящиеся предметы: %s gui.tooltips.appliedenergistics2.ItemsStored=Хранящиеся предметы: %s
gui.tooltips.appliedenergistics2.ItemsRequestable=Запрашиваемые предметы: %s gui.tooltips.appliedenergistics2.ItemsRequestable=Запрашиваемые предметы: %s
gui.tooltips.appliedenergistics2.ItemsCraftable=Можно создать
gui.tooltips.appliedenergistics2.P2PFrequency=Частота: %s gui.tooltips.appliedenergistics2.P2PFrequency=Частота: %s
gui.tooltips.appliedenergistics2.MultiplyByTwo=Удвоить колличество предметов gui.tooltips.appliedenergistics2.MultiplyByTwo=Удвоить колличество предметов
gui.tooltips.appliedenergistics2.MultiplyByTwoDesc=Удвоить колличество предметов, установленных в слотах для крафта gui.tooltips.appliedenergistics2.MultiplyByTwoDesc=Удвоить колличество предметов, установленных в слотах для крафта
@@ -462,6 +463,10 @@ item.appliedenergistics2.material.blank_pattern.name=Пустой шаблон
item.appliedenergistics2.material.calculation_processor.name=Вычислительный процессор item.appliedenergistics2.material.calculation_processor.name=Вычислительный процессор
item.appliedenergistics2.material.card_capacity.name=Карта ёмкости item.appliedenergistics2.material.card_capacity.name=Карта ёмкости
item.appliedenergistics2.material.card_pattern_expansion.name=Карта расширения шаблона item.appliedenergistics2.material.card_pattern_expansion.name=Карта расширения шаблона
item.appliedenergistics2.material.card_magnet.name=Магнитная карта
item.appliedenergistics2.material.card_magnet.usage=Щёлкните ПКМ пустой рукой по терминалу, чтобы включить или выключить
item.appliedenergistics2.material.card_magnet.partition=Можно настроить в верстаке для ячеек
item.appliedenergistics2.material.card_quantum_link.name=Карта квантовой связи
item.appliedenergistics2.material.card_fuzzy.name=Карта нечёткости item.appliedenergistics2.material.card_fuzzy.name=Карта нечёткости
item.appliedenergistics2.material.card_inverter.name=Карта инвертирования item.appliedenergistics2.material.card_inverter.name=Карта инвертирования
item.appliedenergistics2.material.card_redstone.name=Карта красного камня item.appliedenergistics2.material.card_redstone.name=Карта красного камня
@@ -586,6 +591,9 @@ item.appliedenergistics2.matter_cannon.name=Материальная пушка
item.appliedenergistics2.memory_card.name=Карта памяти item.appliedenergistics2.memory_card.name=Карта памяти
item.appliedenergistics2.color_applicator.name=Аппликатор цвета item.appliedenergistics2.color_applicator.name=Аппликатор цвета
item.appliedenergistics2.wireless_terminal.name=Беспроводной терминал item.appliedenergistics2.wireless_terminal.name=Беспроводной терминал
item.appliedenergistics2.wireless_crafting_terminal.name=Беспроводной терминал изготовления
item.appliedenergistics2.wireless_pattern_terminal.name=Беспроводной терминал шаблонов
item.appliedenergistics2.wireless_fluid_terminal.name=Беспроводной жидкостный терминал
item.appliedenergistics2.biometric_card.name=Биометрическая карта item.appliedenergistics2.biometric_card.name=Биометрическая карта
item.appliedenergistics2.debug_card.name=Отладочная карта разработчика item.appliedenergistics2.debug_card.name=Отладочная карта разработчика
@@ -600,7 +608,7 @@ commands.ae2.ChunkLoggerOff=Логирование чанков выключен
commands.ae2.Supporters=Отображает список поддержавших AE2 commands.ae2.Supporters=Отображает список поддержавших AE2
// Achievements // Achievements
achievement.ae2.Root=Applied Energistics! Падите ниц! achievement.ae2.Root=Applied Energistics
achievement.ae2.Root.desc=Когда сундука уже не хватает... achievement.ae2.Root.desc=Когда сундука уже не хватает...
achievement.ae2.Compass=Охотник за метеоритами! achievement.ae2.Compass=Охотник за метеоритами!
achievement.ae2.Compass.desc=Сделайте метеоритный компас! achievement.ae2.Compass.desc=Сделайте метеоритный компас!
@@ -661,3 +669,7 @@ stat.ae2.TurnedCranks=Сломано рукояток
//Keys //Keys
key.appliedenergistics2.category=Applied Energistics 2 key.appliedenergistics2.category=Applied Energistics 2
key.toggle_focus.desc=Переключить фокус окна поиска key.toggle_focus.desc=Переключить фокус окна поиска
key.open_wireless_terminal.desc=Открыть беспроводной терминал
key.open_wireless_crafting_terminal.desc=Открыть беспроводной терминал изготовления
key.open_wireless_pattern_terminal.desc=Открыть беспроводной терминал шаблонов
key.open_wireless_fluid_terminal.desc=Открыть беспроводной жидкостный терминал
@@ -1,5 +1,5 @@
// Blocks (方块) // Blocks
tile.appliedenergistics2.cable_bus.name=AE2线缆和(或)总线 tile.appliedenergistics2.cable_bus.name=AE2线缆和(或)总线
tile.appliedenergistics2.cell_workbench.name=元件工作台 tile.appliedenergistics2.cell_workbench.name=元件工作台
tile.appliedenergistics2.charger.name=充能器 tile.appliedenergistics2.charger.name=充能器
tile.appliedenergistics2.chest.name=ME箱子 tile.appliedenergistics2.chest.name=ME箱子
@@ -52,7 +52,7 @@ tile.appliedenergistics2.crafting_accelerator.name=并行处理单元
tile.appliedenergistics2.crafting_unit.name=合成单元 tile.appliedenergistics2.crafting_unit.name=合成单元
tile.appliedenergistics2.molecular_assembler.name=分子装配室 tile.appliedenergistics2.molecular_assembler.name=分子装配室
// Stairs (楼梯) // Stairs
tile.appliedenergistics2.fluix_stairs.name=錾制赛特斯石英楼梯 tile.appliedenergistics2.fluix_stairs.name=錾制赛特斯石英楼梯
tile.appliedenergistics2.quartz_stairs.name=福鲁伊克斯楼梯 tile.appliedenergistics2.quartz_stairs.name=福鲁伊克斯楼梯
tile.appliedenergistics2.chiseled_quartz_stairs.name=竖纹赛特斯石英楼梯 tile.appliedenergistics2.chiseled_quartz_stairs.name=竖纹赛特斯石英楼梯
@@ -62,7 +62,7 @@ tile.appliedenergistics2.sky_stone_brick_stairs.name=陨石石砖楼梯
tile.appliedenergistics2.sky_stone_small_brick_stairs.name=陨石砖块楼梯 tile.appliedenergistics2.sky_stone_small_brick_stairs.name=陨石砖块楼梯
tile.appliedenergistics2.sky_stone_stairs.name=陨石楼梯 tile.appliedenergistics2.sky_stone_stairs.name=陨石楼梯
// Slabs (台阶) // Slabs
tile.appliedenergistics2.chiseled_quartz_slab.name=錾制赛特斯石英台阶 tile.appliedenergistics2.chiseled_quartz_slab.name=錾制赛特斯石英台阶
tile.appliedenergistics2.fluix_slab.name=福鲁伊克斯台阶 tile.appliedenergistics2.fluix_slab.name=福鲁伊克斯台阶
tile.appliedenergistics2.quartz_pillar_slab.name=竖纹赛特斯石英台阶 tile.appliedenergistics2.quartz_pillar_slab.name=竖纹赛特斯石英台阶
@@ -72,29 +72,30 @@ tile.appliedenergistics2.sky_stone_brick_slab.name=陨石石砖台阶
tile.appliedenergistics2.sky_stone_small_brick_slab.name=陨石砖块台阶 tile.appliedenergistics2.sky_stone_small_brick_slab.name=陨石砖块台阶
tile.appliedenergistics2.sky_stone_slab.name=陨石台阶 tile.appliedenergistics2.sky_stone_slab.name=陨石台阶
// Chat Messages (聊天信息) // Chat Messages
chat.appliedenergistics2.ChestCannotReadStorageCell=ME箱子无法读取存储元件. chat.appliedenergistics2.ChestCannotReadStorageCell=ME箱子无法读取存储元件
chat.appliedenergistics2.SettingCleared=设置已清除. chat.appliedenergistics2.SettingCleared=设置已清除
chat.appliedenergistics2.OutOfRange=超出无线信号范围. chat.appliedenergistics2.MissingPatternsToEncode=样板不足,无法完成复制。
chat.appliedenergistics2.InvalidMachine=无效机器. chat.appliedenergistics2.OutOfRange=超出无线信号范围。
chat.appliedenergistics2.LoadedSettings=成功载入设定. chat.appliedenergistics2.InvalidMachine=无效机器。
chat.appliedenergistics2.DeviceNotPowered=设备供能不足. chat.appliedenergistics2.LoadedSettings=成功载入设定。
chat.appliedenergistics2.DeviceNotWirelessTerminal=设备不是无线终端. chat.appliedenergistics2.DeviceNotPowered=设备供能不足。
chat.appliedenergistics2.DeviceNotLinked=设备未连接. chat.appliedenergistics2.DeviceNotWirelessTerminal=设备不是无线终端。
chat.appliedenergistics2.StationCanNotBeLocated=无法定位安全终端. chat.appliedenergistics2.DeviceNotLinked=设备未连接。
chat.appliedenergistics2.MachineNotPowered=机器未供能. chat.appliedenergistics2.StationCanNotBeLocated=无法定位安全终端。
chat.appliedenergistics2.CommunicationError=网络交互错误. chat.appliedenergistics2.MachineNotPowered=机器未供能。
chat.appliedenergistics2.SavedSettings=已将当前设备的配置保存到内存卡中. chat.appliedenergistics2.CommunicationError=网络交互错误。
chat.appliedenergistics2.ResetSettings=新的设备配置已被创建并保存到内存卡中. chat.appliedenergistics2.SavedSettings=已将当前设备配置保存到内存卡中
chat.appliedenergistics2.AmmoDepleted=弹药告罄. chat.appliedenergistics2.ResetSettings=新的设备配置已被创建并保存到内存卡中。
chat.appliedenergistics2.isNowLocked=监控器已锁定. chat.appliedenergistics2.AmmoDepleted=弹药告罄。
chat.appliedenergistics2.isNowUnlocked=监控器已解锁. chat.appliedenergistics2.isNowLocked=监控器已锁定。
chat.appliedenergistics2.isNowUnlocked=监控器已解锁。
// Creative Tabs (创造模式物品栏) // Creative Tabs
itemGroup.appliedenergistics2=应用能源2 itemGroup.appliedenergistics2=应用能源2
itemGroup.appliedenergistics2.facades=应用能源2-伪装板 itemGroup.appliedenergistics2.facades=应用能源2-伪装板
// GUI (图形用户界面相关) // GUI
gui.appliedenergistics2.CraftingTerminal=合成终端 gui.appliedenergistics2.CraftingTerminal=合成终端
gui.appliedenergistics2.METunnel=ME gui.appliedenergistics2.METunnel=ME
gui.appliedenergistics2.ItemTunnel=物品 gui.appliedenergistics2.ItemTunnel=物品
@@ -113,11 +114,11 @@ gui.appliedenergistics2.security.craft.name=合成
gui.appliedenergistics2.security.build.name=建造 gui.appliedenergistics2.security.build.name=建造
gui.appliedenergistics2.security.security.name=安全 gui.appliedenergistics2.security.security.name=安全
gui.appliedenergistics2.security.extract.tip=允许用户从存储空间中移除物品. gui.appliedenergistics2.security.extract.tip=允许用户从存储空间中移除物品
gui.appliedenergistics2.security.inject.tip=允许用户向存储空间中存入新物品. gui.appliedenergistics2.security.inject.tip=允许用户向存储空间中存入新物品
gui.appliedenergistics2.security.craft.tip=用户可以启动新的合成. gui.appliedenergistics2.security.craft.tip=用户可以启动新的合成
gui.appliedenergistics2.security.build.tip=用户可以修改网络的物理结构,并调整配置. gui.appliedenergistics2.security.build.tip=用户可以修改网络的物理结构并调整配置
gui.appliedenergistics2.security.security.tip=用户可以访问修改网络的安全终端. gui.appliedenergistics2.security.security.tip=用户可以访问修改网络的安全终端
gui.appliedenergistics2.Efficiency=效率 gui.appliedenergistics2.Efficiency=效率
gui.appliedenergistics2.SCSSize=SCS规模 gui.appliedenergistics2.SCSSize=SCS规模
@@ -167,8 +168,9 @@ gui.appliedenergistics2.StoredItems=已存储物品
gui.appliedenergistics2.StoredFluids=已存储流体 gui.appliedenergistics2.StoredFluids=已存储流体
gui.appliedenergistics2.Terminal=终端 gui.appliedenergistics2.Terminal=终端
gui.appliedenergistics2.InterfaceTerminal=接口终端 gui.appliedenergistics2.InterfaceTerminal=接口终端
gui.appliedenergistics2.InterfaceTerminalHint=在接口终端显示或隐藏。
gui.appliedenergistics2.InterfaceConfigurationTerminal=接口配置终端 gui.appliedenergistics2.InterfaceConfigurationTerminal=接口配置终端
gui.appliedenergistics2.InterfaceTerminalHint=在接口终端显示或隐藏. gui.appliedenergistics2.FluidInterfaceConfigurationTerminal=流体接口配置终端
gui.appliedenergistics2.FormationPlane=成型面板 gui.appliedenergistics2.FormationPlane=成型面板
gui.appliedenergistics2.FluidFormationPlane=流体成型面板 gui.appliedenergistics2.FluidFormationPlane=流体成型面板
gui.appliedenergistics2.VibrationChamber=谐振仓 gui.appliedenergistics2.VibrationChamber=谐振仓
@@ -193,23 +195,23 @@ gui.appliedenergistics2.Crafts=合成
gui.appliedenergistics2.And=与 gui.appliedenergistics2.And=与
gui.appliedenergistics2.Creates=制作 gui.appliedenergistics2.Creates=制作
gui.appliedenergistics2.With=使用 gui.appliedenergistics2.With=使用
gui.appliedenergistics2.Substitute=启用替换: gui.appliedenergistics2.Substitute=启用替换
gui.appliedenergistics2.Yes=是 gui.appliedenergistics2.Yes=是
gui.appliedenergistics2.No=否 gui.appliedenergistics2.No=否
gui.appliedenergistics2.InWorldCrafting=AE2在世界中的合成 gui.appliedenergistics2.InWorldCrafting=AE2在世界中的合成
gui.appliedenergistics2.inWorldFluix=将1个充能赛特斯石英水晶,1个下界石英和1个红石,相继扔进同一格水里,并等待一会儿. gui.appliedenergistics2.inWorldFluix=将1个充能赛特斯石英水晶1个下界石英和1个红石相继扔进同一格水里并等待一会儿
gui.appliedenergistics2.inWorldPurificationCertus=用赛特斯石英粉和沙子制作赛特斯石英种子,并扔进水里;使用晶体催生器可以让这个过程变得更快. gui.appliedenergistics2.inWorldPurificationCertus=用赛特斯石英粉和沙子制作赛特斯石英种子并扔进水里;使用晶体催生器可以让这个过程变得更快
gui.appliedenergistics2.inWorldPurificationNether=用下界石英粉和沙子制作下界石英种子,并扔进水里;使用晶体催生器可以让这个过程变得更快. gui.appliedenergistics2.inWorldPurificationNether=用下界石英粉和沙子制作下界石英种子并扔进水里;使用晶体催生器可以让这个过程变得更快
gui.appliedenergistics2.inWorldPurificationFluix=用福鲁伊克斯粉和沙子制作福鲁伊克斯种子,并扔进水里;使用晶体催生器可以让这个过程变得更快. gui.appliedenergistics2.inWorldPurificationFluix=用福鲁伊克斯粉和沙子制作福鲁伊克斯种子并扔进水里;使用晶体催生器可以让这个过程变得更快
gui.appliedenergistics2.inWorldSingularity=将1个奇点和一个末影珍珠粉仍在地上,并用爆炸性物品引爆. gui.appliedenergistics2.inWorldSingularity=将1个奇点和一个末影珍珠粉仍在地上并用爆炸性物品引爆
gui.appliedenergistics2.ChargedQuartz=将未充能赛特斯石英插入充能器充能后,可以得到充能赛特斯石英. gui.appliedenergistics2.ChargedQuartz=将未充能赛特斯石英插入充能器充能后可以得到充能赛特斯石英
gui.appliedenergistics2.ChargedQuartzFind=充能赛特斯石英也可以在世界中以普通赛特斯石英一半的几率找到,它的外观类似普通赛特斯石英,除了它会冒出闪电. gui.appliedenergistics2.ChargedQuartzFind=充能赛特斯石英也可以在世界中以普通赛特斯石英一半的几率找到它的外观类似普通赛特斯石英除了它会冒出闪电
gui.appliedenergistics2.NoSecondOutput=无副产物. gui.appliedenergistics2.NoSecondOutput=无副产物
gui.appliedenergistics2.OfSecondOutput=获得副产物概率%1$d%%. gui.appliedenergistics2.OfSecondOutput=获得副产物概率%1$d%%
gui.appliedenergistics2.MultipleOutputs=第一副产概率%1$d%%,第二副产概率%2$d%%. gui.appliedenergistics2.MultipleOutputs=第一副产概率%1$d%%第二副产概率%2$d%%
gui.appliedenergistics2.SelectAmount=选择数量 gui.appliedenergistics2.SelectAmount=选择数量
gui.appliedenergistics2.CopyMode=复制模式 gui.appliedenergistics2.CopyMode=复制模式
gui.appliedenergistics2.CopyModeDesc=控制当取出存储元件时,是否清空配置格. gui.appliedenergistics2.CopyModeDesc=控制当取出存储元件时是否清空配置格
gui.appliedenergistics2.Next=下一页 gui.appliedenergistics2.Next=下一页
gui.appliedenergistics2.Lumen=光通 gui.appliedenergistics2.Lumen=光通
gui.appliedenergistics2.Empty=空 gui.appliedenergistics2.Empty=空
@@ -229,17 +231,17 @@ gui.appliedenergistics2.Bytes=可存储
gui.appliedenergistics2.Simulation=合成模拟 gui.appliedenergistics2.Simulation=合成模拟
gui.appliedenergistics2.CoProcessors=并行处理单元 gui.appliedenergistics2.CoProcessors=并行处理单元
gui.appliedenergistics2.CraftingCPU=合成CPU gui.appliedenergistics2.CraftingCPU=合成CPU
gui.appliedenergistics2.NoCraftingCPUs=没有可用的合成CPU... gui.appliedenergistics2.NoCraftingCPUs=没有可用的合成CPU……
gui.appliedenergistics2.CalculatingWait=正在计算,请等待... gui.appliedenergistics2.CalculatingWait=正在计算请等待……
gui.appliedenergistics2.Clean=清空 gui.appliedenergistics2.Clean=清空
gui.appliedenergistics2.InvalidPattern=无效样板 gui.appliedenergistics2.InvalidPattern=无效样板
gui.appliedenergistics2.Range=范围 gui.appliedenergistics2.Range=范围
gui.appliedenergistics2.TransparentFacades=透明的伪装板 gui.appliedenergistics2.TransparentFacades=透明的伪装板
gui.appliedenergistics2.TransparentFacadesHint=控制当网络工具放在快捷栏时,伪装板显示的透明度. gui.appliedenergistics2.TransparentFacadesHint=控制当网络工具放在快捷栏时伪装板显示的透明度
gui.appliedenergistics2.CPUs=CPU gui.appliedenergistics2.CPUs=CPU
gui.appliedenergistics2.NoCraftingJobs=没有正在进行的合成任务 gui.appliedenergistics2.NoCraftingJobs=没有正在进行的合成任务
gui.appliedenergistics2.FacadeCrafting=伪装板合成 gui.appliedenergistics2.FacadeCrafting=伪装板合成
gui.appliedenergistics2.inWorldCraftingPresses=压印模板可以在陨石块的中心找到,陨石块会散落在世界中.可以用陨石罗盘来定位它们. gui.appliedenergistics2.inWorldCraftingPresses=压印模板可以在陨石块的中心找到陨石块会散落在世界中可以用陨石罗盘来定位它们
gui.appliedenergistics2.Included=包含匹配 gui.appliedenergistics2.Included=包含匹配
gui.appliedenergistics2.Excluded=排除匹配 gui.appliedenergistics2.Excluded=排除匹配
gui.appliedenergistics2.Partitioned=分区 gui.appliedenergistics2.Partitioned=分区
@@ -247,18 +249,19 @@ gui.appliedenergistics2.Precise=精确匹配
gui.appliedenergistics2.Fuzzy=模糊匹配 gui.appliedenergistics2.Fuzzy=模糊匹配
gui.appliedenergistics2.SmallFontCraft=Craft gui.appliedenergistics2.SmallFontCraft=Craft
gui.appliedenergistics2.LargeFontCraft=+ gui.appliedenergistics2.LargeFontCraft=+
gui.appliedenergistics2.Renamer=自定义名称(按下Enter以设定)
gui.appliedenergistics2.Nothing=无 gui.appliedenergistics2.Nothing=无
// GUI Tooltips (GUI提示) // GUI Tooltips
gui.tooltips.appliedenergistics2.Stash=存储物品 gui.tooltips.appliedenergistics2.Stash=存储物品
gui.tooltips.appliedenergistics2.StashDesc=将合成槽的物品返回网络 gui.tooltips.appliedenergistics2.StashDesc=将合成槽的物品返回网络
gui.tooltips.appliedenergistics2.Substitutions=矿物词典替换 gui.tooltips.appliedenergistics2.Substitutions=矿物词典替换
gui.tooltips.appliedenergistics2.SubstitutionsDescEnabled=启用输入组件替换功能. gui.tooltips.appliedenergistics2.SubstitutionsDescEnabled=启用输入组件替换功能
gui.tooltips.appliedenergistics2.SubstitutionsDescDisabled=禁用输入组件替换功能. gui.tooltips.appliedenergistics2.SubstitutionsDescDisabled=禁用输入组件替换功能
gui.tooltips.appliedenergistics2.SubstitutionsOn=启用替换 gui.tooltips.appliedenergistics2.SubstitutionsOn=启用替换
gui.tooltips.appliedenergistics2.SubstitutionsOff=禁用替换 gui.tooltips.appliedenergistics2.SubstitutionsOff=禁用替换
gui.tooltips.appliedenergistics2.Encode=编码样板 gui.tooltips.appliedenergistics2.Encode=编码样板
gui.tooltips.appliedenergistics2.EncodeDescription=将输入的样板写入当前编码样板,或可用的空样板. gui.tooltips.appliedenergistics2.EncodeDescription=将输入的样板写入当前编码样板或可用的空样板
gui.tooltips.appliedenergistics2.FuzzyMode=模糊对比 gui.tooltips.appliedenergistics2.FuzzyMode=模糊对比
gui.tooltips.appliedenergistics2.FZPercent_25=25%时分离损耗 gui.tooltips.appliedenergistics2.FZPercent_25=25%时分离损耗
gui.tooltips.appliedenergistics2.FZPercent_50=50%时分离损耗 gui.tooltips.appliedenergistics2.FZPercent_50=50%时分离损耗
@@ -283,7 +286,7 @@ gui.tooltips.appliedenergistics2.IOMode=输入/输出模式
gui.tooltips.appliedenergistics2.CondenserOutput=ME聚合器-输出 gui.tooltips.appliedenergistics2.CondenserOutput=ME聚合器-输出
gui.tooltips.appliedenergistics2.PartitionStorage=分区存储 gui.tooltips.appliedenergistics2.PartitionStorage=分区存储
gui.tooltips.appliedenergistics2.Clear=清除 gui.tooltips.appliedenergistics2.Clear=清除
gui.tooltips.appliedenergistics2.TrashController=通过按下shift或空格点击删除. gui.tooltips.appliedenergistics2.TrashController=通过按下Shift或空格点击删除
gui.tooltips.appliedenergistics2.InterfaceBlockingMode=阻挡模式 gui.tooltips.appliedenergistics2.InterfaceBlockingMode=阻挡模式
gui.tooltips.appliedenergistics2.InterfaceCraftingMode=合成模式 gui.tooltips.appliedenergistics2.InterfaceCraftingMode=合成模式
gui.tooltips.appliedenergistics2.Trash=销毁物品 gui.tooltips.appliedenergistics2.Trash=销毁物品
@@ -296,8 +299,8 @@ gui.tooltips.appliedenergistics2.AlwaysActive=总是激活
gui.tooltips.appliedenergistics2.ActiveWithoutSignal=无信号时激活 gui.tooltips.appliedenergistics2.ActiveWithoutSignal=无信号时激活
gui.tooltips.appliedenergistics2.ActiveWithSignal=有信号时激活 gui.tooltips.appliedenergistics2.ActiveWithSignal=有信号时激活
gui.tooltips.appliedenergistics2.ActiveOnPulse=有脉冲信号时激活 gui.tooltips.appliedenergistics2.ActiveOnPulse=有脉冲信号时激活
gui.tooltips.appliedenergistics2.EmitLevelsBelow=当容量标准小于设定限制时发出信号. gui.tooltips.appliedenergistics2.EmitLevelsBelow=当容量标准小于设定限制时发出信号
gui.tooltips.appliedenergistics2.EmitLevelAbove=当容量标准大于等于设定限制时发出信号. gui.tooltips.appliedenergistics2.EmitLevelAbove=当容量标准大于等于设定限制时发出信号
gui.tooltips.appliedenergistics2.SearchMode_Auto=自动搜索 gui.tooltips.appliedenergistics2.SearchMode_Auto=自动搜索
gui.tooltips.appliedenergistics2.SearchMode_Standard=标准搜索 gui.tooltips.appliedenergistics2.SearchMode_Standard=标准搜索
gui.tooltips.appliedenergistics2.SearchMode_JEIAuto=JEI自动同步 gui.tooltips.appliedenergistics2.SearchMode_JEIAuto=JEI自动同步
@@ -307,51 +310,52 @@ gui.tooltips.appliedenergistics2.SearchMode_StandardKeep=保持标准搜索
gui.tooltips.appliedenergistics2.SearchMode_JEIAutoKeep=保持JEI自动同步 gui.tooltips.appliedenergistics2.SearchMode_JEIAutoKeep=保持JEI自动同步
gui.tooltips.appliedenergistics2.SearchMode_JEIStandardKeep=保持JEI标准同步 gui.tooltips.appliedenergistics2.SearchMode_JEIStandardKeep=保持JEI标准同步
gui.tooltips.appliedenergistics2.SearchMode=搜索框模式 gui.tooltips.appliedenergistics2.SearchMode=搜索框模式
gui.tooltips.appliedenergistics2.PartitionStorageHint=基于当前已存储物品进行分区编辑. gui.tooltips.appliedenergistics2.PartitionStorageHint=基于当前已存储物品进行分区编辑
gui.tooltips.appliedenergistics2.ClearSettings=清除配置 gui.tooltips.appliedenergistics2.ClearSettings=清除配置
gui.tooltips.appliedenergistics2.Craftable=可合成 gui.tooltips.appliedenergistics2.Craftable=可合成
gui.tooltips.appliedenergistics2.MoveWhenEmpty=当元件为空时移动至输出口. gui.tooltips.appliedenergistics2.MoveWhenEmpty=当元件为空时移动至输出口
gui.tooltips.appliedenergistics2.MoveWhenWorkIsDone=当工序完成移动至输出口. gui.tooltips.appliedenergistics2.MoveWhenWorkIsDone=当工序完成移动至输出口
gui.tooltips.appliedenergistics2.MoveWhenFull=当元件装满时移动至输出口. gui.tooltips.appliedenergistics2.MoveWhenFull=当元件装满时移动至输出口
gui.tooltips.appliedenergistics2.Disabled=禁用 gui.tooltips.appliedenergistics2.Disabled=禁用
gui.tooltips.appliedenergistics2.Enable=启用 gui.tooltips.appliedenergistics2.Enable=启用
gui.tooltips.appliedenergistics2.Blocking=当容器内有物品时不传送物品. gui.tooltips.appliedenergistics2.Blocking=当容器内有物品时不传送物品
gui.tooltips.appliedenergistics2.NonBlocking=忽略目标容器的内容. gui.tooltips.appliedenergistics2.NonBlocking=忽略目标容器的内容
gui.tooltips.appliedenergistics2.Craft=输出时若有需要则合成物品. gui.tooltips.appliedenergistics2.Craft=输出时若有需要则合成物品
gui.tooltips.appliedenergistics2.CraftOnly=不使用已存储物品,只使用合成物品. gui.tooltips.appliedenergistics2.CraftOnly=不使用已存储物品只使用合成物品
gui.tooltips.appliedenergistics2.CraftEither=输出时使用已存储物品或合成物品. gui.tooltips.appliedenergistics2.CraftEither=输出时使用已存储物品或合成物品
gui.tooltips.appliedenergistics2.LevelType=检测类型 gui.tooltips.appliedenergistics2.LevelType=检测类型
gui.tooltips.appliedenergistics2.LevelType_Energy=能源(ae) gui.tooltips.appliedenergistics2.LevelType_Energy=能源
gui.tooltips.appliedenergistics2.LevelType_Item=物品 gui.tooltips.appliedenergistics2.LevelType_Item=物品
gui.tooltips.appliedenergistics2.InventoryTweaks=InventoryTweak(R键整理) gui.tooltips.appliedenergistics2.InventoryTweaks=InventoryTweaks
gui.tooltips.appliedenergistics2.Mod=Mod gui.tooltips.appliedenergistics2.Mod=Mod
gui.tooltips.appliedenergistics2.TerminalStyle=终端风格 gui.tooltips.appliedenergistics2.TerminalStyle=终端风格
gui.tooltips.appliedenergistics2.TerminalStyle_Full=全屏 gui.tooltips.appliedenergistics2.TerminalStyle_Full=全屏
gui.tooltips.appliedenergistics2.TerminalStyle_Tall=长 gui.tooltips.appliedenergistics2.TerminalStyle_Tall=长
gui.tooltips.appliedenergistics2.TerminalStyle_Small=短 gui.tooltips.appliedenergistics2.TerminalStyle_Small=短
gui.tooltips.appliedenergistics2.DoesntDespawn=该物品不会消失. gui.tooltips.appliedenergistics2.DoesntDespawn=该物品不会消失
gui.tooltips.appliedenergistics2.EmitterMode=合成发信模式 gui.tooltips.appliedenergistics2.EmitterMode=合成发信模式
gui.tooltips.appliedenergistics2.CraftViaRedstone=发射红石信号来合成物品. gui.tooltips.appliedenergistics2.CraftViaRedstone=发射红石信号来合成物品
gui.tooltips.appliedenergistics2.EmitWhenCrafting=在物品合成时发射红石信号. gui.tooltips.appliedenergistics2.EmitWhenCrafting=在物品合成时发射红石信号
gui.tooltips.appliedenergistics2.ReportInaccessibleItems=显示不可交互的物品 gui.tooltips.appliedenergistics2.ReportInaccessibleItems=显示不可交互的物品
gui.tooltips.appliedenergistics2.ReportInaccessibleItemsYes=是: 显示无法取出的物品. gui.tooltips.appliedenergistics2.ReportInaccessibleItemsYes=是显示无法取出的物品
gui.tooltips.appliedenergistics2.ReportInaccessibleItemsNo=否: 只显示可以取出的物品. gui.tooltips.appliedenergistics2.ReportInaccessibleItemsNo=否只显示可以取出的物品
gui.tooltips.appliedenergistics2.ReportInaccessibleFluids=显示不可交互的流体 gui.tooltips.appliedenergistics2.ReportInaccessibleFluids=显示不可交互的流体
gui.tooltips.appliedenergistics2.ReportInaccessibleFluidsYes=是: 显示无法取出的流体. gui.tooltips.appliedenergistics2.ReportInaccessibleFluidsYes=是显示无法取出的流体
gui.tooltips.appliedenergistics2.ReportInaccessibleFluidsNo=否: 只显示可以取出的流体. gui.tooltips.appliedenergistics2.ReportInaccessibleFluidsNo=否只显示可以取出的流体
gui.tooltips.appliedenergistics2.BlockPlacement=方块放置方式 gui.tooltips.appliedenergistics2.BlockPlacement=方块放置方式
gui.tooltips.appliedenergistics2.BlockPlacementYes=方块将被放置. gui.tooltips.appliedenergistics2.BlockPlacementYes=方块将被放置
gui.tooltips.appliedenergistics2.BlockPlacementNo=方块将以物品形式掉落. gui.tooltips.appliedenergistics2.BlockPlacementNo=方块将以物品形式掉落
gui.tooltips.appliedenergistics2.SchedulingMode=调度模式 gui.tooltips.appliedenergistics2.SchedulingMode=调度模式
gui.tooltips.appliedenergistics2.SchedulingModeDefault=输出第一个物品直到系统中没有该物品,再输出下一个. gui.tooltips.appliedenergistics2.SchedulingModeDefault=输出第一个物品直到系统中没有该物品再输出下一个
gui.tooltips.appliedenergistics2.SchedulingModeRoundRobin=循环输出模式. gui.tooltips.appliedenergistics2.SchedulingModeRoundRobin=循环输出模式
gui.tooltips.appliedenergistics2.SchedulingModeRandom=随机输出模式. gui.tooltips.appliedenergistics2.SchedulingModeRandom=随机输出模式
gui.tooltips.appliedenergistics2.FilterMode=搜索过滤器模式 gui.tooltips.appliedenergistics2.FilterMode=搜索过滤器模式
gui.tooltips.appliedenergistics2.FilterModeKeep=重载上一个搜索过滤器. gui.tooltips.appliedenergistics2.FilterModeKeep=重载上一个搜索过滤器
gui.tooltips.appliedenergistics2.FilterModeClear=在每次打开时清空. gui.tooltips.appliedenergistics2.FilterModeClear=在每次打开时清空
gui.tooltips.appliedenergistics2.ItemsStored=存储物品: %s gui.tooltips.appliedenergistics2.ItemsStored=存储物品%s
gui.tooltips.appliedenergistics2.ItemsRequestable=可请求: %s gui.tooltips.appliedenergistics2.ItemsRequestable=可请求%s
gui.tooltips.appliedenergistics2.P2PFrequency=频率: %s gui.tooltips.appliedenergistics2.ItemsCraftable=可合成
gui.tooltips.appliedenergistics2.P2PFrequency=频率:%s
gui.tooltips.appliedenergistics2.MultiplyByTwo=物品数量×2 gui.tooltips.appliedenergistics2.MultiplyByTwo=物品数量×2
gui.tooltips.appliedenergistics2.MultiplyByTwoDesc=将尝试将格内物品数量×2 gui.tooltips.appliedenergistics2.MultiplyByTwoDesc=将尝试将格内物品数量×2
gui.tooltips.appliedenergistics2.MultiplyByThree=物品数量×3 gui.tooltips.appliedenergistics2.MultiplyByThree=物品数量×3
@@ -373,13 +377,13 @@ gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOnDesc=显示所有接
gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOffDesc=仅显示有样板位的接口 gui.tooltips.appliedenergistics2.ToggleShowFullInterfacesOffDesc=仅显示有样板位的接口
gui.tooltips.appliedenergistics2.HighlightInterface=高亮接口 gui.tooltips.appliedenergistics2.HighlightInterface=高亮接口
// Units (单位) // Units
gui.appliedenergistics2.units.appliedenergstics=AE gui.appliedenergistics2.units.appliedenergstics=AE
gui.appliedenergistics2.units.ic2=EU gui.appliedenergistics2.units.ic2=EU
gui.appliedenergistics2.units.rf=RF gui.appliedenergistics2.units.rf=RF
gui.appliedenergistics2.units.gteu=GTEU gui.appliedenergistics2.units.gteu=GTEU
// Colors (颜色) // Colors
gui.appliedenergistics2.White=白色 gui.appliedenergistics2.White=白色
gui.appliedenergistics2.Orange=橙色 gui.appliedenergistics2.Orange=橙色
gui.appliedenergistics2.Magenta=品红色 gui.appliedenergistics2.Magenta=品红色
@@ -409,14 +413,14 @@ waila.appliedenergistics2.Showing=显示
waila.appliedenergistics2.Contains=容纳 waila.appliedenergistics2.Contains=容纳
waila.appliedenergistics2.Channels=%1$d / %2$d 频道 waila.appliedenergistics2.Channels=%1$d / %2$d 频道
waila.appliedenergistics2.P2PUnlinked=未连接 waila.appliedenergistics2.P2PUnlinked=未连接
waila.appliedenergistics2.P2PInputOneOutput=已连接(输入端) waila.appliedenergistics2.p2p_input_one_output=已连接输入端- 1输出
waila.appliedenergistics2.P2PInputManyOutputs=已连接(输入端)- %d 输出 waila.appliedenergistics2.p2p_input_many_outputs=已连接输入端- §4%d§r输出
waila.appliedenergistics2.p2p_output_one_input=已连接(输出端) waila.appliedenergistics2.p2p_output_one_input=已连接输出端- 1输入
waila.appliedenergistics2.p2p_output_many_inputs=已连接(输出端)- %d 输入 waila.appliedenergistics2.p2p_output_many_inputs=已连接输出端- §4%d§r输入
waila.appliedenergistics2.P2POutput=已连接(输出端) waila.appliedenergistics2.P2POutput=已连接输出端
// TheOneProbe // TheOneProbe
theoneprobe.appliedenergistics2.crafting=合成中: %1$s theoneprobe.appliedenergistics2.crafting=合成中%1$s
theoneprobe.appliedenergistics2.device_online=设备开启 theoneprobe.appliedenergistics2.device_online=设备开启
theoneprobe.appliedenergistics2.device_offline=设备关闭 theoneprobe.appliedenergistics2.device_offline=设备关闭
theoneprobe.appliedenergistics2.device_missing_channel=设备缺少频道 theoneprobe.appliedenergistics2.device_missing_channel=设备缺少频道
@@ -426,15 +430,15 @@ theoneprobe.appliedenergistics2.showing=显示
theoneprobe.appliedenergistics2.contains=容纳 theoneprobe.appliedenergistics2.contains=容纳
theoneprobe.appliedenergistics2.channels=%1$d / %2$d 频道 theoneprobe.appliedenergistics2.channels=%1$d / %2$d 频道
theoneprobe.appliedenergistics2.p2p_unlinked=未连接 theoneprobe.appliedenergistics2.p2p_unlinked=未连接
theoneprobe.appliedenergistics2.p2p_input_one_output=已连接(输入端) theoneprobe.appliedenergistics2.p2p_input_one_output=已连接输入端- 1输出
theoneprobe.appliedenergistics2.p2p_input_many_outputs=已连接(输入端)- %d 输出 theoneprobe.appliedenergistics2.p2p_input_many_outputs=已连接输入端- §4%d§r输出
theoneprobe.appliedenergistics2.p2p_output_one_input=已连接(输出端) theoneprobe.appliedenergistics2.p2p_output_one_input=已连接输出端- 1输入
theoneprobe.appliedenergistics2.p2p_output_many_inputs=已连接(输出端)- %d 输入 theoneprobe.appliedenergistics2.p2p_output_many_inputs=已连接输出端- §4%d§r输入
theoneprobe.appliedenergistics2.p2p_output=已连接(输出端) theoneprobe.appliedenergistics2.p2p_output=已连接输出端
theoneprobe.appliedenergistics2.p2p_frequency=频率: %1$s theoneprobe.appliedenergistics2.p2p_frequency=频率%1$s
theoneprobe.appliedenergistics2.stored_energy=%1$d / %2$d theoneprobe.appliedenergistics2.stored_energy=%1$d / %2$d
// Items (物品) // Items
item.appliedenergistics2.storage_cell_1k.name=1k-ME存储元件 item.appliedenergistics2.storage_cell_1k.name=1k-ME存储元件
item.appliedenergistics2.storage_cell_4k.name=4k-ME存储元件 item.appliedenergistics2.storage_cell_4k.name=4k-ME存储元件
item.appliedenergistics2.storage_cell_16k.name=16k-ME存储元件 item.appliedenergistics2.storage_cell_16k.name=16k-ME存储元件
@@ -459,6 +463,10 @@ item.appliedenergistics2.material.blank_pattern.name=空白样板
item.appliedenergistics2.material.calculation_processor.name=运算处理器 item.appliedenergistics2.material.calculation_processor.name=运算处理器
item.appliedenergistics2.material.card_capacity.name=容量卡 item.appliedenergistics2.material.card_capacity.name=容量卡
item.appliedenergistics2.material.card_pattern_expansion.name=样板扩展卡 item.appliedenergistics2.material.card_pattern_expansion.name=样板扩展卡
item.appliedenergistics2.material.card_magnet.name=磁引卡
item.appliedenergistics2.material.card_magnet.usage=在终端上空手右击以打开或关闭
item.appliedenergistics2.material.card_magnet.partition=可以在元件工作台上配置
item.appliedenergistics2.material.card_quantum_link.name=量子链接卡
item.appliedenergistics2.material.card_fuzzy.name=模糊卡 item.appliedenergistics2.material.card_fuzzy.name=模糊卡
item.appliedenergistics2.material.card_inverter.name=反相卡 item.appliedenergistics2.material.card_inverter.name=反相卡
item.appliedenergistics2.material.card_redstone.name=红石卡 item.appliedenergistics2.material.card_redstone.name=红石卡
@@ -539,7 +547,7 @@ item.appliedenergistics2.multi_part.level_emitter.name=ME标准发信器
item.appliedenergistics2.multi_part.fluid_level_emitter.name=ME流体标准发信器 item.appliedenergistics2.multi_part.fluid_level_emitter.name=ME流体标准发信器
item.appliedenergistics2.multi_part.p2p_tunnel.name=P2P通道 item.appliedenergistics2.multi_part.p2p_tunnel.name=P2P通道
item.appliedenergistics2.multi_part.pattern_terminal.name=ME样板终端 item.appliedenergistics2.multi_part.pattern_terminal.name=ME样板终端
item.appliedenergistics2.multi_part.expanded_processing_pattern_terminal.name=ME增广处理样板终端 item.appliedenergistics2.multi_part.expanded_processing_pattern_terminal.name=ME增广样板终端
item.appliedenergistics2.multi_part.quartz_fiber.name=石英纤维 item.appliedenergistics2.multi_part.quartz_fiber.name=石英纤维
item.appliedenergistics2.multi_part.storage_bus.name=ME存储总线 item.appliedenergistics2.multi_part.storage_bus.name=ME存储总线
item.appliedenergistics2.multi_part.oredict_storage_bus.name=ME矿典存储总线 item.appliedenergistics2.multi_part.oredict_storage_bus.name=ME矿典存储总线
@@ -550,6 +558,7 @@ item.appliedenergistics2.multi_part.toggle_bus.name=ME触发总线
item.appliedenergistics2.multi_part.crafting_monitor.name=ME合成监控器 item.appliedenergistics2.multi_part.crafting_monitor.name=ME合成监控器
item.appliedenergistics2.multi_part.interface_terminal.name=ME接口终端 item.appliedenergistics2.multi_part.interface_terminal.name=ME接口终端
item.appliedenergistics2.multi_part.interface_configuration_terminal.name=ME接口配置终端 item.appliedenergistics2.multi_part.interface_configuration_terminal.name=ME接口配置终端
item.appliedenergistics2.multi_part.fluid_interface_configuration_terminal.name=ME流体接口配置终端
item.appliedenergistics2.multi_part.fluid_terminal.name=ME流体终端 item.appliedenergistics2.multi_part.fluid_terminal.name=ME流体终端
item.appliedenergistics2.multi_part.invalid_type.name=已禁用 item.appliedenergistics2.multi_part.invalid_type.name=已禁用
@@ -582,22 +591,25 @@ item.appliedenergistics2.matter_cannon.name=物质炮
item.appliedenergistics2.memory_card.name=内存卡 item.appliedenergistics2.memory_card.name=内存卡
item.appliedenergistics2.color_applicator.name=染色器 item.appliedenergistics2.color_applicator.name=染色器
item.appliedenergistics2.wireless_terminal.name=无线终端 item.appliedenergistics2.wireless_terminal.name=无线终端
item.appliedenergistics2.wireless_crafting_terminal.name=无线合成终端
item.appliedenergistics2.wireless_pattern_terminal.name=无线样板终端
item.appliedenergistics2.wireless_fluid_terminal.name=无线流体终端
item.appliedenergistics2.biometric_card.name=身份卡 item.appliedenergistics2.biometric_card.name=身份卡
item.appliedenergistics2.debug_card.name=Dev.调试卡 item.appliedenergistics2.debug_card.name=Dev.调试卡
item.appliedenergistics2.debug_replicator_card.name=Dev.复制卡 item.appliedenergistics2.debug_replicator_card.name=Dev.复制卡
// Commands (指令) // Commands
commands.ae2.usage=ae2提供的指令 - 输入/ae2 list查看指令列表,/ae2 help _____查看指令帮助. commands.ae2.usage=AE2提供的指令 - 输入/ae2 list查看指令列表/ae2 help _____查看指令帮助
commands.ae2.permissions=你没有足够的权限来执行该指令. commands.ae2.permissions=你没有足够的权限来执行该指令
commands.ae2.ChunkLogger=是否向服务器日志打开区块载入与载出信息.(OP) commands.ae2.ChunkLogger=是否向服务器日志打开区块载入与载出信息。(OP
commands.ae2.ChunkLoggerOn=区块日志已打开 commands.ae2.ChunkLoggerOn=区块日志已打开
commands.ae2.ChunkLoggerOff=区块日志已关闭 commands.ae2.ChunkLoggerOff=区块日志已关闭
commands.ae2.Supporters=显示ae2支持者列表 commands.ae2.Supporters=显示AE2支持者列表
// Achievements (进度) // Achievements
achievement.ae2.Root=Applied Energistics achievement.ae2.Root=应用能源
achievement.ae2.Root.desc=当箱子只是不够用的时候. achievement.ae2.Root.desc=当箱子只是不够用的时候
achievement.ae2.Compass=陨石猎手 achievement.ae2.Compass=陨石猎手
achievement.ae2.Compass.desc=制作一个陨石罗盘 achievement.ae2.Compass.desc=制作一个陨石罗盘
achievement.ae2.Presses=未知科技 achievement.ae2.Presses=未知科技
@@ -649,11 +661,15 @@ achievement.ae2.StorageBus.desc=制作一个存储总线
achievement.ae2.QNB=量子隧道 achievement.ae2.QNB=量子隧道
achievement.ae2.QNB.desc=制作一个链接室 achievement.ae2.QNB.desc=制作一个链接室
// Stats (统计) // Stats
stat.ae2.ItemsInserted=物品已存入ME存储 stat.ae2.ItemsInserted=物品已存入ME存储
stat.ae2.ItemsExtracted=物品已取出ME存储 stat.ae2.ItemsExtracted=物品已取出ME存储
stat.ae2.TurnedCranks=转动曲柄 stat.ae2.TurnedCranks=转动曲柄
// Keys (键盘) //Keys
key.appliedenergistics2.category=Applied Energistics 2 key.appliedenergistics2.category=应用能源2
key.toggle_focus.desc=打开/关闭搜索框聚焦 key.toggle_focus.desc=打开/关闭搜索框聚焦
key.open_wireless_terminal.desc=打开无线终端
key.open_wireless_crafting_terminal.desc=打开无线合成终端
key.open_wireless_pattern_terminal.desc=打开无线样板终端
key.open_wireless_fluid_terminal.desc=打开无线流体终端
@@ -1,122 +1,108 @@
{ {
"credit": "Made with Blockbench", "textures": {
"textures": { "4": "appliedenergistics2:blocks/drive_inside",
"up": "appliedenergistics2:blocks/chest/top", "up": "appliedenergistics2:blocks/chest/top",
"down": "appliedenergistics2:blocks/chest/bottom", "down": "appliedenergistics2:blocks/chest/bottom",
"north": "appliedenergistics2:blocks/chest/front", "north": "appliedenergistics2:blocks/chest/front",
"particle": "appliedenergistics2:blocks/chest/side", "particle": "appliedenergistics2:blocks/chest/side",
"east": "appliedenergistics2:blocks/chest/side" "east": "appliedenergistics2:blocks/chest/side"
}, },
"elements": [ "elements": [
{ {
"name": "inside_border_right", "from": [0, 0, 0],
"from": [4, 3, 0], "to": [16, 16, 16],
"to": [5, 8, 1], "faces": {
"rotation": {"angle": 0, "axis": "y", "origin": [8, 13, 1]}, "north": { "uv": [0, 0, 16, 16], "texture": "#north" },
"faces": { "east": { "uv": [0, 0, 16, 16], "texture": "#east" },
"east": {"uv": [0, 6, 1, 11], "rotation": 180, "texture": "#down"} "south": { "uv": [0, 0, 16, 16], "texture": "#east" },
} "west": { "uv": [0, 0, 16, 16], "texture": "#east" },
}, "up": { "uv": [0, 0, 16, 16], "texture": "#up" },
{ "down": { "uv": [0, 0, 16, 16], "texture": "#down" }
"name": "inside_right", }
"from": [2, 1, 1], },
"to": [5, 12, 11], {
"rotation": {"angle": 0, "axis": "y", "origin": [9, 11, 3]}, "name": "inside_back",
"faces": { "from": [5, 4, 7],
"east": {"uv": [5, 2, 14, 13], "texture": "#down"} "to": [11, 7, 10],
} "rotation": { "angle": 0, "axis": "y", "origin": [19, 11, 8] },
}, "faces": {
{ "north": { "uv": [4, 1, 16, 14], "texture": "#4" }
"from": [0, 0, 0], }
"to": [16, 16, 16], },
"faces": { {
"north": {"uv": [0, 0, 16, 16], "texture": "#north"}, "name": "inside_left",
"east": {"uv": [0, 0, 16, 16], "texture": "#east"}, "from": [11, 1, 1],
"south": {"uv": [0, 0, 16, 16], "texture": "#east"}, "to": [14, 12, 11],
"west": {"uv": [0, 0, 16, 16], "texture": "#east"}, "rotation": { "angle": 0, "axis": "y", "origin": [18, 11, 3] },
"up": {"uv": [0, 0, 16, 16], "texture": "#up"}, "faces": {
"down": {"uv": [0, 0, 16, 16], "texture": "#down"} "north": { "uv": [2, 5, 2, 5], "texture": "#4" },
} "west": { "uv": [5, 1, 14, 12], "texture": "#4" }
}, }
{ },
"name": "inside_back", {
"from": [5, 4, 7], "name": "inside_top",
"to": [11, 7, 10], "from": [5, 6, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [19, 11, 8]}, "to": [11, 9, 11],
"faces": { "rotation": { "angle": 0, "axis": "y", "origin": [15, 16, 3] },
"north": {"uv": [3, 2, 14, 14], "texture": "#down"} "faces": {
} "north": { "uv": [2, 7, 2, 7], "texture": "#4" },
}, "down": { "uv": [6, 4, 6, 4], "texture": "#4" }
{ }
"name": "inside_left", },
"from": [11, 1, 1], {
"to": [14, 12, 11], "name": "inside_bottom",
"rotation": {"angle": 0, "axis": "y", "origin": [18, 11, 3]}, "from": [5, 1, 1],
"faces": { "to": [11, 4, 11],
"north": {"uv": [2, 5, 2, 5], "texture": "#down"}, "rotation": { "angle": 0, "axis": "y", "origin": [15, 11, 3] },
"west": {"uv": [5, 2, 14, 13], "texture": "#down"} "faces": {
} "north": { "uv": [2, 7, 2, 7], "texture": "#4" },
}, "up": { "uv": [6, 3, 6, 3], "texture": "#4" }
{ }
"name": "inside_top", },
"from": [5, 6, 1], {
"to": [11, 9, 11], "name": "inside_border_bottom",
"rotation": {"angle": 0, "axis": "y", "origin": [15, 16, 3]}, "from": [4, 0, 0],
"faces": { "to": [12, 3, 9],
"north": {"uv": [14, 12, 14, 12], "texture": "#down"}, "rotation": { "angle": 0, "axis": "y", "origin": [15, 10, 1] },
"down": {"uv": [12, 15, 12, 15], "texture": "#down"} "faces": {
} "up": { "uv": [0, 4, 9, 13], "rotation": 90, "texture": "#4" }
}, }
{ },
"name": "inside_bottom", {
"from": [5, 1, 1], "name": "inside_border_top",
"to": [11, 4, 11], "from": [5, 7, 0],
"rotation": {"angle": 0, "axis": "y", "origin": [15, 11, 3]}, "to": [12, 10, 9],
"faces": { "rotation": { "angle": 0, "axis": "y", "origin": [15, 17, 1] },
"north": {"uv": [1, 6, 1, 6], "texture": "#down"}, "faces": {
"up": {"uv": [6, 1, 6, 1], "texture": "#down"} "down": { "uv": [0, 4, 9, 13], "rotation": 270, "texture": "#4" }
} }
}, },
{ {
"name": "inside_border_bottom", "name": "inside_border_left",
"from": [4, 0, 0], "from": [11, 3, 0],
"to": [12, 3, 9], "to": [12, 8, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [15, 10, 1]}, "rotation": { "angle": 0, "axis": "y", "origin": [15, 13, 1] },
"faces": { "faces": {
"up": {"uv": [0, 4, 9, 13], "rotation": 90, "texture": "#missing"} "west": { "uv": [0, 8, 1, 13], "texture": "#4" }
} }
}, },
{ {
"name": "inside_border_top", "name": "inside_border_right",
"from": [5, 7, 0], "from": [4, 3, 0],
"to": [12, 10, 9], "to": [5, 8, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [15, 17, 1]}, "rotation": { "angle": 0, "axis": "y", "origin": [8, 13, 1] },
"faces": { "faces": {
"down": {"uv": [0, 4, 9, 13], "rotation": 270, "texture": "#down"} "east": { "uv": [0, 6, 1, 11], "rotation": 180, "texture": "#4" }
} }
}, },
{ {
"name": "inside_border_left", "name": "inside_right",
"from": [11, 3, 0], "from": [2, 1, 1],
"to": [12, 8, 1], "to": [5, 12, 11],
"rotation": {"angle": 0, "axis": "y", "origin": [15, 13, 1]}, "rotation": { "angle": 0, "axis": "y", "origin": [9, 11, 3] },
"faces": { "faces": {
"west": {"uv": [0, 8, 1, 13], "texture": "#down"} "east": { "uv": [5, 2, 14, 13], "texture": "#4" }
} }
} }
], ]
"groups": [
{
"name": "chest",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
},
{
"name": "cells",
"origin": [8, 8, 8],
"color": 0,
"children": []
}
]
} }
@@ -1,4 +1,3 @@
{ {
"textures": {}, "credit": "Made with Blockbench"
"elements": []
} }
@@ -1,38 +1,23 @@
{ {
"credit": "Made with Blockbench", "textures": {
"textures": { "backdrop": "appliedenergistics2:blocks/chest/cell_state_backdrop",
"front": "appliedenergistics2:blocks/chest/cell_state_backdrop", "state": "appliedenergistics2:blocks/chest/cell_state_full"
"state": "appliedenergistics2:blocks/chest/cell_state_full", },
"top_front": "appliedenergistics2:blocks/drive_cell_states_emissive" "elements": [
}, {
"elements": [ "from": [5, 4, 0],
{ "to": [11, 6, 1],
"name": "Cell Backdrop", "faces": {
"from": [5, 4, 0], "north": { "uv": [5, 10, 11, 12], "texture": "#backdrop" },
"to": [11, 6, 1], "up": { "uv": [5, 9, 11, 10], "texture": "#backdrop" }
"shade": false, }
"faces": { },
"north": {"uv": [5, 10, 11, 12], "texture": "#front"}, {
"up": {"uv": [5, 10, 11, 11], "texture": "#front"} "from": [0, 0, 0],
} "to": [16, 16, 16],
}, "faces": {
{ "north": { "uv": [0, 0, 16, 16], "texture": "#state" }
"name": "Cell Light", }
"from": [9, 4, 0], }
"to": [10, 5, 0], ]
"shade": false,
"faces": {
"north": {"uv": [6, 11, 7, 12], "texture": "#state"}
}
},
{
"name": "Cell Light",
"from": [9, 4, 0],
"to": [10, 5, 0],
"shade": false,
"faces": {
"north": {"uv": [1, 7, 2, 8], "texture": "#top_front"}
}
}
]
} }
@@ -1,17 +1,15 @@
{ {
"credit": "Made with Blockbench", "textures": {
"textures": { "state": "appliedenergistics2:blocks/chest/cell_state_offline"
"front": "appliedenergistics2:blocks/chest/cell_state_offline" },
}, "elements": [
"elements": [ {
{ "from": [5, 4, 0],
"from": [5, 4, 0], "to": [11, 6, 1],
"to": [11, 6, 1], "faces": {
"shade": false, "north": { "uv": [5, 10, 11, 12], "texture": "#state" },
"faces": { "up": { "uv": [5, 9, 11, 10], "texture": "#state" }
"north": {"uv": [5, 10, 11, 12], "texture": "#front"}, }
"up": {"uv": [5, 10, 11, 11], "texture": "#front"} }
} ]
}
]
} }
@@ -1,38 +1,23 @@
{ {
"ae2_uvl_marker": true, "textures": {
"parent": "block/block", "backdrop": "appliedenergistics2:blocks/chest/cell_state_backdrop",
"textures": { "state": "appliedenergistics2:blocks/chest/cell_state_online"
"front": "appliedenergistics2:blocks/chest/cell_state_backdrop", },
"state": "appliedenergistics2:blocks/chest/cell_state_online", "elements": [
"top_front": "appliedenergistics2:blocks/drive_cell_states_emissive" {
}, "from": [5, 4, 0],
"elements": [ "to": [11, 6, 1],
{ "faces": {
"name": "Cell Backdrop", "north": { "uv": [5, 10, 11, 12], "texture": "#backdrop" },
"from": [5, 4, 0], "up": { "uv": [5, 9, 11, 10], "texture": "#backdrop" }
"to": [11, 6, 1], }
"shade": false, },
"faces": { {
"north": {"uv": [5, 10, 11, 12], "texture": "#front"}, "from": [0, 0, 0],
"up": {"uv": [5, 10, 11, 11], "texture": "#front"} "to": [16, 16, 16],
} "faces": {
}, "north": { "uv": [0, 0, 16, 16], "texture": "#state" }
{ }
"name": "Cell Light", }
"from": [9, 4, 0], ]
"to": [10, 5, 0],
"shade": false,
"faces": {
"north": {"uv": [6, 11, 7, 12], "texture": "#state"}
}
},
{
"name": "Cell Light",
"from": [9, 4, 0],
"to": [10, 5, 0],
"faces": {
"north": {"uv": [1, 3, 2, 4], "texture": "#top_front"}
}
}
]
} }
@@ -1,38 +1,23 @@
{ {
"credit": "Made with Blockbench", "textures": {
"textures": { "backdrop": "appliedenergistics2:blocks/chest/cell_state_backdrop",
"front": "appliedenergistics2:blocks/chest/cell_state_backdrop", "state": "appliedenergistics2:blocks/chest/cell_state_types_full"
"state": "appliedenergistics2:blocks/chest/cell_state_types_full", },
"top_front": "appliedenergistics2:blocks/drive_cell_states_emissive" "elements": [
}, {
"elements": [ "from": [5, 4, 0],
{ "to": [11, 6, 1],
"name": "Cell Backdrop", "faces": {
"from": [5, 4, 0], "north": { "uv": [5, 10, 11, 12], "texture": "#backdrop" },
"to": [11, 6, 1], "up": { "uv": [5, 9, 11, 10], "texture": "#backdrop" }
"shade": false, }
"faces": { },
"north": {"uv": [5, 10, 11, 12], "texture": "#front"}, {
"up": {"uv": [5, 10, 11, 11], "texture": "#front"} "from": [0, 0, 0],
} "to": [16, 16, 16],
}, "faces": {
{ "north": { "uv": [0, 0, 16, 16], "texture": "#state" }
"name": "Cell Light", }
"from": [9, 4, 0], }
"to": [10, 5, 0], ]
"shade": false,
"faces": {
"north": {"uv": [6, 11, 7, 12], "texture": "#state"}
}
},
{
"name": "Cell Light",
"from": [9, 4, 0],
"to": [10, 5, 0],
"shade": false,
"faces": {
"north": {"uv": [1, 5, 2, 6], "texture": "#top_front"}
}
}
]
} }
@@ -1,25 +1,17 @@
{ {
"textures": { "textures": {
"lights": "appliedenergistics2:blocks/chest/lights_off" "lights": "appliedenergistics2:blocks/chest/lights_off"
}, },
"elements": [ "elements": [
{ {
"from": [ "from": [0, 0, 0],
0, "to": [16, 16, 16],
0, "faces": {
0 "up": {
], "texture": "#lights",
"to": [ "tintindex": 3
16,
16,
16
],
"faces": {
"up": {
"texture": "#lights",
"tintindex": 3
}
}
} }
] }
}
]
} }

Some files were not shown because too many files have changed in this diff Show More