1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-27 23:53:21 +00:00
Commit Graph

80 Commits

Author SHA1 Message Date
SquidDev
4c0fa1fabe Track which player "owns" a turtle
When a player places a turtle, they are marked as its owner. Any actions
they perform (such as breaking blocks, moving, etc...) are performed
using this player's game profile.

This allows turtles to work correctly with various permissions mods.
Previously you would have to whitelist all turtles in order for them to
function within a claim.
2018-02-04 21:35:21 +00:00
SquidDev
0caa133089 Merge pull request #454 from SquidDev-CC/ComputerCraft/hotfix/lazy-computer-peripheral
[WIP] Only instantiate ServerComputer on tile ticks
2017-11-15 11:42:54 +00: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
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
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
35425f0f61 Update to 1.11.2 2017-07-25 21:08:51 +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
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
ebbdd29bd6 Merge pull request #243 from SquidDev-CC/feature/access-transformer
Replace reflection with access transformers
2017-05-16 19:25:10 +01: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
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
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
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
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
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
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
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
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
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
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
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
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