aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/world/anhgelus/manhunt/Manhunt.java5
-rw-r--r--src/main/java/world/anhgelus/manhunt/mixin/ExampleMixin.java15
-rw-r--r--src/main/resources/data/minecraft/loot_table/gameplay/piglin_bartering.json239
-rw-r--r--src/main/resources/fabric.mod.json7
-rw-r--r--src/main/resources/manhunt.mixins.json9
-rw-r--r--src/main/resources/pack.mcmeta6
6 files changed, 248 insertions, 33 deletions
diff --git a/src/main/java/world/anhgelus/manhunt/Manhunt.java b/src/main/java/world/anhgelus/manhunt/Manhunt.java
index 1f7f0b7..fe761de 100644
--- a/src/main/java/world/anhgelus/manhunt/Manhunt.java
+++ b/src/main/java/world/anhgelus/manhunt/Manhunt.java
@@ -6,7 +6,6 @@ import com.mojang.brigadier.builder.RequiredArgumentBuilder;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback;
import net.fabricmc.fabric.api.entity.event.v1.ServerPlayerEvents;
-import net.fabricmc.fabric.api.event.lifecycle.v1.ServerChunkEvents;
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents;
import net.minecraft.command.EntitySelector;
import net.minecraft.command.argument.EntityArgumentType;
@@ -22,8 +21,6 @@ import net.minecraft.server.command.ServerCommandSource;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.util.math.GlobalPos;
import net.minecraft.world.GameMode;
-import net.minecraft.world.dimension.DimensionType;
-import net.minecraft.world.dimension.DimensionTypes;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -138,7 +135,7 @@ public class Manhunt implements ModInitializer {
final LodestoneTrackerComponent trackerCpnt = new LodestoneTrackerComponent(Optional.of(GlobalPos.create(tracked.getWorld().getRegistryKey(), tracked.getBlockPos())), true);
final ItemStack is = compassMap.get(player.getUuid());
if (is == null) {
- LOGGER.warn("Compass item isACompass null");
+ LOGGER.warn("Compass item is null");
return;
}
final int slot = player.getInventory().getSlotWithStack(is);
diff --git a/src/main/java/world/anhgelus/manhunt/mixin/ExampleMixin.java b/src/main/java/world/anhgelus/manhunt/mixin/ExampleMixin.java
deleted file mode 100644
index 0ea67b2..0000000
--- a/src/main/java/world/anhgelus/manhunt/mixin/ExampleMixin.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package world.anhgelus.manhunt.mixin;
-
-import net.minecraft.server.MinecraftServer;
-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(MinecraftServer.class)
-public class ExampleMixin {
- @Inject(at = @At("HEAD"), method = "loadWorld")
- private void init(CallbackInfo info) {
- // This code is injected into the start of MinecraftServer.loadWorld()V
- }
-} \ No newline at end of file
diff --git a/src/main/resources/data/minecraft/loot_table/gameplay/piglin_bartering.json b/src/main/resources/data/minecraft/loot_table/gameplay/piglin_bartering.json
new file mode 100644
index 0000000..09f15e8
--- /dev/null
+++ b/src/main/resources/data/minecraft/loot_table/gameplay/piglin_bartering.json
@@ -0,0 +1,239 @@
+{
+ "type": "minecraft:barter",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:book",
+ "weight": 5,
+ "functions": [
+ {
+ "function": "minecraft:enchant_randomly",
+ "options": "minecraft:soul_speed"
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:iron_boots",
+ "weight": 8,
+ "functions": [
+ {
+ "function": "minecraft:enchant_randomly",
+ "options": "minecraft:soul_speed"
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:potion",
+ "weight": 10,
+ "functions": [
+ {
+ "function": "minecraft:set_potion",
+ "id": "minecraft:fire_resistance"
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:splash_potion",
+ "weight": 10,
+ "functions": [
+ {
+ "function": "minecraft:set_potion",
+ "id": "minecraft:fire_resistance"
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:iron_nugget",
+ "weight": 10,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 9,
+ "max": 36
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:quartz",
+ "weight": 20,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 8,
+ "max": 16
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:glowstone_dust",
+ "weight": 20,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 5,
+ "max": 12
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:magma_cream",
+ "weight": 20,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 2,
+ "max": 6
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:ender_pearl",
+ "weight": 20,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 4,
+ "max": 8
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:string",
+ "weight": 20,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 8,
+ "max": 24
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:fire_charge",
+ "weight": 40,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 1,
+ "max": 5
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:gravel",
+ "weight": 40,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 8,
+ "max": 16
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:leather",
+ "weight": 40,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 4,
+ "max": 10
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:nether_brick",
+ "weight": 40,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 4,
+ "max": 16
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:obsidian",
+ "weight": 40
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:crying_obsidian",
+ "weight": 40,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 1,
+ "max": 3
+ }
+ }
+ ]
+ },
+ {
+ "type": "minecraft:item",
+ "name": "minecraft:soul_sand",
+ "weight": 40,
+ "functions": [
+ {
+ "function": "minecraft:set_count",
+ "count": {
+ "type": "minecraft:uniform",
+ "min": 4,
+ "max": 16
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
index 8e153fb..b097ea1 100644
--- a/src/main/resources/fabric.mod.json
+++ b/src/main/resources/fabric.mod.json
@@ -18,13 +18,10 @@
"world.anhgelus.manhunt.Manhunt"
]
},
- "mixins": [
- "manhunt.mixins.json"
- ],
"depends": {
"fabricloader": ">=0.15.11",
- "minecraft": "~1.16.1",
- "java": ">=17",
+ "minecraft": "~1.21",
+ "java": ">=21",
"fabric": "*"
},
"suggests": {
diff --git a/src/main/resources/manhunt.mixins.json b/src/main/resources/manhunt.mixins.json
deleted file mode 100644
index 12239fb..0000000
--- a/src/main/resources/manhunt.mixins.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "required": true,
- "package": "world.anhgelus.manhunt.mixin",
- "compatibilityLevel": "JAVA_17",
- "mixins": [],
- "injectors": {
- "defaultRequire": 1
- }
-} \ No newline at end of file
diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta
new file mode 100644
index 0000000..ffe0b8e
--- /dev/null
+++ b/src/main/resources/pack.mcmeta
@@ -0,0 +1,6 @@
+{
+ "pack": {
+ "pack_format": 48,
+ "description": "isACompass"
+ }
+} \ No newline at end of file