Skip to content

Commit

Permalink
Prevent guardian crystals from being pushed by pistons
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon3055 committed Oct 23, 2023
1 parent 03e49b4 commit d5aa016
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Change Log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
######## 3.0.31.xxx ########
- Fix: Prevented guardian crystals from being pushed by pistons.

######## 3.0.30.529 ########
- Added energy link module. (Effectively wireless charging direct from an energy core)
- Fixed guardian damaging itself with its own projectiles.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import net.minecraft.world.level.Explosion;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BaseFireBlock;
import net.minecraft.world.level.material.PushReaction;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.network.NetworkHooks;
Expand Down Expand Up @@ -79,6 +80,11 @@ public void setManagerId(UUID managerId) {
this.managerId = managerId;
}

@Override
public PushReaction getPistonPushReaction() {
return PushReaction.IGNORE;
}

@Override
protected void defineSynchedData() {
this.getEntityData().define(BEAM_TARGET, Optional.empty());
Expand Down

0 comments on commit d5aa016

Please sign in to comment.