Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smooth Pistons #1542

Merged
merged 147 commits into from
Sep 10, 2021
Merged
Changes from 1 commit
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
7fbb784
Add PistonBlockEntity and cache it
davchoo Nov 11, 2020
692fe98
Merge branch 'master' into smoothpistons
davchoo Nov 13, 2020
b532795
Move blocks smoothly
davchoo Nov 13, 2020
746b504
Edit comments & add additional checks for adjacent blocks
davchoo Nov 13, 2020
3af2c3e
Fix phantom piston heads and sticky block handling
davchoo Nov 14, 2020
f3ab643
Fix buggy moving pistons
davchoo Nov 15, 2020
7764b4d
Add check for sticky pistons when pulling
davchoo Nov 15, 2020
a88ca41
Change default piston behavior to normal
davchoo Nov 15, 2020
86d6c1e
Merge branch 'master' into smoothpistons
davchoo Nov 17, 2020
452b3a9
Changes for 1.16.100
davchoo Nov 17, 2020
4608eed
Merge branch 'master' into smoothpistons
davchoo Nov 20, 2020
4d04a72
Merge branch 'master' into smoothpistons
davchoo Nov 21, 2020
a8b53fe
Update mappings
davchoo Nov 21, 2020
b6b7daa
Merge branch 'master' into smoothpistons
davchoo Nov 23, 2020
acfee3f
Add collision helper functions
davchoo Nov 23, 2020
3c38e7b
Somewhat fix pistons pushing players
davchoo Nov 23, 2020
397bd54
Send SetEntityMotion Packet to launch players on Slime blocks
davchoo Nov 24, 2020
b41757d
Check collision with piston head + send corrected pos to server
davchoo Nov 25, 2020
e97dbc5
Shrink player collision slightly
davchoo Nov 25, 2020
7b6a6ce
Only call collisionManager.correctPlayerPosition once
davchoo Nov 26, 2020
30386ba
Use runtime ids to check for slime and honey blocks
davchoo Nov 26, 2020
e681e60
Add movement for standing on honey blocks
davchoo Nov 26, 2020
1f2dde9
Hopefully fix out of bounds exception
davchoo Nov 28, 2020
df7ff2b
Move PISTON_HEADS to BlockStateValues
davchoo Dec 2, 2020
e28cc5b
Improve pistons pushing players some more
davchoo Dec 5, 2020
d2fa729
Merge branch 'master' into smoothpistons2
davchoo Dec 9, 2020
870f4a4
Remove fixDirection
davchoo Dec 9, 2020
24c2ae5
Fix timing
davchoo Dec 9, 2020
2a0d6f8
Clean up and fix pushing destroyed blocks
davchoo Dec 9, 2020
f9da532
Launch players only on the pushing side of slime
davchoo Dec 10, 2020
3d273cf
Improve player pushing and launching
davchoo Dec 12, 2020
d12396a
Fix motion check
davchoo Dec 12, 2020
1166a7d
Add honey check and add some comments
davchoo Dec 13, 2020
23c4ce5
Merge branch 'master' into smoothpistons
davchoo Dec 13, 2020
2bf80c0
Cancel movement when colliding with movingBlock
davchoo Dec 19, 2020
a81e7b0
Prevent piston from moving block entities
davchoo Dec 19, 2020
e76cd27
Merge branch 'master' into smoothpistons
davchoo Dec 28, 2020
99c2de7
Modify collision detection
davchoo Dec 28, 2020
3d49ba0
Improve slime block launching and block pushing players
davchoo Dec 29, 2020
efcbb18
Make pistons move smoothly
davchoo Dec 31, 2020
c22217a
Merge branch 'master' into smoothpistons
davchoo Dec 31, 2020
8e7a35d
Merge branch 'master' into smoothpistons
davchoo Jan 1, 2021
2b28f43
Update copyright
davchoo Jan 1, 2021
57a8c5d
Merge branch 'master' into smoothpistons
davchoo Jan 6, 2021
4e1eb3e
Use tick thread
davchoo Jan 6, 2021
fe08cfe
Merge branch 'master' into smoothpistons
davchoo Jan 9, 2021
8335b46
Fix most Java teleports when being pushed horizontally
davchoo Jan 9, 2021
6b7007c
Clean up and update mappings
davchoo Jan 10, 2021
06e56d2
Use translate on player bounding box and move code around
davchoo Jan 13, 2021
116afac
Add Direction enum
davchoo Jan 16, 2021
539c203
Calculate intersection like Java
davchoo Jan 20, 2021
421cbc5
Add missing intersection check
davchoo Jan 21, 2021
a7d839e
Semi working movement correction
davchoo Jan 21, 2021
37bce59
Fix movement correction issues?
davchoo Jan 21, 2021
0fba9e0
Merge branch 'master' into smoothpistons
davchoo Jan 21, 2021
ba3bbfb
Clean up and hopeful another correction issue
davchoo Jan 21, 2021
2f0bf02
Fix players being pushed too far
davchoo Jan 22, 2021
d40df5e
Stop canceling movement and send corrected movement to Bedrock
davchoo Jan 23, 2021
58ba25f
Possibly fix vertical slime launching
davchoo Jan 23, 2021
77ed259
Prevent players from being launched by covered slime blocks
davchoo Jan 23, 2021
e67993b
Remove unneeded code
davchoo Jan 23, 2021
8765575
Fix pistons moving more than 12 blocks and remove unneeded updateBlock
davchoo Jan 24, 2021
0437c12
Hopefully prevent NPEs + Minor clean up
davchoo Jan 25, 2021
a29c7bc
Fix animation & flickering for 0 tick pistons
davchoo Jan 26, 2021
36d666c
Fixing more movement correction problems
davchoo Jan 26, 2021
5e4a4a3
Merge branch 'master' into smoothpistons
davchoo Feb 7, 2021
396af0b
Merge branch 'master' into smoothpistons
davchoo Feb 21, 2021
9892c0d
Add missing import from merge
davchoo Feb 21, 2021
9e5b6f8
Merge branch 'master' into smoothpistons
davchoo Mar 10, 2021
4b37b23
Merge branch 'master' into pistonbehavior
davchoo Apr 2, 2021
fcbf537
Redo movement corrections (breaks stuff)
davchoo Apr 5, 2021
f238734
Improve slime block launching
davchoo Apr 6, 2021
da9555b
Merge branch 'master' into pistonbehavior
davchoo Apr 6, 2021
b99640c
Fix movement correction with piston head
davchoo Apr 6, 2021
30a00af
Add step up movement check
davchoo Apr 7, 2021
7d37c65
Check against world collisions when pistons push players
davchoo Apr 7, 2021
8d1478c
Merge branch 'master' into smoothpistons
davchoo May 5, 2021
d4d97f0
Move piston behavior and hasBlockEntity to BlockMapping
davchoo May 5, 2021
eb0f190
Don't send movement to Java from PistonCache
davchoo May 10, 2021
9fc3c02
Merge branch 'master' into smoothpistons
davchoo May 12, 2021
b487ec7
Remove unneeded code
davchoo May 13, 2021
a95a7ca
Add moving block map to reduce collision checks
davchoo May 13, 2021
e53d61a
Move collision methods to CollisionManager
davchoo May 16, 2021
d859944
Improve collision checks with moving blocks
davchoo May 16, 2021
c66f241
Merge branch 'master' into smoothpistons
davchoo May 16, 2021
f75d835
Merge branch 'master' into smoothpistons
davchoo May 29, 2021
d43d05a
Improve slime block launching?
davchoo May 29, 2021
80c5cf2
Clean up
davchoo May 31, 2021
d4f1522
Merge branch 'master' into smoothpistons
davchoo Jun 9, 2021
19786e3
Update mappings and fix compiling
davchoo Jun 10, 2021
baa28b0
Turns out this was a bad idea
davchoo Jun 11, 2021
57fb296
Cancel movement on honey blocks and more changes to slime blocks
davchoo Jun 11, 2021
d744058
Wait 5 ticks for collisions to be resolved before cleaning up a piston
davchoo Jun 16, 2021
d281d26
Merge branch 'master' into smoothpistons
davchoo Jun 16, 2021
abfc02e
Check for player collisions during setAction
davchoo Jun 17, 2021
df96507
Edit comments
davchoo Jun 17, 2021
d365592
Fix crawling and sneaking when being compressed by a piston
davchoo Jun 17, 2021
a1d4514
Revert crawling fix because it broke slime blocks
davchoo Jun 18, 2021
dbc47b9
Merge branch 'master' into smoothpistons
davchoo Jun 19, 2021
0c83d2c
Prevent players from falling off of moving blocks
davchoo Jun 26, 2021
f78da0a
Properly use synchronization?
davchoo Jun 26, 2021
13dbd7f
Fix a block de-sync problem
davchoo Jun 26, 2021
07d9221
Merge branch 'master' into smoothpistons
davchoo Jun 29, 2021
498cf4d
Temporarily disable GeyserSpigotWorldManager until I find a better so…
davchoo Jul 6, 2021
230190d
Merge branch 'master' into smoothpistons
davchoo Jul 6, 2021
7fa6bc1
Remove unneeded calls to correctPlayerMovement and correctPlayerPosition
davchoo Jul 9, 2021
17f0c0a
Move various block checks to BlockStateValues
davchoo Jul 9, 2021
697e1f6
Merge branch 'master' into smoothpistons
davchoo Jul 13, 2021
637279a
Changes for new registry system
davchoo Jul 13, 2021
180b5f8
Merge branch 'master' into smoothpistons
davchoo Aug 2, 2021
6403987
Add position offset to BlockCollision
davchoo Aug 2, 2021
1fe540b
Update mappings and hope that everything still works
davchoo Aug 2, 2021
beea8fd
NPE
davchoo Aug 2, 2021
35bbccb
Merge remote-tracking branch 'upstream/master' into smoothpistons
davchoo Aug 3, 2021
9c85155
Change BlockMapping.pistonBehavior to use an enum and fix regressions
davchoo Aug 3, 2021
a749d4b
Enable movingblocks
davchoo Aug 4, 2021
050f0fa
Merge branch 'master' into smoothpistons
davchoo Aug 17, 2021
6184069
No more synchronization!!!
davchoo Aug 17, 2021
322288f
Fix stuff from review
davchoo Aug 18, 2021
272562f
Merge branch 'master' into smoothpistons
davchoo Aug 18, 2021
b55bb8a
Fix more stuff from review
davchoo Aug 19, 2021
366ccd8
Reset position & position offset
davchoo Aug 19, 2021
55b43be
Fix stair position corrections?
davchoo Aug 19, 2021
40303e1
Move isValidMove check to before adjustBedrockPosition is called
davchoo Aug 19, 2021
fcf7d14
Improve movement on slime blocks and honey blocks?
davchoo Aug 20, 2021
c0fb654
Disable player piston movement checks when there is no moving pistons
davchoo Aug 21, 2021
c6ff755
Use Bukkit events for finding piston attached blocks
Camotoy Aug 22, 2021
69217cd
Add some comments
Camotoy Aug 22, 2021
0a24dc3
1.12 compatibility
Camotoy Aug 22, 2021
48e5d18
Extend collidable blocks volume and use IntSet for isPistonHead
davchoo Aug 23, 2021
1963233
Fix moving_piston check
davchoo Aug 23, 2021
798474b
Fix pushing players in compost bins!
davchoo Aug 23, 2021
6fc4dc6
Remove unnecessary offset for movingBlockMap
davchoo Aug 23, 2021
15603ef
Fix moving_block in front of pistons
davchoo Aug 23, 2021
0f4a522
Place pistonArmCollision + minor changes
davchoo Aug 24, 2021
0f39917
Attempt to clean up code
davchoo Aug 24, 2021
478f476
Merge branch 'master' into smoothpistons
davchoo Aug 25, 2021
69aa80c
Merge branch 'master' into smoothpistons
davchoo Sep 3, 2021
ddf339c
Merge remote-tracking branch 'camotoy/smoothpistons' into smoothpistons
davchoo Sep 3, 2021
aeec2e1
Fix ghost blocks on Spigot and move some code
davchoo Sep 4, 2021
3ddf2dc
Fix empty retracting sticky pistons on Spigot
davchoo Sep 4, 2021
1c0806f
Fix stuff from review
davchoo Sep 4, 2021
aaa4914
Run attached blocks calculations just once
Camotoy Sep 4, 2021
d8644cb
Add distance check for Spigot piston event
davchoo Sep 5, 2021
affcd5f
Fix stuff from review
davchoo Sep 6, 2021
abcda69
Fix more stuff from review
davchoo Sep 7, 2021
6da9de6
Fix block duplication
davchoo Sep 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix moving_piston check
  • Loading branch information
davchoo committed Aug 23, 2021
commit 1963233f7c790bf4e0ba1da81e2475cfbd493f51
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,12 @@ public static void storeBlockStateValues(String javaId, int javaBlockState, Json
}

if (javaId.contains("piston[")) {
// True if extended, false if not
PISTON_VALUES.put(javaBlockState, javaId.contains("extended=true"));
IS_STICKY_PISTON.put(javaBlockState, javaId.contains("sticky"));
if (javaId.startsWith("minecraft:moving_piston")) {
MOVING_PISTONS.add(javaBlockState);
} else {
PISTON_VALUES.put(javaBlockState, javaId.contains("extended=true"));
IS_STICKY_PISTON.put(javaBlockState, javaId.contains("sticky"));
}
return;
} else if (javaId.startsWith("minecraft:piston_head")) {
ALL_PISTON_HEADS.add(javaBlockState);
Expand All @@ -147,8 +150,6 @@ public static void storeBlockStateValues(String javaId, int javaBlockState, Json
PISTON_HEADS.put(Direction.EAST, javaBlockState);
}
}
} else if (javaId.startsWith("minecraft:moving_piston")) {
MOVING_PISTONS.add(javaBlockState);
return;
}

Expand Down