1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-07-02 10:03:32 +00:00
Commit Graph

294 Commits

Author SHA1 Message Date
SquidDev
bfb4f88304 Fix the printer clearing the previous page
When printing on top of an already printed page, the previous contents
should be preserved. However, this did not occur as the stack had been
shrunk and so the item was no longer considered a printout.

Closes SquidDev-CC/ComputerCraft#2
2017-10-06 12:04:49 +01:00
SquidDev
fb6d65ec23 Invalidate the network when the peripheral is removed
Fixes #83
2017-10-04 21:49:41 +01:00
SquidDev
6b364052c7 Only render breaking animation on the part being hit 2017-10-04 21:49:40 +01:00
SquidDev
7169abcd7b Ensure the modem's peripheral is incorrectly invalidated when changed 2017-10-04 21:49:40 +01:00
SquidDev
75ccfbdb3d Migrate cable core block state to an enum
This allows us to render the cable "core", as was done pre-1.8.
2017-10-04 21:49:40 +01:00
SquidDev
728644c104 Initial attempt at improving cable/wired modem interactions
- Cable and modem can be broken individually
 - Ray tracing will go through "holes" in the cable.
 - Pick block will determine which part you are looking at.
 - Selection box will only highlight the region you are looking at:
   modem or cable.
2017-10-04 21:49:37 +01:00
Joseph C. Sible
80ec54eaf6 Remove unnecessary code
- Remove unnecessary casts
- Use the diamond operator where possible
- Remove "throws" declarations that aren't actually thrown
- Remove unused local variables
- Remove unused imports
- Remove redundant superinterfaces
2017-09-24 01:23:29 -04:00
SquidDev
01f5d006fc Fix BlockFaceShape not being overridden for turtles and peripherals
This meant one could perform various illogical actions to
non-full-blocks, such as connecting fences and placing paitings.

We also modify the behaviour of isOpaqueCube and isFullCube for
peripherals, only returning false for the case of modems and cables.
2017-09-18 08:33:40 +01:00
SquidDev
cd6b076efe Turn on ServerComputer instances if they have timed out 2017-09-16 20:09:51 +01:00
SquidDev
fbbfe33e21 Do not instantiate ServerComputer instances in the peripheral provider
Instead we create a ComputerProxy, which delegates methods to the
ServerComputer or TileComputerBase, depending on which one exists.
2017-09-15 18:58:13 +01:00
SquidDev
7a916ed8c2 Do not instantiate a ServerComputer for pocket computers's mount 2017-09-15 18:48:57 +01:00
SquidDev
60305cd106 Remove tile before calling destroy
This ensures that the tile will updating neighbouring blocks, and so
the destroyed tile will not be wrapped as a peripheral.
2017-09-15 17:40:53 +01:00
SquidDev
1ef7c8e8db Only send the packet to people within 64 blocks
This is equivalent to what vanilla Minecraft does
2017-09-12 22:44:49 +01:00
SquidDev
afec3743f3 Use custom packet to play records, instead of using block events
Breaking a disk drive was not stopping the record being played as the
block event never reached the client. Instead, we send a custom packet
which starts/stops music at a given location.

We also remove all the plumbing for eventReceived/sendBlockEvent from
the generic block/tile classes, as they are no longer used.

Closes #443
2017-09-12 15:46:46 +01:00
Daniel Ratcliffe
61ff91f237 Merge pull request #316 from SquidDev-CC/feature/minecraft-1.12.2
Update to 1.12. Bam!
2017-09-10 20:52:26 +01:00
SquidDev
a2da6d9601 Pass the original block in redstone propagation
notifyBlockOfStateChange and notifyNeighborsOfStateExcept expect the
block which caused the redstone update, rather than the neighbor block.

