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

Glass protection barrier rework #469

Merged
merged 48 commits into from
Jul 16, 2023
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d510d68
Add VersionSupport#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
c50bd82
Add isGlass & isProtectedByGlass to VersionSupport
IIHERO4 Mar 31, 2022
30de605
Change VersionSupport#calculateExplosionBlocks implementation
IIHERO4 Mar 31, 2022
d50eb4f
Implement v1_8_R3#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
8361c77
Implement v1_9_R2#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
83e29b7
Implement v1_10_R1#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
0ba8d9a
Implement v1_11_R1#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
4375304
Implement v1_12_R1#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
790c908
Implement v1_13_R2#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
f6204e4
Fix wrong behavior from locY in calculateExplosionBlocks
IIHERO4 Mar 31, 2022
fbb0d04
Implement v1_14_R1#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
742fd9a
Fix tnt breaking blocks under water @ 1.13
IIHERO4 Mar 31, 2022
ac1d90b
Fix locY @ 1.12
IIHERO4 Mar 31, 2022
532af31
Fix blocks under water getting exploded
IIHERO4 Mar 31, 2022
304640a
Fix comments
IIHERO4 Mar 31, 2022
c72ea36
Implement v1_15_R1#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
0d6d0dd
Implement v1_16_*#calculateExplosionBlocks
IIHERO4 Mar 31, 2022
9f4f558
Add exceptions for not implemented versions of calculateExplosionBlocks
IIHERO4 Mar 31, 2022
16efb1f
Change radius of explosion to float instead of int
IIHERO4 Mar 31, 2022
1d99189
Reimplement explosive-related events to use NMS/better detection
IIHERO4 Mar 31, 2022
5a85980
Fix location hashing rounding instead of flooring coords
IIHERO4 Mar 31, 2022
f9d3b68
Add function caching to the default callback of calculateExplosionBlocks
IIHERO4 Mar 31, 2022
add8f61
Add comment describing whatever this is
IIHERO4 Mar 31, 2022
382bc7d
Fix ExplosionPrimeEvent not being check correctly
IIHERO4 Mar 31, 2022
bea9047
Fix distances being calculated wrong in VersionSupport#isProtectedByG…
IIHERO4 Mar 31, 2022
dda7f0e
Add BlockRay for better ray tracing
IIHERO4 Apr 2, 2022
30d6ce9
Reimplement VersionSupport#isProtected and its events
IIHERO4 Apr 2, 2022
764f407
Fix typo
IIHERO4 Apr 2, 2022
5f8e026
Remove debug junk
IIHERO4 Apr 2, 2022
4b5cfeb
Add cache cleaning for BreakPlace
IIHERO4 Apr 2, 2022
434b9ab
test if block is placed in special cases
IIHERO4 Apr 3, 2022
6ab5211
Fix air being counted as a block
IIHERO4 Apr 3, 2022
9a8433a
Increase caching lifetime & change keys to Entity
IIHERO4 Apr 3, 2022
1ff561e
always manage explosions even if blockList is empty
IIHERO4 Apr 3, 2022
8f070b0
Fix imports
IIHERO4 Apr 3, 2022
ae8b51a
Fix inaccurate calculation of the delta vector in BlockRay
IIHERO4 Apr 12, 2022
c25afb7
Add the 3 missing components to BlockRay
IIHERO4 Apr 14, 2022
f8b879d
Merge branch 'andrei1058:master' into explosives-rework
IIHERO4 Apr 23, 2022
f5969a1
Merge remote-tracking branch 'origin/master' into explosives-rework
andrei1058 Jun 24, 2023
fd569bf
wip
andrei1058 Jun 24, 2023
1045c04
wip
andrei1058 Jun 24, 2023
e505da8
Merge remote-tracking branch 'origin/master' into explosives-rework
andrei1058 Jul 15, 2023
7e6dff4
implement explosion function
andrei1058 Jul 15, 2023
2a8b754
improvements and clean up
andrei1058 Jul 16, 2023
2e76e57
clean up
andrei1058 Jul 16, 2023
914a0a0
clean up
andrei1058 Jul 16, 2023
1b14665
clean up
andrei1058 Jul 16, 2023
0345d0f
fix typo
andrei1058 Jul 16, 2023
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 distances being calculated wrong in VersionSupport#isProtectedByG…
…lass
IIHERO4 authored Mar 31, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit bea90475827622c1c56f43af76a02353b5274224
Original file line number Diff line number Diff line change
@@ -168,7 +168,7 @@ public boolean isProtectedByGlass(Location pov, Block block) {
if (isGlass(block.getType()))
return true;

int distance = (int) pov.distance(block.getLocation());
int distance = (int) Math.ceil(pov.distance(block.getLocation()));
if (distance == 0) {
return isGlass(block.getType());
}