falling blocks can also tick
This commit is contained in:
1 parent
6c2ddd68db
commit
5bb959a853
4 files changed
+31
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetServer;
|
||||
import carpet.fakes.EntityInterface;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.FallingBlockEntity;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
@Mixin(FallingBlockEntity.class)
|
||||
public class FallingBlockEntity_scarpetEventsMixin
|
||||
{
|
||||
@Inject(method = "tick", at = @At("HEAD"))
|
||||
private void onTickCall(CallbackInfo ci)
|
||||
{
|
||||
if (((EntityInterface)this).getTickCallback() != null)
|
||||
{
|
||||
CarpetServer.scriptServer.events.onEntityTick(((EntityInterface)this).getTickCallback(), (Entity) (Object) this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user