Fixes #393
2017-09-10 09:32:02 +01:00
Wojbie
acb5f65e16 Functional change Lignum suggested 2017-07-29 01:14:36 +02:00
SquidDev
d29ffed383 Java 8. Java 8. Does whatever Java 8 can.
Default methods, everywhere.
Arrow types, switch on strings.
Lambdas!
Here comes Java 8.
2017-07-25 21:10:48 +01:00
SquidDev
08099f08f2 Initial update to 1.12
- Convert most recipes to JSON
 - Add JSON factories for impostor and turtle recipes.
 - Several mappings changes
 - Migrate to Forge's new registry system
2017-07-25 21:10:47 +01:00
SquidDev
bee41e7f97 Avoid deprecated warnings on ItemCable 2017-07-25 21:08:52 +01:00
SquidDev
35425f0f61 Update to 1.11.2 2017-07-25 21:08:51 +01:00
Daniel Ratcliffe
6701403370 Merge pull request #364 from KingofGamesYami/feature/computer-get-label
Add .getLabel
2017-07-25 20:06:22 +01:00
SquidDev
c0294e1534 Adds the ability to load custom bios.lua files from resource packs
Computer now delegates to IComputerEnvironment which, by default, looks
in the following locations:

 - Resouce pack files
 - The "debug" folder
 - The original ComputerCraft jar
2017-07-14 21:58:58 +01:00
Steven Dirth
4b36ed6719 Add .getLabel to computer peripheral
Closes #359
2017-07-09 12:43:50 -05:00
Daniel Ratcliffe
00a1342883 Merge pull request #297 from SquidDev-CC/feature/fire-events
Fire Forge events where appropriate
2017-06-28 22:32:22 +01:00
SquidDev
c9a3bcb68b Replace direct equality with InventoryUtil.areItemsEqual
Some IItemHandler.insertItem implementations clone the item, so we must
check whether the object is equal instead.

Fixes #340
2017-06-28 22:11:25 +01:00
Wojbie
225ec594e7 Adds pocket computer light support to Speaker
This makes use of new pocket computer light access peripherals have and adds said functionality to speaker. If noisy pocket has made sound the pocket computer light will turn dark blue for a second.
2017-06-12 20:54:38 +02:00
SquidDev
bffc3c18cc Rewrite argument validation
This uses a new utility class ArgumentHelper, which provides convenience
methods for parsing arguments from an array of Objects.

The format of error messages has also changed. It now follows a format
similar to Lua's native error messages - including the invalid argument
index, the expected type and the type actually received.
2017-06-12 10:28:31 +01:00
SquidDev
255dc925fb Fire Forge events where appropriate
- BlockEvent.BreakEvent and BlockEvent.HarvestDropsEvent are fired when
   digging.
 - AttackEntityEvent is fired when attacking.
 - Various PlayerInteractEvent.* events are fired when placing.

