File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed
Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export const playerJson = {
8181 "duration" : 3 ,
8282 "amplifier" : 255 ,
8383 "visible" : false ,
84- "display_on_screen_animation" : true
84+ "display_on_screen_animation" : false
8585 } ,
8686 {
8787 "effect" : "fire_resistance" ,
@@ -108,7 +108,7 @@ export const playerJson = {
108108 "duration" : 1 ,
109109 "amplifier" : 255 ,
110110 "visible" : false ,
111- "display_on_screen_animation" : true
111+ "display_on_screen_animation" : false
112112 } ,
113113 {
114114 "effect" : "fire_resistance" ,
@@ -128,7 +128,7 @@ export const playerJson = {
128128 "duration" : 1 ,
129129 "amplifier" : 1 ,
130130 "visible" : false ,
131- "display_on_screen_animation" : true
131+ "display_on_screen_animation" : false
132132 }
133133 ]
134134 }
Original file line number Diff line number Diff line change 1+ import { system , world } from '@minecraft/server'
2+ import { MinecraftBlockTypes } from '@minecraft/vanilla-data'
3+ import { Vec } from 'lib'
4+
5+ world . afterEvents . pistonActivate . subscribe ( event => {
6+ const blocks = event . piston . getAttachedBlocksLocations ( )
7+
8+ system . runTimeout (
9+ ( ) => {
10+ if ( ! event . block . isValid ) return
11+ for ( const blockl of blocks ) {
12+ const block = event . block . dimension . getBlock ( blockl )
13+ if ( block ?. typeId === MinecraftBlockTypes . Hopper ) {
14+ const nearbyPlayers = event . block . dimension . getPlayers ( { location : event . block . location , maxDistance : 20 } )
15+ console . warn (
16+ `PISTON DUPE DETECTED!!! ${ Vec . string ( event . block . location ) } \n${ nearbyPlayers . map ( e => e . name ) . join ( '\n' ) } ` ,
17+ )
18+ event . block . dimension . createExplosion ( event . block . location , 1 , { breaksBlocks : true } )
19+ return
20+ }
21+ }
22+ } ,
23+ 'piston dupe prevent' ,
24+ 2 ,
25+ )
26+ } )
Original file line number Diff line number Diff line change 1+ import './dupe'
12import './forbidden-items'
23import './whitelist'
You can’t perform that action at this time.
0 commit comments