6233 Commits

Author SHA1 Message Date
payonel
98a1eb7875 Merge remote-tracking branch 'origin/master-MC1.10' into master-MC1.11
# Conflicts:
#	src/main/scala/li/cil/oc/common/entity/Drone.scala
2018-09-29 17:38:50 -07:00
payonel
c0e5fd03c5 Merge remote-tracking branch 'origin/master-MC1.7.10' into master-MC1.10 2018-09-29 17:36:37 -07:00
payonel
0b7d8bfd92 copy the simulated stack before using it
The simulated stack from inventories may not be a copy, and we modify it
thus, we should copy it before using it. This fixes our interaction with
ae interfaces

closes #2845
2018-09-29 17:32:41 -07:00
payonel
8a9740b641 funnel wake-on-lan start through host, not direct
The network card's wake-on-lan previously was sending a computer.start
message directly to the machine. But some hosts, specifically the Drone
need to make certain start actions before the machine starts. For
instance, the drone zeros its velocity (technically, it rises by .5m)

closes #2866
2018-09-28 17:30:42 -07:00
payonel
83d954ccde set modified fluid stack after fill 2018-09-28 00:40:23 -07:00
payonel
6ca46e564a set modified fluid container after drain
fluid was duplicating because >1.11 fluid drain modified copies
thus, we need to set the slot in the internal inventory with the new
stack

closes #2894
2018-09-28 00:25:46 -07:00
payonel
0eb316127c Merge branch 'master-MC1.10' into master-MC1.11 2018-09-27 18:27:13 -07:00
payonel
b6acea0d8a Merge branch 'master-MC1.7.10' into master-MC1.10 2018-09-27 18:27:01 -07:00
payonel
d350b30e9c make line reads safer
closes #2934
2018-09-27 18:26:14 -07:00
payonel
8ea2acad29 Merge remote-tracking branch 'origin/master-MC1.7.10' into master-MC1.10 2018-09-27 15:10:42 -07:00
payonel
2158aac5d1 fix typo in in-game manual
closes #2805
2018-09-27 15:07:27 -07:00
payonel
8bbbeefc3b Merge remote-tracking branch 'origin/master-MC1.7.10' into master-MC1.10 2018-09-27 12:20:41 -07:00
payonel
6adad2adbe network loot disk installed via install only
The previous network installer was from legacy days, the new install
tool provides the reboot options it was meant to have

closes #2472
2018-09-27 09:48:03 -07:00
payonel
fb2f4ca088 Merge branch 'master-MC1.10' into master-MC1.11
# Conflicts:
#	src/main/scala/li/cil/oc/client/GuiHandler.scala
#	src/main/scala/li/cil/oc/common/GuiHandler.scala
#	src/main/scala/li/cil/oc/server/component/DiskDriveMountable.scala
2018-09-27 02:01:32 -07:00
payonel
04815c76a0 Merge branch 'master-MC1.7.10' into master-MC1.10
# Conflicts:
#	src/main/scala/li/cil/oc/client/GuiHandler.scala
#	src/main/scala/li/cil/oc/common/GuiHandler.scala
2018-09-27 01:53:54 -07:00
payonel
9aef16b2a3 use sided inventory for accessors to agent inv
inventory calls such as `suck` and `suckFromSlot` were creating a
sideless inventory handler on the agents (drones and robots). The
sideless access was allowing the api calls to access slot indexes beyond
the intended main inventory size, and creep into their component
inventory (e.g. starting with slot index 69 on creatix), thus creating
a copy of the agent's first component (e.g. a Screen block)

This fix creates a sided inventory handler from the inventoryAt call,
fixing these cases.

closes #2935
2018-09-27 01:41:23 -07:00
payonel
70554be9a8 remove unused import 2018-09-26 22:10:44 -07:00
payonel
ea252ff475 compare BlockPos to BlockPos move fix 2018-09-26 22:05:58 -07:00
payonel
bf9eae1be9 provide inventory gui for mountable disk drives
rack click accessible as well as "from the hip" with your held item

closes #2704
2018-09-25 17:57:16 -07:00
payonel
1a4224b741 Merge branch 'master-MC1.10' into master-MC1.11
# Conflicts:
#	src/main/scala/li/cil/oc/server/component/Trade.scala
2018-09-23 22:25:52 -07:00
payonel
04a0697f29 Merge branch 'master-MC1.7.10' into master-MC1.10
# Conflicts:
#	src/main/scala/li/cil/oc/server/component/Trade.scala
2018-09-23 22:09:38 -07:00
payonel
c57dc9ae48 try exact trade first before item type only check
again closes #2788
2018-09-23 21:14:52 -07:00
payonel
9eb0d23e17 Merge branch 'master-MC1.10' into master-MC1.11 2018-09-22 21:50:54 -07:00
payonel
90d62a17d2 merge master-MC1.10 to master-MC1.11 2018-09-22 21:45:22 -07:00
payonel
10c13e5ec1 Merge branch 'master-MC1.7.10' into master-MC1.10
# Conflicts:
#	src/main/scala/li/cil/oc/server/component/Trade.scala
#	src/main/scala/li/cil/oc/util/InventoryUtils.scala
2018-09-22 21:37:32 -07:00
payonel
89eeae875b make weak ItemStack comparison for trading
Mimicking vanilla minecraft, we now only compare Item types in recipe
inputs for making a trade with villagers. This commit also adds a
parameter to our inv utils for extracting ItemStacks, whether to make
a strict and exact comparison (as it was always doing before, and is
still the default) or to make a weak check only (which only verifies the
Item types are the same)