Closes #103, closes #100
2017-05-31 12:41:31 +01:00
Wojbie
47f470910e Fix to getPalletteColour
Done as @dan200 specified in #287. Closes #287.
2017-05-28 14:08:15 +02:00
Lignum
0a2cb7442d
Merge branch 'master' into fix-speakers 2017-05-20 13:23:12 +02:00
Daniel Ratcliffe
d86aa50bec Merge pull request #267 from SquidDev-CC/feature/tutle-tool-changes
Shovel upgrade converts grass to path blocks
2017-05-20 12:16:47 +01:00
Lignum
163c1db6be
Fix some if statements 2017-05-19 23:37:02 +02:00
Lignum
c2af482615
Format TileSpeaker and TurtleSpeaker 2017-05-19 20:25:08 +02:00
Lignum
a402fc9093
Format SpeakerPeripheral correctly 2017-05-19 20:20:51 +02:00
SquidDev
971c719a9f Add some sanity checks to Palette.readFromNBT
Printers use a Terminal to store the page currently being printed.
Printers saved in an older version of ComputerCraft would be missing the
term_palette field, resulting in an NPE when loading the tile.
2017-05-19 11:47:27 +01:00
Daniel Ratcliffe
f3c291cb4d Merge pull request #205 from SquidDev-CC/feature/packet-network-api
Expose wireless network in the public API
2017-05-18 23:57:44 +01:00
SquidDev
d76ce22db7 Split transmit into two separate methods
This removes the interdimensional and range options from the packet
and ensures they are provides them from the transmit* methods instead.
2017-05-18 23:50:14 +01:00
Wojbie
af07a78f76 Speaker rage limit
Limit max volume of speaker to volume of normal noteblock.
2017-05-18 23:12:55 +02:00
SquidDev
12e61efd76 Fixes speakers playing incorrect sounds on the server
As a new SoundEvent was being created each time, the actual sound was
not in the registry, resulting in the sound -> id mapping yielding
incorrect values.
2017-05-17 08:00:14 +01:00
SquidDev
b5e75a86c8 Remove AT for Block.createStackedBlock
Access transformers do not propagate to sub classes, and so the access
transformer did not work here. Reverting to reflection fixes this issue.
2017-05-16 21:19:36 +01:00
Daniel Ratcliffe
ba4b1e21fe Merge pull request #238 from SquidDev-CC/feature/binary-handles
Refactor the filesystem and HTTP code
2017-05-16 20:02:34 +01:00
Daniel Ratcliffe
cd85a03429 Merge pull request #237 from Restioson/feature/speaker
[Peripheral] Speaker
2017-05-16 19:52:10 +01:00
Daniel Ratcliffe
2e22ca4ccf Merge pull request #217 from SquidDev-CC/feature/logging
Add a basic logging system
2017-05-16 19:38:03 +01:00
SquidDev
0e1135ed97 Disable peripheral logging by default 2017-05-16 19:35:07 +01:00
Daniel Ratcliffe
ebbdd29bd6 Merge pull request #243 from SquidDev-CC/feature/access-transformer
Replace reflection with access transformers
2017-05-16 19:25:10 +01:00
Restioson
4df4b91d09 Converted (!x == y) to x != y 2017-05-16 20:02:59 +02:00
Restioson
b28c565665 (Hopefully) addressed @dan200's concerns
Push your fix to thread safety if this doesn't cut it
2017-05-16 19:48:38 +02:00
SquidDev
efb0065ebd Add config option to disable certain error messages 2017-05-16 15:59:09 +01:00
SquidDev
a0b6cbb671 Remove ILogger facade
Just use global Log4j logger on the ComputerCraft class.
2017-05-16 15:49:55 +01:00
SquidDev
44ba4069c1 Print stack traces/add logging messages in several places
This will hopefully make it easier to track down various issues which
might otherwise go unnoticed or provide little information.

