-
-
Notifications
You must be signed in to change notification settings - Fork 245
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
84 changed files
with
909 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
.../java/io/izzel/arclight/common/bridge/core/world/level/levelgen/StructureStartBridge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
package io.izzel.arclight.common.bridge.core.world.level.levelgen; | ||
|
||
import org.bukkit.craftbukkit.v.persistence.CraftPersistentDataContainer; | ||
import org.bukkit.event.world.AsyncStructureGenerateEvent; | ||
|
||
public interface StructureStartBridge { | ||
|
||
void bridge$setGenerateCause(AsyncStructureGenerateEvent.Cause cause); | ||
|
||
CraftPersistentDataContainer bridge$getPersistentDataContainer(); | ||
} |
5 changes: 5 additions & 0 deletions
5
arclight-common/src/main/java/io/izzel/arclight/common/bridge/inject/InjectEntityBridge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package io.izzel.arclight.common.bridge.inject; | ||
|
||
import io.izzel.arclight.common.bridge.core.entity.EntityBridge; | ||
import org.bukkit.craftbukkit.v.entity.CraftEntity; | ||
|
||
public interface InjectEntityBridge { | ||
|
||
default CraftEntity bridge$getBukkitEntity() { | ||
throw new IllegalStateException("Not implemented"); | ||
} | ||
|
||
default EntityBridge bridge() { | ||
return (EntityBridge) this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...ava/io/izzel/arclight/common/mixin/core/world/entity/ai/behavior/warden/DiggingMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.izzel.arclight.common.mixin.core.world.entity.ai.behavior.warden; | ||
|
||
import net.minecraft.server.level.ServerLevel; | ||
import net.minecraft.world.entity.ai.behavior.warden.Digging; | ||
import net.minecraft.world.entity.monster.warden.Warden; | ||
import org.bukkit.event.entity.EntityRemoveEvent; | ||
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(Digging.class) | ||
public class DiggingMixin<E extends Warden> { | ||
|
||
@Inject(method = "stop(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/world/entity/monster/warden/Warden;J)V", at = @At("HEAD")) | ||
private void arclight$despawn(ServerLevel serverLevel, E warden, long l, CallbackInfo ci) { | ||
warden.bridge().bridge$pushEntityRemoveCause(EntityRemoveEvent.Cause.DESPAWN); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.