@@ -122,6 +122,7 @@ public void onInitialize() {
122122
123123 // 氧化过程
124124 ServerTickEvents .END_WORLD_TICK .register (world -> {
125+ RustTick .Judge_Rusty (world );
125126 if (RustConfig .useLegacyOxidizeLogic ()) {
126127 if (world .getTime () % 6000 == 0 ) { // 5min一次
127128 if (world instanceof ServerWorld serverWorld ) {
@@ -151,7 +152,8 @@ public void onInitialize() {
151152 }
152153 } else {
153154 // 新版氧化过程
154- if (RustTick .tick (world )) {
155+ if (RustTick .CanRusty ("item" )) {
156+ RustTick .Item_Can_Rusty = false ;
155157 // 新版物品氧化机制
156158 for (PlayerEntity player : world .getPlayers ()) {
157159 ItemReplace .OxidizationItemWithAttribute (player , 3 );
@@ -220,26 +222,5 @@ public void onInitialize() {
220222 }
221223 return ActionResult .PASS ;
222224 });
223- /*
224- UseEntityCallback.EVENT.register((player, world, hand, entity, hitResult) -> {
225- Rust.LOGGER.info(world.toString());
226- if (world.isClient) return ActionResult.PASS;
227- if (entity.getType() == EntityType.IRON_GOLEM) {
228- if (player.getStackInHand(hand).getItem() == Items.GUNPOWDER) {
229- //Rust.LOGGER.info("1");
230- return ActionResult.SUCCESS;
231- }
232- }
233-
234- StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
235- String caller = "";
236- for (int i = 1; i < Math.min(5, stackTrace.length); i++) {
237- caller += stackTrace[i].getMethodName() + " <-";
238- }
239- Rust.LOGGER.info("调用链:{}",caller);
240-
241- return ActionResult.PASS;
242- });
243- */
244225 }
245226}
0 commit comments