Skip to content

Commit

Permalink
No random ticks in game
Browse files Browse the repository at this point in the history
  • Loading branch information
ellieisjelly committed Jan 29, 2024
1 parent d0ec0d8 commit f0b0f2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
import xyz.nucleoid.plasmid.game.player.PlayerSet;
import xyz.nucleoid.plasmid.game.rule.GameRuleType;
import xyz.nucleoid.plasmid.util.PlayerRef;
import xyz.nucleoid.stimuli.event.block.BlockRandomTickEvent;
import xyz.nucleoid.stimuli.event.player.PlayerDeathEvent;
import xyz.nucleoid.stimuli.event.player.ReplacePlayerChatEvent;

Expand Down Expand Up @@ -475,6 +476,7 @@ public static void Open(GameSpace gameSpace, ServerWorld world, SabotageMap map,
activity.listen(GamePlayerEvents.REMOVE, game::onPlayerRemove);
activity.listen(GamePlayerEvents.OFFER, game::onOffer);
activity.listen(GameActivityEvents.DESTROY, game::onDestroy);
activity.listen(BlockRandomTickEvent.EVENT, (_block, _pos, _state) -> ActionResult.FAIL);
map.setWorld(world);
map.generateChests();
PlayerSet plrs = game.gameSpace.getPlayers();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.ActionResult;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.GameMode;
import xyz.nucleoid.fantasy.RuntimeWorldConfig;
Expand All @@ -19,6 +20,7 @@
import xyz.nucleoid.plasmid.game.player.PlayerOffer;
import xyz.nucleoid.plasmid.game.player.PlayerOfferResult;
import xyz.nucleoid.plasmid.game.rule.GameRuleType;
import xyz.nucleoid.stimuli.event.block.BlockRandomTickEvent;

public class SabotageWaiting {
private final SabotageConfig config;
Expand Down Expand Up @@ -63,6 +65,7 @@ public static GameOpenProcedure Open(GameOpenContext<SabotageConfig> context) {
rules(activity);
activity.listen(GamePlayerEvents.OFFER, game::onOffer);
activity.listen(GameActivityEvents.REQUEST_START, game::requestStart);
activity.listen(BlockRandomTickEvent.EVENT, (_block, _pos, _state) -> ActionResult.FAIL);
});
}

Expand Down

0 comments on commit f0b0f2c

Please sign in to comment.