Skip to content

Commit

Permalink
fix: type checking on forge event
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelHillcox committed Feb 3, 2023
1 parent d20d2a1 commit 1fd5934
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ classes/
.metadata
.vscode
.settings
*.launch
*.launch
.DS_Store
11 changes: 3 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
# Accelerated Decay Changelog

## [0.1.2]
## [0.1.3]

### Removed

- Requirement for Architectury have been removed. This mod no longer requires `Architectury` to be installed to the server or client

### Changed

- Updated Forge & Fabric dependencies
### Fixed

- Added protection around clients being able to call server events
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public AcceleratedDecayForge() {

@SubscribeEvent
void onBreakEvent(BlockEvent.BreakEvent event) {
AcceleratedDecay.breakEvent((Level) event.getWorld(), event.getState(), event.getPos(), (ServerPlayer) event.getPlayer());
if (event.getPlayer() instanceof ServerPlayer player) {
AcceleratedDecay.breakEvent((Level) event.getWorld(), event.getState(), event.getPos(), player);
}
}

@SubscribeEvent
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ minecraft_version=1.18.2
enabled_platforms=fabric,forge

archives_base_name=accelerated-decay
mod_version=0.1.2
mod_version=0.1.3
maven_group=pro.mikey.mods

architectury_version=4.10.88
Expand Down

0 comments on commit 1fd5934

Please sign in to comment.