closes #2788
2018-09-22 21:11:07 -07:00
payonel
e856f829c9 Merge branch 'master-MC1.10' into master-MC1.11 2018-09-22 06:50:53 -07:00
payonel
2bc4b7354f Merge branch 'master-MC1.7.10' into master-MC1.10 2018-09-22 06:48:30 -07:00
payonel
e5ccda83f0 use Node to find the angel upgrade
closes #2573
2018-09-22 06:48:09 -07:00
payonel
3596208b14 Merge branch 'master-MC1.10' into master-MC1.11
# Conflicts:
#	src/main/scala/li/cil/oc/common/EventHandler.scala
#	src/main/scala/li/cil/oc/server/component/UpgradeCrafting.scala
2018-09-22 05:42:44 -07:00
payonel
7f614c507d mimic vanilla crafting solution, 1.10
fixes case where craft item is not consumed but damaged, specifically the ic2 hammer

closes #2479
2018-09-22 05:39:03 -07:00
payonel
a5c1419635 adding support for the ic2 reactor chamber
closes #2038
2018-09-22 01:00:29 -07:00
payonel
6f620d37c0 Merge branch 'master-MC1.7.10' into master-MC1.10
# Conflicts:
#	src/main/scala/li/cil/oc/common/EventHandler.scala
2018-09-22 00:30:28 -07:00
payonel
3a2a4d0a18 ic2 type check on cast
protect from event crash in case class transformer crashed on start
2018-09-22 00:26:38 -07:00
payonel
3b6e16f7ef Merge branch 'master-MC1.10' into master-MC1.11
# Conflicts:
#	src/main/scala/li/cil/oc/util/FluidUtils.scala
2018-09-21 18:52:56 -07:00
payonel
beb7ec5963 Merge branch 'master-MC1.7.10' into master-MC1.10
# Conflicts:
#	src/main/scala/li/cil/oc/util/FluidUtils.scala
2018-09-21 18:51:46 -07:00
payonel
515645b181 remove unnecessary onBlockHarvested call
since 1.10 block.removedByPlayer now calls onBlockHarvested for us
Interestingly enough, SkullBlock generates its drop items in a custom
onBlockHarvested override, and thus we were duplicating it

closes #2624
2018-09-21 18:40:23 -07:00
payonel
0cb24f9c4f simple nil check on drain from empty fluid tank
closes #2291
2018-09-20 22:49:09 -07:00
payonel
4d6eebfdd2 Merge branch 'master-MC1.10' into master-MC1.11 2018-09-17 20:52:12 -07:00
Yibo Cao
58d3c6b45c Fix transferItem checking the wrong side 2018-09-16 23:40:02 -07:00
payonel
2c468bdfc3 Merge branch 'master-MC1.10' into master-MC1.11
# Conflicts:
#	build.gradle
#	src/main/scala/li/cil/oc/server/agent/Player.scala
2018-09-16 20:17:43 -07:00
payonel
f7a1347779 Merge branch 'master-MC1.7.10' into master-MC1.10
# Conflicts:
#	src/main/scala/li/cil/oc/common/block/RedstoneAware.scala
#	src/main/scala/li/cil/oc/common/tileentity/Keyboard.scala
#	src/main/scala/li/cil/oc/server/agent/Player.scala
2018-09-16 20:14:37 -07:00
payonel
2f0e495265 allow force luaj even when natives are available
closes #2880
2018-09-16 00:10:37 -07:00
payonel
4bf8bbbd7f mimic player inventory with back ref to player
also, remove node neighbor check in keyboard, vex didn't like it, also
because it didn't work as intended

closes #2870
2018-09-15 23:00:27 -07:00
payonel
195074678b return bool to lua that the robot really moved
In #2334 it was reported that robot movement can at times return
success even when it didn't move. In addition to that, sangar
had left in comments that sometimes the api calls to move return true
even when they couldn't make the movements, but we don't know why

I was unable to repro this behavior. However, it seems reasonable to
believe that returning success of the api calls ALONG with a check
of the robots current position compared to the requested position it
move to, might be sufficient to correct the result sent to the machine

closes #2334 (probably, maybe)
2018-09-15 01:26:10 -07:00
payonel
202988676f voodoo magic of the dead
Apparently, mob (skeletons, zombies) equipment drops (armor, tools, etc)
were being duplicated as a side effect of the robot kill code when the
robot had no more inventory space to suck up the item. It would seem
that the vanilla mechanic for mobs dropping these special loot items is
different, and somehow oc's robot collect drop code was causing two
items to be created.

Strangely, setDead fixes this and doesn't appear to break anything else!
Very confused why, but, I've tested this and it seems to work. Works
with partial stacks pickups, full inventories, full pickups, and
various mob types

closes #2392
2018-09-15 01:21:15 -07:00
payonel
3228131dbb allow the keyboard to attach to sides
closes #2524
2018-09-13 21:26:59 -07:00
Vexatos
67d352f149 Switched to the correct IC2 dependency. 2018-09-10 19:59:16 +02:00
Vexatos
225e907c49 Replace ChatFormatting with TextFormatting, like it should be.
ChatFormatting only exists on the client side.
Fixes #2792.
Fixes #2850.
2018-09-10 17:56:41 +02:00
payonel
2653f31c98 allow redstone setOutput to specify large values
This appears to work fine with other mods, and with vanilla redstone
tested from 1.7.10 and up.

Also, I reviewed code in other mods setting redstone signals and it
seems that we don't need to cap our redstone signal

Note that this is not an exploit on vanilla redstone, setting output to
2,000 (for example) does not propogate a powered redstone "wire" (dust
line) further than the vanilla 15 blocks. Also, when reading a vanilla
redstone dust line that was powered with a value greater than 15 (e.g.
2,000 again), we do not read huge values either. The vanilla mc system
is capping the values for us.

closes #2058
2018-09-09 19:30:37 -07:00