The main areas modified are those that external APIs may provide values
for or interact with: various providers and ILuaObject/IPeripheral
implementations. However, we do also log in a couple of other places
which indicate a problem with this, or another, mod.
2017-05-16 15:49:55 +01:00
Restioson
b3c49db761 Made Speaker threadsafe & fix warnings 2017-05-15 17:42:29 +02:00
Restioson
7ff4631a9f @gegy1000 strikes again 2017-05-15 17:42:29 +02:00
Restioson
aad81bead7 Fix style
@gegy1000 don't say *I* get distracted
2017-05-15 17:42:29 +02:00
Restioson
88b55934c7 Fix castException 2017-05-15 17:42:29 +02:00
Restioson
42962dcd48 Fix Noisy turtles not in creative - Thanks @SquidDev 2017-05-15 17:42:29 +02:00
Restioson
093d2ea89f Added PocketSpeaker & corrected blockmodel for turtle speaker 2017-05-15 17:42:29 +02:00
Restioson
a3b0e4e993 Added speaker as turtle peripheral 2017-05-15 17:38:50 +02:00
Restioson
dc96f2121a Fix Speaker not playing sounds on break and replace for entire Lua session 2017-05-15 17:38:50 +02:00
Restioson
2899246dbc Fix speaker peripheral API 2017-05-15 17:38:50 +02:00
gegy1000
2444245b80 Speaker rendering and name 2017-05-15 17:38:50 +02:00
Restioson
a748d0167b Fixed Speaker being recognized as Disk Drive. Massive thanks to @SquidDev 2017-05-15 17:38:50 +02:00
Restioson
6cf1801f7e Changed method names to camelCaser 2017-05-15 17:38:50 +02:00
Restioson
61c08afc7f Implemented speaker. It's broken though - thinks it's a Disk Drive
~~Damn Tile Entities these days, always with their identity crises~~
2017-05-15 17:38:50 +02:00
Restioson
61dc61d356 Attempt to fix git history #2 2017-05-15 17:36:29 +02:00
SquidDev
63cdc7a72e Replace reflection with access transformers
This makes the code slightly neater and allows us to catch places where
the variable/function has been renamed between versions.
2017-05-14 17:01:14 +01:00
SquidDev
b37dbbd0af Allow dying pocket computers too
This splits up the pocket computer textures and models into the frame
(off, on, blinking), colour layer (normal, advanced, custom) and modem
light.
2017-05-14 15:02:56 +01:00
SquidDev
a6b870dfbb Expand IPocketAccess.getLight/setLight to use RGB colours
This allows us to restore the modem light to its original colour.
2017-05-14 14:22:20 +01:00
SquidDev
6426255bd4 Remove getColour and setColour methods from ITurtleAccess
This allows us to remove the m_Colour field from TurtleBrain
2017-05-14 14:17:55 +01:00
SquidDev
8c36eccfef Allow dying turtles arbitrary colours
- Makes ITurtleItem implement IColourableItem
 - Only cache one turtle item model for all colours, rather than one for
   each colour.
 - Allow ITurtleAccess to set an arbitrary colour.
2017-05-14 14:17:55 +01:00
SquidDev
88de097c1c Add more general item colouring system
This allows for other items, such as turtles, to be dyed in the future.
This also adds support for the ore dictionary, meaning you can use other
mod's dyes to colour items.
2017-05-14 14:17:54 +01:00
SquidDev
6ccffe9742 Refactor the filesystem and HTTP code
- Move the encoding/decoding from the Filesystem implementation to the
   individual handles.
 - Move each handle into an core.apis.handles package from the main fs
   API.
 - Move the HTTP response to inherit from these handles.
 - Allow binary handles' read function to accept a number, specifying
   how many characters to read - these will be returned as a Lua string.
 - Add readAll to binary handles
 - Allow binary handles' write function to accept a string which is
   decoded into the individual bytes.
 - Add "binary" argument to http.request and friends in order to return
   a binary handle.
 - Ensure file handles are open when reading from/writing to them.
 - Return the error message when opening a file fails.
