mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-15 17:45:08 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a614038a18 | ||
|
|
cd58ee6866 | ||
|
|
88ac45d6b6 | ||
|
|
187ba74826 | ||
|
|
10a05d75bc | ||
|
|
b9d405312d | ||
|
|
067d602a9d | ||
|
|
9b54770785 | ||
|
|
51d553d6a0 | ||
|
|
a2da1c4832 | ||
|
|
a40e48f5d8 | ||
|
|
0e7bf1c530 | ||
|
|
81ac330ec8 | ||
|
|
c08af8ef02 | ||
|
|
15ed039813 | ||
|
|
a217fd3699 | ||
|
|
246a6d8f0a | ||
|
|
b652b79e61 | ||
|
|
27a0a443a2 | ||
|
|
c7a334c913 | ||
|
|
f512b210a5 | ||
|
|
e2b41a49c3 | ||
|
|
7f89eba8b5 | ||
|
|
76dabdf493 | ||
|
|
41c51754bb | ||
|
|
472b3649e1 | ||
|
|
806d162b19 | ||
|
|
ad1f98b03e | ||
|
|
f9bc80ef91 | ||
|
|
8807be5887 | ||
|
|
026a36d51d | ||
|
|
c6c539ea13 | ||
|
|
983a76dd1d | ||
|
|
f492c45f50 | ||
|
|
3093ea6180 | ||
|
|
ea5786c266 | ||
|
|
2c714d4321 | ||
|
|
40462a06fd | ||
|
|
eb83e72c74 | ||
|
|
6ed29e1ae1 | ||
|
|
a388c7ed2d | ||
|
|
d7080d356e | ||
|
|
f7c2a36e36 | ||
|
|
3f57c1ba79 | ||
|
|
1e30b56d65 | ||
|
|
bace7f93fe | ||
|
|
dfd194159f | ||
|
|
15d7f7405b | ||
|
|
364f833b55 | ||
|
|
36eaeeb615 | ||
|
|
49c17652cd | ||
|
|
6abe5ea4a9 | ||
|
|
be44112161 | ||
|
|
88d90c2d07 |
No files matched your search
@@ -38,3 +38,4 @@
|
||||
resources/assets/enderio/lang/*.lang.txt
|
||||
*.bat
|
||||
libs/
|
||||
options.txt
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
# EnderIO
|
||||
|
||||
Changelog of EnderIO.
|
||||
|
||||
|
||||
### [#28 Fix Burn Time tooltip](https://github.com/GTNewHorizons/EnderIO/pull/28)
|
||||
**Merge pull request #28 from GTNewHorizons/fix_burn_time_tooltip**
|
||||
* Fix Burn Time tooltip
|
||||
|
||||
[a40e48f5d87b0be](https://github.com/GTNewHorizons/EnderIO/commit/a40e48f5d87b0be)
|
||||
by Martin Robertz *2021-01-24 21:37:43*
|
||||
### No issue
|
||||
**bump version**
|
||||
|
||||
[a2da1c4832993a3](https://github.com/GTNewHorizons/EnderIO/commit/a2da1c4832993a3)
|
||||
by DreamMasterXXL *2021-01-29 18:56:32*
|
||||
|
||||
**Revert "Update TooltipHandlerBurnTime.java"**
|
||||
* This reverts commit 3093ea6180beec8329087a1f91bda448683331d8.
|
||||
|
||||
[0e7bf1c530797f8](https://github.com/GTNewHorizons/EnderIO/commit/0e7bf1c530797f8)
|
||||
by Jason Mitchell *2021-01-24 21:02:17*
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
EnderIO [](http://ci.tterrag.com/job/EnderIO/)
|
||||
EnderIO-Unofficial
|
||||
=======
|
||||
[](http://jenkins.usrv.eu:8080/job/Ender-IO/)
|
||||
This is a unofficial version of EndeIO for 1.7.10, in case of any bugs or problems please do not contact the original developers of EnderIO!
|
||||
|
||||
All code (excluding the bundled APIs from other mods, which are covered by their respective licenses) are released without restriction into the public domain under the CC0 1.0 license (http://creativecommons.org/publicdomain/zero/1.0/legalcode) FAQ (https://wiki.creativecommons.org/CC0_FAQ).
|
||||
Do what you want with it, as long as you smile while doing so. While it is not a requirement, it would be nice to know if it is being used and how, so send me hello to **crazypants.mc at gmail.com**.
|
||||
Do what you want with it, as long as you smile while doing so.
|
||||
|
||||
|
||||
|
||||
|
||||
+32
-6
@@ -1,16 +1,30 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url = "http://files.minecraftforge.net/maven" }
|
||||
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
|
||||
maven { url = "https://jitpack.io" }
|
||||
maven { url = "https://gregtech.overminddl1.com/" }
|
||||
}
|
||||
dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' }
|
||||
dependencies { classpath 'com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT' }
|
||||
}
|
||||
plugins {
|
||||
id 'idea'
|
||||
id 'java'
|
||||
}
|
||||
|
||||
|
||||
apply plugin: 'forge'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'curseforge'
|
||||
|
||||
idea.module.downloadJavadoc = true
|
||||
idea.module.downloadSources = true
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
compileJava.options.encoding = 'UTF-8'
|
||||
|
||||
ext.buildnumber = 0
|
||||
if (System.getenv('BUILD_NUMBER') != null)
|
||||
project.buildnumber = System.getenv('BUILD_NUMBER')
|
||||
@@ -46,6 +60,7 @@ configurations {
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
maven { url = "http://mobiusstrip.eu/maven" }
|
||||
maven { url = "http://chickenbones.net/maven/" }
|
||||
@@ -65,15 +80,26 @@ dependencies {
|
||||
compile "com.mod-buildcraft:buildcraft:${buildcraft_version}:api"
|
||||
compile "mcp.mobius.waila:Waila:${waila_version}_${minecraft_version}:dev"
|
||||
compile "net.sengir.forestry:${forestry_version}:api"
|
||||
compile ("com.pahimar.ee3:EquivalentExchange3:${ee3_version}:dev") {
|
||||
compileOnly ("com.pahimar.ee3:EquivalentExchange3:${ee3_version}:dev") {
|
||||
transitive = false
|
||||
}
|
||||
|
||||
// WAILA ships really old CCC/CCL versions, so we force the new versions
|
||||
compile "codechicken:CodeChickenLib:${minecraft_version}-${ccl_version}:dev"
|
||||
compile "codechicken:CodeChickenCore:${minecraft_version}-${ccc_version}:dev"
|
||||
|
||||
compile "li.cil.oc:OpenComputers:${opencomputers_version}:api"
|
||||
|
||||
compileOnly "li.cil.oc:OpenComputers:${opencomputers_version}:api"
|
||||
|
||||
// Missing Libs -_-' -bart
|
||||
compileOnly "mekanism:MekanismAll:1.7.10-9.1.1.283:dev"
|
||||
compileOnly "appeng:appliedenergistics2:rv3-beta-6:dev"
|
||||
compileOnly "powercrystals:MineFactoryReloaded:[1.7.10]2.8.2B1-201:dev"
|
||||
compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev"
|
||||
compileOnly "dan200.computercraft:ComputerCraft:1.75"
|
||||
compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf"
|
||||
compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev"
|
||||
compileOnly "codechicken:ForgeMultipart:1.7.10-1.2.0.347:dev"
|
||||
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
+3
-3
@@ -2,7 +2,7 @@ minecraft_version=1.7.10
|
||||
forge_version=10.13.4.1614-1.7.10
|
||||
forgeDep_version=10.13.4.1614
|
||||
|
||||
mod_version=2.3.1.7_beta
|
||||
mod_version=2.3.1.17
|
||||
|
||||
#Comment out this line to get rid of the appendix
|
||||
#mod_appendix=beta
|
||||
@@ -10,7 +10,7 @@ mod_version=2.3.1.7_beta
|
||||
buildcraft_version=6.1.5
|
||||
waila_version=1.5.10
|
||||
ccc_version=1.0.7.46
|
||||
ccl_version=1.1.3.138
|
||||
ccl_version=1.1.3.140
|
||||
ae2_version=rv3-stable-24
|
||||
endercore_version=1.7.10-0.2.0.35_beta
|
||||
ee3_version=1.7.10-0.3.507
|
||||
@@ -19,4 +19,4 @@ opencomputers_version=MC1.7.10-1.5.+
|
||||
|
||||
toReplace=after:endercore;after:MineFactoryReloaded;after:Waila@[1.5.8,);after:Thaumcraft;after:appliedenergistics2@[rv3-beta-24,)
|
||||
|
||||
curse_projectId=64578
|
||||
curse_projectId=379275
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
invertYMouse:false
|
||||
mouseSensitivity:0.5
|
||||
fov:0.0
|
||||
gamma:0.0
|
||||
saturation:0.0
|
||||
renderDistance:12
|
||||
guiScale:3
|
||||
particles:0
|
||||
bobView:true
|
||||
anaglyph3d:false
|
||||
advancedOpengl:false
|
||||
maxFps:120
|
||||
fboEnable:true
|
||||
difficulty:2
|
||||
fancyGraphics:true
|
||||
ao:2
|
||||
clouds:true
|
||||
resourcePacks:[]
|
||||
lastServer:
|
||||
lang:en_US
|
||||
chatVisibility:0
|
||||
chatColors:true
|
||||
chatLinks:true
|
||||
chatLinksPrompt:true
|
||||
chatOpacity:1.0
|
||||
snooperEnabled:true
|
||||
fullscreen:false
|
||||
enableVsync:true
|
||||
hideServerAddress:false
|
||||
advancedItemTooltips:true
|
||||
pauseOnLostFocus:true
|
||||
showCape:true
|
||||
touchscreen:false
|
||||
overrideWidth:0
|
||||
overrideHeight:0
|
||||
heldItemTooltips:true
|
||||
chatHeightFocused:1.0
|
||||
chatHeightUnfocused:0.44366196
|
||||
chatScale:1.0
|
||||
chatWidth:1.0
|
||||
showInventoryAchievementHint:false
|
||||
mipmapLevels:4
|
||||
anisotropicFiltering:1
|
||||
streamBytesPerPixel:0.5
|
||||
streamMicVolume:1.0
|
||||
streamSystemVolume:1.0
|
||||
streamKbps:0.5412844
|
||||
streamFps:0.31690142
|
||||
streamCompression:1
|
||||
streamSendMetadata:true
|
||||
streamPreferredServer:
|
||||
streamChatEnabled:0
|
||||
streamChatUserFilter:0
|
||||
streamMicToggleBehavior:0
|
||||
forceUnicodeFont:false
|
||||
key_key.attack:-100
|
||||
key_key.use:-99
|
||||
key_key.forward:17
|
||||
key_key.left:30
|
||||
key_key.back:31
|
||||
key_key.right:32
|
||||
key_key.jump:57
|
||||
key_key.sneak:42
|
||||
key_key.drop:16
|
||||
key_key.inventory:18
|
||||
key_key.chat:20
|
||||
key_key.playerlist:15
|
||||
key_key.pickItem:-98
|
||||
key_key.command:53
|
||||
key_key.screenshot:60
|
||||
key_key.togglePerspective:63
|
||||
key_key.smoothCamera:0
|
||||
key_key.sprint:29
|
||||
key_key.streamStartStop:64
|
||||
key_key.streamPauseUnpause:65
|
||||
key_key.streamCommercial:0
|
||||
key_key.streamToggleMic:0
|
||||
key_key.fullscreen:87
|
||||
key_key.hotbar.1:2
|
||||
key_key.hotbar.2:3
|
||||
key_key.hotbar.3:4
|
||||
key_key.hotbar.4:5
|
||||
key_key.hotbar.5:6
|
||||
key_key.hotbar.6:7
|
||||
key_key.hotbar.7:8
|
||||
key_key.hotbar.8:9
|
||||
key_key.hotbar.9:10
|
||||
key_key.charge:47
|
||||
key_key.extra:46
|
||||
key_key.release:19
|
||||
key_key.toggle:34
|
||||
key_waila.keybind.wailaconfig:82
|
||||
key_waila.keybind.wailadisplay:79
|
||||
key_waila.keybind.liquid:80
|
||||
key_waila.keybind.recipe:81
|
||||
key_waila.keybind.usage:75
|
||||
key_Baubles Inventory:48
|
||||
key_Change Wand Focus:33
|
||||
key_Activate Hover Harness:35
|
||||
key_Misc Wand Toggle:34
|
||||
key_Glider Toggle:34
|
||||
key_Sound Locator:38
|
||||
key_Night Vision:25
|
||||
key_Goggles of Revealing:19
|
||||
key_Step Assist:0
|
||||
key_Speed:0
|
||||
key_Jump:0
|
||||
key_Yeta Wrench Mode:21
|
||||
key_Toggle Electromagnet:0
|
||||
soundCategory_master:0.0
|
||||
soundCategory_music:0.0
|
||||
soundCategory_record:1.0
|
||||
soundCategory_weather:0.0
|
||||
soundCategory_block:1.0
|
||||
soundCategory_hostile:1.0
|
||||
soundCategory_neutral:1.0
|
||||
soundCategory_player:1.0
|
||||
soundCategory_ambient:1.0
|
||||
@@ -1182,7 +1182,11 @@ enderio.gui.conduit.item.channel=Channel
|
||||
enderio.gui.conduit.item.ignoreMetaData=Ignore Meta Data
|
||||
enderio.gui.conduit.item.matchMetaData=Match Meta Data
|
||||
enderio.gui.conduit.item.whitelist=Whitelist
|
||||
enderio.gui.conduit.item.whitelist.tooltip.0=If item list is empty, no item
|
||||
enderio.gui.conduit.item.whitelist.tooltip.1=will be allowed to pass
|
||||
enderio.gui.conduit.item.blacklist=Blacklist
|
||||
enderio.gui.conduit.item.blacklist.tooltip.0=If item list is empty, all items
|
||||
enderio.gui.conduit.item.blacklist.tooltip.1=will be allowed to pass
|
||||
enderio.gui.conduit.item.stickyEnabled=Sticky Mode Enabled|Selected items will only|be sent to this or other|Sticky outputs.
|
||||
enderio.gui.conduit.item.stickyDisbaled=Sticky Mode Disabled
|
||||
enderio.gui.conduit.item.ignoreNBT=Ignore NBT Data
|
||||
@@ -1195,11 +1199,14 @@ enderio.gui.conduit.item.roundRobinEnabled=Round Robin Enabled
|
||||
enderio.gui.conduit.item.roundRobinDisabled=Round Robin Disabled
|
||||
enderio.gui.conduit.item.priority=Priority
|
||||
|
||||
enderio.gui.conduit.item.fuzzy.disabled=Fuzzy Mode disabled
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_25=Fuzzy match for 25% damage
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_50=Fuzzy match for 50% damage
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_75=Fuzzy match for 75% damage
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_99=Fuzzy match for any damage
|
||||
enderio.gui.conduit.item.fuzzy.disabled=Damage Mode: Disabled
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_25=Damage Mode: Damaged by 25% or more
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_50=Damage Mode: Damaged by 50% or more
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_75=Damage Mode: Damaged by 75% or more
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_99=Damage Mode: Damaged at least once
|
||||
enderio.gui.conduit.item.fuzzy.tooltip.0=Can work without items in the filter
|
||||
enderio.gui.conduit.item.fuzzy.tooltip.1=In this case its logic can be
|
||||
enderio.gui.conduit.item.fuzzy.tooltip.2=controlled by %s button
|
||||
|
||||
enderio.gui.conduit.item.filterupgrade=Insert Item Filter
|
||||
enderio.gui.conduit.item.speedupgrade=Insert Item Conduit Speed Upgrades/Downgrade
|
||||
|
||||
@@ -1009,7 +1009,11 @@ enderio.gui.conduit.item.channel=Канал
|
||||
enderio.gui.conduit.item.ignoreMetaData=Игнорировать метаданные
|
||||
enderio.gui.conduit.item.matchMetaData=Соблюдать метаданные
|
||||
enderio.gui.conduit.item.whitelist=Белый список
|
||||
enderio.gui.conduit.item.whitelist.tooltip.0=Если список предметов пуст, ни один
|
||||
enderio.gui.conduit.item.whitelist.tooltip.1=предмет не будет принят
|
||||
enderio.gui.conduit.item.blacklist=Чёрный список
|
||||
enderio.gui.conduit.item.blacklist.tooltip.0=Если список предметов пуст,
|
||||
enderio.gui.conduit.item.blacklist.tooltip.1=все предметы будут приняты
|
||||
enderio.gui.conduit.item.stickyEnabled=Включён "липкий" режим|Выбранные предметы будут|отправляться только на этот|или другие "липкие" выходы.
|
||||
enderio.gui.conduit.item.stickyDisbaled="Липкий" режим выключен
|
||||
enderio.gui.conduit.item.ignoreNBT=Игнорировать NBT
|
||||
@@ -1022,11 +1026,14 @@ enderio.gui.conduit.item.roundRobinEnabled=Цикл включён
|
||||
enderio.gui.conduit.item.roundRobinDisabled=Цикл отключен
|
||||
enderio.gui.conduit.item.priority=Приоритет
|
||||
|
||||
enderio.gui.conduit.item.fuzzy.disabled=Нечёткий режим отключен
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_25=Нечёткое совпадение на 25% урона
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_50=Нечёткое совпадение на 50% урона
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_75=Нечёткое совпадение на 75% урона
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_99=Нечёткое совпадение при любом уроне
|
||||
enderio.gui.conduit.item.fuzzy.disabled=Сравнение повреждения: Отключено
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_25=Сравнение повреждения: Повреждено на 25% или более
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_50=Сравнение повреждения: Повреждено на 50% или более
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_75=Сравнение повреждения: Повреждено на 75% или более
|
||||
enderio.gui.conduit.item.fuzzy.fuzzy_99=Сравнение повреждения: Повреждено хотя бы раз
|
||||
enderio.gui.conduit.item.fuzzy.tooltip.0=Может работать без предметов в фильтре
|
||||
enderio.gui.conduit.item.fuzzy.tooltip.1=В таком случае логика его работы
|
||||
enderio.gui.conduit.item.fuzzy.tooltip.2=контролируется кнопкой %s
|
||||
|
||||
enderio.gui.conduit.item.filterupgrade=Вставить предметный фильтр
|
||||
enderio.gui.conduit.item.speedupgrade=Вставить улучшения скорости/понижение скорости
|
||||
|
||||
@@ -33,6 +33,19 @@ enderio.itemPowerConduit.name=能量导管
|
||||
enderio.itemPowerConduitEnhanced.name=强化能量导管
|
||||
enderio.itemPowerConduitEnder.name=末影能量导管
|
||||
|
||||
enderio.itemPowerConduitEndergyCrude.name=复合粘土能量导管
|
||||
enderio.itemPowerConduitEndergyIron.name=铁制能量导管
|
||||
enderio.itemPowerConduitEndergyAluminum.name=铝制能量导管
|
||||
enderio.itemPowerConduitEndergyGold.name=金制能量导管
|
||||
enderio.itemPowerConduitEndergyCopper.name=铜制能量导管
|
||||
enderio.itemPowerConduitEndergySilver.name=银制能量导管
|
||||
enderio.itemPowerConduitEndergyElectrum.name=琥珀金能量导管
|
||||
enderio.itemPowerConduitEndergyEnergeticSilver.name=充能银能量导管
|
||||
enderio.itemPowerConduitEndergyCrystalline.name=晶化合金能量导管
|
||||
enderio.itemPowerConduitEndergyCrystallinePinkSlime.name=晶化粉红史莱姆能量导管
|
||||
enderio.itemPowerConduitEndergyMelodic.name=旋律合金能量导管
|
||||
enderio.itemPowerConduitEndergyStellar.name=恒星合金能量导管
|
||||
|
||||
enderio.itemRedstoneConduit.name=红石导管
|
||||
enderio.itemRedstoneConduitSwitch.name=导管开关
|
||||
enderio.itemRedstoneConduitInsulated.name=绝缘红石导管
|
||||
@@ -58,8 +71,9 @@ enderio.itemItemConduit.name=物品导管
|
||||
|
||||
enderio.filterUpgradeBasic.name=基础物品过滤器
|
||||
enderio.filterUpgradeAdvanced.name=高级物品过滤器
|
||||
enderio.filterUpgradeBig.name=大型物品过滤器
|
||||
enderio.filterUpgradeBigAdvanced.name=高级大型物品过滤器
|
||||
enderio.itemConduitFilterUpgrade=物品导管升级
|
||||
|
||||
enderio.itemConduitFilterUpgrade.configured=已配置
|
||||
enderio.itemConduitFilterUpgrade.clearConfigMethod=放到合成格里面清除
|
||||
enderio.itemConduitFilterUpgrade.clearConfigWarning=这会清除所有存储的数据!
|
||||
@@ -115,7 +129,7 @@ enderio.itemMEConduit.name=ME导管
|
||||
enderio.itemMEConduitDense.name=致密ME导管
|
||||
enderio.itemMEConduit.channelsUsed=第{0,number}频道, 共{1,number}频道
|
||||
|
||||
enderio.itemOCConduit.name=网络管道(OC)
|
||||
enderio.itemOCConduit.name=网络导管(OC)
|
||||
|
||||
//Entity
|
||||
entity.witherSkeleton.name=凋零骷髅
|
||||
@@ -127,6 +141,8 @@ enderio.conduitBinder.name=导管粘合剂
|
||||
enderio.binderComposite.name=粘合胚料
|
||||
enderio.phasedIronNugget.name=脉冲铁粒
|
||||
tile.blockDarkIronBars.name=玄铁栅栏
|
||||
tile.blockSoulariumBars.name=魂金栅栏
|
||||
tile.blockEndSteelBars.name=末影钢栅栏
|
||||
tile.blockEndermanSkull.name=末影人头颅
|
||||
tile.blockEndermanSkull.base.name=末影人头
|
||||
tile.blockEndermanSkull.reanimated.name=复苏末影人头
|
||||
@@ -173,6 +189,14 @@ fluid.cloud_seed_concentrated=浓缩云之精华
|
||||
tile.fluid.cloud_seed_concentrated.name=浓缩云之精华
|
||||
item.bucketCloud_seed_concentrated.name=桶装浓缩云之精华
|
||||
|
||||
fluid.ender_distillation=深渊露水
|
||||
tile.fluid.ender_distillation.name=深渊露水
|
||||
item.bucketEnder_distillation.name=桶装深渊露水
|
||||
|
||||
fluid.vapor_of_levity=轻盈之气
|
||||
tile.fluid.vapor_of_levity.name=轻盈之气
|
||||
item.bucketVapor_of_levity.name=桶装轻盈之气
|
||||
|
||||
fluid.eio.xpjuice=液态XP
|
||||
tile.fluid.eio.xpjuice.name=液态XP
|
||||
item.bucketXpjuice.name=桶装液态XP
|
||||
@@ -190,16 +214,29 @@ enderio.gas.gasTick=气体每t
|
||||
enderio.itemMachinePart.name=机器零件
|
||||
enderio.machineChassi.name=机器框架
|
||||
enderio.basicGear.name=基础齿轮
|
||||
enderio.soulMachineChassi.name=灵魂机器框架
|
||||
enderio.endSteelMachineChassi.name=末影钢机器底盘
|
||||
enderio.pulsatingCrystal.name=脉冲晶体
|
||||
enderio.vibrantCrystal.name=充能晶体
|
||||
enderio.enderCrystal.name=末影晶体
|
||||
enderio.attractorCrystal.name=诱引晶体
|
||||
enderio.weatherCrystal.name=天气晶体
|
||||
enderio.darkGrindingBall.name=玄铁钢珠
|
||||
|
||||
enderio.darkGrindingBall.name=玄铁磨球
|
||||
enderio.electricalGrindingBall.name=磁钢磨球
|
||||
enderio.energeticGrindingBall.name=充能合金磨球
|
||||
enderio.vibrantGrindingBall.name=脉冲合金磨球
|
||||
enderio.redstoneGrindingBall.name=红石合金磨球
|
||||
enderio.conductiveGrindingBall.name=导电铁磨球
|
||||
enderio.pulsatingGrindingBall.name=脉冲铁磨球
|
||||
enderio.soulariumGrindingBall.name=魂金磨球
|
||||
enderio.endSteelGrindingBall.name=末影钢磨球
|
||||
|
||||
enderio.darkGrindingBall.tooltip.detailed.line1=SAG磨粉机研磨球
|
||||
enderio.darkGrindingBall.tooltip.detailed.line2=最大输出
|
||||
enderio.darkGrindingBall.tooltip.detailed.line3=额外输出
|
||||
enderio.darkGrindingBall.tooltip.detailed.line4=功率降低
|
||||
enderio.darkSteelRod.name=玄钢杆
|
||||
|
||||
tile.blockReinforcedObsidian.name=强化黑曜石
|
||||
tile.blockReinforcedObsidian.tooltip.common.line1=能抵挡凋零
|
||||
@@ -227,6 +264,42 @@ enderio.phasedIron.name=脉冲铁锭
|
||||
enderio.vibrantNugget.name=脉冲合金粒
|
||||
enderio.darkSteel.name=玄钢锭
|
||||
enderio.soularium.name=魂金锭
|
||||
enderio.endSteel.name=末影钢锭
|
||||
enderio.endSteelNugget.name=末影钢粒
|
||||
|
||||
enderio.crudeSteel.name=复合粘土
|
||||
enderio.crystallineAlloy.name=晶化合金
|
||||
enderio.melodicAlloy.name=旋律合金
|
||||
enderio.stellarAlloy.name=恒星合金
|
||||
enderio.crystallinePinkSlime.name=晶化粉红史莱姆
|
||||
enderio.energeticSilver.name=充能银
|
||||
enderio.vividAlloy.name=生动合金
|
||||
|
||||
enderio.crudeSteelGrindingBall.name=复合粘土磨球
|
||||
enderio.crystallineAlloyGrindingBall.name=晶化合金磨球
|
||||
enderio.melodicAlloyGrindingBall.name=旋律合金磨球
|
||||
enderio.stellarAlloyGrindingBall.name=恒星合金磨球
|
||||
enderio.crystallinePinkSlimeGrindingBall.name=晶化粉红史莱姆磨球
|
||||
enderio.energeticSilverGrindingBall.name=充能银磨球
|
||||
enderio.vividAlloyGrindingBall.name=生动合金磨球
|
||||
|
||||
enderio.precientCrystal.name=预知晶体
|
||||
enderio.pulsatingPowder.name=脉冲晶体粉
|
||||
enderio.vibrantPowder.name=充能晶体粉
|
||||
enderio.enderCrystalPowder.name=末影晶体粉
|
||||
enderio.precientPowder.name=预知晶体粉
|
||||
|
||||
//Balls
|
||||
enderio.electricalSteel_ball.name=磁钢磨球
|
||||
enderio.energeticAlloy_ball.name=充能合金磨球
|
||||
enderio.phasedGold_ball.name=脉冲合金磨球
|
||||
enderio.redstoneAlloy_ball.name=红石合金磨球
|
||||
enderio.conductiveIron_ball.name=导电铁磨球
|
||||
enderio.phasedIron_ball.name=脉冲铁磨球
|
||||
enderio.vibrantNugget_ball.name=脉冲合金磨球
|
||||
enderio.darkSteel_ball.name=玄铁磨球
|
||||
enderio.soularium_ball.name=魂金磨球
|
||||
enderio.endSteel_ball.name=末影钢磨球
|
||||
|
||||
tile.blockIngotStorage.name=金属块
|
||||
tile.enderio.electricalSteel.name=磁钢块
|
||||
@@ -238,6 +311,15 @@ tile.enderio.phasedIron.name=脉冲铁块
|
||||
tile.enderio.vibrantNugget.name=脉冲合金粒块
|
||||
tile.enderio.darkSteel.name=玄钢块
|
||||
tile.enderio.soularium.name=魂金块
|
||||
tile.enderio.endSteel.name=末影钢块
|
||||
|
||||
tile.enderio.crudeSteel.name=复合粘土块
|
||||
tile.enderio.crystallineAlloy.name=晶化合金块
|
||||
tile.enderio.melodicAlloy.name=旋律合金块
|
||||
tile.enderio.stellarAlloy.name=恒星合金块
|
||||
tile.enderio.crystallinePinkSlime.name=晶化粉红史莱姆块
|
||||
tile.enderio.energeticSilver.name=充能银块
|
||||
tile.enderio.vividAlloy.name=生动合金块
|
||||
|
||||
//Powder / Ingot
|
||||
enderio.powderCoal.name=煤粉
|
||||
@@ -254,6 +336,13 @@ enderio.itemBasicCapacitor.name=电容
|
||||
enderio.basicCapacitor.name=基础电容
|
||||
enderio.activatedCapacitor.name=双层电容
|
||||
enderio.enderCapacitor.name=八位电容
|
||||
enderio.crystallineCapacitor.name=晶化合金电容
|
||||
enderio.melodicCapacitor.name=旋律合金电容
|
||||
enderio.stellarCapacitor.name=恒星合金电容
|
||||
enderio.silverCapacitor.name=银制电容
|
||||
enderio.endergeticCapacitor.name=充能银电容
|
||||
enderio.endergisedCapacitor.name=生动合金电容
|
||||
enderio.totemicCapacitor.name=不死图腾电容
|
||||
|
||||
enderio.machine.tooltip.upgrade=机器升级
|
||||
enderio.machine.tooltip.upgrade.tooltip.detailed.line1=增加机器能量存储与
|
||||
@@ -283,6 +372,7 @@ tile.blockAlloySmelter.tooltip.detailed.line5=增加速度与能量存储
|
||||
|
||||
tile.blockSolarPanel.name=光伏板
|
||||
tile.blockSolarPanel.advanced.name=高级光伏板
|
||||
tile.blockSolarPanel.vibrant.name=脉冲光伏板
|
||||
tile.blockSolarPanel.tooltip.common.line1=太阳能!
|
||||
tile.blockSolarPanel.tooltip.detailed.line1=白天产生能量
|
||||
tile.blockSolarPanel.tooltip.detailed.line2=顶部必须
|
||||
@@ -382,7 +472,7 @@ enderio.trans.item=物品
|
||||
enderio.trans.fluid=流体
|
||||
enderio.trans.rail=轨道
|
||||
|
||||
enderio.trans.recieving=接收
|
||||
enderio.trans.receiving=接收
|
||||
enderio.trans.sending=发送
|
||||
|
||||
tile.blockPowerMonitor.name=能量监控器
|
||||
@@ -398,8 +488,8 @@ tile.blockVat.tooltip.detailed.line1=用于生产末影接口中的流体
|
||||
|
||||
tile.blockEnchanter.name=附魔器
|
||||
tile.blockEnchanter.tooltip.detailed.line1=使用XP让物品与
|
||||
tile.blockEnchanter.tooltip.detailed.line2=一个书与笔结合
|
||||
tile.blockEnchanter.tooltip.detailed.line2=来制作附魔书
|
||||
tile.blockEnchanter.tooltip.detailed.line3=附魔书创造!
|
||||
|
||||
tile.blockCombustionGenerator.name=燃烧发电机
|
||||
tile.blockCombustionGenerator.tooltip.detailed.line1=燃烧液体燃料产生能量
|
||||
@@ -412,6 +502,16 @@ tile.blockZombieGenerator.tooltip.detailed.line2=来产生能量
|
||||
enderio.zombieGenerator.fuelTank=营养液水槽
|
||||
enderio.gui.fluid.minReq=激活需要 %s
|
||||
|
||||
tile.blockFrankenzombieGenerator.name=人造僵尸发电机
|
||||
tile.blockFrankenzombieGenerator.tooltip.detailed.line1=消耗营养精华液
|
||||
tile.blockFrankenzombieGenerator.tooltip.detailed.line2=产生更多能量
|
||||
enderio.frankenzombieGenerator.fuelTank=营养液槽
|
||||
|
||||
tile.blockEnderGenerator.name=末影人发电机
|
||||
tile.blockEnderGenerator.tooltip.detailed.line1=消耗深渊露水
|
||||
tile.blockEnderGenerator.tooltip.detailed.line2=来产生能量
|
||||
enderio.enderGenerator.fuelTank=深渊储罐
|
||||
|
||||
tile.blockKillerJoe.name=杀手乔
|
||||
tile.blockKillerJoe.tooltip.detailed.line1=当你提供一把剑和营养精华
|
||||
tile.blockKillerJoe.tooltip.detailed.line2=液时,这台机器就会自动攻
|
||||
@@ -698,6 +798,8 @@ skullZombieController.name=Z-逻辑控制器
|
||||
skullZombieFrankenstien.name=人造僵尸
|
||||
skullEnderResonator.name=末影谐振器
|
||||
skullSentientEnder.name=意识末影谐振器
|
||||
skullSkeletalContractor.name=骷髅契约板
|
||||
skullGuardianDiode.name=守卫者二极管
|
||||
|
||||
item.itemSpawnEggEnderIO.name=生成
|
||||
|
||||
@@ -711,13 +813,41 @@ item.darkSteel_pickaxe.name=玄钢镐
|
||||
item.darkSteel_axe.name=玄钢斧
|
||||
item.darkSteel_shears.name=玄钢剪
|
||||
|
||||
//End Steel
|
||||
item.endSteel_helmet.name=末影钢头盔
|
||||
item.endSteel_chestplate.name=末影钢胸甲
|
||||
item.endSteel_leggings.name=末影钢护腿
|
||||
item.endSteel_boots.name=末影钢靴子
|
||||
item.endSteel_sword.name=终结之剑 MK2
|
||||
item.endSteel_pickaxe.name=末影钢镐
|
||||
item.endSteel_axe.name=末影钢斧
|
||||
|
||||
//Stellar
|
||||
item.stellar_helmet.name=恒星合金头盔
|
||||
item.stellar_chestplate.name=恒星合金胸甲
|
||||
item.stellar_leggings.name=恒星合金护腿
|
||||
item.stellar_boots.name=恒星合金靴子
|
||||
item.stellar_sword.name=终结之剑 MK4
|
||||
item.stellar_pickaxe.name=恒星合金镐
|
||||
item.stellar_axe.name=恒星合金斧
|
||||
|
||||
enderio.item.darkSteel.tooltip.lvs=等级
|
||||
|
||||
enderio.item.darkSteel_pickaxe.tooltip.effPowered=充能后的效率
|
||||
enderio.item.darkSteel_pickaxe.tooltip.effObs=采集黑曜石的效率
|
||||
enderio.item.darkSteel_pickaxe.tooltip.cost=消耗
|
||||
|
||||
enderio.item.endSteel_pickaxe.tooltip.effPowered=充能后的效率
|
||||
enderio.item.endSteel_pickaxe.tooltip.effObs=采集黑曜石的效率
|
||||
enderio.item.endSteel_pickaxe.tooltip.cost=消耗
|
||||
|
||||
enderio.item.stellar_pickaxe.tooltip.effPowered=充能后的效率
|
||||
enderio.item.stellar_pickaxe.tooltip.effObs=采集黑曜石的效率
|
||||
enderio.item.stellar_pickaxe.tooltip.cost=消耗
|
||||
|
||||
enderio.item.darkSteel_axe.tooltip.multiHarvest=潜行时一次采集多个原木
|
||||
enderio.item.endSteel_axe.tooltip.multiHarvest=潜行时一次采集多个原木
|
||||
enderio.item.stellar_axe.tooltip.multiHarvest=潜行时一次采集多个原木
|
||||
|
||||
enderio.item.darkSteel_shears.tooltip.multiHarvest=激活后修剪多个方块/羊
|
||||
|
||||
@@ -725,12 +855,32 @@ enderio.item.darkSteel_sword.tooltip.line1=增加头颅与末影珍珠的掉落
|
||||
enderio.item.darkSteel_sword.tooltip.line2=击中后将阻止末影人传送
|
||||
enderio.item.darkSteel_sword.tooltip.line3=充能后伤害+2
|
||||
|
||||
enderio.item.endSteel_sword.tooltip.line1=增加头颅与末影珍珠的掉落
|
||||
enderio.item.endSteel_sword.tooltip.line2=击中后将阻止末影人传送
|
||||
enderio.item.endSteel_sword.tooltip.line3=充能后伤害+2
|
||||
|
||||
enderio.item.stellar_sword.tooltip.line1=增加头颅与末影珍珠的掉落
|
||||
enderio.item.stellar_sword.tooltip.line2=击中后将阻止末影人传送
|
||||
enderio.item.stellar_sword.tooltip.line3=充能后伤害+2
|
||||
|
||||
enderio.item.darkSteel_armor.tooltip.line1=充能后
|
||||
enderio.item.darkSteel_armor.tooltip.line2=钻石级别保护
|
||||
|
||||
enderio.item.endSteel_armor.tooltip.line1=钻石+级别保护
|
||||
enderio.item.endSteel_armor.tooltip.line2=免疫跌落伤害
|
||||
|
||||
enderio.item.stellar_armor.tooltip.line1=钻石+级别保护
|
||||
enderio.item.stellar_armor.tooltip.line2=免疫跌落伤害
|
||||
|
||||
enderio.item.darkSteel_boots.tooltip.line1=充能后
|
||||
enderio.item.darkSteel_boots.tooltip.line2=免疫跌落伤害
|
||||
|
||||
enderio.item.endSteel_boots.tooltip.line1=充能后
|
||||
enderio.item.endSteel_boots.tooltip.line2=免疫跌落伤害
|
||||
|
||||
enderio.item.stellar_boots.tooltip.line1=充能后
|
||||
enderio.item.stellar_boots.tooltip.line2=免疫跌落伤害
|
||||
|
||||
enderio.darksteel.upgrade.empowered_one.name=注能
|
||||
enderio.darksteel.upgrade.empowered_one.tooltip.detailed.line1=能量: $P
|
||||
enderio.darksteel.upgrade.empowered_one.tooltip.detailed.line2=能量将抵消
|
||||
@@ -751,6 +901,11 @@ enderio.darksteel.upgrade.empowered_four.tooltip.detailed.line1=能量: $P
|
||||
enderio.darksteel.upgrade.empowered_four.tooltip.detailed.line2=能量将抵消
|
||||
enderio.darksteel.upgrade.empowered_four.tooltip.detailed.line3=$D%耐久损耗
|
||||
|
||||
enderio.darksteel.upgrade.empowered_five.name=注能 V
|
||||
enderio.darksteel.upgrade.empowered_five.tooltip.detailed.line1=能量: $P
|
||||
enderio.darksteel.upgrade.empowered_five.tooltip.detailed.line2=能量将抵消
|
||||
enderio.darksteel.upgrade.empowered_five.tooltip.detailed.line3=$D%耐久损耗
|
||||
|
||||
enderio.darksteel.upgrade.travel.name=旅行
|
||||
enderio.darksteel.upgrade.travel.tooltip.detailed.line1=按住shift右击来传送或
|
||||
enderio.darksteel.upgrade.travel.tooltip.detailed.line2=激活旅行锚和末影接口
|
||||
@@ -834,6 +989,9 @@ enderio.darksteel.upgrade.solar_one.tooltip.detailed.line1=利用阳光产能.
|
||||
enderio.darksteel.upgrade.solar_two.name=太阳能 II
|
||||
enderio.darksteel.upgrade.solar_two.tooltip.detailed.line1=利用阳光产能.
|
||||
|
||||
enderio.darksteel.upgrade.solar_three.name=太阳能 III
|
||||
enderio.darksteel.upgrade.solar_three.tooltip.detailed.line1=利用阳光产能.
|
||||
|
||||
//------GUI
|
||||
|
||||
enderio.gui.simple.in=最大输入:
|
||||
@@ -999,7 +1157,7 @@ enderio.gui.telepad.configure.travel=旅行设置
|
||||
enderio.gui.telepad.configure.telepad=传送台设置
|
||||
enderio.gui.telepad.blocked=传送锁定!
|
||||
|
||||
//Spawn Gurad
|
||||
//Spawn Gurad [sic]
|
||||
enderio.gui.spawnGurad.showRange=显示范围
|
||||
enderio.gui.spawnGurad.hideRange=隐藏范围
|
||||
enderio.gui.spawnGurad.range=范围:
|
||||
@@ -1064,7 +1222,7 @@ enderio.gui.conduit.gas.autoExtract=自动提取
|
||||
enderio.gui.weather.task.clear=清除天气
|
||||
enderio.gui.weather.task.rain=雨天
|
||||
enderio.gui.weather.task.storm=雷暴天气
|
||||
enderio.gui.weather.requireditem=需要物品: %s
|
||||
enderio.gui.weather.requiredfluid=需要流体: %s mB
|
||||
enderio.weatherObelisk.fuelTank=大气通量仓
|
||||
|
||||
//Enchants
|
||||
@@ -1134,10 +1292,11 @@ enderio.nei.sagmill=SAG磨粉机
|
||||
enderio.nei.sagmill.outputchance=概率: {0,choice,0#'<1'|0<{0,number}}%
|
||||
enderio.nei.slicensplice=头颅装配机
|
||||
enderio.nei.soulbinder=灵魂绑定器
|
||||
enderio.nei.vat=酿液锅
|
||||
enderio.nei.vat=酿液桶
|
||||
enderio.tooltip.burntime=燃烧时间:
|
||||
enderio.tooltip.oredict=矿物辞典:
|
||||
enderio.tooltip.meta=Meta:
|
||||
enderio.tooltip.uid=UID:
|
||||
enderio.tooltip.anvilupgrades=铁砧升级:
|
||||
enderio.waila.config.hiddenfacades=隐形栅栏
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
package crazypants.enderio;
|
||||
|
||||
public class Tst {
|
||||
|
||||
/**
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import crazypants.enderio.conduit.gui.*;
|
||||
import mods.immibis.core.api.multipart.IMultipartRenderingBlockMarker;
|
||||
import mods.immibis.core.api.multipart.IMultipartSystem;
|
||||
import net.minecraft.block.Block;
|
||||
@@ -51,12 +52,6 @@ import crazypants.enderio.api.tool.ITool;
|
||||
import crazypants.enderio.conduit.facade.ItemConduitFacade.FacadeType;
|
||||
import crazypants.enderio.conduit.geom.CollidableComponent;
|
||||
import crazypants.enderio.conduit.geom.ConduitConnectorType;
|
||||
import crazypants.enderio.conduit.gui.ExternalConnectionContainer;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnection;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnectionSelector;
|
||||
import crazypants.enderio.conduit.gui.PacketFluidFilter;
|
||||
import crazypants.enderio.conduit.gui.PacketOpenConduitUI;
|
||||
import crazypants.enderio.conduit.gui.PacketSlotVisibility;
|
||||
import crazypants.enderio.conduit.gui.item.PacketExistingItemFilterSnapshot;
|
||||
import crazypants.enderio.conduit.gui.item.PacketModItemFilter;
|
||||
import crazypants.enderio.conduit.liquid.PacketFluidLevel;
|
||||
@@ -66,6 +61,7 @@ import crazypants.enderio.conduit.packet.PacketItemConduitFilter;
|
||||
import crazypants.enderio.conduit.packet.PacketOCConduitSignalColor;
|
||||
import crazypants.enderio.conduit.packet.PacketRedstoneConduitOutputStrength;
|
||||
import crazypants.enderio.conduit.packet.PacketRedstoneConduitSignalColor;
|
||||
import crazypants.enderio.conduit.packet.PacketRoundRobinMode;
|
||||
import crazypants.enderio.conduit.redstone.IInsulatedRedstoneConduit;
|
||||
import crazypants.enderio.conduit.redstone.IRedstoneConduit;
|
||||
import crazypants.enderio.conduit.redstone.InsulatedRedstoneConduit;
|
||||
@@ -97,6 +93,7 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
PacketHandler.INSTANCE.registerMessage(PacketExistingItemFilterSnapshot.class, PacketExistingItemFilterSnapshot.class, PacketHandler.nextID(), Side.SERVER);
|
||||
PacketHandler.INSTANCE.registerMessage(PacketModItemFilter.class, PacketModItemFilter.class, PacketHandler.nextID(), Side.SERVER);
|
||||
PacketHandler.INSTANCE.registerMessage(PacketFluidFilter.class, PacketFluidFilter.class, PacketHandler.nextID(), Side.SERVER);
|
||||
PacketHandler.INSTANCE.registerMessage(PacketFluidChannel.class, PacketFluidChannel.class, PacketHandler.nextID(), Side.SERVER);
|
||||
PacketHandler.INSTANCE.registerMessage(PacketRedstoneConduitSignalColor.class, PacketRedstoneConduitSignalColor.class, PacketHandler.nextID(), Side.SERVER);
|
||||
PacketHandler.INSTANCE.registerMessage(PacketRedstoneConduitOutputStrength.class, PacketRedstoneConduitOutputStrength.class, PacketHandler.nextID(),
|
||||
Side.SERVER);
|
||||
@@ -104,6 +101,7 @@ public class BlockConduitBundle extends BlockEio implements IGuiHandler, IFacade
|
||||
PacketHandler.INSTANCE.registerMessage(PacketSlotVisibility.class, PacketSlotVisibility.class, PacketHandler.nextID(), Side.SERVER);
|
||||
PacketHandler.INSTANCE.registerMessage(PacketOCConduitSignalColor.class, PacketOCConduitSignalColor.class,
|
||||
PacketHandler.nextID(), Side.SERVER);
|
||||
PacketHandler.INSTANCE.registerMessage(PacketRoundRobinMode.class, PacketRoundRobinMode.class, PacketHandler.nextID(), Side.SERVER);
|
||||
|
||||
BlockConduitBundle result = new BlockConduitBundle();
|
||||
result.init();
|
||||
|
||||
@@ -19,6 +19,8 @@ import mods.immibis.microblocks.api.IMicroblockSystem;
|
||||
import mods.immibis.microblocks.api.MicroblockAPIUtils;
|
||||
import mods.immibis.microblocks.api.Part;
|
||||
import mods.immibis.microblocks.api.PartType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -162,7 +164,19 @@ public class TileConduitBundle extends TileEntityEio implements IConduitBundle {
|
||||
facadeMeta = nbtRoot.getInteger("facadeMeta");
|
||||
|
||||
if(worldObj != null && worldObj.isRemote) {
|
||||
clientUpdated = true;
|
||||
if (conduits.size() == 1 && conduits.get(0) instanceof IItemConduit) {
|
||||
boolean itemConduitClientUpdated = false;
|
||||
for (Object o : Minecraft.getMinecraft().theWorld.playerEntities) {
|
||||
Entity e = ((Entity) o);
|
||||
if (e.getDistanceSq(this.xCoord, yCoord, zCoord) < 36) {
|
||||
itemConduitClientUpdated = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (itemConduitClientUpdated) clientUpdated = true;
|
||||
} else {
|
||||
clientUpdated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (MicroblocksUtil.supportMicroblocks()) {
|
||||
|
||||
@@ -5,6 +5,8 @@ import java.awt.Rectangle;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.enderio.core.client.gui.button.ToggleButton;
|
||||
import crazypants.enderio.conduit.packet.PacketRoundRobinMode;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
@@ -41,12 +43,17 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
static final int ID_REDSTONE_BUTTON = GuiExternalConnection.nextButtonId();
|
||||
|
||||
private static final int ID_COLOR_BUTTON = GuiExternalConnection.nextButtonId();
|
||||
private static final int ID_ROUND_ROBIN_BUTTON = GuiExternalConnection.nextButtonId();
|
||||
private static final int ID_WHITELIST = GuiExternalConnection.nextButtonId();
|
||||
|
||||
private static final int NEXT_FILTER_ID = 989322;
|
||||
|
||||
private static final int ID_CHANNEL = GuiExternalConnection.nextButtonId();
|
||||
|
||||
private final RedstoneModeButton rsB;
|
||||
private final ToggleButton roundRobinB;
|
||||
private final ColorButton colorB;
|
||||
private ColorButton channelB;
|
||||
|
||||
private static final String autoExtractStr = EnderIO.lang.localize("gui.conduit.fluid.autoExtract");
|
||||
private static final String filterStr = EnderIO.lang.localize("gui.conduit.fluid.filter");
|
||||
@@ -72,9 +79,11 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
eConduit = (EnderLiquidConduit) con;
|
||||
isEnder = true;
|
||||
|
||||
int x = gui.getXSize() - 20;
|
||||
|
||||
int x = 52;
|
||||
int y = customTop;
|
||||
|
||||
|
||||
inOutNextB = MultiIconButton.createRightArrowButton(gui, NEXT_FILTER_ID, x, y);
|
||||
|
||||
x = filterX - 20;
|
||||
@@ -87,9 +96,17 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
gui.getContainer().setInventorySlotsVisible(false);
|
||||
}
|
||||
|
||||
int x = gap + gui.getFontRenderer().getStringWidth(autoExtractStr) + gap * 2;
|
||||
int x = 66;
|
||||
int y = customTop;
|
||||
|
||||
if(isEnder)
|
||||
{
|
||||
channelB = new ColorButton(gui, ID_CHANNEL, x, y);
|
||||
channelB.setColorIndex(0);
|
||||
channelB.setToolTipHeading(EnderIO.lang.localize("gui.conduit.item.channel"));
|
||||
x += channelB.getWidth() + gap;
|
||||
}
|
||||
|
||||
rsB = new RedstoneModeButton(gui, ID_REDSTONE_BUTTON, x, y, new IRedstoneModeControlable() {
|
||||
|
||||
@Override
|
||||
@@ -112,6 +129,16 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
colorB = new ColorButton(gui, ID_COLOR_BUTTON, x, y);
|
||||
colorB.setToolTipHeading(EnderIO.lang.localize("gui.conduit.redstone.signalColor"));
|
||||
colorB.setColorIndex(conduit.getExtractionSignalColor(gui.getDir()).ordinal());
|
||||
|
||||
if (isEnder) {
|
||||
x += rsB.getWidth() + gap;
|
||||
roundRobinB = new ToggleButton(gui, ID_ROUND_ROBIN_BUTTON, x, y, IconEIO.ROUND_ROBIN_OFF, IconEIO.ROUND_ROBIN);
|
||||
roundRobinB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.roundRobinEnabled"));
|
||||
roundRobinB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.roundRobinDisabled"));
|
||||
roundRobinB.setPaintSelectedBorder(false);
|
||||
} else {
|
||||
roundRobinB = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void addFilterTooltips() {
|
||||
@@ -133,16 +160,48 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
toggleBlacklist();
|
||||
} else if(guiButton.id == NEXT_FILTER_ID) {
|
||||
inOutShowIn = !inOutShowIn;
|
||||
if(channelB != null) {
|
||||
channelB.onGuiInit();
|
||||
if(isInput()) {
|
||||
channelB.setColorIndex(eConduit.getInputColor(gui.getDir()).ordinal());
|
||||
} else {
|
||||
channelB.setColorIndex(eConduit.getOutputColor(gui.getDir()).ordinal());
|
||||
}
|
||||
}
|
||||
if(isInput()) {
|
||||
if (isEnder) {
|
||||
roundRobinB.onGuiInit();
|
||||
}
|
||||
rsB.onGuiInit();
|
||||
colorB.onGuiInit();
|
||||
} else {
|
||||
if (isEnder) {
|
||||
roundRobinB.detach();
|
||||
}
|
||||
rsB.detach();
|
||||
colorB.detach();
|
||||
}
|
||||
if(isFilterVisible()) {
|
||||
updateWhiteListButton(eConduit.getFilter(gui.getDir(), isInput()));
|
||||
}
|
||||
} else if(guiButton.id == ID_CHANNEL) {
|
||||
if(isEnder) {
|
||||
|
||||
DyeColor col = DyeColor.values()[channelB.getColorIndex()];
|
||||
|
||||
if (isInput()) {
|
||||
eConduit.setInputColor(gui.getDir(), col);
|
||||
} else {
|
||||
eConduit.setOutputColor(gui.getDir(), col);
|
||||
}
|
||||
setConduitChannel(col);
|
||||
}
|
||||
} else if(guiButton.id == ID_ROUND_ROBIN_BUTTON) {
|
||||
if (isEnder && isInput()) {
|
||||
final boolean selected = roundRobinB.isSelected();
|
||||
eConduit.setRoundRobin(gui.getDir(), selected);
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketRoundRobinMode(eConduit, gui.getDir()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,8 +248,18 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
|
||||
protected void setConduitFilter(FluidFilter filter) {
|
||||
eConduit.setFilter(gui.getDir(), filter, isInput());
|
||||
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketFluidFilter(eConduit, gui.getDir(), filter, isInput()));
|
||||
}
|
||||
protected void setConduitChannel(DyeColor channel) {
|
||||
if(isInput()) {
|
||||
eConduit.setInputColor(gui.getDir(), channel);
|
||||
} else {
|
||||
eConduit.setOutputColor(gui.getDir(), channel);
|
||||
}
|
||||
|
||||
PacketHandler.INSTANCE.sendToServer(new PacketFluidChannel(eConduit, gui.getDir(), isInput(), channel));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initCustomOptions() {
|
||||
@@ -209,6 +278,21 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
return;
|
||||
}
|
||||
|
||||
if(conduit.getConnectionMode(gui.getDir()) == ConnectionMode.DISABLED) {
|
||||
channelB.detach();
|
||||
} else {
|
||||
channelB.onGuiInit();
|
||||
if (isInput()) {
|
||||
channelB.setColorIndex(eConduit.getInputColor(gui.getDir()).ordinal());
|
||||
} else {
|
||||
channelB.setColorIndex(eConduit.getOutputColor(gui.getDir()).ordinal());
|
||||
}
|
||||
}
|
||||
if(isInput()) {
|
||||
roundRobinB.onGuiInit();
|
||||
roundRobinB.setSelected(eConduit.isRoundRobin(gui.getDir()));
|
||||
}
|
||||
|
||||
if(isFilterVisible()) {
|
||||
gui.getContainer().setInventorySlotsVisible(true);
|
||||
addFilterTooltips();
|
||||
@@ -241,6 +325,7 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
rsB.detach();
|
||||
colorB.detach();
|
||||
if(isEnder) {
|
||||
roundRobinB.detach();
|
||||
gui.getContainer().setInventorySlotsVisible(false);
|
||||
if(filterToolTips != null) {
|
||||
for (GuiToolTip tt : filterToolTips) {
|
||||
@@ -251,25 +336,23 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
}
|
||||
inOutNextB.detach();
|
||||
whiteListB.detach();
|
||||
channelB.detach();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderCustomOptions(int top, float par1, int par2, int par3) {
|
||||
boolean isInput = isInput();
|
||||
if(isInput) {
|
||||
int x = gui.getGuiLeft() + gap + gui.getFontRenderer().getStringWidth(autoExtractStr) + gap + 2;
|
||||
int y = top;
|
||||
gui.getFontRenderer().drawString(autoExtractStr, left, y, ColorUtil.getRGB(Color.DARK_GRAY));
|
||||
}
|
||||
if(isEnder && isFilterVisible()) {
|
||||
|
||||
String inOutStr = EnderIO.lang.localize("gui.conduit.ioMode.output");
|
||||
if(conduit.getConnectionMode(gui.getDir()) == ConnectionMode.IN_OUT) {
|
||||
String inOutStr = inOutShowIn ? EnderIO.lang.localize("gui.conduit.ioMode.input") : EnderIO.lang.localize("gui.conduit.ioMode.output");
|
||||
int x = gui.getGuiLeft() + gui.getXSize() - 20 - 5 - gui.getFontRenderer().getStringWidth(inOutStr);
|
||||
int y = top;
|
||||
gui.getFontRenderer().drawString(inOutStr, x, y, ColorUtil.getRGB(Color.DARK_GRAY));
|
||||
inOutStr = inOutShowIn ? EnderIO.lang.localize("gui.conduit.ioMode.input") : EnderIO.lang.localize("gui.conduit.ioMode.output");
|
||||
} else if(conduit.getConnectionMode(gui.getDir()) == ConnectionMode.INPUT){
|
||||
inOutStr = EnderIO.lang.localize("gui.conduit.ioMode.input");
|
||||
}
|
||||
int x = left;
|
||||
int y = top;
|
||||
gui.getFontRenderer().drawString(inOutStr, x, y, ColorUtil.getRGB(Color.DARK_GRAY));
|
||||
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
gui.bindGuiTexture(1);
|
||||
@@ -277,8 +360,8 @@ public class LiquidSettings extends BaseSettingsPanel {
|
||||
|
||||
FontRenderer fr = gui.getFontRenderer();
|
||||
int sw = fr.getStringWidth(filterStr);
|
||||
int x = (gui.width / 2) - sw / 2;
|
||||
int y = top + 20;
|
||||
x = (gui.width / 2) - sw / 2;
|
||||
y = top + 20;
|
||||
fr.drawString(filterStr, x, y, ColorUtil.getRGB(Color.DARK_GRAY));
|
||||
|
||||
x = gui.getGuiLeft() + filterX;
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
package crazypants.enderio.conduit.gui;
|
||||
|
||||
import com.enderio.core.common.util.DyeColor;
|
||||
import cpw.mods.fml.common.network.ByteBufUtils;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import crazypants.enderio.conduit.liquid.EnderLiquidConduit;
|
||||
import crazypants.enderio.conduit.liquid.FluidFilter;
|
||||
import crazypants.enderio.conduit.liquid.ILiquidConduit;
|
||||
import crazypants.enderio.conduit.packet.AbstractConduitPacket;
|
||||
import crazypants.enderio.conduit.packet.ConTypeEnum;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class PacketFluidChannel extends AbstractConduitPacket<ILiquidConduit> implements IMessageHandler<PacketFluidChannel, IMessage>{
|
||||
|
||||
private ForgeDirection dir;
|
||||
private boolean isInput;
|
||||
|
||||
private DyeColor channel;
|
||||
|
||||
public PacketFluidChannel() {
|
||||
}
|
||||
|
||||
public PacketFluidChannel(EnderLiquidConduit eConduit, ForgeDirection dir, boolean isInput, DyeColor channel) {
|
||||
super(eConduit.getBundle().getEntity(), ConTypeEnum.FLUID);
|
||||
this.dir = dir;
|
||||
this.isInput = isInput;
|
||||
this.channel = channel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
super.toBytes(buf);
|
||||
buf.writeShort(dir.ordinal());
|
||||
buf.writeBoolean(isInput);
|
||||
buf.writeShort(channel.ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
super.fromBytes(buf);
|
||||
dir = ForgeDirection.values()[buf.readShort()];
|
||||
isInput = buf.readBoolean();
|
||||
channel = DyeColor.values()[buf.readShort()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketFluidChannel message, MessageContext ctx) {
|
||||
ILiquidConduit conduit = message.getTileCasted(ctx);
|
||||
if(! (conduit instanceof EnderLiquidConduit)) {
|
||||
return null;
|
||||
}
|
||||
EnderLiquidConduit eCon = (EnderLiquidConduit)conduit;
|
||||
|
||||
if(message.isInput)
|
||||
eCon.setInputColor(message.dir, message.channel);
|
||||
else
|
||||
eCon.setOutputColor(message.dir, message.channel);
|
||||
|
||||
message.getWorld(ctx).markBlockForUpdate(message.x, message.y, message.z);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,20 +1,16 @@
|
||||
package crazypants.enderio.conduit.gui.item;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.enderio.core.client.gui.GuiContainerBase;
|
||||
import com.enderio.core.client.gui.button.CycleButton;
|
||||
import com.enderio.core.client.gui.button.IconButton;
|
||||
import com.enderio.core.client.gui.button.ToggleButton;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnection;
|
||||
import crazypants.enderio.conduit.item.filter.FuzzyMode;
|
||||
import crazypants.enderio.conduit.item.filter.ItemFilter;
|
||||
import crazypants.enderio.gui.GuiContainerBaseEIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class BasicItemFilterGui implements IItemFilterGui {
|
||||
|
||||
@@ -66,7 +62,7 @@ public class BasicItemFilterGui implements IItemFilterGui {
|
||||
int x = butLeft;
|
||||
int y = yOffset + 1;
|
||||
whiteListB = new IconButton(gui, ID_WHITELIST + buttonIdOffset, x, y, IconEIO.FILTER_WHITELIST);
|
||||
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
|
||||
whiteListB.setToolTip(getWhitelistTooltips(false));
|
||||
|
||||
x += 20;
|
||||
useMetaB = new ToggleButton(gui, ID_META + buttonIdOffset, x, y, IconEIO.FILTER_META_OFF, IconEIO.FILTER_META);
|
||||
@@ -135,16 +131,14 @@ public class BasicItemFilterGui implements IItemFilterGui {
|
||||
useMetaB.setSelected(activeFilter.isMatchMeta());
|
||||
|
||||
whiteListB.onGuiInit();
|
||||
whiteListB.setToolTip(getWhitelistTooltips(activeFilter.isBlacklist()));
|
||||
if(activeFilter.isBlacklist()) {
|
||||
whiteListB.setIcon(IconEIO.FILTER_BLACKLIST);
|
||||
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.blacklist"));
|
||||
} else {
|
||||
whiteListB.setIcon(IconEIO.FILTER_WHITELIST);
|
||||
whiteListB.setToolTip(EnderIO.lang.localize("gui.conduit.item.whitelist"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(GuiButton guiButton) {
|
||||
|
||||
@@ -193,5 +187,20 @@ public class BasicItemFilterGui implements IItemFilterGui {
|
||||
gui.drawTexturedModalRect(gui.getGuiLeft() + xOffset, gui.getGuiTop() + yOffset + 20, 0, 238, 18 * 5, 18);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private String[] getWhitelistTooltips(boolean isBlacklist) {
|
||||
if(isBlacklist) {
|
||||
return new String[]{
|
||||
EnderIO.lang.localize("gui.conduit.item.blacklist"),
|
||||
EnderIO.lang.localize("gui.conduit.item.blacklist.tooltip.0"),
|
||||
EnderIO.lang.localize("gui.conduit.item.blacklist.tooltip.1")
|
||||
};
|
||||
} else {
|
||||
return new String[]{
|
||||
EnderIO.lang.localize("gui.conduit.item.whitelist"),
|
||||
EnderIO.lang.localize("gui.conduit.item.whitelist.tooltip.0"),
|
||||
EnderIO.lang.localize("gui.conduit.item.whitelist.tooltip.1")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
}
|
||||
};
|
||||
|
||||
x += channelB.getWidth() + 4;
|
||||
x += channelB.getWidth() + gap;
|
||||
priLeft = x - 8;
|
||||
|
||||
rsB = new RedstoneModeButton(gui, ID_REDSTONE_BUTTON, x, y, new IRedstoneModeControlable() {
|
||||
@@ -149,18 +149,18 @@ public class ItemSettings extends BaseSettingsPanel {
|
||||
}
|
||||
});
|
||||
|
||||
x += rsB.getWidth() + 4;
|
||||
x += rsB.getWidth() + gap;
|
||||
colorB = new ColorButton(gui, ID_COLOR_BUTTON, x, y);
|
||||
colorB.setColorIndex(itemConduit.getExtractionSignalColor(gui.getDir()).ordinal());
|
||||
colorB.setToolTipHeading(EnderIO.lang.localize("gui.conduit.item.sigCol"));
|
||||
|
||||
x += 4 + colorB.getWidth();
|
||||
x += gap + colorB.getWidth();
|
||||
roundRobinB = new ToggleButton(gui, ID_ROUND_ROBIN, x, y, IconEIO.ROUND_ROBIN_OFF, IconEIO.ROUND_ROBIN);
|
||||
roundRobinB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.roundRobinEnabled"));
|
||||
roundRobinB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.roundRobinDisabled"));
|
||||
roundRobinB.setPaintSelectedBorder(false);
|
||||
|
||||
x += 4 + roundRobinB.getWidth();
|
||||
x += gap + roundRobinB.getWidth();
|
||||
loopB = new ToggleButton(gui, ID_LOOP, x, y, IconEIO.LOOP_OFF, IconEIO.LOOP);
|
||||
loopB.setSelectedToolTip(EnderIO.lang.localize("gui.conduit.item.selfFeedEnabled"));
|
||||
loopB.setUnselectedToolTip(EnderIO.lang.localize("gui.conduit.item.selfFeedDisabled"));
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package crazypants.enderio.conduit.item.filter;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import com.enderio.core.api.client.render.IWidgetIcon;
|
||||
import com.enderio.core.client.gui.button.CycleButton;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.gui.IconEIO;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public enum FuzzyMode implements CycleButton.ICycleEnum {
|
||||
DISABLED(IconEIO.FILTER_FUZZY_DISABLED) {
|
||||
@@ -63,7 +62,13 @@ public enum FuzzyMode implements CycleButton.ICycleEnum {
|
||||
|
||||
@Override
|
||||
public List<String> getTooltipLines() {
|
||||
return Collections.singletonList(EnderIO.lang.localize("gui.conduit.item.fuzzy.".concat(name().toLowerCase(Locale.US))));
|
||||
return Arrays.asList(
|
||||
EnderIO.lang.localize("gui.conduit.item.fuzzy.".concat(name().toLowerCase(Locale.US))),
|
||||
EnumChatFormatting.GRAY + EnderIO.lang.localize("gui.conduit.item.fuzzy.tooltip.0"),
|
||||
EnumChatFormatting.GRAY + EnderIO.lang.localize("gui.conduit.item.fuzzy.tooltip.1"),
|
||||
EnumChatFormatting.GRAY + EnderIO.lang.localize("gui.conduit.item.fuzzy.tooltip.2",
|
||||
EnderIO.lang.localize("gui.conduit.item.whitelist"))
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
package crazypants.enderio.conduit.item.filter;
|
||||
|
||||
import com.enderio.core.client.gui.widget.GhostSlot;
|
||||
import com.enderio.core.common.network.NetworkUtil;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.conduit.gui.GuiExternalConnection;
|
||||
import crazypants.enderio.conduit.gui.item.BasicItemFilterGui;
|
||||
import crazypants.enderio.conduit.gui.item.IItemFilterGui;
|
||||
import crazypants.enderio.conduit.gui.item.ItemConduitFilterContainer;
|
||||
import crazypants.enderio.conduit.item.IItemConduit;
|
||||
import crazypants.enderio.conduit.item.NetworkedInventory;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -19,12 +19,9 @@ import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import com.enderio.core.client.gui.widget.GhostSlot;
|
||||
import com.enderio.core.common.network.NetworkUtil;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.conduit.item.NetworkedInventory;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemFilter implements IInventory, IItemFilter {
|
||||
|
||||
@@ -93,43 +90,56 @@ public class ItemFilter implements IInventory, IItemFilter {
|
||||
return doesItemPassFilter(item);
|
||||
}
|
||||
|
||||
@SuppressWarnings("SimplifiableConditionalExpression")
|
||||
public boolean doesItemPassFilter(ItemStack item) {
|
||||
if(!isValid()) {
|
||||
return true;
|
||||
}
|
||||
boolean matched = itemMatched(item);
|
||||
return isBlacklist ? !matched : matched;
|
||||
boolean allow = isValid() && itemMatched(item);
|
||||
|
||||
return isBlacklist ? !allow : allow;
|
||||
}
|
||||
|
||||
private boolean itemMatched(ItemStack item) {
|
||||
if(item == null) {
|
||||
return false;
|
||||
}
|
||||
boolean doFuzzy = false;
|
||||
boolean fuzzyValue = false;
|
||||
if(fuzzyMode != FuzzyMode.DISABLED && item.getItem().isDamageable()) {
|
||||
doFuzzy = true;
|
||||
fuzzyValue = fuzzyMode.compare(item);
|
||||
|
||||
boolean checkDamage = fuzzyMode != FuzzyMode.DISABLED;
|
||||
boolean damageMatched = false;
|
||||
if(checkDamage && item.getItem().isDamageable()) {
|
||||
damageMatched = fuzzyMode.compare(item);
|
||||
}
|
||||
|
||||
if(isItemListEmpty()) {
|
||||
if (checkDamage) {
|
||||
return damageMatched;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
boolean matched = false;
|
||||
int i = 0;
|
||||
for (ItemStack it : items) {
|
||||
if(it != null && Item.getIdFromItem(item.getItem()) == Item.getIdFromItem(it.getItem())) {
|
||||
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
ItemStack it = items[i];
|
||||
|
||||
if (it != null && Item.getIdFromItem(item.getItem()) == Item.getIdFromItem(it.getItem())) {
|
||||
matched = true;
|
||||
boolean fuzzyOk = doFuzzy && fuzzyMode.compare(it) == fuzzyValue;
|
||||
if(matchMeta && !fuzzyOk && item.getItemDamage() != it.getItemDamage()) {
|
||||
|
||||
if(checkDamage && !damageMatched) {
|
||||
matched = false;
|
||||
} else if(matchNBT && !isNBTMatch(item, it)) {
|
||||
} else if (matchMeta && item.getItemDamage() != it.getItemDamage()) {
|
||||
matched = false;
|
||||
}else if (matchNBT && !isNBTMatch(item, it)) {
|
||||
matched = false;
|
||||
}
|
||||
}
|
||||
if(!matched && useOreDict && isOreDicMatch(i, item)) {
|
||||
|
||||
if (!matched && useOreDict && isOreDicMatch(i, item)) {
|
||||
matched = true;
|
||||
}
|
||||
if(matched) {
|
||||
|
||||
if (matched) {
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
return matched;
|
||||
}
|
||||
@@ -184,12 +194,21 @@ public class ItemFilter implements IInventory, IItemFilter {
|
||||
|
||||
@Override
|
||||
public boolean isValid() {
|
||||
//allows fuzzy mode to be not dependent from filter items
|
||||
if(fuzzyMode != FuzzyMode.DISABLED) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return !isItemListEmpty();
|
||||
}
|
||||
|
||||
private boolean isItemListEmpty() {
|
||||
for (ItemStack item : items) {
|
||||
if(item != null) {
|
||||
return true;
|
||||
if (item != null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isBlacklist() {
|
||||
@@ -285,6 +304,7 @@ public class ItemFilter implements IInventory, IItemFilter {
|
||||
numItems = nbtRoot.getInteger("numItems");
|
||||
|
||||
if(numItems<10 && isAdvanced) numItems = 10;
|
||||
else if(numItems<5 && !isAdvanced) numItems = 5;
|
||||
|
||||
items = new ItemStack[numItems];
|
||||
oreIds.clear();
|
||||
|
||||
@@ -1,10 +1,17 @@
|
||||
package crazypants.enderio.conduit.liquid;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import com.enderio.core.common.util.DyeColor;
|
||||
|
||||
import com.enderio.core.client.render.IconUtil;
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.conduit.*;
|
||||
import crazypants.enderio.conduit.geom.CollidableComponent;
|
||||
import crazypants.enderio.conduit.item.ItemConduit;
|
||||
import crazypants.enderio.machine.RedstoneControlMode;
|
||||
import crazypants.enderio.tool.ToolUtil;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -17,28 +24,22 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import com.enderio.core.client.render.IconUtil;
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.conduit.AbstractConduitNetwork;
|
||||
import crazypants.enderio.conduit.ConduitUtil;
|
||||
import crazypants.enderio.conduit.ConnectionMode;
|
||||
import crazypants.enderio.conduit.IConduit;
|
||||
import crazypants.enderio.conduit.RaytraceResult;
|
||||
import crazypants.enderio.conduit.geom.CollidableComponent;
|
||||
import crazypants.enderio.machine.RedstoneControlMode;
|
||||
import crazypants.enderio.tool.ToolUtil;
|
||||
import java.util.EnumMap;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
|
||||
public static final String ICON_KEY = "enderio:liquidConduitEnder";
|
||||
public static final String ICON_CORE_KEY = "enderio:liquidConduitCoreEnder";
|
||||
public static final String ICON_EXTRACT_KEY = "enderio:liquidConduitAdvancedInput";
|
||||
public static final String ICON_INSERT_KEY = "enderio:liquidConduitAdvancedOutput";
|
||||
public static final String ICON_IN_OUT_KEY = "enderio:liquidConduitAdvancedInOut";
|
||||
|
||||
public static final String ICON_KEY_INPUT = ItemConduit.ICON_KEY_INPUT;
|
||||
public static final String ICON_KEY_OUTPUT = ItemConduit.ICON_KEY_OUTPUT;
|
||||
public static final String ICON_KEY_IN_OUT_BG = ItemConduit.ICON_KEY_IN_OUT_BG;
|
||||
public static final String ICON_KEY_IN_OUT_OUT = ItemConduit.ICON_KEY_IN_OUT_OUT;
|
||||
public static final String ICON_KEY_IN_OUT_IN = ItemConduit.ICON_KEY_IN_OUT_IN;
|
||||
|
||||
static final Map<String, IIcon> ICONS = new HashMap<String, IIcon>();
|
||||
|
||||
@@ -50,9 +51,12 @@ public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
public void registerIcons(IIconRegister register) {
|
||||
ICONS.put(ICON_KEY, register.registerIcon(ICON_KEY));
|
||||
ICONS.put(ICON_CORE_KEY, register.registerIcon(ICON_CORE_KEY));
|
||||
ICONS.put(ICON_EXTRACT_KEY, register.registerIcon(ICON_EXTRACT_KEY));
|
||||
ICONS.put(ICON_INSERT_KEY, register.registerIcon(ICON_INSERT_KEY));
|
||||
ICONS.put(ICON_IN_OUT_KEY, register.registerIcon(ICON_IN_OUT_KEY));
|
||||
|
||||
ICONS.put(ICON_KEY_INPUT, register.registerIcon(ICON_KEY_INPUT));
|
||||
ICONS.put(ICON_KEY_OUTPUT, register.registerIcon(ICON_KEY_OUTPUT));
|
||||
ICONS.put(ICON_KEY_IN_OUT_OUT, register.registerIcon(ICON_KEY_IN_OUT_OUT));
|
||||
ICONS.put(ICON_KEY_IN_OUT_IN, register.registerIcon(ICON_KEY_IN_OUT_IN));
|
||||
ICONS.put(ICON_KEY_IN_OUT_BG, register.registerIcon(ICON_KEY_IN_OUT_BG));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,6 +73,11 @@ public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
private final EnumMap<ForgeDirection, FluidFilter> outputFilters = new EnumMap<ForgeDirection, FluidFilter>(ForgeDirection.class);
|
||||
private final EnumMap<ForgeDirection, FluidFilter> inputFilters = new EnumMap<ForgeDirection, FluidFilter>(ForgeDirection.class);
|
||||
|
||||
protected final EnumMap<ForgeDirection, DyeColor> outputColors = new EnumMap<ForgeDirection, DyeColor>(ForgeDirection.class);
|
||||
protected final EnumMap<ForgeDirection, DyeColor> inputColors = new EnumMap<ForgeDirection, DyeColor>(ForgeDirection.class);
|
||||
|
||||
private int roundRobin = 0;
|
||||
|
||||
@Override
|
||||
public ItemStack createItem() {
|
||||
return new ItemStack(EnderIO.itemLiquidConduit, 1, 2);
|
||||
@@ -165,17 +174,21 @@ public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
}
|
||||
|
||||
public IIcon getTextureForInputMode() {
|
||||
return ICONS.get(ICON_EXTRACT_KEY);
|
||||
return ICONS.get(ICON_KEY_INPUT);
|
||||
}
|
||||
|
||||
public IIcon getTextureForOutputMode() {
|
||||
return ICONS.get(ICON_INSERT_KEY);
|
||||
return ICONS.get(ICON_KEY_OUTPUT);
|
||||
}
|
||||
|
||||
public IIcon getTextureForInOutMode() {
|
||||
return ICONS.get(ICON_IN_OUT_KEY);
|
||||
|
||||
public IIcon getTextureForInOutMode(boolean input) {
|
||||
return input ? ICONS.get(ICON_KEY_IN_OUT_IN) : ICONS.get(ICON_KEY_IN_OUT_OUT);
|
||||
}
|
||||
|
||||
public IIcon getTextureForInOutBackground() {
|
||||
return ICONS.get(ICON_KEY_IN_OUT_BG);
|
||||
}
|
||||
@Override
|
||||
public IIcon getTransmitionTextureForState(CollidableComponent component) {
|
||||
return null;
|
||||
@@ -298,10 +311,60 @@ public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
}
|
||||
return network.getTankInfo(this, from);
|
||||
}
|
||||
//@Override
|
||||
public DyeColor getInputColor(ForgeDirection dir) {
|
||||
DyeColor result = inputColors.get(dir);
|
||||
if(result == null) {
|
||||
return DyeColor.GREEN;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//@Override
|
||||
public DyeColor getOutputColor(ForgeDirection dir) {
|
||||
DyeColor result = outputColors.get(dir);
|
||||
if(result == null) {
|
||||
return DyeColor.GREEN;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
//@Override
|
||||
public void setInputColor(ForgeDirection dir, DyeColor col) {
|
||||
inputColors.put(dir, col);
|
||||
if(network != null) {
|
||||
network.notifyNetworkOfUpdate();
|
||||
}
|
||||
setClientStateDirty();
|
||||
collidablesDirty = true;
|
||||
}
|
||||
|
||||
//@Override
|
||||
public void setOutputColor(ForgeDirection dir, DyeColor col) {
|
||||
outputColors.put(dir, col);
|
||||
if(network != null) {
|
||||
network.notifyNetworkOfUpdate();
|
||||
}
|
||||
setClientStateDirty();
|
||||
collidablesDirty = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void readTypeSettings(ForgeDirection dir, NBTTagCompound dataRoot) {
|
||||
super.readTypeSettings(dir, dataRoot);
|
||||
|
||||
if (dataRoot.hasKey("inputColor")) {
|
||||
setInputColor(dir, DyeColor.values()[dataRoot.getShort("inputColor")]);
|
||||
}
|
||||
if (dataRoot.hasKey("outputColor")) {
|
||||
setOutputColor(dir, DyeColor.values()[dataRoot.getShort("outputColor")]);
|
||||
}
|
||||
|
||||
if(dataRoot.hasKey("roundRobin")) {
|
||||
setRoundRobin(dir, dataRoot.getBoolean("roundRobin"));
|
||||
} else {
|
||||
setRoundRobin(dir, true);
|
||||
}
|
||||
|
||||
if (dataRoot.hasKey("outputFilters")) {
|
||||
FluidFilter out = new FluidFilter();
|
||||
out.readFromNBT(dataRoot.getCompoundTag("outputFilters"));
|
||||
@@ -317,6 +380,12 @@ public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
@Override
|
||||
protected void writeTypeSettingsToNbt(ForgeDirection dir, NBTTagCompound dataRoot) {
|
||||
super.writeTypeSettingsToNbt(dir, dataRoot);
|
||||
|
||||
dataRoot.setShort("inputColor", (short)getInputColor(dir).ordinal());
|
||||
dataRoot.setShort("outputColor", (short)getOutputColor(dir).ordinal());
|
||||
|
||||
dataRoot.setBoolean("roundRobin", isRoundRobin(dir));
|
||||
|
||||
FluidFilter out = outputFilters.get(dir);
|
||||
if (out != null) {
|
||||
NBTTagCompound outTag = new NBTTagCompound();
|
||||
@@ -329,11 +398,13 @@ public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
in.writeToNBT(inTag);
|
||||
dataRoot.setTag("inputFilters", inTag);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbtRoot) {
|
||||
super.writeToNBT(nbtRoot);
|
||||
nbtRoot.setInteger("roundRobin", roundRobin);
|
||||
for (Entry<ForgeDirection, FluidFilter> entry : inputFilters.entrySet()) {
|
||||
if(entry.getValue() != null) {
|
||||
FluidFilter f = entry.getValue();
|
||||
@@ -354,11 +425,29 @@ public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Entry<ForgeDirection, DyeColor> entry : inputColors.entrySet()) {
|
||||
if(entry.getValue() != null) {
|
||||
short ord = (short) entry.getValue().ordinal();
|
||||
nbtRoot.setShort("inSC." + entry.getKey().name(), ord);
|
||||
}
|
||||
}
|
||||
|
||||
for (Entry<ForgeDirection, DyeColor> entry : outputColors.entrySet()) {
|
||||
if(entry.getValue() != null) {
|
||||
short ord = (short) entry.getValue().ordinal();
|
||||
nbtRoot.setShort("outSC." + entry.getKey().name(), ord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbtRoot, short nbtVersion) {
|
||||
super.readFromNBT(nbtRoot, nbtVersion);
|
||||
if(nbtRoot.hasKey("roundRobin")) {
|
||||
roundRobin = nbtRoot.getInteger("roundRobin");
|
||||
} else {
|
||||
roundRobin = 0b111111;
|
||||
}
|
||||
for (ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
||||
String key = "inFilts." + dir.name();
|
||||
if(nbtRoot.hasKey(key)) {
|
||||
@@ -379,8 +468,34 @@ public class EnderLiquidConduit extends AbstractLiquidConduit {
|
||||
outputFilters.put(dir, f);
|
||||
}
|
||||
}
|
||||
|
||||
key = "inSC." + dir.name();
|
||||
if(nbtRoot.hasKey(key)) {
|
||||
short ord = nbtRoot.getShort(key);
|
||||
if(ord >= 0 && ord < DyeColor.values().length) {
|
||||
inputColors.put(dir, DyeColor.values()[ord]);
|
||||
}
|
||||
}
|
||||
|
||||
key = "outSC." + dir.name();
|
||||
if(nbtRoot.hasKey(key)) {
|
||||
short ord = nbtRoot.getShort(key);
|
||||
if(ord >= 0 && ord < DyeColor.values().length) {
|
||||
outputColors.put(dir, DyeColor.values()[ord]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean isRoundRobin(ForgeDirection dir) {
|
||||
return (roundRobin & dir.flag) != 0;
|
||||
}
|
||||
|
||||
public void setRoundRobin(ForgeDirection dir, boolean roundRobin) {
|
||||
if (roundRobin)
|
||||
this.roundRobin |= dir.flag;
|
||||
else
|
||||
this.roundRobin &= ~dir.flag;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,6 @@
|
||||
package crazypants.enderio.conduit.liquid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -11,13 +8,51 @@ import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
import com.enderio.core.common.util.RoundRobinIterator;
|
||||
|
||||
import crazypants.enderio.conduit.AbstractConduitNetwork;
|
||||
import crazypants.enderio.conduit.ConnectionMode;
|
||||
import crazypants.enderio.config.Config;
|
||||
|
||||
public class EnderLiquidConduitNetwork extends AbstractConduitNetwork<ILiquidConduit, EnderLiquidConduit> {
|
||||
private class TankIterator implements Iterator<NetworkTank> {
|
||||
private int index = -1;
|
||||
private int currentCount = 0;
|
||||
|
||||
public TankIterator start() {
|
||||
currentCount = 0;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return !tanks.isEmpty() && currentCount < tanks.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public NetworkTank next() {
|
||||
if (tanks.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
currentCount++;
|
||||
index++;
|
||||
if (index >= tanks.size()) {
|
||||
index = 0;
|
||||
}
|
||||
return tanks.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove() {
|
||||
}
|
||||
|
||||
public void rewind() {
|
||||
if (index == 0)
|
||||
index = tanks.size() - 1;
|
||||
else
|
||||
index--;
|
||||
currentCount--;
|
||||
}
|
||||
}
|
||||
|
||||
public static final int MAX_EXTRACT_PER_TICK = Config.enderFluidConduitExtractRate;
|
||||
public static final int MAX_IO_PER_TICK = Config.enderFluidConduitMaxIoRate;
|
||||
@@ -25,7 +60,7 @@ public class EnderLiquidConduitNetwork extends AbstractConduitNetwork<ILiquidCon
|
||||
List<NetworkTank> tanks = new ArrayList<NetworkTank>();
|
||||
Map<NetworkTankKey, NetworkTank> tankMap = new HashMap<NetworkTankKey, NetworkTank>();
|
||||
|
||||
Map<NetworkTank, RoundRobinIterator<NetworkTank>> iterators;
|
||||
Map<NetworkTank, TankIterator> iterators;
|
||||
|
||||
boolean filling;
|
||||
|
||||
@@ -93,17 +128,21 @@ public class EnderLiquidConduitNetwork extends AbstractConduitNetwork<ILiquidCon
|
||||
int remaining = resource.amount;
|
||||
//TODO: Only change starting pos of iterator is doFill is true so a false then true returns the same
|
||||
|
||||
for (NetworkTank target : getIteratorForTank(tank)) {
|
||||
if(!target.equals(tank) && target.acceptsOuput && target.isValid() && matchedFilter(resource, target.con, target.conDir, false)) {
|
||||
TankIterator iterator;
|
||||
for (iterator = getIteratorForTank(tank).start(); iterator.hasNext(); ) {
|
||||
NetworkTank target = iterator.next();
|
||||
if (!target.equals(tank) && target.con.getOutputColor(target.conDir).equals(tank.con.getInputColor(tank.conDir)) && target.acceptsOuput && target.isValid() && matchedFilter(resource, target.con, target.conDir, false)) {
|
||||
int vol = target.externalTank.fill(target.tankDir, resource.copy(), doFill);
|
||||
remaining -= vol;
|
||||
filled += vol;
|
||||
if(remaining <= 0) {
|
||||
return filled;
|
||||
if (remaining <= 0) {
|
||||
break;
|
||||
}
|
||||
resource.amount = remaining;
|
||||
}
|
||||
}
|
||||
if (!tank.con.isRoundRobin(tank.conDir))
|
||||
iterator.rewind();
|
||||
return filled;
|
||||
|
||||
} finally {
|
||||
@@ -122,13 +161,13 @@ public class EnderLiquidConduitNetwork extends AbstractConduitNetwork<ILiquidCon
|
||||
return filter.matchesFilter(drained);
|
||||
}
|
||||
|
||||
private Iterable<NetworkTank> getIteratorForTank(NetworkTank tank) {
|
||||
private TankIterator getIteratorForTank(NetworkTank tank) {
|
||||
if(iterators == null) {
|
||||
iterators = new HashMap<NetworkTank, RoundRobinIterator<NetworkTank>>();
|
||||
iterators = new HashMap<>();
|
||||
}
|
||||
RoundRobinIterator<NetworkTank> res = iterators.get(tank);
|
||||
TankIterator res = iterators.get(tank);
|
||||
if(res == null) {
|
||||
res = new RoundRobinIterator<NetworkTank>(tanks);
|
||||
res = new TankIterator();
|
||||
iterators.put(tank, res);
|
||||
}
|
||||
return res;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package crazypants.enderio.conduit.liquid;
|
||||
|
||||
import com.enderio.core.common.util.DyeColor;
|
||||
import crazypants.enderio.conduit.item.IItemConduit;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import crazypants.enderio.conduit.ConnectionMode;
|
||||
@@ -26,19 +29,42 @@ public class EnderLiquidConduitRenderer extends DefaultConduitRenderer {
|
||||
public void renderEntity(ConduitBundleRenderer conduitBundleRenderer, IConduitBundle te, IConduit conduit, double x, double y, double z, float partialTick,
|
||||
float worldLight, RenderBlocks rb) {
|
||||
super.renderEntity(conduitBundleRenderer, te, conduit, x, y, z, partialTick, worldLight, rb);
|
||||
|
||||
EnderLiquidConduit pc = (EnderLiquidConduit) conduit;
|
||||
for (ForgeDirection dir : conduit.getExternalConnections()) {
|
||||
IIcon tex = null;
|
||||
DyeColor inChannel = null;
|
||||
DyeColor outChannel = null;
|
||||
IIcon inTex = null;
|
||||
IIcon outTex = null;
|
||||
boolean render = true;
|
||||
if(conduit.getConnectionMode(dir) == ConnectionMode.INPUT) {
|
||||
tex = pc.getTextureForInputMode();
|
||||
inTex = pc.getTextureForInputMode();
|
||||
inChannel = pc.getInputColor(dir);
|
||||
} else if(conduit.getConnectionMode(dir) == ConnectionMode.OUTPUT) {
|
||||
tex = pc.getTextureForOutputMode();
|
||||
outTex = pc.getTextureForOutputMode();
|
||||
outChannel = pc.getOutputColor(dir);
|
||||
} else if(conduit.getConnectionMode(dir) == ConnectionMode.IN_OUT) {
|
||||
tex = pc.getTextureForInOutMode();
|
||||
inTex = pc.getTextureForInOutMode(true);
|
||||
outTex = pc.getTextureForInOutMode(false);
|
||||
inChannel = pc.getInputColor(dir);
|
||||
outChannel = pc.getOutputColor(dir);
|
||||
} else {
|
||||
render = false;
|
||||
}
|
||||
if(tex != null) {
|
||||
if(render && !rb.hasOverrideBlockTexture()) {
|
||||
Offset offset = te.getOffset(ILiquidConduit.class, dir);
|
||||
ConnectionModeGeometry.renderModeConnector(dir, offset, tex, true);
|
||||
ConnectionModeGeometry.renderModeConnector(dir, offset, pc.getTextureForInOutBackground(), true);
|
||||
|
||||
if(inChannel != null) {
|
||||
Tessellator.instance.setColorOpaque_I(inChannel.getColor());
|
||||
ConnectionModeGeometry.renderModeConnector(dir, offset, inTex, false);
|
||||
}
|
||||
if(outChannel != null) {
|
||||
Tessellator.instance.setColorOpaque_I(outChannel.getColor());
|
||||
ConnectionModeGeometry.renderModeConnector(dir, offset, outTex, false);
|
||||
}
|
||||
|
||||
Tessellator.instance.setColorOpaque_F(1f, 1f, 1f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package crazypants.enderio.conduit.packet;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
import crazypants.enderio.conduit.liquid.EnderLiquidConduit;
|
||||
import crazypants.enderio.conduit.liquid.ILiquidConduit;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class PacketRoundRobinMode extends AbstractConduitPacket<ILiquidConduit> implements IMessageHandler<PacketRoundRobinMode, IMessage> {
|
||||
private ForgeDirection dir;
|
||||
private boolean roundRobin;
|
||||
|
||||
public PacketRoundRobinMode() {
|
||||
}
|
||||
|
||||
public PacketRoundRobinMode(EnderLiquidConduit eConduit, ForgeDirection dir) {
|
||||
super(eConduit.getBundle().getEntity(), ConTypeEnum.FLUID);
|
||||
this.dir = dir;
|
||||
roundRobin = eConduit.isRoundRobin(dir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
super.toBytes(buf);
|
||||
buf.writeShort(dir.ordinal());
|
||||
buf.writeBoolean(roundRobin);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
super.fromBytes(buf);
|
||||
dir = ForgeDirection.values()[buf.readShort()];
|
||||
roundRobin = buf.readBoolean();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMessage onMessage(PacketRoundRobinMode message, MessageContext ctx) {
|
||||
final ILiquidConduit conduit = message.getTileCasted(ctx);
|
||||
if (conduit instanceof EnderLiquidConduit) {
|
||||
((EnderLiquidConduit) conduit).setRoundRobin(message.dir, message.roundRobin);
|
||||
message.getWorld(ctx).markBlockForUpdate(message.x, message.y, message.z);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -185,6 +185,9 @@ public class ItemSoulVessel extends Item implements IResourceTooltipProvider {
|
||||
if(entity instanceof EntityPlayer) {
|
||||
return false;
|
||||
}
|
||||
if(entity.isDead) {
|
||||
return false;
|
||||
}
|
||||
|
||||
String entityId = EntityList.getEntityString(entity);
|
||||
if(isBlackListed(entityId)) {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package crazypants.enderio.machine;
|
||||
|
||||
import crazypants.enderio.power.*;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.MathHelper;
|
||||
@@ -8,13 +9,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import com.enderio.core.common.vecmath.VecmathUtil;
|
||||
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.material.ItemCapacitor;
|
||||
import crazypants.enderio.network.PacketHandler;
|
||||
import crazypants.enderio.power.Capacitors;
|
||||
import crazypants.enderio.power.ICapacitor;
|
||||
import crazypants.enderio.power.ICapacitorItem;
|
||||
import crazypants.enderio.power.IInternalPoweredTile;
|
||||
import crazypants.enderio.power.PowerHandlerUtil;
|
||||
|
||||
public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity implements IInternalPoweredTile {
|
||||
|
||||
@@ -27,7 +22,7 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
|
||||
protected AbstractPoweredMachineEntity(SlotDefinition slotDefinition) {
|
||||
super(slotDefinition);
|
||||
setCapacitor(Capacitors.BASIC_CAPACITOR);
|
||||
capacitorType = Capacitors.BASIC_CAPACITOR;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -45,7 +40,7 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
return;
|
||||
}
|
||||
boolean powerChanged = (lastSyncPowerStored != storedEnergyRF && shouldDoWorkThisTick(5));
|
||||
if(powerChanged) {
|
||||
if (powerChanged) {
|
||||
lastSyncPowerStored = storedEnergyRF;
|
||||
PacketHandler.sendToAllAround(new PacketPowerStorage(this), this);
|
||||
}
|
||||
@@ -60,7 +55,7 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
|
||||
@Override
|
||||
public int getMaxEnergyRecieved(ForgeDirection dir) {
|
||||
if(isSideDisabled(dir.ordinal())) {
|
||||
if (isSideDisabled(dir.ordinal())) {
|
||||
return 0;
|
||||
}
|
||||
return getCapacitor().getMaxEnergyReceived();
|
||||
@@ -98,18 +93,16 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
|
||||
public ICapacitor getCapacitor() {
|
||||
|
||||
if(capacitor != null) {
|
||||
return capacitor;
|
||||
}
|
||||
if (capacitor != null) {
|
||||
return capacitor;
|
||||
} else if (capacitorType == Capacitors.TOTEMIC_CAPACITOR) {
|
||||
ItemStack contents = inventory[slotDefinition.minUpgradeSlot];
|
||||
if (contents != null && contents.getItem() == EnderIO.itemBasicCapacitor) {
|
||||
return EnderIO.itemBasicCapacitor.getCapacitor(contents);
|
||||
}
|
||||
}
|
||||
|
||||
else if(capacitorType == Capacitors.TOTEMIC_CAPACITOR) {
|
||||
ItemStack contents = inventory[slotDefinition.minUpgradeSlot];
|
||||
if(contents != null && contents.getItem() == EnderIO.itemBasicCapacitor) {
|
||||
return EnderIO.itemBasicCapacitor.getCapacitor(contents);
|
||||
}
|
||||
}
|
||||
|
||||
return capacitorType.capacitor;
|
||||
return capacitorType.capacitor;
|
||||
|
||||
}
|
||||
|
||||
@@ -127,15 +120,13 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
public void setCapacitor(Capacitors capacitorType) {
|
||||
this.capacitorType = capacitorType;
|
||||
|
||||
if(capacitorType == Capacitors.TOTEMIC_CAPACITOR) {
|
||||
ItemStack contents = inventory[slotDefinition.minUpgradeSlot];
|
||||
if(contents != null && contents.getItem() == EnderIO.itemBasicCapacitor) {
|
||||
setCapacitor(EnderIO.itemBasicCapacitor.getCapacitor(contents));
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
this.capacitor = capacitorType.capacitor;
|
||||
if (capacitorType == Capacitors.TOTEMIC_CAPACITOR) {
|
||||
ItemStack contents = inventory[slotDefinition.minUpgradeSlot];
|
||||
if (contents != null && contents.getItem() == EnderIO.itemBasicCapacitor) {
|
||||
setCapacitor(EnderIO.itemBasicCapacitor.getCapacitor(contents));
|
||||
}
|
||||
} else {
|
||||
this.capacitor = capacitorType.capacitor;
|
||||
}
|
||||
|
||||
onCapacitorTypeChange();
|
||||
@@ -153,7 +144,7 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
@Override
|
||||
public void setInventorySlotContents(int slot, ItemStack contents) {
|
||||
super.setInventorySlotContents(slot, contents);
|
||||
if(slotDefinition.isUpgradeSlot(slot)) {
|
||||
if (slotDefinition.isUpgradeSlot(slot)) {
|
||||
updateCapacitorFromSlot();
|
||||
}
|
||||
}
|
||||
@@ -161,19 +152,19 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
@Override
|
||||
public ItemStack decrStackSize(int fromSlot, int amount) {
|
||||
ItemStack res = super.decrStackSize(fromSlot, amount);
|
||||
if(slotDefinition.isUpgradeSlot(fromSlot)) {
|
||||
if (slotDefinition.isUpgradeSlot(fromSlot)) {
|
||||
updateCapacitorFromSlot();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
private void updateCapacitorFromSlot() {
|
||||
if(slotDefinition.getNumUpgradeSlots() <= 0) {
|
||||
if (slotDefinition.getNumUpgradeSlots() <= 0) {
|
||||
setCapacitor(Capacitors.BASIC_CAPACITOR);
|
||||
return;
|
||||
}
|
||||
ItemStack contents = inventory[slotDefinition.minUpgradeSlot];
|
||||
if(contents == null || contents.getItem() != EnderIO.itemBasicCapacitor) {
|
||||
if (contents == null || contents.getItem() != EnderIO.itemBasicCapacitor) {
|
||||
setCapacitor(Capacitors.BASIC_CAPACITOR);
|
||||
} else {
|
||||
setCapacitor(Capacitors.values()[contents.getItemDamage()]);
|
||||
@@ -190,7 +181,7 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
super.readCommon(nbtRoot);
|
||||
setCapacitor(Capacitors.values()[nbtRoot.getShort("capacitorType")]);
|
||||
int energy;
|
||||
if(nbtRoot.hasKey("storedEnergy")) {
|
||||
if (nbtRoot.hasKey("storedEnergy")) {
|
||||
float storedEnergyMJ = nbtRoot.getFloat("storedEnergy");
|
||||
energy = (int) (storedEnergyMJ * 10);
|
||||
} else {
|
||||
@@ -208,5 +199,4 @@ public abstract class AbstractPoweredMachineEntity extends AbstractMachineEntity
|
||||
nbtRoot.setInteger(PowerHandlerUtil.STORED_ENERGY_NBT_KEY, storedEnergyRF);
|
||||
nbtRoot.setShort("capacitorType", (short) capacitorType.ordinal());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -409,7 +409,7 @@ public class TileCapBank extends TileEntityEio implements IInternalPowerReceiver
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
if(!type.isMultiblock() || !(network instanceof CapBankClientNetwork)) {
|
||||
if(!getType().isMultiblock() || !(network instanceof CapBankClientNetwork)) {
|
||||
return super.getRenderBoundingBox();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import crazypants.enderio.machine.farm.farmers.PlantableFarmer;
|
||||
import crazypants.enderio.machine.farm.farmers.RubberTreeFarmerIC2;
|
||||
import crazypants.enderio.machine.farm.farmers.StemFarmer;
|
||||
import crazypants.enderio.machine.farm.farmers.TreeFarmer;
|
||||
import crazypants.enderio.machine.farm.farmers.ForestryFarmer;
|
||||
|
||||
public final class FarmersRegistry {
|
||||
|
||||
@@ -34,13 +35,10 @@ public final class FarmersRegistry {
|
||||
addExtraUtilities();
|
||||
addNatura();
|
||||
addTiC();
|
||||
addStillHungry();
|
||||
addIC2();
|
||||
addMFR();
|
||||
addThaumcraft();
|
||||
addFlowers();
|
||||
addGrowableOres();
|
||||
addImmersiveEngineering();
|
||||
ForestryFarmer.init();
|
||||
|
||||
FarmersCommune.joinCommune(new StemFarmer(Blocks.reeds, new ItemStack(Items.reeds)));
|
||||
FarmersCommune.joinCommune(new StemFarmer(Blocks.cactus, new ItemStack(Blocks.cactus)));
|
||||
@@ -178,16 +176,6 @@ public final class FarmersRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
private static void addMFR() {
|
||||
String mod = "MineFactoryReloaded";
|
||||
String blockName = "rubberwood.sapling";
|
||||
Block saplingBlock = GameRegistry.findBlock(mod, blockName);
|
||||
if(saplingBlock != null) {
|
||||
FarmersCommune.joinCommune(new TreeFarmer(saplingBlock, GameRegistry.findBlock(mod, "rubberwood.log")));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static void addIC2() {
|
||||
RubberTreeFarmerIC2 rtf = new RubberTreeFarmerIC2();
|
||||
if(rtf.isValid()) {
|
||||
@@ -195,11 +183,6 @@ public final class FarmersRegistry {
|
||||
}
|
||||
}
|
||||
|
||||
private static void addStillHungry() {
|
||||
String mod = "stillhungry";
|
||||
addPickable(mod, "grapeBlock", "StillHungry_grapeSeed");
|
||||
}
|
||||
|
||||
private static void addExtraUtilities() {
|
||||
String mod = "ExtraUtilities";
|
||||
String name = "plant/ender_lilly";
|
||||
@@ -219,36 +202,6 @@ public final class FarmersRegistry {
|
||||
GameRegistry.findBlock("Botany", "flower"),
|
||||
GameRegistry.findBlock("Botania", "flower") ) );
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private static void addGrowableOres() {
|
||||
String mod = "B0bGrowsOre";
|
||||
if (!Loader.isModLoaded(mod)) {
|
||||
return;
|
||||
}
|
||||
Pattern[] growableOres = { Pattern.compile("(.+)Reed"), Pattern.compile("oreGrowable(.+)") };
|
||||
|
||||
Iterator<Block> blockIter = Block.blockRegistry.iterator();
|
||||
while (blockIter.hasNext()) {
|
||||
Block block = blockIter.next();
|
||||
String name = Block.blockRegistry.getNameForObject(block);
|
||||
if (name != null && name.startsWith(mod)) {
|
||||
for (Pattern blockPattern : growableOres) {
|
||||
if (blockPattern.matcher(name).find()) {
|
||||
FarmersCommune.joinCommune(new StemFarmer(block, new ItemStack(block)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void addImmersiveEngineering() {
|
||||
Block hemp = GameRegistry.findBlock("ImmersiveEngineering", "hemp");
|
||||
Item hempSeed = GameRegistry.findItem("ImmersiveEngineering", "hemp");
|
||||
if (hemp != null && hempSeed != null) {
|
||||
FarmersCommune.joinCommune(new StemFarmer(hemp, new ItemStack(hempSeed)));
|
||||
}
|
||||
}
|
||||
|
||||
private FarmersRegistry() {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package crazypants.enderio.machine.farm.farmers;
|
||||
|
||||
import com.enderio.core.common.util.BlockCoord;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import crazypants.enderio.Log;
|
||||
import crazypants.enderio.machine.farm.TileFarmStation;
|
||||
import forestry.api.arboriculture.EnumGermlingType;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.ITreeRoot;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ForestryFarmer implements IFarmerJoe {
|
||||
private ITreeRoot root;
|
||||
private Item forestrySapling;
|
||||
|
||||
private ForestryFarmer(ITreeRoot root, Item forestrySapling) {
|
||||
this.root = root;
|
||||
this.forestrySapling = forestrySapling;
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
ITreeRoot root = (ITreeRoot) AlleleManager.alleleRegistry.getSpeciesRoot("rootTrees");
|
||||
Item forestrySapling = GameRegistry.findItem("Forestry", "sapling");
|
||||
if (root != null && forestrySapling != null) {
|
||||
FarmersCommune.joinCommune(new ForestryFarmer(root, forestrySapling));
|
||||
Log.info("ForestryFarmer engaged.");
|
||||
} else {
|
||||
Log.info("ForestryFarmer borked.");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlant(ItemStack stack) {
|
||||
return stack != null && stack.getItem() == forestrySapling && root.getType(stack) == EnumGermlingType.SAPLING;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean prepareBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) {
|
||||
ItemStack sapling = farm.getSeedTypeInSuppliesFor(bc);
|
||||
ITree tree = root.getMember(sapling);
|
||||
if (tree != null && tree.canStay(farm.getWorldObj(), bc.x, bc.y, bc.z)) {
|
||||
farm.takeSeedFromSupplies(sapling, bc, false);
|
||||
root.plantSapling(farm.getWorldObj(), tree, farm.getFakePlayer().getGameProfile(), bc.x, bc.y, bc.z);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvest(TileFarmStation farm, BlockCoord bc, Block block, int meta) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IHarvestResult harvestBlock(TileFarmStation farm, BlockCoord bc, Block block, int meta) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -128,25 +128,25 @@ public class RecipeConfig {
|
||||
for (RecipeGroup group : userConfig.getRecipeGroups().values()) {
|
||||
if(!group.enabled) {
|
||||
if(recipeGroups.remove(group.name) != null) {
|
||||
Log.info("Disabled core recipe group " + group.name + " due to user config.");
|
||||
Log.debug("Disabled core recipe group " + group.name + " due to user config.");
|
||||
}
|
||||
} else {
|
||||
RecipeGroup modifyGroup = recipeGroups.get(group.name);
|
||||
if(modifyGroup == null) {
|
||||
Log.info("Added user defined recipe group " + group.name);
|
||||
Log.debug("Added user defined recipe group " + group.name);
|
||||
modifyGroup = new RecipeGroup(group.name);
|
||||
recipeGroups.put(group.name, modifyGroup);
|
||||
}
|
||||
for (RecipeElement recipe : group.recipes.values()) {
|
||||
if(recipe.isValid()) {
|
||||
if(modifyGroup.recipes.containsKey(recipe.name)) {
|
||||
Log.info("Replacing core recipe " + recipe.name + " with user defined recipe.");
|
||||
Log.debug("Replacing core recipe " + recipe.name + " with user defined recipe.");
|
||||
} else {
|
||||
Log.info("Added user defined recipe " + recipe.name);
|
||||
Log.debug("Added user defined recipe " + recipe.name);
|
||||
}
|
||||
modifyGroup.addRecipe(recipe);
|
||||
} else {
|
||||
Log.info("Removed recipe " + recipe.name + " due to user config.");
|
||||
Log.debug("Removed recipe " + recipe.name + " due to user config.");
|
||||
modifyGroup.recipes.remove(recipe.name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,15 +32,15 @@ import crazypants.enderio.xp.XpUtil;
|
||||
public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveExperience, IFluidHandler, ITankAccess {
|
||||
|
||||
public static final int POWER_PER_TICK_ONE = Config.soulBinderLevelOnePowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(POWER_PER_TICK_ONE * 2,
|
||||
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(0,POWER_PER_TICK_ONE * 2,
|
||||
Capacitors.BASIC_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_ONE);
|
||||
|
||||
public static final int POWER_PER_TICK_TWO = Config.soulBinderLevelTwoPowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_TWO = new BasicCapacitor(POWER_PER_TICK_TWO * 2,
|
||||
private static final BasicCapacitor CAP_TWO = new BasicCapacitor(0,POWER_PER_TICK_TWO * 2,
|
||||
Capacitors.ACTIVATED_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_TWO);
|
||||
|
||||
public static final int POWER_PER_TICK_THREE = Config.soulBinderLevelThreePowerPerTickRF;
|
||||
private static final BasicCapacitor CAP_THREE = new BasicCapacitor(POWER_PER_TICK_THREE * 2,
|
||||
private static final BasicCapacitor CAP_THREE = new BasicCapacitor(0,POWER_PER_TICK_THREE * 2,
|
||||
Capacitors.ENDER_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_THREE);
|
||||
|
||||
private final ExperienceContainer xpCont = new ExperienceContainer(XpUtil.getExperienceForLevel(Config.soulBinderMaxXpLevel));
|
||||
|
||||
@@ -48,7 +48,7 @@ public class TileTransceiver extends AbstractPoweredTaskEntity implements IFluid
|
||||
private final SetMultimap<ChannelType, Channel> sendChannels = MultimapBuilder.enumKeys(ChannelType.class).hashSetValues().build();
|
||||
private final SetMultimap<ChannelType, Channel> recieveChannels = MultimapBuilder.enumKeys(ChannelType.class).hashSetValues().build();
|
||||
|
||||
private ICapacitor capacitor = new BasicCapacitor(Config.transceiverMaxIoRF * 2, 500000, Config.transceiverMaxIoRF);
|
||||
private final ICapacitor capacitor = new BasicCapacitor(0, Config.transceiverMaxIoRF * 2, 500000, Config.transceiverMaxIoRF);
|
||||
private boolean sendChannelsDirty = false;
|
||||
private boolean recieveChannelsDirty = false;
|
||||
private boolean registered = false;
|
||||
@@ -69,7 +69,6 @@ public class TileTransceiver extends AbstractPoweredTaskEntity implements IFluid
|
||||
|
||||
public TileTransceiver() {
|
||||
super(new SlotDefinition(8, 8, 0));
|
||||
|
||||
currentTask = new ContinuousTask(Config.transceiverUpkeepCostRF);
|
||||
railController = new EnderRailController(this);
|
||||
|
||||
@@ -161,6 +160,7 @@ public class TileTransceiver extends AbstractPoweredTaskEntity implements IFluid
|
||||
return hasPower();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ICapacitor getCapacitor() {
|
||||
return capacitor;
|
||||
@@ -260,7 +260,7 @@ public class TileTransceiver extends AbstractPoweredTaskEntity implements IFluid
|
||||
|
||||
static void readChannels(NBTTagCompound nbtRoot, SetMultimap<ChannelType, Channel> channels, String key) {
|
||||
channels.clear();
|
||||
|
||||
|
||||
if(!nbtRoot.hasKey(key)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public class BlockFusedQuartz extends BlockEio {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
Type type = Type.byMeta(meta);
|
||||
if (type.blastResistance) {
|
||||
return 2000;
|
||||
return 20;
|
||||
} else {
|
||||
return super.getExplosionResistance(par1Entity);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public class NEIEnderIOConfig implements IConfigureNEI {
|
||||
API.registerGuiOverlayHandler(GuiInventoryPanel.class, new InventoryPanelNEIOverlayHandler(), "crafting");
|
||||
|
||||
API.hideItem(new ItemStack(EnderIO.blockConduitFacade));
|
||||
API.hideItem(new ItemStack(EnderIO.blockLightNode));
|
||||
API.hideItem(new ItemStack(EnderIO.itemEnderface));
|
||||
API.hideItem(PainterUtil.applyDefaultPaintedState(new ItemStack(EnderIO.blockPaintedCarpet)));
|
||||
API.hideItem(PainterUtil.applyDefaultPaintedState(new ItemStack(EnderIO.blockPaintedSlab)));
|
||||
|
||||
@@ -22,8 +22,8 @@ public class BasicCapacitor implements ICapacitor {
|
||||
this(tier, maxEnergyIO, maxEnergyStored, maxEnergyIO);
|
||||
}
|
||||
|
||||
public BasicCapacitor(int tier, int maxEnergyIn, int maxEnergyStored, int maxEnergyOut) {
|
||||
configure(tier, maxEnergyIn, maxEnergyStored, maxEnergyOut);
|
||||
public BasicCapacitor(int tier, int maxEnergyReceived, int maxEnergyStored, int maxEnergyExtracted) {
|
||||
configure(tier, maxEnergyReceived, maxEnergyStored, maxEnergyExtracted);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,124 +0,0 @@
|
||||
package crazypants.enderio.trigger;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import buildcraft.api.gates.ActionManager;
|
||||
import buildcraft.api.gates.ITrigger;
|
||||
import buildcraft.api.gates.ITriggerParameter;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import crazypants.enderio.machine.power.TileCapacitorBank;
|
||||
|
||||
public class TriggerEnderIO implements ITrigger {
|
||||
|
||||
public static IIcon[] triggerIcons = new IIcon[5];
|
||||
public static String[] descriptions = new String[] { "Capacitor Bank has no energy stored", "Capacitor Bank has energy stored",
|
||||
"Capacitor Bank is full with energy", "Capacitor Bank is charging items", "Capacitor Bank finished charging items" };
|
||||
|
||||
public String uniqueTag;
|
||||
|
||||
public int triggerID;
|
||||
|
||||
public TriggerEnderIO(String uniqueTag, int triggerID) {
|
||||
this.uniqueTag = uniqueTag;
|
||||
this.triggerID = triggerID;
|
||||
ActionManager.registerTrigger(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return descriptions[triggerID];
|
||||
}
|
||||
|
||||
//@Override
|
||||
public boolean isTriggerActive(ForgeDirection side, TileEntity tile, ITriggerParameter parameter) {
|
||||
if(tile instanceof TileCapacitorBank) {
|
||||
TileCapacitorBank capacitorBank = (TileCapacitorBank) tile;
|
||||
|
||||
if(triggerID == 0) {
|
||||
return capacitorBank.getEnergyStored() == 0;
|
||||
}
|
||||
if(triggerID == 1) {
|
||||
return capacitorBank.getEnergyStored() != 0;
|
||||
}
|
||||
if(triggerID == 2) {
|
||||
return capacitorBank.getMaxEnergyStored() - capacitorBank.getEnergyStored() < 5;
|
||||
}
|
||||
if(triggerID == 3 || triggerID == 4) {
|
||||
ItemStack[] items = new ItemStack[capacitorBank.getSizeInventory()];
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
items[i] = capacitorBank.getStackInSlot(i);
|
||||
}
|
||||
boolean capacitorBankEmpty = true;
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
if(items[i] != null && items[i].getItem() instanceof IChargeableItem) {
|
||||
capacitorBankEmpty = false;
|
||||
}
|
||||
}
|
||||
if(capacitorBankEmpty) {
|
||||
return false;
|
||||
}
|
||||
boolean hasUnchargedItems = false;
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
if(items[i] != null && items[i].getItem() instanceof IChargeableItem) {
|
||||
IChargeableItem item = (IChargeableItem) items[i].getItem();
|
||||
if(item.getEnergyStored(items[i]) < item.getMaxEnergyStored(items[i])) {
|
||||
hasUnchargedItems = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(hasUnchargedItems && triggerID == 3) {
|
||||
return true;
|
||||
}
|
||||
if(!hasUnchargedItems && triggerID == 4) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon() {
|
||||
return triggerIcons[triggerID];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegistry) {
|
||||
triggerIcons[0] = iconRegistry.registerIcon("enderio:triggers/noEnergy");
|
||||
triggerIcons[1] = iconRegistry.registerIcon("enderio:triggers/hasEnergy");
|
||||
triggerIcons[2] = iconRegistry.registerIcon("enderio:triggers/fullEnergy");
|
||||
triggerIcons[3] = iconRegistry.registerIcon("enderio:triggers/charging");
|
||||
triggerIcons[4] = iconRegistry.registerIcon("enderio:triggers/chargingDone");
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public int getLegacyId() {
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public String getUniqueTag() {
|
||||
return this.uniqueTag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasParameter() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITriggerParameter createParameter() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean requiresParameter() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package crazypants.enderio.trigger;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import buildcraft.api.gates.IOverrideDefaultTriggers;
|
||||
import buildcraft.api.gates.ITrigger;
|
||||
import buildcraft.api.gates.ITriggerProvider;
|
||||
import buildcraft.api.transport.IPipeTile;
|
||||
import crazypants.enderio.EnderIO;
|
||||
import crazypants.enderio.machine.power.TileCapacitorBank;
|
||||
|
||||
public class TriggerProviderEIO implements ITriggerProvider {
|
||||
|
||||
@Override
|
||||
public LinkedList<ITrigger> getNeighborTriggers(Block block, TileEntity tile) {
|
||||
if (tile instanceof IOverrideDefaultTriggers) {
|
||||
return ((IOverrideDefaultTriggers) tile).getTriggers();
|
||||
}
|
||||
|
||||
LinkedList<ITrigger> triggers = new LinkedList<ITrigger>();
|
||||
|
||||
if (tile instanceof TileCapacitorBank) {
|
||||
triggers.add(EnderIO.triggerNoEnergy);
|
||||
triggers.add(EnderIO.triggerHasEnergy);
|
||||
triggers.add(EnderIO.triggerFullEnergy);
|
||||
triggers.add(EnderIO.triggerIsCharging);
|
||||
triggers.add(EnderIO.triggerFinishedCharging);
|
||||
}
|
||||
|
||||
return triggers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<ITrigger> getPipeTriggers(IPipeTile pipe) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user