1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-14 20:20:30 +00:00
CC-Tweaked/projects
Jonathan Coates 672c2cf029
Limit turtle's reach distance in Item.use
When a turtle attempts to place a block, it does so by searching for
nearby blocks and attempting to place the item against that block.

This has slightly strange behaviour when working with "placable"
non-block items though (such as buckets or boats). In this case, we call
Item.use, which doesn't take in the position of the block we're placing
against. Instead these items do their own ray trace, using the default
reach distance.

If the block we're trying to place against is non-solid, the ray trace
will go straight through it and continue (up to the maximum of 5
blocks), allowing placing the item much further away.

Our fix here is to override the default reach distance of our fake
players, limiting it to 2. This is easy on Forge (it has built-in
support), and requires a mixin on Fabric.

Closes #1497.
2023-06-24 17:09:34 +01:00
..
common Limit turtle's reach distance in Item.use 2023-06-24 17:09:34 +01:00
common-api Allow extending UpgradeDataProvider 2023-06-15 18:57:25 +01:00
core Update lua.lua require logic. 2023-06-20 23:33:53 +02:00
core-api Support arguments being coerced from strings 2023-05-20 18:54:22 +01:00
fabric Limit turtle's reach distance in Item.use 2023-06-24 17:09:34 +01:00
fabric-api Publish Fabric jars to CF/Modrinth 2023-03-15 23:20:13 +00:00
forge Limit turtle's reach distance in Item.use 2023-06-24 17:09:34 +01:00
forge-api License CC:T according to the REUSE specification (#1351) 2023-03-15 21:52:13 +00:00
lints License CC:T according to the REUSE specification (#1351) 2023-03-15 21:52:13 +00:00
web Re-license several more files under MPL-2.0 2023-03-28 10:28:59 +01:00
ARCHITECTURE.md License CC:T according to the REUSE specification (#1351) 2023-03-15 21:52:13 +00:00