2017-05-13 22:47:28 +01:00
Daniel Ratcliffe
ea0d688345 Merge pull request #234 from SquidDev-CC/feature/remap-ids
Remap all blocks and items to underscore_case
2017-05-13 21:44:10 +01:00
Daniel Ratcliffe
891666c8bf Merge pull request #220 from SquidDev-CC/feature/item-handler
Replace most inventory handling code with IItemHandlers
2017-05-13 21:31:58 +01:00
SquidDev
a328308f67 Switch from using INetwork to IPacketNetwork 2017-05-13 20:43:12 +01:00
ObloxCC
7f754f33bb Updated (C) from 2016 to 2017 (#229)
* Updated (C)

* Fixed Whitespace

bugs, bugs, and more bugs

* Fixed Whitespaces 1/2

* Fixed Whitespaces 2/2

* Fixed Whitespaces 3/2
2017-05-13 19:20:39 +01:00
SquidDev
add046cbda Remap all blocks and items to underscore_case
This makes block/model names a little mode consistent and should help
with porting to 1.11.2.

 - Prefix all tile entities with "computercraft:".
 - Change all "pascalCase" and "CC-*" items to use underscore_case
 - Listen to the missing mappings event and gracefully convert
   blocks/items.
2017-05-12 13:29:56 +01:00
SquidDev
b07f28c30c Replace most inventory handling code with IItemHandlers
- Make InventoryUtil deal with item handlers instead. This
   significantly simplifies the implementation, the interface now
   does most of the hard work.
 - Add InvWrapper item handlers to printers, disk drives and turtles
 - Add IItemHandlerModifiable accessor to ITurtleAccess
 - Migrate all other inventory code (mostly turtle commands) to use
   item handlers instead.
2017-05-11 00:00:10 +01:00
Daniel Ratcliffe
c049de6939 Merge pull request #221 from SquidDev-CC/feature/nullable-annotations
Fix several crashes caused by incorrect NonNull annotations.
2017-05-09 20:00:02 +01:00
SquidDev
93aea371a7 Shovel upgrade converts grass to path blocks
Using turtle.dig() with a shovel upgrade on a grass block will create a
path block.

Closes #127
2017-05-09 13:03:12 +01:00
SquidDev
dd63fac8af Register TurtlePlayer in the entity registry
Fixes #143
2017-05-09 12:16:32 +01:00
SquidDev
8b411387f1 Fix several craches caused by incorrect NonNull annotations.
Awfully sorry about this. It appears that Minecraft's annotations are
occasionally wrong. IntelliJ will automatically add "not-null" checks on
these annotations, resulting in crashes when they are actually null.
2017-05-09 00:54:15 +01:00
Daniel Ratcliffe
0308ec555a Merge pull request #207 from SquidDev-CC/feature/cleanup
Fix a couple of warnings
2017-05-07 18:26:07 +01:00
Daniel Ratcliffe
e063f5a6b8 Merge pull request #197 from Lignum/colour-palettes
Modifiable terminal colour palette
2017-05-07 17:31:14 +01:00
Daniel Ratcliffe
5f22d8bac6 Enabled setTextColour/setBackgroundColour with all colours on greyscale monitors
It's fine, now that we have greyscale rendering
2017-05-07 17:24:45 +01:00
Lignum
c10e1ba78c
Get rid of setPaletteColour table overload 2017-05-07 15:04:09 +02:00
SquidDev
2e901a063d Remove accessibility modifiers from all enums and interfaces 2017-05-07 13:35:18 +01:00
SquidDev
5a60818c99 Make many fields final 2017-05-07 13:35:18 +01:00
SquidDev
a3400ecf26 Fix all the deprecated warnings 2017-05-07 13:35:05 +01:00
SquidDev
a2fd0b1f7f Use block comment instead of Javadoc for license 2017-05-07 13:30:10 +01:00
SquidDev
db9cd15fb3 Remove most raw types
This means we can remove even more casts and what not.
2017-05-07 13:30:05 +01:00
SquidDev
9af15d1e30 Remove some unnecessary constructs
- Replace for and while loops with for iterators
 - Remove unused casts
2017-05-07 13:29:52 +01:00
SquidDev
dc5517303f Add @Nullable and @NonNull annotations 2017-05-07 13:29:49 +01:00
Lignum
0164032a4a
Allow greyscale palettes on basic computers 2017-05-07 13:04:54 +02:00
Lignum
70c2f50aa8
Un-break the non-table setPaletteColour overload 2017-05-07 12:55:16 +02:00
Lignum
54273fc6e5
Add Palette.DEFAULT 2017-05-07 12:51:06 +02:00
Lignum
156e74b69c
setColour -> setPaletteColour 2017-05-07 12:40:31 +02:00
SquidDev
8ba5edb6e4 Minor cleanup of pocket computer upgrades
- General improvements of the docs.
 - Move all ItemStack code to the ItemPocketComputer class
 - Make PocketAPI execute on the server thread, rather than the computer
   thread
2017-05-07 08:09:36 +01:00
SquidDev
5a4375f6ac Allow changing the colour of the modem light
This now uses an integer between 0 and 15 to represent a colour, rather
than a simple on/off flag.
2017-05-07 08:09:36 +01:00
SquidDev
7f8100ae0f Check the offhand inventory too when searching for upgrades 2017-05-07 08:08:09 +01:00
SquidDev
22631cfc63 Add .equip and .unequip methods to pocket API. 2017-05-07 08:08:09 +01:00
SquidDev
5faceac7ba Add registry for pocket computer upgrades 2017-05-07 08:08:09 +01:00
Lignum
287c6f172c
Allow passing RGB8 hex values to term.setColour 2017-05-07 01:16:48 +02:00
Daniel Ratcliffe
58713caa73 Merge pull request #203 from SquidDev-CC/feature/turtle-models
Convert turtle rendering to use tinting
2017-05-06 23:56:13 +01:00
Daniel Ratcliffe
a6e3d4fd26 Merge pull request #195 from SquidDev-CC/hotfix/selection-boxes
Fix selection boxes not being shown
2017-05-06 23:55:45 +01:00
SquidDev
f34a319b79 Make cable collision boxes more accurate for cables
Each cable segment is added to the list, meaning you can get close and
snugly with the cables.
2017-05-06 23:45:15 +01:00
Lignum
ac2382a861
Add setColour overload with table parameter 2017-05-06 20:22:16 +02:00
SquidDev
2f93354981 Remove dye block state property
It doesn't make sense to have it now as the coloured models do not exist
any more, and so would just produce errors should we try to load them.
2017-05-06 17:41:49 +01:00
SquidDev
c7f5d039b2 Use IBlockState instead of Block methods
There was a crash in RedstoneUtil when redstone state was changing next
to a full block due to the incorrect state being passed. By using
IBlockState methods we ensure that this cannot happen again.

The old IBlockState methods were also deprecated, so this reduces the
warning count a little. I've also moved string translation into
StringUtils, to reduce the number of deprecation warnings from there.
2017-05-06 15:31:06 +01:00
Lignum
3de674dfb1
Simplify the palette payload to an int array 2017-05-05 18:47:43 +02:00
Lignum
39a56c8e55
Get rid of the PaletteColour class
It just took up a bunch of space. We're storing an array of float[3] now.
2017-05-05 18:22:48 +02:00
Lignum
6997471280
Add palette functions to monitor peripheral 2017-05-05 18:12:33 +02:00
SquidDev
4b95ed5d53 Do not reset redstone inputs when adding peripherals
As of 8abff95441, peripherals no longer
block redstone input. As this is no longer the case, redstone levels
should not be reset.
2017-05-05 17:00:44 +01:00
Lignum
088dab799e
Network the colour palette
Which means it actually has a visible effect! 🎉
2017-05-05 17:21:53 +02:00
SquidDev
d87b0e9435 Fix selection boxes not being shown
getSelectedBoundingBox expects a bounding box relative to (0, 0, 0) but
we were returning one relative to the current block. Instead we allow
the default behaviour to continue, which will call getBoundingBox and
offset it.
2017-05-05 15:25:07 +01:00
Lignum
b0f0d8fd71
Add getColour/setColour to the window api 2017-05-05 16:14:13 +02:00
Lignum
56c9dec687
Add term.setColour/term.getColour 2017-05-05 15:52:21 +02:00
Lignum
936a531cd5
Add a palette class and use it for rendering 2017-05-05 15:24:29 +02:00
Daniel Ratcliffe
42f2235d45 Made the black colour on monitors, terminals, block and item graphics darker
0x111111 is now used throughout, previously there was quite a bit of
variance
2017-05-05 00:54:24 +01:00
Daniel Ratcliffe
8abff95441 Peripherals no longer break turtle<->redstone connectivity
I can't think of a good reason for this feature tbh
2017-05-04 22:13:14 +01:00
Daniel Ratcliffe
4b0a976bd6 Merge pull request #182 from SquidDev-CC/feature/turtle-upgrade-both
Allow turtle upgrades to act as tools and peripherals
2017-05-04 22:02:09 +01:00
Daniel Ratcliffe
17a3e120e8 Merge pull request #180 from boq/master
Handle tile entity changes
2017-05-04 21:42:34 +01:00
Daniel Ratcliffe
55b160e1bb Merge pull request #164 from SquidDev-CC/hotfix/turtle-connectivity
Fix redstone connectivity on turtles
2017-05-04 21:28:08 +01:00
Daniel Ratcliffe
27ef182294 Merge pull request #158 from SquidDev-CC/feature/require-container
Require the player to be interacting with the computer when typing
2017-05-04 21:08:34 +01:00
SquidDev
a021a072b5 Allow turtle upgrades to act as tools and peripherals
This may be useful when you want your tool to also provide additional
methods. For instance, a pickaxe could provide methods to check whether
it can break the block in front.
2017-05-03 17:28:54 +01:00
Bartek Bok
4eb4bb933f
Different fix for shadow turtles 2017-05-03 16:03:47 +02:00
Bartek Bok
5284b145f8
Handle tile entity changes 2017-05-03 11:36:55 +02:00
Bartek Bok
bd8769f300 Fix compilation error 2017-05-02 23:40:31 +02:00
Daniel Ratcliffe
4825aefccf Merge pull request #167 from SquidDev-CC/hotfix/limit-label
Impose additional limitations on disk and computer labels
2017-05-02 13:54:43 +01:00
SquidDev
14d3a182d9 Fix NPE when clearing disk label 2017-05-02 13:32:53 +01:00
SquidDev
2fef772f3d Use '?' for unprintable characters 2017-05-02 13:24:42 +01:00
SquidDev
c190ec5147 Do not limit labels to the ASCII range.
This should accept all printable characters that ComputerCraft can
handle.
2017-05-02 00:20:46 +01:00
SquidDev
b1efbdad95 Impose additional limitations on disk and computer labels
Closes #147
2017-05-01 22:23:54 +01:00
SquidDev
230b578a98 Add config GUI
This allows you to modify various settings in-game.
2017-05-01 22:14:45 +01:00
SquidDev
02ce111d9e Invert side when checking connectivity
The side marks the direction relative to the wire, rather than the side
of the block it is attempting to connect to. Therefore needs to be
flipped.

Closes #149
2017-05-01 21:44:48 +01:00
SquidDev
b2542289f0 Require the player to be interacting with the computer when typing
Packets will be discarded if the sending player is not currently
interacting with the appropriate computer. This ensures players cannot
control other people's computers.

This is enforced by checking if the current container is a "computer
container", and this container holds the correct computer.
2017-05-01 17:07:32 +01:00
SquidDev
bbbbccf63d Fire all entity interaction events in TurtlePlaceCommand
This allows turtles to interact with entities correctly.
2017-05-01 16:14:05 +01:00
SquidDev
d050ca9849 Fix advanced computer's item model 2017-05-01 16:10:45 +01:00
SquidDev
77d225d1fe Listen to correct block update
We now listen to neighborChanged instead of onNeighborChange. This means
computers correctly detect redstone updates.

However, this leads to issues when moving turtles, so we defer the block
update until the turtle has finished moving.
2017-05-01 16:08:27 +01:00
SquidDev
9b5f4a877c Fix null bounding box being returned
Its usage is not always checked for null, so it is safer to return a
full block.
2017-05-01 16:04:42 +01:00
SquidDev
34cb75dfc3 Fix various tile entities not syncing correctly
This ensures the tile state is sent and received when it changes. This
fixes turtles facing the wrong direction and computers not turning on.
2017-05-01 16:04:36 +01:00
Daniel Ratcliffe
b202b7b8a5 Converted tabs to spaces throughout 2017-05-01 15:48:44 +01:00
Daniel Ratcliffe
7d497f2835 ComputerCraft 1.80pr0
Updated the source code to the version shipped as the 1.80pr0 alpha
release. Also removed some unnecessary files from the LuaJ subfolder
which were bulking up the repository.
2017-05-01 14:51:26 +01:00
Daniel Ratcliffe
e85cdacbc5 ComputerCraft 1.79 initial upload
Added the complete source code to ComputerCraft 1.79 for Minecraft
1.8.9, plus newly written README and LICENSE files for the open source
release.
2017-05-01 14:32:39 +01:00