修改GLM
This commit is contained in:
parent
b8297e9614
commit
5d3f0639ab
27 changed files with 102 additions and 249 deletions
|
@ -1,50 +0,0 @@
|
|||
package com.atsuishio.superbwarfare.init;
|
||||
|
||||
import com.atsuishio.superbwarfare.Mod;
|
||||
import com.mojang.serialization.MapCodec;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.fml.event.lifecycle.FMLConstructModEvent;
|
||||
import net.neoforged.neoforge.common.loot.IGlobalLootModifier;
|
||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||
import net.neoforged.neoforge.registries.NeoForgeRegistries;
|
||||
|
||||
@EventBusSubscriber(modid = Mod.MODID, bus = EventBusSubscriber.Bus.MOD)
|
||||
public class ModLootModifier {
|
||||
// TODO loot table modifier
|
||||
// public static class TargetModLootTableModifier extends LootModifier {
|
||||
// public static final Supplier<Codec<TargetModLootTableModifier>> CODEC = Suppliers
|
||||
// .memoize(() -> RecordCodecBuilder.create(instance -> codecStart(instance).and(ResourceLocation.CODEC.fieldOf("lootTable").forGetter(m -> m.lootTable)).apply(instance, TargetModLootTableModifier::new)));
|
||||
// private final ResourceLocation lootTable;
|
||||
//
|
||||
// public TargetModLootTableModifier(LootItemCondition[] conditions, ResourceLocation lootTable) {
|
||||
// super(conditions);
|
||||
// this.lootTable = lootTable;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// protected ObjectArrayList<ItemStack> doApply(ObjectArrayList<ItemStack> generatedLoot, LootContext context) {
|
||||
// context.getResolver().getLootTable(lootTable).getRandomItemsRaw(context, generatedLoot::add);
|
||||
// return generatedLoot;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public MapCodec<? extends IGlobalLootModifier> codec() {
|
||||
// return CODEC;
|
||||
// }
|
||||
//
|
||||
//// @Override
|
||||
//// public Codec<? extends IGlobalLootModifier> codec() {
|
||||
//// return CODEC.get();
|
||||
//// }
|
||||
// }
|
||||
|
||||
public static final DeferredRegister<MapCodec<? extends IGlobalLootModifier>> LOOT_MODIFIERS = DeferredRegister.create(NeoForgeRegistries.Keys.GLOBAL_LOOT_MODIFIER_SERIALIZERS, Mod.MODID);
|
||||
// public static final DeferredHolder<Codec<TargetModLootTableModifier>, Codec<TargetModLootTableModifier>> LOOT_MODIFIER = LOOT_MODIFIERS.register(ModUtils.MODID + "_loot_modifier", TargetModLootTableModifier.CODEC);
|
||||
|
||||
@SubscribeEvent
|
||||
public static void register(FMLConstructModEvent event) {
|
||||
// IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
// event.enqueueWork(() -> LOOT_MODIFIERS.register(bus));
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
"entries": [
|
||||
"superbwarfare:common_chest",
|
||||
"superbwarfare:common_chest_2",
|
||||
"superbwarfare:common_chest_3",
|
||||
"superbwarfare:common_chest_4",
|
||||
"superbwarfare:common_chest_5",
|
||||
"superbwarfare:rare_chest",
|
||||
"superbwarfare:rare_chest_2",
|
||||
"superbwarfare:common_chest_6",
|
||||
"superbwarfare:rare_chest_3",
|
||||
"superbwarfare:rare_chest_4",
|
||||
"superbwarfare:rare_chest_5",
|
||||
"superbwarfare:rare_chest_6",
|
||||
"superbwarfare:rare_chest_7",
|
||||
"superbwarfare:rare_chest_8",
|
||||
"superbwarfare:rare_chest_9",
|
||||
"superbwarfare:epic_chest",
|
||||
"superbwarfare:epic_chest_2",
|
||||
"superbwarfare:epic_chest_3",
|
||||
"superbwarfare:epic_chest_4",
|
||||
"superbwarfare:ancient_cpu_chest"
|
||||
],
|
||||
"replace": false
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"entries": [
|
||||
"superbwarfare:common_chest",
|
||||
"superbwarfare:rare_chest",
|
||||
"superbwarfare:epic_chest",
|
||||
"superbwarfare:ancient_cpu_chest"
|
||||
],
|
||||
"replace": false
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"type": "neoforge:add_table",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/ancient_city"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/ancient_cpu"
|
||||
"table": "superbwarfare:chests/ancient_cpu"
|
||||
}
|
|
@ -1,10 +1,35 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"type": "neoforge:add_table",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/simple_dungeon"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/abandoned_mineshaft"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/shipwreck_map"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/shipwreck_supply"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/shipwreck_treasure"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/ruined_portal"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_common"
|
||||
"table": "superbwarfare:chests/blue_print_common"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/abandoned_mineshaft"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_common"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/shipwreck_map"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_common"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/shipwreck_supply"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_common"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/shipwreck_treasure"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_common"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/ruined_portal"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_common"
|
||||
}
|
|
@ -1,10 +1,27 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"type": "neoforge:add_table",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/pillager_outpost"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/stronghold_library"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/woodland_mansion"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/end_city_treasure"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_epic"
|
||||
"table": "superbwarfare:chests/blue_print_epic"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/stronghold_library"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_epic"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/woodland_mansion"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_epic"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/end_city_treasure"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_epic"
|
||||
}
|
|
@ -1,10 +1,47 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"type": "neoforge:add_table",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:any_of",
|
||||
"terms": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/ancient_city"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/ancient_city_ice_box"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/bastion_bridge"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/bastion_hoglin_stable"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/bastion_other"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/buried_treasure"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/desert_pyramid"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/igloo"
|
||||
},
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/jungle_temple"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
"table": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/ancient_city_ice_box"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/bastion_bridge"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/bastion_hoglin_stable"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/bastion_other"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/buried_treasure"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/desert_pyramid"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/igloo"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"type": "superbwarfare:superbwarfare_loot_modifier",
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "neoforge:loot_table_id",
|
||||
"loot_table_id": "minecraft:chests/jungle_temple"
|
||||
}
|
||||
],
|
||||
"lootTable": "superbwarfare:chests/blue_print_rare"
|
||||
}
|
Loading…
Add table
Reference in a new issue