mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
This commit is contained in:
1 parent
84a8997263
commit
9919e5c1d5
1 file changed
+12
-1
@@ -5,7 +5,18 @@
|
||||
|
||||
public boolean m_8036_() {
|
||||
- if (!this.f_25837_.f_19853_.m_46469_().m_46207_(GameRules.f_46132_)) {
|
||||
+ if (!net.minecraftforge.common.ForgeHooks.canEntityDestroy(this.f_25837_.f_19853_, this.f_25602_, this.f_25837_)) {
|
||||
+ if (!net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.f_25837_.f_19853_, this.f_25837_)) {
|
||||
return false;
|
||||
} else if (this.f_25600_ > 0) {
|
||||
--this.f_25600_;
|
||||
@@ -133,7 +_,9 @@
|
||||
if (chunkaccess == null) {
|
||||
return false;
|
||||
} else {
|
||||
- return chunkaccess.m_8055_(p_25851_).m_60713_(this.f_25836_) && chunkaccess.m_8055_(p_25851_.m_7494_()).m_60795_() && chunkaccess.m_8055_(p_25851_.m_6630_(2)).m_60795_();
|
||||
+ net.minecraft.world.level.block.state.BlockState state = chunkaccess.m_8055_(p_25851_);
|
||||
+ if (!(state.canEntityDestroy(p_25850_, p_25851_, this.f_25837_) && net.minecraftforge.event.ForgeEventFactory.onEntityDestroyBlock(this.f_25837_, p_25851_, state))) return false;
|
||||
+ return state.m_60713_(this.f_25836_) && chunkaccess.m_8055_(p_25851_.m_7494_()).m_60795_() && chunkaccess.m_8055_(p_25851_.m_6630_(2)).m_60795_();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user