aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PotatoGuard.bbmodel2
-rw-r--r--src/client/resources/assets/potato-crime/textures/entity/potato_guard.pngbin385 -> 3863 bytes
-rw-r--r--src/client/resources/assets/potato-crime/textures/entity/potato_guard.png~bin0 -> 385 bytes
-rw-r--r--src/main/generated/assets/potato-crime/lang/en_us.json1
-rw-r--r--src/main/generated/data/potato-crime/advancements/recipes/tools/contraband.json11
-rw-r--r--src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java20
-rw-r--r--src/main/kotlin/moe/nea/potatocrime/PotatoCrime.kt56
-rw-r--r--src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt8
-rw-r--r--src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt14
-rw-r--r--src/main/kotlin/moe/nea/potatocrime/registry/PotatoTranslations.kt1
-rw-r--r--src/main/resources/potato-crime.mixins.json19
11 files changed, 97 insertions, 35 deletions
diff --git a/PotatoGuard.bbmodel b/PotatoGuard.bbmodel
index d444dd3..a9f8af8 100644
--- a/PotatoGuard.bbmodel
+++ b/PotatoGuard.bbmodel
@@ -1 +1 @@
-{"meta":{"format_version":"4.9","model_format":"modded_entity","box_uv":true},"name":"PotatoGuard","model_identifier":"PotatoGuard","modded_entity_version":"1.17","modded_entity_flip_y":true,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"timeline_setups":[],"unhandled_root_fields":{},"resolution":{"width":128,"height":128},"elements":[{"name":"Bottom","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[-7,24,-7],"to":[7,45,7],"autouv":0,"color":0,"origin":[0,11,0],"uv_offset":[0,37],"faces":{"north":{"uv":[14,51,28,72],"texture":0},"east":{"uv":[0,51,14,72],"texture":0},"south":{"uv":[42,51,56,72],"texture":0},"west":{"uv":[28,51,42,72],"texture":0},"up":{"uv":[28,51,14,37],"texture":0},"down":{"uv":[42,37,28,51],"texture":0}},"type":"cube","uuid":"0f55f4a3-0d72-5c6d-982e-684ce663c320"},{"name":"Middle","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[-8,2,-8],"to":[8,23,8],"autouv":0,"color":0,"origin":[0,11,0],"faces":{"north":{"uv":[16,16,32,37],"texture":0},"east":{"uv":[0,16,16,37],"texture":0},"south":{"uv":[48,16,64,37],"texture":0},"west":{"uv":[32,16,48,37],"texture":0},"up":{"uv":[32,16,16,0],"texture":0},"down":{"uv":[48,0,32,16],"texture":0}},"type":"cube","uuid":"24f11f33-7c43-7252-45b8-1ee95e8b8cd2"},{"name":"Head","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[-4,46,-4],"to":[4,59,4],"autouv":0,"color":0,"origin":[0,54.5,0],"uv_offset":[56,29],"faces":{"north":{"uv":[64,37,72,50],"texture":0},"east":{"uv":[56,37,64,50],"texture":0},"south":{"uv":[80,37,88,50],"texture":0},"west":{"uv":[72,37,80,50],"texture":0},"up":{"uv":[72,37,64,29],"texture":0},"down":{"uv":[80,29,72,37],"texture":0}},"type":"cube","uuid":"4b524bf5-e2c0-3deb-49ed-5f0ca886e2bd"}],"outliner":[{"name":"PotatoGuard","origin":[0,23.5,0],"color":0,"uuid":"c81dfe05-4f02-f636-f659-d539b5f26ebe","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["0f55f4a3-0d72-5c6d-982e-684ce663c320","24f11f33-7c43-7252-45b8-1ee95e8b8cd2"]},{"name":"PotatoHead","origin":[0,52.5,0],"color":0,"uuid":"055e3b4f-4b0e-77e2-9db5-c5bc30945efd","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["4b524bf5-e2c0-3deb-49ed-5f0ca886e2bd"]}],"textures":[{"path":"/home/nea/src/potato-crime/potato guard.png","name":"potato guard.png","folder":"block","namespace":"","id":"0","width":128,"height":128,"uv_width":128,"uv_height":128,"particle":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":true,"uuid":"3fc7db74-a9df-c21d-dcb8-2ef89d2fab22","relative_path":"../potato guard.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAANpSURBVHhe7ZzBTsNQEANbwf9/MQh66AFBqdK3Jmaa6YlDnteyJxskQs+n4eft4/QxlBgdfz2fziOBgx8ehycAbIIEgN3f2L0AjCNkCwgAu7+xewEYR8gWEAB2f2P3AjCOkC0gAOz+xu4FYBwhW0AA2P2N3QvAOEK2gACw+xu7F4BxhGwBAWD3N3YvAOMI2QLn9p9z2/Ed/X0CATj4CyUCIADdV7p8BHQTcAO4AdwA3XuwO90N4AZwA3Tvwe50N4AbwA3QvQe7090AbgA3QPce7E53A7gBjr0Bpvcf/Y9Jh98AAlD+9+5pAe3zboB2A+X5AlAuoD1eANoNlOcLQLmA9ngBaDdQno8HYDW/vV8mXQ16b5/f81z1vdrLo+eWXwvfO9jVIPf2KQCPIrjxegHYGNSDl7kBroG9XJJ4v37j4defH8zzx+Wr4E7nbj0vAFuTWrxOABaDSz1L/R3gfgFugBCgv8m4AUIBrwbpBnAD+GXWdxjwERDaUD4C/mmQWx4Bl8fLzc/l7Piz+ugaD94o4AbYGNTqZQKwmty3c6tBbtkAIYs3ZVZ9/6Wnr9pPvwH2CpI65+lfCv3vd2AbHAFoN1CeLwDlAtrjBaDdQHm+AJQLaI8XgHYD5fkCUC6gPV4A2g2U5wtAuYD2eAFoN1CeLwDlAtrjBaDdQHm+AJQLaI8XgHYD5fkCUC6gPV4A2g2U5wtAuYD2eAFoN1CeLwDlAtrjBaDdQHm+AJQLaI9ffiu4bdz5mQQEIJMjVkUAsNVljAtAJkesigBgq8sYF4BMjlgVAcBWlzEuAJkcsSoCgK0uY1wAMjliVQQAW13GuABkcsSqCAC2uoxxAcjkiFURAGx1GeMCkMkRqyIA2OoyxgUgkyNWRQCw1WWMC0AmR6yKAGCryxgXgEyOWBUBwFaXMS4AmRyxKgKArS5jXAAyOWJVBABbXca4AGRyxKoIALa6jHEByOSIVREAbHUZ4wKQyRGrIgDY6jLGBSCTI1ZFALDVZYwLQCZHrIoAYKvLGBeATI5YFQHAVpcxLgCZHLEqAoCtLmNcADI5YlUEAFtdxrgAZHLEqggAtrqMcQHI5IhVEQBsdRnjApDJEasiANjqMsYFIJMjVkUAsNVljAtAJkesigBgq8sYF4BMjlgVAcBWlzEuAJkcsSqf7n8FkBXKfiQAAAAASUVORK5CYII="}],"fabricOptions":{"header":"package com.example.mod;","entity":"Entity","render":"","members":""}} \ No newline at end of file
+{"meta":{"format_version":"4.9","model_format":"modded_entity","box_uv":true},"name":"PotatoGuard","model_identifier":"PotatoGuard","modded_entity_version":"1.17","modded_entity_flip_y":true,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"timeline_setups":[],"unhandled_root_fields":{},"resolution":{"width":128,"height":128},"elements":[{"name":"Bottom","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[-7,24,-7],"to":[7,45,7],"autouv":0,"color":0,"origin":[0,11,0],"uv_offset":[0,37],"faces":{"north":{"uv":[14,51,28,72],"texture":1},"east":{"uv":[0,51,14,72],"texture":1},"south":{"uv":[42,51,56,72],"texture":1},"west":{"uv":[28,51,42,72],"texture":1},"up":{"uv":[28,51,14,37],"texture":1},"down":{"uv":[42,37,28,51],"texture":1}},"type":"cube","uuid":"0f55f4a3-0d72-5c6d-982e-684ce663c320"},{"name":"Middle","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[-8,2,-8],"to":[8,23,8],"autouv":0,"color":0,"visibility":false,"origin":[0,11,0],"faces":{"north":{"uv":[16,16,32,37],"texture":1},"east":{"uv":[0,16,16,37],"texture":1},"south":{"uv":[48,16,64,37],"texture":1},"west":{"uv":[32,16,48,37],"texture":1},"up":{"uv":[32,16,16,0],"texture":1},"down":{"uv":[48,0,32,16],"texture":1}},"type":"cube","uuid":"24f11f33-7c43-7252-45b8-1ee95e8b8cd2"},{"name":"Head","box_uv":true,"rescale":false,"locked":false,"render_order":"default","allow_mirror_modeling":true,"from":[-4,46,-4],"to":[4,59,4],"autouv":0,"color":0,"visibility":false,"origin":[0,54.5,0],"uv_offset":[56,29],"faces":{"north":{"uv":[64,37,72,50],"texture":1},"east":{"uv":[56,37,64,50],"texture":1},"south":{"uv":[80,37,88,50],"texture":1},"west":{"uv":[72,37,80,50],"texture":1},"up":{"uv":[72,37,64,29],"texture":1},"down":{"uv":[80,29,72,37],"texture":1}},"type":"cube","uuid":"4b524bf5-e2c0-3deb-49ed-5f0ca886e2bd"}],"outliner":[{"name":"PotatoGuard","origin":[0,23.5,0],"color":0,"uuid":"c81dfe05-4f02-f636-f659-d539b5f26ebe","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["0f55f4a3-0d72-5c6d-982e-684ce663c320","24f11f33-7c43-7252-45b8-1ee95e8b8cd2"]},{"name":"PotatoHead","origin":[0,52.5,0],"color":0,"uuid":"055e3b4f-4b0e-77e2-9db5-c5bc30945efd","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"children":["4b524bf5-e2c0-3deb-49ed-5f0ca886e2bd"]}],"textures":[{"path":"/home/nea/src/potato-crime/potato guard.png","name":"potato guard.png","folder":"block","namespace":"","id":"0","width":128,"height":128,"uv_width":128,"uv_height":128,"particle":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":true,"uuid":"3fc7db74-a9df-c21d-dcb8-2ef89d2fab22","relative_path":"../potato guard.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAA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wLQCZHrIoAYKvLGBeATI5YFQHAVpcxLgCZHLEqAoCtLmNcADI5YlUEAFtdxrgAZHLEqggAtrqMcQHI5IhVEQBsdRnjApDJEasiANjqMsYFIJMjVkUAsNVljAtAJkesigBgq8sYF4BMjlgVAcBWlzEuAJkcsSqf7n8FkBXKfiQAAAAASUVORK5CYII="},{"path":"/home/nea/src/potato-crime/src/client/resources/assets/potato-crime/textures/entity/potato_guard.png","name":"potato_guard.png","folder":"","namespace":"","id":"1","width":128,"height":128,"uv_width":128,"uv_height":128,"particle":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":true,"uuid":"2d579c71-d1bd-5053-e75a-e1edf5c62333","relative_path":"../src/client/resources/assets/potato-crime/textures/entity/potato_guard.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAA6VSURBVHhe7V19iF1XET9PaxGx2pjY0hRjbItYpamt+LVqKrGgglIrJP/4vbCRiEJBQ8Xav9oUJQoFpaKxsVgKkgWrCCqiwVaqlYLWBEVLCUmhDalJU1spgjRPfzfMdd7szDlzbvLWt3vm/rP77sd598z8znzPeaM08PjO1jS+Zuv16fzz1/QjPP30yf7/kyeOdf/fc9fv0hUbxumFl2xKrzjvgvT6157Xncf1NWsv7P8/sP+3S96Exn/5BZd114488tDE+H8+/M/u88O/Ppi+8fvxaOBUmn5sENHA/E1b5tJrLn1dIub848lHkwTA/gPnpHXH7085oNy3eG/PAIDknW+6tAMHgPORT749HT3xkjT3lg392H955Nl00drnUjD/7OB2MAA8q/P5QwdSDihgviUZvvn1H3WSgx8YCweYj1WPI1b+mQFhEAA+99bRWK5OvpL5K1lAwf2aZLAkAiTB3//0y3TwsdESYGxfTIPmcWakWx1PDyIcAPDGd1+RsMLp4OIb+hzMxSrWxDiYrEmGH+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GicAo1PPyRAAKBxCjQ+/ZAAAYDGKdD49EMCBAAap0Dj0w8JEABonAKNTz8kQACgcQo0Pv2QAAGAxinQ+PRDAgQAGqdA49MPCRAAaJwCjU8/JEAAoHEKND79kAABgMYp0Pj0QwIEABqnQOPTDwnQOAD+A8SPmo+lWeGbAAAAAElFTkSuQmCC"}],"fabricOptions":{"header":"package com.example.mod;","entity":"Entity","render":"","members":""}} \ No newline at end of file
diff --git a/src/client/resources/assets/potato-crime/textures/entity/potato_guard.png b/src/client/resources/assets/potato-crime/textures/entity/potato_guard.png
index 3cfa2f1..2f1b612 100644
--- a/src/client/resources/assets/potato-crime/textures/entity/potato_guard.png
+++ b/src/client/resources/assets/potato-crime/textures/entity/potato_guard.png
Binary files differ
diff --git a/src/client/resources/assets/potato-crime/textures/entity/potato_guard.png~ b/src/client/resources/assets/potato-crime/textures/entity/potato_guard.png~
new file mode 100644
index 0000000..3cfa2f1
--- /dev/null
+++ b/src/client/resources/assets/potato-crime/textures/entity/potato_guard.png~
Binary files differ
diff --git a/src/main/generated/assets/potato-crime/lang/en_us.json b/src/main/generated/assets/potato-crime/lang/en_us.json
index 7a5c3e9..a032f14 100644
--- a/src/main/generated/assets/potato-crime/lang/en_us.json
+++ b/src/main/generated/assets/potato-crime/lang/en_us.json
@@ -1,6 +1,7 @@
{
"entity.potato-crime.potato_guard": "Potato Guard",
"item.potato-crime.contraband": "Contraband",
+ "potato-crime.text.arrest": "You broke the law by bringing carrots into those holy land!",
"potato-crime.text.fill-level": "Hidden carrots: %s/1000.",
"potato-crime.text.item-group": "Potato Crimes",
"potato-crime.text.no-carrots": "No carrots to deposit."
diff --git a/src/main/generated/data/potato-crime/advancements/recipes/tools/contraband.json b/src/main/generated/data/potato-crime/advancements/recipes/tools/contraband.json
index c13496b..40a2c20 100644
--- a/src/main/generated/data/potato-crime/advancements/recipes/tools/contraband.json
+++ b/src/main/generated/data/potato-crime/advancements/recipes/tools/contraband.json
@@ -11,16 +11,6 @@
},
"trigger": "minecraft:inventory_changed"
},
- "has_paper": {
- "conditions": {
- "items": [
- {
- "items": "minecraft:paper"
- }
- ]
- },
- "trigger": "minecraft:inventory_changed"
- },
"has_the_recipe": {
"conditions": {
"recipe": "potato-crime:contraband"
@@ -31,7 +21,6 @@
"requirements": [
[
"has_the_recipe",
- "has_paper",
"has_carrot"
]
],
diff --git a/src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java b/src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java
new file mode 100644
index 0000000..7d41687
--- /dev/null
+++ b/src/main/java/moe/nea/potatocrime/mixin/OnEnterPotatoWorldPatch.java
@@ -0,0 +1,20 @@
+package moe.nea.potatocrime.mixin;
+
+import moe.nea.potatocrime.events.OnEnterPotatoWorld;
+import net.minecraft.entity.Entity;
+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(Entity.class)
+public class OnEnterPotatoWorldPatch {
+ @Inject(method = "tickPortal", at = @At(
+ value = "INVOKE",
+ target = "Lnet/minecraft/entity/Entity;moveToWorld(Lnet/minecraft/server/world/ServerWorld;Z)Lnet/minecraft/entity/Entity;",
+ shift = At.Shift.AFTER
+ ))
+ private void onMoveToWorld(CallbackInfo ci) {
+ OnEnterPotatoWorld.Companion.getEVENT().invoker().onEnterPotatoWorld((Entity) (Object) this);
+ }
+}
diff --git a/src/main/kotlin/moe/nea/potatocrime/PotatoCrime.kt b/src/main/kotlin/moe/nea/potatocrime/PotatoCrime.kt
index 5d0cddc..b6ac78d 100644
--- a/src/main/kotlin/moe/nea/potatocrime/PotatoCrime.kt
+++ b/src/main/kotlin/moe/nea/potatocrime/PotatoCrime.kt
@@ -1,22 +1,60 @@
package moe.nea.potatocrime
import moe.nea.potatocrime.entity.PotatoGuardEntity
+import moe.nea.potatocrime.events.OnEnterPotatoWorld
import moe.nea.potatocrime.registry.PotatoRegistry
+import moe.nea.potatocrime.registry.PotatoTranslations
import net.fabricmc.api.ModInitializer
import net.fabricmc.fabric.api.`object`.builder.v1.entity.FabricDefaultAttributeRegistry
+import net.minecraft.entity.SpawnReason
+import net.minecraft.server.network.ServerPlayerEntity
+import net.minecraft.server.world.ServerWorld
+import net.minecraft.util.math.Direction
+import net.minecraft.world.dimension.DimensionTypes
import org.slf4j.LoggerFactory
object PotatoCrime : ModInitializer {
- val modId = "potato-crime"
+ val modId = "potato-crime"
private val logger = LoggerFactory.getLogger("potato-crime")
- override fun onInitialize() {
- // This code runs as soon as Minecraft is in a mod-load-ready state.
- // However, some things (like resources) may still be uninitialized.
- // Proceed with mild caution.
- logger.info("Hello Fabric world!")
- PotatoRegistry.registerAll()
- FabricDefaultAttributeRegistry.register(PotatoRegistry.potatoGuard, PotatoGuardEntity.createMobAttributes())
- }
+ override fun onInitialize() {
+ // This code runs as soon as Minecraft is in a mod-load-ready state.
+ // However, some things (like resources) may still be uninitialized.
+ // Proceed with mild caution.
+ logger.info("Hello Fabric world!")
+ PotatoRegistry.registerAll()
+ FabricDefaultAttributeRegistry.register(PotatoRegistry.potatoGuard, PotatoGuardEntity.createMobAttributes())
+ OnEnterPotatoWorld.EVENT.register(OnEnterPotatoWorld { player ->
+ if (player is ServerPlayerEntity
+ && player.world.dimensionEntry.matchesKey(DimensionTypes.POTATO)
+ && hasContraband(player)
+ ) {
+ player.sendMessage(PotatoTranslations.youBrokeTheLaw.format())
+ repeat(player.random.nextBetween(2, 4)) {
+ val randomOffsetPosition =
+ player.blockPos
+ .offset(Direction.Axis.X, player.random.nextBetween(-10, 10))
+ .offset(Direction.Axis.Z, player.random.nextBetween(-10, 10))
+ player.world.spawnEntity(
+ PotatoRegistry.potatoGuard.create(
+ player.world as ServerWorld,
+ null,
+ randomOffsetPosition,
+ SpawnReason.EVENT,
+ false,
+ false
+ )
+ )
+ }
+ }
+ })
+ }
+
+ fun hasContraband(entity: ServerPlayerEntity): Boolean {
+ return entity.inventory
+ .getMatchingStacks { it.isIn(PotatoRegistry.carrotIshItems) }
+ .isNotEmpty()
+
+ }
} \ No newline at end of file
diff --git a/src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt b/src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt
index 33ea7d1..40e0519 100644
--- a/src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt
+++ b/src/main/kotlin/moe/nea/potatocrime/entity/PotatoGuard.kt
@@ -1,6 +1,6 @@
package moe.nea.potatocrime.entity
-import moe.nea.potatocrime.registry.PotatoRegistry
+import moe.nea.potatocrime.PotatoCrime
import net.minecraft.entity.EntityType
import net.minecraft.entity.ai.goal.*
import net.minecraft.entity.attribute.DefaultAttributeContainer
@@ -8,6 +8,7 @@ import net.minecraft.entity.attribute.EntityAttributes
import net.minecraft.entity.mob.HostileEntity
import net.minecraft.entity.mob.PathAwareEntity
import net.minecraft.entity.player.PlayerEntity
+import net.minecraft.server.network.ServerPlayerEntity
import net.minecraft.world.World
class PotatoGuardEntity(entityType: EntityType<out PotatoGuardEntity>, world: World?) :
@@ -40,10 +41,7 @@ class PotatoGuardEntity(entityType: EntityType<out PotatoGuardEntity>, world: Wo
PlayerEntity::class.java,
true
) { player ->
- (player as PlayerEntity)
- .inventory
- .getMatchingStacks { it.isIn(PotatoRegistry.carrotIshItems) }
- .isNotEmpty()
+ PotatoCrime.hasContraband(player as ServerPlayerEntity)
}
)
}
diff --git a/src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt b/src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt
new file mode 100644
index 0000000..135ea51
--- /dev/null
+++ b/src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt
@@ -0,0 +1,14 @@
+package moe.nea.potatocrime.events
+
+import net.fabricmc.fabric.api.event.EventFactory
+import net.minecraft.entity.Entity
+
+fun interface OnEnterPotatoWorld {
+ fun onEnterPotatoWorld(entity: Entity)
+
+ companion object {
+ val EVENT = EventFactory.createArrayBacked(OnEnterPotatoWorld::class.java) { events ->
+ OnEnterPotatoWorld { entity -> events.forEach { it.onEnterPotatoWorld(entity) } }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/main/kotlin/moe/nea/potatocrime/registry/PotatoTranslations.kt b/src/main/kotlin/moe/nea/potatocrime/registry/PotatoTranslations.kt
index 8d7fd19..a2cabf8 100644
--- a/src/main/kotlin/moe/nea/potatocrime/registry/PotatoTranslations.kt
+++ b/src/main/kotlin/moe/nea/potatocrime/registry/PotatoTranslations.kt
@@ -21,5 +21,6 @@ object PotatoTranslations {
val noCarrotsToDeposit = PT("no-carrots", "No carrots to deposit.")
val itemGroup = PT("item-group", "Potato Crimes")
val contrabandFillText = PT("fill-level", "Hidden carrots: %s/1000.")
+ val youBrokeTheLaw = PT("arrest", "You broke the law by bringing carrots into those holy land!")
} \ No newline at end of file
diff --git a/src/main/resources/potato-crime.mixins.json b/src/main/resources/potato-crime.mixins.json
index ba5b256..323c639 100644
--- a/src/main/resources/potato-crime.mixins.json
+++ b/src/main/resources/potato-crime.mixins.json
@@ -1,11 +1,12 @@
{
- "required": true,
- "package": "moe.nea.potatocrime.mixin",
- "compatibilityLevel": "JAVA_17",
- "mixins": [
- "ExampleMixin"
- ],
- "injectors": {
- "defaultRequire": 1
- }
+ "required": true,
+ "package": "moe.nea.potatocrime.mixin",
+ "compatibilityLevel": "JAVA_17",
+ "mixins": [
+ "ExampleMixin",
+ "OnEnterPotatoWorldPatch"
+ ],
+ "injectors": {
+ "defaultRequire": 1
+ }
} \ No newline at end of file