diff --git a/middle-earth/build.gradle b/middle-earth/build.gradle index 823d90c6b0..e3e680dc42 100644 --- a/middle-earth/build.gradle +++ b/middle-earth/build.gradle @@ -1,5 +1,6 @@ repositories { maven { url "https://maven.shedaniel.me" } + mavenCentral() } dependencies { @@ -7,6 +8,7 @@ dependencies { implementation project(path: ':of-beasts-and-wild-things', configuration: 'dev') modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:20.0.811" modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:20.0.811" + modImplementation(include("me.lucko:fabric-permissions-api:0.4.0")) } loom { diff --git a/middle-earth/gradle.properties b/middle-earth/gradle.properties index a9f356c81e..8f204e4435 100644 --- a/middle-earth/gradle.properties +++ b/middle-earth/gradle.properties @@ -14,7 +14,7 @@ loom_version=1.11-SNAPSHOT fabric_version=0.129.0+1.21.8 # Mod Properties -mod_version = 1.0.0-1.21.8-beta-dev +mod_version = 1.0.1-1.21.8-beta maven_group = net.sevenstars.middleearth archives_base_name = Middle-earth diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/MiddleEarth.java b/middle-earth/src/main/java/net/sevenstars/middleearth/MiddleEarth.java index ff16b4b615..c2592ec627 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/MiddleEarth.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/MiddleEarth.java @@ -43,7 +43,7 @@ public class MiddleEarth implements ModInitializer { public static final String MOD_ID = "middle-earth"; public static final String OLD_MOD_ID = "me"; - public static final String MOD_VERSION = "1.0.0-1.21.8-beta-dev"; + public static final String MOD_VERSION = "1.0.0-1.21.8-beta"; public static final boolean IS_DEBUG = true; public static final boolean ENABLE_INSTANT_BOOTING = true; public static final ModLogger LOGGER = new ModLogger(MOD_ID, IS_DEBUG); @@ -175,4 +175,8 @@ public static Identifier append(Identifier base, String suffix) { public static String createAggregate(char splitter, String... names){ return IdentifierUtil.createAggregateValue(splitter, names); } + + public static boolean compareId(Identifier id1, Identifier id2) { + return id1.compareTo(id2) == 0; + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/registration/GenericBlockSets.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/registration/GenericBlockSets.java index 4dc28b7d15..c3ba8fd315 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/registration/GenericBlockSets.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/registration/GenericBlockSets.java @@ -225,74 +225,74 @@ public class GenericBlockSets { ItemGroupsME.STONE_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder WEATHERED_SHINGLES = registerBlockSet(new GenericBlockSetBuilder( - "weathered_shingles", 2.0f, 3.0f, MapColor.WHITE_GRAY, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "weathered_shingles", 2.0f, 3.0f, MapColor.WHITE_GRAY, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder TREATED_WOOD = registerPillarBlockSet(new GenericBlockSetBuilder( - "treated_wood", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "treated_wood", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder TREATED_WOOD_PLANKS = registerBlockSet(new GenericBlockSetBuilder( - "treated_wood_planks", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "treated_wood_planks", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder TREATED_WOOD_BEAM = registerPillarBlockSet(new GenericBlockSetBuilder( - "treated_wood_beam", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "treated_wood_beam", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder TREATED_WOOD_CARVED_BEAM = registerPillarBlockSet(new GenericBlockSetBuilder( - "treated_wood_carved_beam", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "treated_wood_carved_beam", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder TREATED_WOOD_PANELS = registerBlockSet(new GenericBlockSetBuilder( - "treated_wood_panels", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "treated_wood_panels", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder TREATED_WOOD_TILING = registerBlockSet(new GenericBlockSetBuilder( - "treated_wood_tiling", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "treated_wood_tiling", 2.0f, 3.0f, MapColor.SPRUCE_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_BOARDS = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_boards", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_boards", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_CARVING = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_carving", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_carving", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_PLANKS = registerBlockSet(new GenericBlockSetBuilder( - "aged_wood_planks", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_planks", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_BEAM = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_beam", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_beam", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_FISH_CARVING = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_fish_carving", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_fish_carving", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_PANELS = registerBlockSet(new GenericBlockSetBuilder( - "aged_wood_panels", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_panels", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_SHINGLES = registerBlockSet(new GenericBlockSetBuilder( - "aged_wood_shingles", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_shingles", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_CARVED_BEAM = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_carved_beam", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_carved_beam", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_KNOTTED_BEAM = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_knotted_beam", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_knotted_beam", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_REDDISH_BEAM = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_reddish_beam", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_reddish_beam", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_GILDED_CARVED_PILLAR = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_gilded_carved_pillar", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_gilded_carved_pillar", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_GILDED_CARVING = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_gilded_carving", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_gilded_carving", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_GILDED_HORSES = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_gilded_horses", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_gilded_horses", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static GenericBlockSetBuilder AGED_WOOD_GILDED_TRIM = registerPillarBlockSet(new GenericBlockSetBuilder( - "aged_wood_gilded_trim", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, false, + "aged_wood_gilded_trim", 2.0f, 3.0f, MapColor.TERRACOTTA_BROWN, NoteBlockInstrument.BASS, BlockSoundGroup.WOOD, true, ItemGroupsME.WOOD_BLOCKS_CONTENTS)); public static OxidizableBlockSetBuilder THATCH = registerOxidizableBlockSet(new OxidizableBlockSetBuilder( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/registration/ModNatureBlocks.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/registration/ModNatureBlocks.java index 6278ffec72..ed274e75c2 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/registration/ModNatureBlocks.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/registration/ModNatureBlocks.java @@ -327,10 +327,10 @@ public class ModNatureBlocks { public static final Block SHORT_CATTAILS = registerBlock("short_cattails", CustomPlantBlock::new, AbstractBlock.Settings.copy(Blocks.SHORT_GRASS).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS).offset(AbstractBlock.OffsetType.XYZ) - .mapColor(DyeColor.GREEN), true); + .mapColor(MapColor.TERRACOTTA_BROWN), true); public static final Block SHORT_BULRUSH = registerBlock("short_bulrush", CustomPlantBlock::new, AbstractBlock.Settings.copy(Blocks.SHORT_GRASS).noCollision().breakInstantly().sounds(BlockSoundGroup.GRASS).offset(AbstractBlock.OffsetType.XYZ) - .mapColor(DyeColor.GREEN), true); + .mapColor(MapColor.TERRACOTTA_BROWN), true); public static final Block TALL_CATTAILS = registerBlock("tall_cattails", (settings) -> new CustomWaterloggableTallPlantBlock(settings, false), AbstractBlock.Settings.copy(Blocks.TALL_GRASS).breakInstantly(), true); @@ -633,6 +633,7 @@ public static Block registerVariantSapling(String name, List CODEC = createCodec(ReinforcedScaffoldingBlock::new) - .xmap(block -> block, block -> (ReinforcedScaffoldingBlock) block); + public static final IntProperty SUPPORT_DISTANCE = IntProperty.of("support_distance", 0, MAX_SUPPORT_DISTANCE); + public static final MapCodec CODEC = createCodec(ReinforcedScaffoldingBlock::new); public ReinforcedScaffoldingBlock(AbstractBlock.Settings settings) { super(settings); + this.setDefaultState(this.stateManager.getDefaultState().with(SUPPORT_DISTANCE, 0)); } @Override @@ -47,6 +49,7 @@ public BlockState getPlacementState(ItemPlacementContext ctx) { return this.getDefaultState() .with(WATERLOGGED, world.getFluidState(pos).getFluid() == Fluids.WATER) .with(DISTANCE, toStoredDistance(distance)) + .with(SUPPORT_DISTANCE, distance) .with(BOTTOM, shouldBeBottom(world, pos, distance, this)); } @@ -71,9 +74,11 @@ protected BlockState getStateForNeighborUpdate(BlockState state, WorldView world @Override protected void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { int distance = calculateDistance(world, pos, this); - BlockState updatedState = state.with(DISTANCE, toStoredDistance(distance)).with(BOTTOM, shouldBeBottom(world, pos, distance, this)); + BlockState updatedState = state.with(DISTANCE, toStoredDistance(distance)) + .with(SUPPORT_DISTANCE, distance) + .with(BOTTOM, shouldBeBottom(world, pos, distance, this)); if (distance == MAX_SUPPORT_DISTANCE) { - if (state.get(DISTANCE) == MAX_STORED_DISTANCE) { + if (state.get(SUPPORT_DISTANCE) == MAX_SUPPORT_DISTANCE) { FallingBlockEntity.spawnFromBlock(world, pos, updatedState); } else { world.breakBlock(pos, true); @@ -94,52 +99,63 @@ protected boolean canReplace(BlockState state, ItemPlacementContext context) { && blockItem.getBlock() == this; } + @Override + protected void appendProperties(StateManager.Builder builder) { + super.appendProperties(builder); + builder.add(SUPPORT_DISTANCE); + } + public static boolean shouldBeBottom(BlockView world, BlockPos pos, int distance, Block scaffoldingBlock) { return distance > 0 && !world.getBlockState(pos.down()).isOf(scaffoldingBlock); } public static int calculateDistance(BlockView world, BlockPos pos, Block scaffoldingBlock) { - return calculateDistance(world, pos, scaffoldingBlock, new HashMap<>(), new HashSet<>()); - } - - private static int calculateDistance(BlockView world, BlockPos pos, Block scaffoldingBlock, Map cache, Set visiting) { - Integer cachedDistance = cache.get(pos); - if (cachedDistance != null) { - return cachedDistance; - } - - if (!visiting.add(pos)) { - return MAX_SUPPORT_DISTANCE; - } - - BlockPos.Mutable mutable = pos.mutableCopy().move(Direction.DOWN); - BlockState belowState = world.getBlockState(mutable); - int distance = MAX_SUPPORT_DISTANCE; - if (belowState.isOf(scaffoldingBlock)) { - distance = calculateDistance(world, mutable.toImmutable(), scaffoldingBlock, cache, visiting); - } else if (belowState.isSideSolidFullSquare(world, mutable, Direction.UP)) { - cache.put(pos, 0); - visiting.remove(pos); - return 0; - } + Map supportDistances = new HashMap<>(); + ArrayDeque positionsToCheck = new ArrayDeque<>(); + BlockPos startPos = pos.toImmutable(); + + supportDistances.put(startPos, 0); + positionsToCheck.add(startPos); + + while (!positionsToCheck.isEmpty()) { + BlockPos currentPos = positionsToCheck.removeFirst(); + int currentDistance = supportDistances.get(currentPos); + BlockPos belowPos = currentPos.down(); + BlockState belowState = world.getBlockState(belowPos); + + if (belowState.isOf(scaffoldingBlock)) { + addSupportPosition(positionsToCheck, supportDistances, belowPos, currentDistance, true); + } else if (belowState.isSideSolidFullSquare(world, belowPos, Direction.UP)) { + return Math.min(currentDistance, MAX_SUPPORT_DISTANCE); + } - for (Direction direction : Direction.Type.HORIZONTAL) { - BlockPos horizontalPos = mutable.set(pos, direction).toImmutable(); - BlockState horizontalState = world.getBlockState(horizontalPos); - if (!horizontalState.isOf(scaffoldingBlock)) { + if (currentDistance >= MAX_SUPPORT_DISTANCE) { continue; } - distance = Math.min(distance, calculateDistance(world, horizontalPos, scaffoldingBlock, cache, visiting) + 1); - if (distance == 1) { - break; + for (Direction direction : Direction.Type.HORIZONTAL) { + BlockPos horizontalPos = currentPos.offset(direction); + if (world.getBlockState(horizontalPos).isOf(scaffoldingBlock)) { + addSupportPosition(positionsToCheck, supportDistances, horizontalPos, currentDistance + 1, false); + } } } - distance = Math.min(distance, MAX_SUPPORT_DISTANCE); - cache.put(pos, distance); - visiting.remove(pos); - return distance; + return MAX_SUPPORT_DISTANCE; + } + + private static void addSupportPosition(ArrayDeque positionsToCheck, Map supportDistances, BlockPos pos, int distance, boolean checkFirst) { + Integer knownDistance = supportDistances.get(pos); + if (knownDistance != null && knownDistance <= distance) { + return; + } + + supportDistances.put(pos, distance); + if (checkFirst) { + positionsToCheck.addFirst(pos); + } else { + positionsToCheck.addLast(pos); + } } private static int toStoredDistance(int distance) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/candles/CandleHolderBlock.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/candles/CandleHolderBlock.java index fb18273550..ca47a16228 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/candles/CandleHolderBlock.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/candles/CandleHolderBlock.java @@ -89,6 +89,10 @@ protected ActionResult onUse(BlockState state, World world, BlockPos pos, Player Hand hand = player.getActiveHand(); if (!world.isClient && player.getAbilities().allowModifyWorld) { ItemStack itemStack = player.getStackInHand(hand); + if(player.isInCreativeMode() && itemStack == ItemStack.EMPTY){ + world.setBlockState(pos, state.cycle(LIT)); + return ActionResult.SUCCESS; + } if (state.get(LIT) && itemStack.isIn(ItemTags.SHOVELS)) { extinguish(null, state, world, pos); } else if (!state.get(LIT) && itemStack.isOf(Items.FLINT_AND_STEEL) || itemStack.isOf(Items.TORCH)) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/candles/CandleStickBlock.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/candles/CandleStickBlock.java index 080f70166b..ad18063102 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/candles/CandleStickBlock.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/candles/CandleStickBlock.java @@ -102,15 +102,15 @@ protected boolean canPathfindThrough(BlockState state, NavigationType type) { protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) { Hand hand = player.getActiveHand(); if (!world.isClient && player.getAbilities().allowModifyWorld) { - if(player.isInCreativeMode()){ + ItemStack itemStack = player.getStackInHand(hand); + if(player.isInCreativeMode() && itemStack == ItemStack.EMPTY){ world.setBlockState(pos, state.cycle(LIT)); - } else { - ItemStack itemStack = player.getStackInHand(hand); - if (state.get(LIT) && itemStack.isIn(ItemTags.SHOVELS)) { - extinguish(null, state, world, pos); - } else if (!state.get(LIT) && itemStack.isOf(Items.FLINT_AND_STEEL) || itemStack.isOf(Items.TORCH)) { - setLit(world, state, pos, true); - } + return ActionResult.SUCCESS; + } + if (state.get(LIT) && itemStack.isIn(ItemTags.SHOVELS)) { + extinguish(null, state, world, pos); + } else if (!state.get(LIT) && itemStack.isOf(Items.FLINT_AND_STEEL) || itemStack.isOf(Items.TORCH)) { + setLit(world, state, pos, true); } } return ActionResult.SUCCESS; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/forge/ForgeBlockEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/forge/ForgeBlockEntity.java index 6eb3439699..f938981551 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/forge/ForgeBlockEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/forge/ForgeBlockEntity.java @@ -1,14 +1,17 @@ package net.sevenstars.middleearth.block.special.forge; import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory; +import net.minecraft.component.type.ConsumableComponents; +import net.minecraft.component.type.FoodComponent; +import net.minecraft.entity.ExperienceOrbEntity; import net.minecraft.item.equipment.trim.ArmorTrim; import net.minecraft.item.equipment.trim.ArmorTrimMaterial; import net.minecraft.item.equipment.trim.ArmorTrimPattern; import net.minecraft.recipe.ServerRecipeManager; -import net.minecraft.screen.NamedScreenHandlerFactory; import net.minecraft.server.world.ServerWorld; import net.minecraft.storage.ReadView; import net.minecraft.storage.WriteView; +import net.minecraft.util.math.MathHelper; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.block.registration.ModBlockEntities; import net.sevenstars.middleearth.block.registration.ModDecorativeBlocks; @@ -215,7 +218,7 @@ protected void readData(ReadView view) { this.maxFuelTime = view.getInt(ID + ".max-fuel-time", 0); this.mode = view.getInt(ID + ".mode", 0); this.storage = view.getInt(ID + ".storage", 0); - this.currentMetal = MetalTypes.valueOf(view.getString(ID + ".current-metal", "bronze").toUpperCase()); + this.currentMetal = MetalTypes.fromValue(view.getString(ID + ".current-metal", "bronze").toLowerCase()); } public void update() { @@ -352,23 +355,43 @@ public static void outputItemStack(int amount, Vec3d coords, ServerPlayerEntity switch (amount){ case 16 -> { - if (entity.currentMetal.getNugget() != null){ + if(entity.currentMetal.getIngot().equals(ResourceItemsME.THERAPOD_NUGGET)) { + itemstack = new ItemStack(ResourceItemsME.PTEROSAUR_NUGGET); + FoodComponent foodComponent = new FoodComponent(1, 0.5f, false); + itemstack.set(DataComponentTypes.FOOD, foodComponent); + itemstack.set(DataComponentTypes.CONSUMABLE, ConsumableComponents.FOOD); + itemstack.set(DataComponentTypesME.TEMPERATURE_DATA, new TemperatureDataComponent(100)); + } else if (entity.currentMetal.getNugget() != null){ itemstack = new ItemStack(entity.currentMetal.getNugget()); itemstack.set(DataComponentTypesME.TEMPERATURE_DATA, new TemperatureDataComponent(100)); } } case 144 -> { - itemstack = new ItemStack(entity.currentMetal.getIngot()); + if(entity.currentMetal.getIngot().equals(ResourceItemsME.THERAPOD_NUGGET)) { + itemstack = new ItemStack(ResourceItemsME.THERAPOD_NUGGET); + FoodComponent foodComponent = new FoodComponent(7, 0.8f, false); + itemstack.set(DataComponentTypes.FOOD, foodComponent); + itemstack.set(DataComponentTypes.CONSUMABLE, ConsumableComponents.FOOD); + } else { + itemstack = new ItemStack(entity.currentMetal.getIngot()); + } itemstack.set(DataComponentTypesME.TEMPERATURE_DATA, new TemperatureDataComponent(100)); } case 288 -> { itemstack = new ItemStack(ResourceItemsME.ROD); if(mode == 4) itemstack = new ItemStack(ResourceItemsME.ARMOR_PLATE); - if (entity.currentMetal.isVanilla()){ + + if(entity.currentMetal.getIngot().equals(ResourceItemsME.THERAPOD_NUGGET)) { + if(mode == 4) itemstack = new ItemStack(ResourceItemsME.THYREOPHORAN_NUGGET); + else itemstack = new ItemStack(ResourceItemsME.CERATOPSIAN_NUGGET); + FoodComponent foodComponent = new FoodComponent(10, 0.8f, false); + itemstack.set(DataComponentTypes.FOOD, foodComponent); + itemstack.set(DataComponentTypes.CONSUMABLE, ConsumableComponents.FOOD); + } + else if(entity.currentMetal.isVanilla()) { itemstack.set(DataComponentTypes.TRIM, new ArmorTrim( armorTrimMaterialRegistry.getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(entity.currentMetal.getName()))), armorTrimPatternRegistry.getOrThrow(RegistryKey.of(RegistryKeys.TRIM_PATTERN, Identifier.of(MiddleEarth.MOD_ID, "smithing_part"))))); - } else { itemstack.set(DataComponentTypes.TRIM, new ArmorTrim( armorTrimMaterialRegistry.getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MiddleEarth.MOD_ID, entity.currentMetal.getName()))), @@ -378,7 +401,12 @@ public static void outputItemStack(int amount, Vec3d coords, ServerPlayerEntity } case 432 -> { itemstack = new ItemStack(ResourceItemsME.LARGE_ROD); - if (entity.currentMetal.isVanilla()){ + if(entity.currentMetal.getIngot().equals(ResourceItemsME.THERAPOD_NUGGET)) { + itemstack = new ItemStack(ResourceItemsME.SAUROPOD_NUGGET); + FoodComponent foodComponent = new FoodComponent(14, 0.85f, false); + itemstack.set(DataComponentTypes.FOOD, foodComponent); + itemstack.set(DataComponentTypes.CONSUMABLE, ConsumableComponents.FOOD); + } else if (entity.currentMetal.isVanilla()){ itemstack.set(DataComponentTypes.TRIM, new ArmorTrim( armorTrimMaterialRegistry.getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(entity.currentMetal.getName()))), armorTrimPatternRegistry.getOrThrow(RegistryKey.of(RegistryKeys.TRIM_PATTERN, Identifier.of(MiddleEarth.MOD_ID, "smithing_part"))))); @@ -511,12 +539,14 @@ private static void craftItem(ForgeBlockEntity entity, ServerWorld world) { if(match == null) throw new RuntimeException("Somehow... you crafted an item without recipe?!"); + ExperienceOrbEntity.spawn(world, entity.getPos().toCenterPos().add(0, 1, 0), match.value().getXp()); + if(hasAlloyingRecipe(entity, world)) { for (int i = 1; i <= 4; i++) { entity.removeStack(i, 1); } entity.storage = entity.storage + match.value().amount; - entity.currentMetal = MetalTypes.valueOf(match.value().output.toUpperCase()); + entity.currentMetal = MetalTypes.fromValue(match.value().output.toLowerCase()); entity.update(); } } @@ -623,7 +653,8 @@ private void getFuel(ForgeBlockEntity entity, ItemStack fuelStack) { } private static boolean canInsertLiquid(int storage, MetalTypes currentMetal, RecipeEntry match) { - MetalTypes metal = MetalTypes.valueOf(match.value().output.toUpperCase()); + var value = match.value().output.toLowerCase(); + MetalTypes metal = MetalTypes.fromValue(value); if((storage + match.value().amount) <= MAX_STORAGE){ if(metal == currentMetal){ return true; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/forge/MetalTypes.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/forge/MetalTypes.java index 20f51ed449..fc2a4b0213 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/forge/MetalTypes.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/forge/MetalTypes.java @@ -27,6 +27,8 @@ public enum MetalTypes implements StringIdentifiable { MITHRIL(12, "mithril", ResourceItemsME.MITHRIL_INGOT, ResourceItemsME.MITHRIL_NUGGET, false,14278631), NETHERITE(13, "netherite", Items.NETHERITE_INGOT, null, true, 6445145), + + CHICKEN_NUGGY(14, "chicken_nugget", ResourceItemsME.THERAPOD_NUGGET, ResourceItemsME.PTEROSAUR_NUGGET, false, 11242339), ; public static MetalTypes fromValue(String name) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/shapingAnvil/ShapingAnvilBlockEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/shapingAnvil/ShapingAnvilBlockEntity.java index 6f9822b2f0..97133b3644 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/shapingAnvil/ShapingAnvilBlockEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/shapingAnvil/ShapingAnvilBlockEntity.java @@ -1,6 +1,7 @@ package net.sevenstars.middleearth.block.special.shapingAnvil; import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerFactory; +import net.minecraft.entity.ExperienceOrbEntity; import net.minecraft.item.equipment.trim.ArmorTrim; import net.minecraft.item.equipment.trim.ArmorTrimMaterial; import net.minecraft.item.equipment.trim.ArmorTrimPattern; @@ -12,6 +13,7 @@ import net.sevenstars.middleearth.block.special.forge.MetalTypes; import net.sevenstars.middleearth.gui.shapinganvil.ShapingAnvilScreenHandler; import net.sevenstars.middleearth.item.DataComponentTypesME; +import net.sevenstars.middleearth.item.ResourceItemsME; import net.sevenstars.middleearth.item.dataComponents.TemperatureDataComponent; import net.sevenstars.middleearth.particles.ModParticleTypes; import net.sevenstars.middleearth.recipe.AnvilShapingRecipe; @@ -148,7 +150,7 @@ public void bonk(ShapingAnvilBlockEntity entity, ServerWorld world){ entity.getWorld().playSound(null, pos, SoundEvents.BLOCK_ANVIL_LAND, SoundCategory.BLOCKS, 1.5f, 1.0f - (float) temperature / 1000); - int minRandProgress = 6; + int minRandProgress = 7; int maxRandProgress = 14; if (input.getMaxDamage() == 0 && input.getDamage() == 0){ @@ -177,6 +179,11 @@ public void bonk(ShapingAnvilBlockEntity entity, ServerWorld world){ if (input.getDamage() == 0){ + int xp = 2; + if(input.getItem() == ResourceItemsME.ROD || input.getItem() == ResourceItemsME.ARMOR_PLATE) xp = 4; + if(input.getItem() == ResourceItemsME.LARGE_ROD) xp = 7; + ExperienceOrbEntity.spawn(world, entity.getPos().toCenterPos().add(0, 1, 0), xp); + ItemStack output = match.get(entity.outputIndex).value().craft(new SingleStackRecipeInput(input), entity.world.getRegistryManager()); if(input.get(DataComponentTypes.TRIM) != null){ diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/StructureManagerBlockEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/StructureManagerBlockEntity.java index 789f7f612e..c326c992da 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/StructureManagerBlockEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/StructureManagerBlockEntity.java @@ -19,7 +19,6 @@ import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; -import net.sevenstars.api.utils.ModLogger; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.block.registration.ModBlockEntities; import net.sevenstars.middleearth.block.special.structureManager.features.SpawnNestManager; @@ -36,7 +35,6 @@ import java.util.UUID; public class StructureManagerBlockEntity extends BlockEntity implements ExtendedScreenHandlerFactory { - ModLogger logger = MiddleEarth.LOGGER; private static final String ID = "structure_manager"; private enum SyncedData { @@ -63,6 +61,13 @@ private enum SyncedData { // Runtime private StructureManagerData managerData; private boolean worldWasSet = false; + private boolean registered = false; + + @Override + public void markRemoved() { + StructureManagerService.unregister(this); + super.markRemoved(); + } public StructureManagerBlockEntity(BlockPos pos, BlockState state) { super(ModBlockEntities.STRUCTURE_MANAGER, pos, state); @@ -154,8 +159,10 @@ public void showAllEntities() { public void respawnAllEntities() { if(structureNestList == null) return; + if(world == null || world.isClient) + return; for(var nest : structureNestList.getManagers()){ - nest.forceRespawn(managerData, world, pos); + nest.forceRespawn(managerData, (ServerWorld) world, pos); } } @@ -185,6 +192,11 @@ private void tickEvent(World world, BlockPos blockPos, BlockState blockState) { this.worldWasSet = false; } + if (!world.isClient && !this.registered) { + StructureManagerService.register(this); + this.registered = true; + } + if(!enabled) return; @@ -200,7 +212,7 @@ private void tickEvent(World world, BlockPos blockPos, BlockState blockState) { boolean haveToDoWellnessCheck = (timeOfDay > 11000 && timeOfDay < 12000) || (timeOfDay >= 23000) && !wellnessChecked; for(SpawnNestManager data : structureNestList.getManagers()){ if(managerData == null) - managerData = StructureManagerService.GetStructureManagerData(serverWorld, structureManagerIdentifier); + managerData = StructureManagerService.getStructureManagerData(serverWorld, structureManagerIdentifier); if(haveToDoWellnessCheck){ data.doWellnessCheck(managerData, serverWorld, blockPos); } @@ -218,7 +230,7 @@ private void tryToInitializeManager(World world){ if(structureManagerIdentifier == null) return; - this.managerData = StructureManagerService.GetStructureManagerData(world, structureManagerIdentifier); + this.managerData = StructureManagerService.getStructureManagerData(world, structureManagerIdentifier); if(structureNestList == null) this.structureNestList = new StructureNestList(); if(managerData == null) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/features/SpawnNestManager.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/features/SpawnNestManager.java index e2aa3d7e1f..ef978342db 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/features/SpawnNestManager.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/features/SpawnNestManager.java @@ -7,6 +7,7 @@ import net.minecraft.block.DoubleBlockProperties; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.util.Identifier; import net.minecraft.util.Uuids; import net.minecraft.util.math.BlockPos; @@ -122,7 +123,7 @@ public boolean canRespawn(long time){ return (entities.isEmpty() && time > respawnEventTriggerTick + respawnTickDelay); } - public void tick(StructureManagerData structureManagerData, long currentTick, World world, BlockPos sourcePos) { + public void tick(StructureManagerData structureManagerData, long currentTick, ServerWorld world, BlockPos sourcePos) { if(canRespawn(currentTick)){ respawnAll(structureManagerData, world, sourcePos); } @@ -142,7 +143,7 @@ public void doWellnessCheck(StructureManagerData structureManagerData, World wor } - private void respawnAll(StructureManagerData structureManagerData, World world, BlockPos structureManagerPos) { + private void respawnAll(StructureManagerData structureManagerData, ServerWorld world, BlockPos structureManagerPos) { if(structureManagerData == null) return; SpawnNestNodeData data = structureManagerData.getNpcSpawnNest(id); @@ -151,7 +152,7 @@ private void respawnAll(StructureManagerData structureManagerData, World world, StructureSpawnNestPool pool = data.getRandomPool(); int entityAmountToSpawn = pool.getEntityAmount(); for(int i = 0; i < entityAmountToSpawn; i ++){ - LivingEntity entityToAdd = StructureManagerService.SpawnEntity(world, pool, originPos, spawnRadius); + LivingEntity entityToAdd = StructureManagerService.spawnEntity(world, pool, originPos, spawnRadius); if(entityToAdd instanceof NpcEntity npcEntity){ npcEntity.assignStructureManager((StructureManagerBlockEntity) world.getBlockEntity(structureManagerPos)); } @@ -170,7 +171,7 @@ public boolean computeDeath(LivingEntity entity) { return false; } - public void forceRespawn(StructureManagerData structureManagerData, World world, BlockPos structureManagerPos) { + public void forceRespawn(StructureManagerData structureManagerData, ServerWorld world, BlockPos structureManagerPos) { for(var uuid : getEntityUuids()){ if(world.getEntity(uuid) instanceof LivingEntity livingEntity){ livingEntity.setRemoved(Entity.RemovalReason.DISCARDED); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/features/StructureManagerService.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/features/StructureManagerService.java index 8573fa96f4..787b1de1b0 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/features/StructureManagerService.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/features/StructureManagerService.java @@ -1,25 +1,37 @@ package net.sevenstars.middleearth.block.special.structureManager.features; +import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.SpawnReason; +import net.minecraft.entity.mob.MobEntity; +import net.minecraft.registry.RegistryKey; +import net.minecraft.server.world.ServerWorld; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; +import net.sevenstars.middleearth.block.special.structureManager.StructureManagerBlockEntity; import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.entity.npcs.initializer.NpcEntityBuilder; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.StructureManagerData; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.StructureManagerDataLookup; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.StructureSpawnNestPool; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + public class StructureManagerService { - public static StructureManagerData GetStructureManagerData(World world, Identifier structureManagerDataId){ + private static final Map, Set> STRUCTURE_MANAGERS = new HashMap<>(); + + public static StructureManagerData getStructureManagerData(World world, Identifier structureManagerDataId){ if(world == null) return null; var data = StructureManagerDataLookup.getStructureManagerData(world, structureManagerDataId); return data.orElse(null); } - public static LivingEntity SpawnEntity(World world, StructureSpawnNestPool pool, BlockPos pos, int spawnRadius){ + public static LivingEntity spawnEntity(ServerWorld world, StructureSpawnNestPool pool, BlockPos pos, int spawnRadius){ var random = world.getRandom(); int chances = 5; BlockPos chosenBlockPos = null; @@ -33,15 +45,16 @@ public static LivingEntity SpawnEntity(World world, StructureSpawnNestPool pool, if(chosenBlockPos == null) chosenBlockPos = pos; - LivingEntity entity; if(pool.getEntityType() == EntitiesME.NPC){ entity = new NpcEntityBuilder(world, chosenBlockPos) - .withNpcData(pool.getNpcIdentifier().get()) + .withNpcType(pool.getNpcIdentifier().get()) .build(); } else { entity = (LivingEntity) pool.getEntityType().create(world, SpawnReason.STRUCTURE); + if(entity instanceof MobEntity mob) + mob.initialize(world, world.getLocalDifficulty(pos), SpawnReason.STRUCTURE, null); entity.setPosition(chosenBlockPos.toCenterPos()); } @@ -51,4 +64,72 @@ public static LivingEntity SpawnEntity(World world, StructureSpawnNestPool pool, } return null; } + + public static void register(StructureManagerBlockEntity manager) { + World world = manager.getWorld(); + if (world == null || world.isClient()) + return; + STRUCTURE_MANAGERS.computeIfAbsent(world.getRegistryKey(), key -> new HashSet<>()) + .add(manager.getPos().toImmutable()); + } + + public static void unregister(StructureManagerBlockEntity manager) { + World world = manager.getWorld(); + if (world == null || world.isClient()) + return; + Set managers = STRUCTURE_MANAGERS.get(world.getRegistryKey()); + if (managers == null) + return; + + managers.remove(manager.getPos()); + if (managers.isEmpty()) + STRUCTURE_MANAGERS.remove(world.getRegistryKey()); + } + + public static boolean isClose(World world, BlockPos pos, int radius) { + Set managers = STRUCTURE_MANAGERS.get(world.getRegistryKey()); + + if (managers == null) { + return false; + } + + int radiusSquared = radius * radius; + + for (BlockPos managerPos : managers) { + if (managerPos.getSquaredDistance(pos) <= radiusSquared) { + return true; + } + } + + return false; + } + + public static StructureManagerBlockEntity getClosest(World world, BlockPos pos, int radius) { + Set managers = STRUCTURE_MANAGERS.get(world.getRegistryKey()); + + if (managers == null) { + return null; + } + + int radiusSquared = radius * radius; + double closestDistance = Double.MAX_VALUE; + StructureManagerBlockEntity closest = null; + + for (BlockPos managerPos : managers) { + double distance = managerPos.getSquaredDistance(pos); + + if (distance > radiusSquared || distance >= closestDistance) { + continue; + } + + BlockEntity blockEntity = world.getBlockEntity(managerPos); + + if (blockEntity instanceof StructureManagerBlockEntity structureManager) { + closestDistance = distance; + closest = structureManager; + } + } + + return closest; + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/nest/StructureNestBlockEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/nest/StructureNestBlockEntity.java index 936fd5bb70..490c059922 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/nest/StructureNestBlockEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/special/structureManager/nest/StructureNestBlockEntity.java @@ -19,6 +19,7 @@ import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.block.registration.ModBlockEntities; import net.sevenstars.middleearth.block.special.structureManager.StructureManagerBlockEntity; +import net.sevenstars.middleearth.block.special.structureManager.features.StructureManagerService; import net.sevenstars.middleearth.gui.structuremanager.structurenest.StructureNestScreenData; import net.sevenstars.middleearth.gui.structuremanager.structurenest.StructureNestScreenHandler; import org.jetbrains.annotations.Nullable; @@ -146,19 +147,12 @@ private void tickEvent(World world, BlockState blockState) { if(managerId == null || nestId == null || world.getTickOrder() % 20 != 0) // every 1 seconds return; - Optional nearestBlockEntity = BlockPos.findClosest(pos, 20, 20, new Predicate() { - @Override - public boolean test(BlockPos blockPos) { - var blockEntity = world.getBlockEntity(blockPos); - if(blockEntity != null && blockEntity instanceof StructureManagerBlockEntity) - return true; - return false; - } - }); - - if(nearestBlockEntity.isPresent()){ - StructureManagerBlockEntity blockEntity= ((StructureManagerBlockEntity)world.getBlockEntity(nearestBlockEntity.get())); - if(blockEntity.subscribeNest(this.pos, this.managerId, this.nestId, this.spawnRadius)) + StructureManagerBlockEntity structureManagerBlockEntity = StructureManagerService.getClosest(world, pos, 20); + if(structureManagerBlockEntity == null) { + fails++; + } + else { + if(structureManagerBlockEntity.subscribeNest(this.pos, this.managerId, this.nestId, this.spawnRadius)) { world.breakBlock(pos, false); world.removeBlockEntity(pos); @@ -167,10 +161,7 @@ public boolean test(BlockPos blockPos) { } else { fails++; } - } else { - fails++; } - if(fails >= 12) { world.breakBlock(pos, false); world.removeBlockEntity(pos); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/block/utils/setBuilders/GenericBlockSetBuilder.java b/middle-earth/src/main/java/net/sevenstars/middleearth/block/utils/setBuilders/GenericBlockSetBuilder.java index 0f3281206e..9b29e9cc53 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/block/utils/setBuilders/GenericBlockSetBuilder.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/block/utils/setBuilders/GenericBlockSetBuilder.java @@ -21,7 +21,7 @@ public class GenericBlockSetBuilder { public NoteBlockInstrument instrument; public BlockSoundGroup soundGroup; public boolean requiresTool; - public List group; + public List group; public GenericBlockSetBuilder(String name, float hardness, float blastResistance, MapColor mapColor, NoteBlockInstrument instrument, BlockSoundGroup soundGroup, boolean requiresTool, diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/client/RenderUtil.java b/middle-earth/src/main/java/net/sevenstars/middleearth/client/RenderUtil.java new file mode 100644 index 0000000000..20e7faeeb1 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/client/RenderUtil.java @@ -0,0 +1,43 @@ +package net.sevenstars.middleearth.client; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.client.render.RenderLayer; +import net.minecraft.client.render.VertexConsumer; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.entity.model.EntityModel; +import net.minecraft.client.texture.Sprite; +import net.minecraft.client.texture.SpriteAtlasTexture; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.util.Identifier; + +@Environment(EnvType.CLIENT) +public final class RenderUtil { + private RenderUtil() { + } + + public static void renderCutoutTexture(EntityModel model, MatrixStack matrices, + VertexConsumerProvider vertexConsumers, Identifier texture, + int light, int overlay) { + renderModel(model, matrices, vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(texture)), light, overlay); + } + + public static void renderEmissiveTexture(EntityModel model, MatrixStack matrices, + VertexConsumerProvider vertexConsumers, Identifier texture, + int light, int overlay) { + renderModel(model, matrices, vertexConsumers.getBuffer(RenderLayer.getEntityTranslucentEmissive(texture)), light, overlay); + } + + public static void renderAtlasTexture(SpriteAtlasTexture atlas, EntityModel model, MatrixStack matrices, + VertexConsumer vertexConsumer, Identifier textureId, int light, int overlay) { + Sprite sprite = atlas.getSprite(textureId); + if(sprite != null) { + VertexConsumer textureSpecificVertexConsumer = sprite.getTextureSpecificVertexConsumer(vertexConsumer); + renderModel(model, matrices, textureSpecificVertexConsumer, light, overlay); + } + } + + public static void renderModel(EntityModel model, MatrixStack matrices, VertexConsumer vertexConsumer, int light, int overlay) { + model.render(matrices, vertexConsumer, light, overlay); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/commands/custom/CommandFaction.java b/middle-earth/src/main/java/net/sevenstars/middleearth/commands/custom/CommandFaction.java index 4a980667c9..013f744d52 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/commands/custom/CommandFaction.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/commands/custom/CommandFaction.java @@ -107,7 +107,7 @@ private static int getBanner(CommandContext context) { try{ Faction faction = FactionLookup.getFactionById(source.getWorld(), factionIdentifier); - source.giveItemStack(faction.getBannerItem(source.getWorld())); + source.giveItemStack(faction.getBannerItem(source.getWorld().getRegistryManager())); MutableText sourceText = Text.translatable("command.%s.faction.banner.success".formatted(MiddleEarth.MOD_ID), faction.getFullName().formatted(Formatting.GOLD)); source.sendMessage(sourceText.withColor(ModColors.SUCCESS.color)); } catch (FactionIdentifierException e){ diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/compat/REICommonPluginME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/compat/REICommonPluginME.java index 6d1ac5c8d4..83867e0660 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/compat/REICommonPluginME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/compat/REICommonPluginME.java @@ -43,8 +43,10 @@ public void registerDisplays(ServerDisplayRegistry registry) { Collection> alloyRecipeEntryList = GameInstance.getServer().getRecipeManager().getAllOfType(RecipesME.FORGE); for(RecipeEntry recipeEntry : alloyRecipeEntryList) { AlloyingRecipe alloyRecipe = recipeEntry.value(); - List inputs = AlloyingDisplay.getInputs(alloyRecipe); - registry.add(new AlloyingDisplay(inputs, alloyRecipe.output, alloyRecipe.amount)); + if(!alloyRecipe.output.contains("nugget")) { + List inputs = AlloyingDisplay.getInputs(alloyRecipe); + registry.add(new AlloyingDisplay(inputs, alloyRecipe.output, alloyRecipe.amount)); + } } } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/HelpingGenerator.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/HelpingGenerator.java index 6fa55bcaf8..2c238f830c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/HelpingGenerator.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/HelpingGenerator.java @@ -26,52 +26,59 @@ public static void generateFiles() { for (StoneBlockSetBuilder set : StoneBlockSets.stoneSetsList){ set.existingList.forEach(stoneBlockTypes -> { switch (stoneBlockTypes){ - case BASE_BLOCKS -> mainStoneBlocks(set.baseBlocks); + case BASE_BLOCKS -> { + mainStoneBlocks(set.baseBlocks); + MineablePickaxe.baseStoneOverworld.add(set.baseBlocks.base()); + } case COBBLED_BLOCKS,COBBLESTONE_BLOCKS,PILLAR_BASE_BLOCKS -> { - regularBlocks(set.cobblestoneBlocks); - if(set.hasMossy) regularBlocks(set.mossyCobblestoneBlocks); + regularBlocks(set.cobblestoneBlocks, 1); + if(set.hasMossy) regularBlocks(set.mossyCobblestoneBlocks, 1); } case BRICK_BLOCKS, POLISHED_BRICK_BLOCKS -> { - regularBlocks(set.brickBlocks); - if(set.hasMossy) regularBlocks(set.mossyBrickBlocks); - if(set.hasCracked) regularBlocks(set.crackedBrickBlocks); + regularBlocks(set.brickBlocks, 1); + if(set.hasMossy) regularBlocks(set.mossyBrickBlocks, 1); + if(set.hasCracked) regularBlocks(set.crackedBrickBlocks, 1); } case TILE_BLOCKS -> { - regularBlocks(set.tileBlocks); - if(set.hasMossy) regularBlocks(set.mossyTileBlocks); - if(set.hasCracked) regularBlocks(set.crackedTileBlocks); + regularBlocks(set.tileBlocks, 1); + if(set.hasMossy) regularBlocks(set.mossyTileBlocks, 1); + if(set.hasCracked) regularBlocks(set.crackedTileBlocks, 1); } case SMOOTH_BLOCKS -> { - regularBlocks(set.smoothBlocks); - if(set.hasMossy) regularBlocks(set.mossySmoothBlocks); - if(set.hasCracked) regularBlocks(set.crackedSmoothBlocks); + regularBlocks(set.smoothBlocks, 1); + if(set.hasMossy) regularBlocks(set.mossySmoothBlocks, 1); + if(set.hasCracked) regularBlocks(set.crackedSmoothBlocks, 1); } case POLISHED_BLOCKS, POLISHED_BLOCKS_PILLAR -> { - regularBlocks(set.polishedBlocks); - if(set.hasMossy) regularBlocks(set.mossyPolishedBlocks); - if(set.hasCracked) regularBlocks(set.crackedPolishedBlocks); + regularBlocks(set.polishedBlocks, 1); + if(set.hasMossy) regularBlocks(set.mossyPolishedBlocks, 1); + if(set.hasCracked) regularBlocks(set.crackedPolishedBlocks, 1); + } + case BRICKWORK_BLOCKS -> regularBlocks(set.brickworkBlocks, 1); + case OLD_BLOCKS, OLD_BLOCKS_PILLAR -> { + regularBlocks(set.oldBlocks, 1); + MineablePickaxe.baseStoneOverworld.add(set.oldBlocks.base()); } - case BRICKWORK_BLOCKS -> regularBlocks(set.brickworkBlocks); - case OLD_BLOCKS, OLD_BLOCKS_PILLAR -> regularBlocks(set.oldBlocks); case PILLAR_BLOCKS -> { - pillarBlocks(set.pillarBlocks, set.brickBlocks.base()); - if(set.hasMossy) pillarBlocks(set.mossyPillarBlocks, set.pillarBlocks.base()); - if(set.hasCracked) pillarBlocks(set.crackedPillarBlocks, set.pillarBlocks.base()); + pillarBlocks(set.pillarBlocks, set.brickBlocks.base(), 1); + if(set.hasMossy) pillarBlocks(set.mossyPillarBlocks, set.pillarBlocks.base(), 1); + if(set.hasCracked) pillarBlocks(set.crackedPillarBlocks, set.pillarBlocks.base(), 1); } case CHISELED_BLOCKS -> { - if (set.existingList.contains(StoneBlockTypes.BASE_BLOCKS)) pillarBlocks(set.chiseledBlocks, set.baseBlocks.base()); - if (set.existingList.contains(StoneBlockTypes.BRICK_BLOCKS)) pillarBlocks(set.chiseledBricksBlocks, set.brickBlocks.base()); - if (set.existingList.contains(StoneBlockTypes.POLISHED_BRICK_BLOCKS)) pillarBlocks(set.chiseledBricksBlocks, set.brickBlocks.base()); - if (set.existingList.contains(StoneBlockTypes.POLISHED_BLOCKS) || set.existingList.contains(StoneBlockTypes.POLISHED_BLOCKS_PILLAR)) pillarBlocks(set.chiseledPolishedBlocks, set.polishedBlocks.base()); - if (set.existingList.contains(StoneBlockTypes.TILE_BLOCKS)) pillarBlocks(set.chiseledTilesBlocks, set.tileBlocks.base()); - if (set.existingList.contains(StoneBlockTypes.SMOOTH_BLOCKS)) pillarBlocks(set.chiseledSmoothBlocks, set.smoothBlocks.base()); + if (set.existingList.contains(StoneBlockTypes.BASE_BLOCKS)) pillarBlocks(set.chiseledBlocks, set.baseBlocks.base(), 1); + if (set.existingList.contains(StoneBlockTypes.BRICK_BLOCKS)) pillarBlocks(set.chiseledBricksBlocks, set.brickBlocks.base(), 1); + if (set.existingList.contains(StoneBlockTypes.POLISHED_BRICK_BLOCKS)) pillarBlocks(set.chiseledBricksBlocks, set.brickBlocks.base(), 1); + if (set.existingList.contains(StoneBlockTypes.POLISHED_BLOCKS) || set.existingList.contains(StoneBlockTypes.POLISHED_BLOCKS_PILLAR)) + pillarBlocks(set.chiseledPolishedBlocks, set.polishedBlocks.base(), 1); + if (set.existingList.contains(StoneBlockTypes.TILE_BLOCKS)) pillarBlocks(set.chiseledTilesBlocks, set.tileBlocks.base(), 1); + if (set.existingList.contains(StoneBlockTypes.SMOOTH_BLOCKS)) pillarBlocks(set.chiseledSmoothBlocks, set.smoothBlocks.base(), 1); } case CHISELED_BLOCKS_NO_RESTRICTION -> { - pillarBlocks(set.chiseledBlocks, null); - pillarBlocks(set.chiseledBricksBlocks, null); - pillarBlocks(set.chiseledPolishedBlocks, null); - pillarBlocks(set.chiseledTilesBlocks, null); - pillarBlocks(set.chiseledSmoothBlocks, null); + pillarBlocks(set.chiseledBlocks, null, 1); + pillarBlocks(set.chiseledBricksBlocks, null, 1); + pillarBlocks(set.chiseledPolishedBlocks, null, 1); + pillarBlocks(set.chiseledTilesBlocks, null, 1); + pillarBlocks(set.chiseledSmoothBlocks, null, 1); } case CARVED_WINDOW -> { if(set.baseBlocks == null) carvedWindowBlocks(set.carvedWindows, set.cobblestoneBlocks.base()); @@ -82,8 +89,8 @@ public static void generateFiles() { } for (WoodBlockSetBuilder set : WoodBlockSets.woodSetsList){ - set.existingList.forEach(stoneBlockTypes -> { - switch (stoneBlockTypes){ + set.existingList.forEach(woodBlockTypes -> { + switch (woodBlockTypes){ case LOG_BLOCKS, NETHER_STEM_BLOCKS -> woodBlocks(set.logBlocks); case MUSHROOM_STEM_BLOCKS -> mushroomStemBlocks(set.mushroomStemBlocks); case STRIPPED_LOG_BLOCKS, STRIPPED_STEM_BLOCKS -> { @@ -93,9 +100,9 @@ public static void generateFiles() { case PLANK_BLOCKS -> plankBlocks(set.planksBlocks); case SHINGLE_BLOCKS -> { Shingles.shingles.add(set.shinglesBlocks.base()); - regularBlocks(set.shinglesBlocks); + regularBlocks(set.shinglesBlocks, 0); } - case ROOFING_BLOCKS -> regularBlocks(set.roofingBlocks); + case ROOFING_BLOCKS -> regularBlocks(set.roofingBlocks, 0); case FURNITURE_BLOCKS -> furnitureBlocks(set.furnitureBlocks, set.planksBlocks.base()); case REDSTONE_BLOCKS -> woodRedstoneBlocks(set.redstoneBlocks, set.planksBlocks.base()); case LEAVES -> { @@ -112,10 +119,15 @@ public static void generateFiles() { } for (GenericBlockSetBuilder set : GenericBlockSets.genericSetsList) { - regularBlocks(set.blockSet); + int tool = -1; + if(set.requiresTool) { + if(set.setName.contains("wood")) tool = 0; + else if(set.setName.contains("clay") || set.setName.contains("stone") || set.setName.contains("brick") || set.setName.contains("tiles")) tool = 1; + } + regularBlocks(set.blockSet, tool); } for (SimpleBlockSetBuilder set : GenericBlockSets.simpleSetsList) { - regularBlocks(set.blockSet); + regularBlocks(set.blockSet, -1); } SimpleBlockModel.blocks.addAll(LeavesSets.leaves); @@ -221,8 +233,14 @@ public static void generateFiles() { } } - public static void addBlocksToLists(Block block, Block base, Block origin){ - MineablePickaxe.blocks.add(block); + // -1 == nothing, 0 == axe, 1 == pickaxe, 2 == shovel, 3 == hoe + public static void addBlocksToLists(Block block, Block base, Block origin, int tool){ + switch(tool) { + case 0 -> MineableAxe.blocks.add(block); + case 1 -> MineablePickaxe.blocks.add(block); + case 3 -> MineableHoe.blocks.add(block); + } + BlockDrops.blocks.add(block); String blockName = block.getName().toString(); @@ -336,47 +354,48 @@ public static void addBlocksToLists(Block block, Block base, Block origin){ } } - public static void regularBlocks(BlockRecordTypes.RegularSet set) { - BlockRecordTypes.RegularSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.slab())); + public static void regularBlocks(BlockRecordTypes.RegularSet set, int tool) { + BlockRecordTypes.RegularSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.slab(), tool)); } - public static void regularBlocks(BlockRecordTypes.SimpleBlocks set) { - BlockRecordTypes.SimpleBlocks.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.slab())); + public static void regularBlocks(BlockRecordTypes.SimpleBlocks set, int tool) { + BlockRecordTypes.SimpleBlocks.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.slab(), tool)); } - public static void pillarBlocks(BlockRecordTypes.PillarSet set, Block origin) { - BlockRecordTypes.PillarSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.verticalSlab())); + public static void pillarBlocks(BlockRecordTypes.PillarSet set, Block origin, int tool) { + BlockRecordTypes.PillarSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.verticalSlab(), tool)); } public static void carvedWindowBlocks(BlockRecordTypes.CarvedWindow set, Block origin) { - BlockRecordTypes.CarvedWindow.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.block(), origin)); + BlockRecordTypes.CarvedWindow.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.block(), origin, 1)); } public static void mainStoneBlocks(BlockRecordTypes.BaseStoneSet set){ - BlockRecordTypes.BaseStoneSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.slab())); + BlockRecordTypes.BaseStoneSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.slab(), 1)); } public static void plankBlocks(BlockRecordTypes.PlanksSet set) { - BlockRecordTypes.PlanksSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.slab())); + BlockRecordTypes.PlanksSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.base(), set.slab(), 0)); WoodenVerticalSlabs.woodenVericalSlabs.add(set.verticalSlab()); Planks.planks.add(set.base()); + Planks.planksSlabs.add(set.slab()); } public static void woodBlocks(BlockRecordTypes.WoodSet set) { - BlockRecordTypes.WoodSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.wood(), set.slab())); + BlockRecordTypes.WoodSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.wood(), set.slab(), 0)); Logs.logs.add(set.log()); Logs.logs.add(set.wood()); } public static void mushroomStemBlocks(BlockRecordTypes.MushroomStemSet set) { - BlockRecordTypes.MushroomStemSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.stem(), set.slab())); + BlockRecordTypes.MushroomStemSet.getAllBlocks(set).forEach(block -> addBlocksToLists(block, set.stem(), set.slab(), 0)); } public static void furnitureBlocks(BlockRecordTypes.WoodFurnitureBlocks set, Block base) { - BlockRecordTypes.WoodFurnitureBlocks.getAllBlocks(set).forEach(block -> addBlocksToLists(block, base, null)); + BlockRecordTypes.WoodFurnitureBlocks.getAllBlocks(set).forEach(block -> addBlocksToLists(block, base, null, 0)); } public static void woodRedstoneBlocks(BlockRecordTypes.WoodRedstoneBlocks set, Block base) { - BlockRecordTypes.WoodRedstoneBlocks.getAllBlocks(set).forEach(block -> addBlocksToLists(block, base, null)); + BlockRecordTypes.WoodRedstoneBlocks.getAllBlocks(set).forEach(block -> addBlocksToLists(block, base, null, 0)); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/TranslationEntries.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/TranslationEntries.java index 659cc81f30..bec75e49dc 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/TranslationEntries.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/TranslationEntries.java @@ -35,7 +35,7 @@ public class TranslationEntries { }; public static List factionEntries = new ArrayList<>() { }; - public static List npcDataEntries = new ArrayList<>() { + public static List npcTypeEntries = new ArrayList<>() { }; public static List structureManagerEntries = new ArrayList<>() { }; @@ -145,6 +145,8 @@ public class TranslationEntries { put("advancements.smithing.dwarven_lantern.description", "Craft a dwarven lantern"); put("advancements.smithing.elven_lantern.title", "Light of the Elves"); put("advancements.smithing.elven_lantern.description", "Light your way like the Quendi"); + put("advancements.smithing.hot_ones.title", "Hot Ones"); + put("advancements.smithing.hot_ones.description", "Eat a spicy chicken nugget"); put("effect."+ MiddleEarth.MOD_ID +".hallucination", "Hallucination"); put("effect."+ MiddleEarth.MOD_ID +".enshrouded", "Enshrouded"); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/models/HotMetalsModel.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/models/HotMetalsModel.java index 850824934f..5a83e22f97 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/models/HotMetalsModel.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/models/HotMetalsModel.java @@ -49,6 +49,16 @@ public record ShapingItem(Item item, Item output, int amount) {} } }; + public static List nuggies = new ArrayList<>() { + { + add(ResourceItemsME.PTEROSAUR_NUGGET); + add(ResourceItemsME.THERAPOD_NUGGET); + add(ResourceItemsME.CERATOPSIAN_NUGGET); + add(ResourceItemsME.THYREOPHORAN_NUGGET); + add(ResourceItemsME.SAUROPOD_NUGGET); + } + }; + public static List items = new ArrayList<>() { { add(ResourceItemsME.AXE_HEAD); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/models/SimpleItemModel.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/models/SimpleItemModel.java index 49e0fadc5c..67b761e450 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/models/SimpleItemModel.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/models/SimpleItemModel.java @@ -48,7 +48,6 @@ public class SimpleItemModel { add(ResourceItemsME.LETTUCE_SEEDS); add(ResourceItemsME.STRAW); - add(ResourceItemsME.REEDS.asItem()); add(ResourceItemsME.PIPEWEED_BANNER_PATTERN); add(ResourceItemsME.GONDOR_BANNER_PATTERN); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/ArmorTags.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/ArmorTags.java index e2c31d08ce..1291ca0726 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/ArmorTags.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/ArmorTags.java @@ -47,7 +47,6 @@ public static void registerRecipesTemplates() { add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.MORDOR_SNOUT_HELMET)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.BLACK_URUK_PLATE_HELMET)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.BLACK_URUK_FACE_PLATE_HELMET)); - add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.BLACK_CASTELLAN_HELMET)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, true, EquipmentItemsME.MORDOR_BLACK_NUMENOREAN_PLATE_HELMET)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.DOL_GULDUR_MARAUDER_HELMET)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.WEATHERED_DOL_GULDUR_MARAUDER_HELMET)); @@ -87,7 +86,6 @@ public static void registerRecipesTemplates() { add(new RecipeItem(DispositionType.GOOD, MetalTypes.EDHEL_STEEL, false, EquipmentItemsME.WARRIOR_OF_THE_NIGHTSHADE_BOOTS)); add(new RecipeItem(DispositionType.GOOD, MetalTypes.EDHEL_STEEL, true, EquipmentItemsME.WOODLAND_REALM_COMMANDER_BOOTS)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.BLACK_URUK_PLATE_BOOTS)); - add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.BLACK_CASTELLAN_BOOTS)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, true, EquipmentItemsME.MORDOR_BLACK_NUMENOREAN_PLATE_BOOTS)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.DOL_GULDUR_MARAUDER_BOOTS)); add(new RecipeItem(DispositionType.EVIL, MetalTypes.BURZUM_STEEL, false, EquipmentItemsME.WEATHERED_DOL_GULDUR_MARAUDER_BOOTS)); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/Logs.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/Logs.java index da32c7d88b..4299c07031 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/Logs.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/Logs.java @@ -14,7 +14,7 @@ public class Logs { } }; - public static List getItemPlanks() { + public static List getItemLogs() { ArrayList newList = new ArrayList<>(); for (Block block : logs) { newList.add(block.asItem()); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/MineablePickaxe.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/MineablePickaxe.java index 025ecc59bc..70ede9b811 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/MineablePickaxe.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/MineablePickaxe.java @@ -8,6 +8,12 @@ import java.util.List; public class MineablePickaxe { + public static List baseStoneOverworld = new ArrayList<>() { + { + + } + }; + public static List blocks = new ArrayList<>() { { add(ModBlocks.POINTED_GALONN); @@ -33,6 +39,8 @@ public class MineablePickaxe { add(ModDecorativeBlocks.CRUDE_ROD); add(ModDecorativeBlocks.TREATED_STEEL_ROD); + add(ModBlocks.BURZUM_SPIKES); + add(ModDecorativeBlocks.BRONZE_CHAIN); add(ModDecorativeBlocks.BRONZE_BROAD_CHAIN); add(ModDecorativeBlocks.CRUDE_CHAIN); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/Planks.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/Planks.java index 42b71ad1c4..fda7895cc6 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/Planks.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/content/tags/Planks.java @@ -15,7 +15,21 @@ public class Planks { public static List getItemPlanks() { ArrayList newList = new ArrayList<>(); - for (Block block : planks) { + for(Block block : planks) { + newList.add(block.asItem()); + } + return newList; + } + + public static List planksSlabs = new ArrayList<>() { + { + + } + }; + + public static List getItemPlanksSlabs() { + ArrayList newList = new ArrayList<>(); + for(Block block : planksSlabs) { newList.add(block.asItem()); } return newList; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/custom/AlloyRecipeJsonBuilder.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/custom/AlloyRecipeJsonBuilder.java index 54210bdfee..671b194751 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/custom/AlloyRecipeJsonBuilder.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/custom/AlloyRecipeJsonBuilder.java @@ -32,14 +32,16 @@ public class AlloyRecipeJsonBuilder implements CraftingRecipeJsonBuilder { private final int metalAmount; private final Map> criteria = new LinkedHashMap<>(); private String group; + private final int xp; private final RegistryEntryLookup registryLookup; - public AlloyRecipeJsonBuilder(RegistryEntryLookup registryLookup, RecipeCategory category, String metalOutput, int metalAmount) { + public AlloyRecipeJsonBuilder(RegistryEntryLookup registryLookup, RecipeCategory category, String metalOutput, int metalAmount, int xp) { this.registryLookup = registryLookup; this.category = category; this.metalOutput = metalOutput; this.metalAmount = metalAmount; + this.xp = xp; } @Override @@ -59,7 +61,8 @@ public void offerTo(RecipeExporter exporter, RegistryKey> recipeKey) { Advancement.Builder builder = exporter.getAdvancementBuilder().criterion("has_the_recipe", RecipeUnlockedCriterion.create(recipeKey)).rewards(AdvancementRewards.Builder.recipe(recipeKey)).criteriaMerger(AdvancementRequirements.CriterionMerger.OR); Objects.requireNonNull(builder); this.criteria.forEach(builder::criterion); - AlloyingRecipe alloyRecipeJsonBuilder = new AlloyingRecipe((String)Objects.requireNonNullElse(this.group, ""), CraftingRecipeJsonBuilder.toCraftingCategory(this.category), this.metalOutput, this.inputs, this.metalAmount); + AlloyingRecipe alloyRecipeJsonBuilder = new AlloyingRecipe((String)Objects.requireNonNullElse(this.group, ""), + CraftingRecipeJsonBuilder.toCraftingCategory(this.category), this.metalOutput, this.inputs, this.metalAmount, this.xp); exporter.accept(recipeKey, alloyRecipeJsonBuilder, builder.build(recipeKey.getValue().withPrefixedPath("recipes/" + this.category.getName() + "/"))); } @@ -71,8 +74,8 @@ public int getMetalAmount() { return this.metalAmount; } - public static AlloyRecipeJsonBuilder createAlloyRecipe(RegistryEntryLookup registryLookup, RecipeCategory category, String output, int amount) { - return new AlloyRecipeJsonBuilder(registryLookup, category, output, amount); + public static AlloyRecipeJsonBuilder createAlloyRecipe(RegistryEntryLookup registryLookup, RecipeCategory category, String output, int amount, int xp) { + return new AlloyRecipeJsonBuilder(registryLookup, category, output, amount, xp); } public AlloyRecipeJsonBuilder input(TagKey tag) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/custom/ArtisanTableRecipeJsonBuilder.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/custom/ArtisanTableRecipeJsonBuilder.java index d6f4e955a0..5aaf436d2a 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/custom/ArtisanTableRecipeJsonBuilder.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/custom/ArtisanTableRecipeJsonBuilder.java @@ -34,16 +34,19 @@ public class ArtisanTableRecipeJsonBuilder implements CraftingRecipeJsonBuilder private final ItemStack output; private final DispositionType dispositionType; private final Map> criteria = new LinkedHashMap<>(); + private final int xp; private String group; private final RegistryEntryLookup registryLookup; - public ArtisanTableRecipeJsonBuilder(RegistryEntryLookup registryLookup, RecipeCategory category, ItemStack output, String tab, DispositionType dispositionType) { + public ArtisanTableRecipeJsonBuilder(RegistryEntryLookup registryLookup, RecipeCategory category, ItemStack output, + String tab, DispositionType dispositionType, int xp) { this.registryLookup = registryLookup; this.category = category; this.output = output; this.tab = tab; this.dispositionType = dispositionType; + this.xp = xp; } @Override @@ -63,15 +66,22 @@ public void offerTo(RecipeExporter exporter, RegistryKey> recipeKey) { Advancement.Builder builder = exporter.getAdvancementBuilder().criterion("has_the_recipe", RecipeUnlockedCriterion.create(recipeKey)).rewards(AdvancementRewards.Builder.recipe(recipeKey)).criteriaMerger(AdvancementRequirements.CriterionMerger.OR); Objects.requireNonNull(builder); this.criteria.forEach(builder::criterion); - ArtisanRecipe artisanRecipe = new ArtisanRecipe(this.tab, this.output, this.inputs, this.dispositionType.toString().toLowerCase()); + ArtisanRecipe artisanRecipe = new ArtisanRecipe(this.tab, this.output, this.inputs, this.dispositionType.toString().toLowerCase(), this.xp); exporter.accept(recipeKey, artisanRecipe, builder.build(recipeKey.getValue().withPrefixedPath("recipes/" + this.category.getName() + "/"))); } - public static ArtisanTableRecipeJsonBuilder createArtisanRecipe(RegistryEntryLookup registryLookup, RecipeCategory category, ItemStack output, String tab, DispositionType dispositionType) { - return new ArtisanTableRecipeJsonBuilder(registryLookup, category, output, tab, dispositionType); + public static ArtisanTableRecipeJsonBuilder createArtisanRecipe(RegistryEntryLookup registryLookup, RecipeCategory category, + ItemStack output, String tab, DispositionType dispositionType, int xp) { + return new ArtisanTableRecipeJsonBuilder(registryLookup, category, output, tab, dispositionType, xp); } + + public static ArtisanTableRecipeJsonBuilder createArtisanRecipe(RegistryEntryLookup registryLookup, RecipeCategory category, + ItemStack output, String tab, DispositionType dispositionType) { + return new ArtisanTableRecipeJsonBuilder(registryLookup, category, output, tab, dispositionType, 0); + } + public static ArtisanTableRecipeJsonBuilder createArtisanRecipe(RegistryEntryLookup registryLookup, RecipeCategory category, ItemStack output, String tab) { - return new ArtisanTableRecipeJsonBuilder(registryLookup, category, output, tab, null); + return new ArtisanTableRecipeJsonBuilder(registryLookup, category, output, tab, null, 0); } public ArtisanTableRecipeJsonBuilder input(TagKey tag) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/BlockLootTableProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/BlockLootTableProvider.java index 782650c4f9..aa41d6b5f4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/BlockLootTableProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/BlockLootTableProvider.java @@ -33,6 +33,7 @@ import net.sevenstars.middleearth.datageneration.content.models.SimplePaneModel; import net.sevenstars.middleearth.datageneration.content.models.SimpleRocksModel; import net.sevenstars.middleearth.datageneration.content.models.TintableCrossModel; +import net.sevenstars.middleearth.datageneration.content.tags.Saplings; import net.sevenstars.middleearth.item.DecorativeItemsME; import net.sevenstars.middleearth.item.ResourceItemsME; @@ -40,6 +41,7 @@ public class BlockLootTableProvider extends FabricBlockLootTableProvider { private final CompletableFuture registryLookup; + protected static final float[] SAPLING_COMMON_DROP_CHANCE = new float[]{0.1F, 0.1625F, 0.183333336F, 0.2F}; public BlockLootTableProvider(FabricDataOutput dataOutput, CompletableFuture registryLookup) { super(dataOutput, registryLookup); @@ -102,11 +104,18 @@ public void generate() { for (LeavesDrops.LeavesDrop drop : LeavesDrops.blocks) { RegistryWrapper.Impl impl = this.registries.getOrThrow(RegistryKeys.ENCHANTMENT); if (drop.toString().contains("pine")) { - leavesDrops(drop.block(), drop.drop(), SAPLING_DROP_CHANCE).pool(LootPool.builder().rolls(ConstantLootNumberProvider.create(1.0F)).conditionally(this.createWithoutShearsOrSilkTouchCondition()).with(((LeafEntry.Builder)this.addSurvivesExplosionCondition(drop.block(), ItemEntry.builder(Items.APPLE))).conditionally(TableBonusLootCondition.builder(impl.getOrThrow(Enchantments.FORTUNE), new float[]{0.005F, 0.0055555557F, 0.00625F, 0.008333334F, 0.025F})))); + addDrop(drop.block(), this.leavesDrops(drop.block(), drop.drop(), SAPLING_COMMON_DROP_CHANCE).pool( + LootPool.builder().rolls(ConstantLootNumberProvider.create(1.0F)).conditionally(this.createWithoutShearsOrSilkTouchCondition()) + .with(((LeafEntry.Builder)this.addSurvivesExplosionCondition(drop.block(), ItemEntry.builder(ResourceItemsME.PINECONE))) + .conditionally(TableBonusLootCondition.builder(impl.getOrThrow(Enchantments.FORTUNE), + 0.025F, 0.03F, 0.035F, 0.04F, 0.045F))))); } else { addDrop(drop.block(), this.leavesDrops(drop.block(), drop.drop(), SAPLING_DROP_CHANCE)); } } + for (Block sapling : Saplings.saplings) { + addDrop(sapling); + } for (CropDrops.CropDrop cd : CropDrops.crops) { addDrop(cd.crop_block, cropDrops(cd.crop_block, cd.fruit, cd.seeds, cd.builder)); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/LanguageProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/LanguageProvider.java index eae8ccf71b..e7c704e911 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/LanguageProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/LanguageProvider.java @@ -99,8 +99,8 @@ public void generateTranslations(RegistryWrapper.WrapperLookup wrapperLookup, Tr createTranslation(translationBuilder, "faction", faction); }); - TranslationEntries.npcDataEntries.forEach(npcData -> { - createNpcDataTranslation(translationBuilder, "npc_data", npcData); + TranslationEntries.npcTypeEntries.forEach(npcData -> { + createNpcDataTranslation(translationBuilder, "npc_type", npcData); }); TranslationEntries.raceEntries.forEach(race -> { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/dynamic/NpcProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/dynamic/NpcProvider.java index 0989699d4b..0c94cf3f72 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/dynamic/NpcProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/dynamic/NpcProvider.java @@ -14,10 +14,10 @@ public NpcProvider(FabricDataOutput output, CompletableFuture { @@ -172,7 +176,7 @@ public void generateItemModels(ItemModelGenerator itemModelGenerator) { List models = new ArrayList<>(List.of()); - NpcRegistry.allNpcDatas.forEach(npcDataRegistryKey -> { + NpcRegistry.allNpcTypes.forEach(npcDataRegistryKey -> { String id = npcDataRegistryKey.getValue().getPath().replaceAll("npc_data.middle-earth.", "").replaceAll("\\.", "_") + "_spawn_egg"; var item = ItemModels.switchCase(id, diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableArmorRecipeProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableArmorRecipeProvider.java index 9da4fd0d35..9abdee6074 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableArmorRecipeProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableArmorRecipeProvider.java @@ -31,6 +31,12 @@ import java.util.concurrent.CompletableFuture; public class ArtisanTableArmorRecipeProvider extends RecipeProvider { + private static final int XP_T2 = 1; + private static final int XP_T3 = 4; + private static final int XP_T4 = 9; + private static final int XP_T5 = 12; + private static final int XP_STEEL_ITEM = 3; + private static final int XP_NOBLE_ITEM = 5; private final CompletableFuture registryLookup; @@ -167,7 +173,7 @@ public void generate() { //region GONDOR //T2 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -177,7 +183,7 @@ public void generate() { .offerTo(exporter); //T3 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CABASSET_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CABASSET_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -187,7 +193,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -200,7 +206,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_LEATHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_LEATHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -213,7 +219,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_LEATHER_CUIRASS.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_LEATHER_CUIRASS.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -226,7 +232,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_TABBARD.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_TABBARD.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) @@ -239,7 +245,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -252,7 +258,7 @@ public void generate() { .offerTo(exporter); //T4 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelHelmetPlate.getItem()), steelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) @@ -262,7 +268,7 @@ public void generate() { conditionsFromItem(steelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_SOLDIER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_SOLDIER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -276,7 +282,7 @@ public void generate() { .offerTo(exporter); //T5 PLATE - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelChainmail.getItem()), steelChainmail.getComponentChanges())) @@ -289,7 +295,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_SOLDIER_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.GONDORIAN_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -302,7 +308,7 @@ public void generate() { .offerTo(exporter); //T5 CAPTAIN - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CAPTAIN_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CAPTAIN_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .input(EquipmentItemsME.GONDORIAN_PLATE_HELMET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) @@ -313,7 +319,7 @@ public void generate() { .offerTo(exporter); //T5 KING'S GUARD - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_KINGS_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_KINGS_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .input(Items.FEATHER) .input(EquipmentItemsME.GONDORIAN_PLATE_HELMET) .input(Items.FEATHER) @@ -323,7 +329,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_PLATE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_KINGS_GUARD_CHESTKPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_KINGS_GUARD_CHESTKPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -336,7 +342,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_PLATE_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_KINGS_GUARD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_KINGS_GUARD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelChainmail.getItem()), steelChainmail.getComponentChanges())) .input(EquipmentItemsME.GONDORIAN_PLATE_LEGGINGS) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelChainmail.getItem()), steelChainmail.getComponentChanges())) @@ -349,7 +355,7 @@ public void generate() { .offerTo(exporter); //T5 CITADEL GUARD - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CITADEL_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CITADEL_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .input(EquipmentItemsME.GONDORIAN_PLATE_HELMET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) @@ -359,7 +365,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_PLATE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CITADEL_GUARD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CITADEL_GUARD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) @@ -372,7 +378,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_PLATE_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CITADEL_GUARD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CITADEL_GUARD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelChainmail.getItem()), steelChainmail.getComponentChanges())) .input(EquipmentItemsME.GONDORIAN_PLATE_LEGGINGS) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelChainmail.getItem()), steelChainmail.getComponentChanges())) @@ -384,7 +390,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_PLATE_LEGGINGS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CITADEL_GUARD_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_CITADEL_GUARD_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -394,7 +400,7 @@ public void generate() { .offerTo(exporter); //T5 FOUNTAIN GUARD - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .input(ResourceItemsME.MITHRIL_NUGGET) .input(EquipmentItemsME.GONDORIAN_CAPTAIN_HELMET) .input(ResourceItemsME.MITHRIL_NUGGET) @@ -404,7 +410,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_CAPTAIN_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) @@ -417,7 +423,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_PLATE_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .input(ResourceItemsME.FABRIC) .input(EquipmentItemsME.GONDORIAN_PLATE_LEGGINGS) .input(ResourceItemsME.FABRIC) @@ -529,7 +535,7 @@ public void generate() { .offerTo(exporter); //T2 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -539,7 +545,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_REINFORCED_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_REINFORCED_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -549,7 +555,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ORNAMENTED_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ORNAMENTED_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -559,7 +565,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_LEATHER_VEST.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_LEATHER_VEST.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -572,7 +578,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ARMING_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_LEATHER_SCALE_VEST.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_LEATHER_SCALE_VEST.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -585,7 +591,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ARMING_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_GAMBESON.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_GAMBESON.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -599,7 +605,7 @@ public void generate() { .offerTo(exporter); //T3 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_MILITIA_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_MILITIA_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -609,7 +615,7 @@ public void generate() { conditionsFromItem(bronzeArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_BRACED_MILITIA_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_BRACED_MILITIA_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -619,7 +625,7 @@ public void generate() { conditionsFromItem(ironArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_REINFORCED_MILITIA_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_REINFORCED_MILITIA_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -629,7 +635,7 @@ public void generate() { conditionsFromItem(bronzeArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ORNAMENTED_MILITIA_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ORNAMENTED_MILITIA_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -639,7 +645,7 @@ public void generate() { conditionsFromItem(bronzeArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_REINFORCED_LEATHER_VEST.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_REINFORCED_LEATHER_VEST.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -652,7 +658,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_REINFORCED_LEATHER_SCALE_VEST.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_REINFORCED_LEATHER_SCALE_VEST.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -665,7 +671,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_BRACED_MAIL_SHIRT.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_BRACED_MAIL_SHIRT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -679,7 +685,7 @@ public void generate() { .offerTo(exporter); ///T4 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelHelmetPlate.getItem()), steelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) @@ -689,7 +695,7 @@ public void generate() { conditionsFromItem(steelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ORNAMENTED_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ORNAMENTED_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelHelmetPlate.getItem()), steelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) @@ -699,7 +705,7 @@ public void generate() { conditionsFromItem(steelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ROYAL_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ROYAL_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelHelmetPlate.getItem()), steelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -709,7 +715,7 @@ public void generate() { conditionsFromItem(steelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) @@ -722,7 +728,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ORNAMENTED_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_ORNAMENTED_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -735,7 +741,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_SCALE_JACKET.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ROHIRRIC_SCALE_JACKET.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) @@ -748,7 +754,7 @@ public void generate() { .offerTo(exporter); //T5 EORLING MARSHAL - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EORLING_MARSHAL_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EORLING_MARSHAL_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelChainmail.getItem()), steelChainmail.getComponentChanges())) @@ -761,7 +767,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ROHIRRIC_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EORLING_MARSHAL_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EORLING_MARSHAL_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ROHIRRIC_SCALE_JACKET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -774,7 +780,7 @@ public void generate() { .offerTo(exporter); //T5 HORSE LORD - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.HORSE_LORD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.HORSE_LORD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) @@ -787,7 +793,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ROHIRRIC_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.HORSE_LORD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.HORSE_LORD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ROHIRRIC_SCALE_JACKET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -912,7 +918,7 @@ public void generate() { .offerTo(exporter); //T2 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -922,7 +928,7 @@ public void generate() { .offerTo(exporter); //T3 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -932,7 +938,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HELMET_BLACK_FUR.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HELMET_BLACK_FUR.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.FUR) .input(EquipmentItemsME.DALISH_HELMET) .input(ResourceItemsME.FUR) @@ -942,7 +948,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DALISH_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HELMET_BROWN_FUR.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HELMET_BROWN_FUR.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.FUR) .input(EquipmentItemsME.DALISH_HELMET) .input(ResourceItemsME.FUR) @@ -952,7 +958,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DALISH_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HELMET_TAN_FUR.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HELMET_TAN_FUR.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.FUR) .input(EquipmentItemsME.DALISH_HELMET) .input(ResourceItemsME.FUR) @@ -962,7 +968,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DALISH_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -975,7 +981,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .input(EquipmentItemsME.MAIL_SKIRT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -988,7 +994,7 @@ public void generate() { .offerTo(exporter); //T4 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_BURGONET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_BURGONET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelHelmetPlate.getItem()), steelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) @@ -998,7 +1004,7 @@ public void generate() { conditionsFromItem(steelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) @@ -1012,7 +1018,7 @@ public void generate() { .offerTo(exporter); //T4 HEYDAY - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HEYDAY_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HEYDAY_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.DALISH_HELMET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -1022,7 +1028,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DALISH_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HEYDAY_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HEYDAY_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -1035,7 +1041,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DALISH_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HEYDAY_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HEYDAY_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T4) .input(ResourceItemsME.FABRIC) .input(EquipmentItemsME.DALISH_MAIL_COAT) .input(ResourceItemsME.FABRIC) @@ -1047,7 +1053,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DALISH_MAIL_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HEYDAY_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DALISH_HEYDAY_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T4) .input(Items.LEATHER) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -1057,7 +1063,7 @@ public void generate() { .offerTo(exporter); //T5 BARDING - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BARDING_SOLDIER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BARDING_SOLDIER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelChainmail.getItem()), steelChainmail.getComponentChanges())) @@ -1070,7 +1076,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DALISH_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BARDING_MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BARDING_MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.DALISH_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -1083,7 +1089,7 @@ public void generate() { .offerTo(exporter); //T5 BARDING SERGEANT - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BARDING_SERGEANT_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BARDING_SERGEANT_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .input(Items.FEATHER) .input(EquipmentItemsME.BARDING_SOLDIER_HELMET) .input(Items.FEATHER) @@ -1093,7 +1099,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.BARDING_SOLDIER_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BARDING_SERGEANT_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BARDING_SERGEANT_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -1150,10 +1156,6 @@ public void generate() { .offerTo(exporter); //endregion - //region BLACK NUMENOREANS - - //endregion - //endregion //region ELVES @@ -1169,7 +1171,7 @@ public void generate() { .offerTo(exporter); //T2 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1179,7 +1181,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(ResourceItemsME.FABRIC) @@ -1192,7 +1194,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ELVEN_ARMING_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_ARMING_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_ARMING_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(EquipmentItemsME.ELVEN_ARMING_SKIRT) .input(Items.LEATHER) @@ -1205,7 +1207,7 @@ public void generate() { .offerTo(exporter); //T3 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_MAIL_COIF_DIADEM.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_MAIL_COIF_DIADEM.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(EquipmentItemsME.ELVEN_MAIL_COIF) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .input(EquipmentItemsME.LORIEN_DIADEM) @@ -1215,7 +1217,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ELVEN_MAIL_COIF)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SHORT_MAIL_COIF_DIADEM.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SHORT_MAIL_COIF_DIADEM.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(EquipmentItemsME.ELVEN_MAIL_COIF) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .input(EquipmentItemsME.LORIEN_DIADEM) @@ -1225,7 +1227,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ELVEN_MAIL_COIF)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1238,7 +1240,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ELVEN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_MARCHWARDEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_MARCHWARDEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) @@ -1252,7 +1254,7 @@ public void generate() { .offerTo(exporter); //T4 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelHelmetPlate.getItem()), edhelSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) @@ -1262,7 +1264,7 @@ public void generate() { conditionsFromItem(edhelSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SOLDIER_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SOLDIER_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -1275,7 +1277,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.LORIEN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SOLDIER_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SOLDIER_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .input(Items.LEATHER) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) @@ -1288,7 +1290,7 @@ public void generate() { conditionsFromItem(edhelSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SCALE_COAT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LORIEN_SCALE_COAT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) @@ -1301,7 +1303,7 @@ public void generate() { .offerTo(exporter); //T5 GALADHRIM - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GALADHRIM_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GALADHRIM_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelChainmail.getItem()), edhelSteelChainmail.getComponentChanges())) @@ -1314,7 +1316,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.LORIEN_SOLDIER_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GALADHRIM_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GALADHRIM_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.LORIEN_SCALE_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) @@ -1327,7 +1329,7 @@ public void generate() { .offerTo(exporter); //T5 EGLADIL & GALADHRIM LORD - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EGLADIL_SENTINEL_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EGLADIL_SENTINEL_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(silverArmorPlate.getItem()), silverArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(silverArmorPlate.getItem()), silverArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -1339,7 +1341,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.GALADHRIM_CHESTPLATE), conditionsFromItem(EquipmentItemsME.GALADHRIM_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EGLADIL_SENTINEL_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EGLADIL_SENTINEL_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .input(ResourceItemsME.FABRIC) .input(EquipmentItemsME.GALADHRIM_LEGGINGS) .input(ResourceItemsME.FABRIC) @@ -1351,7 +1353,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GALADHRIM_LEGGINGS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GALADHRIM_LORD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GALADHRIM_LORD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -1363,7 +1365,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.GALADHRIM_CHESTPLATE), conditionsFromItem(EquipmentItemsME.GALADHRIM_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GALADHRIM_LORD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GALADHRIM_LORD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .input(ResourceItemsME.FABRIC) .input(EquipmentItemsME.GALADHRIM_LEGGINGS) .input(ResourceItemsME.FABRIC) @@ -1470,7 +1472,7 @@ public void generate() { //endregion //region WOODLAND REALM - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) @@ -1482,7 +1484,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.FABRIC), conditionsFromItem(ResourceItemsME.FABRIC)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_LEATHER_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_LEATHER_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1494,7 +1496,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_ARMING_COAT), conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_ARMING_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_LEATHER_BRONZED_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_LEATHER_BRONZED_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(ResourceItemsME.BRONZE_NUGGET) .input(ResourceItemsME.BRONZE_NUGGET) .input(Items.LEATHER) @@ -1506,7 +1508,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_ARMING_COAT), conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_ARMING_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_LEATHER_SILVER_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_LEATHER_SILVER_ARMING_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(ResourceItemsME.SILVER_NUGGET) .input(ResourceItemsME.SILVER_NUGGET) .input(Items.LEATHER) @@ -1519,7 +1521,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_ARMING_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_BRONZE_TRIMMED_RANGER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_BRONZE_TRIMMED_RANGER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(ResourceItemsME.BRONZE_NUGGET) .input(Items.LEATHER) @@ -1528,7 +1530,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.BRONZE_NUGGET), conditionsFromItem(ResourceItemsME.BRONZE_NUGGET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SILVER_TRIMMED_RANGER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SILVER_TRIMMED_RANGER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(ResourceItemsME.SILVER_NUGGET) .input(Items.LEATHER) @@ -1538,7 +1540,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SILVER_NUGGET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_CAVALRY_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_CAVALRY_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelHelmetPlate.getItem()), edhelSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) @@ -1547,7 +1549,7 @@ public void generate() { .criterion(hasItem(edhelSteelHelmetPlate.getItem()), conditionsFromItem(edhelSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -1559,7 +1561,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.LORIEN_MAIL_HAUBERK), conditionsFromItem(EquipmentItemsME.LORIEN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) @@ -1571,7 +1573,7 @@ public void generate() { conditionsFromItem(edhelSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_ROYAL_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_ROYAL_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelHelmetPlate.getItem()), edhelSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) @@ -1580,7 +1582,7 @@ public void generate() { .criterion(hasItem(edhelSteelHelmetPlate.getItem()), conditionsFromItem(edhelSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -1592,7 +1594,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.LORIEN_MAIL_HAUBERK), conditionsFromItem(EquipmentItemsME.LORIEN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SCALE_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SCALE_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) @@ -1604,32 +1606,32 @@ public void generate() { conditionsFromItem(edhelSteelScaleMail.getItem())) .offerTo(exporter); - //T5 GALADHRIM - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SOLDIER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + //T5 WLR + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SOLDIER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelChainmail.getItem()), edhelSteelChainmail.getComponentChanges())) - .input(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_HAUBERK) + .input(EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelChainmail.getItem()), edhelSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelChainmail.getItem()), edhelSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelChainmail.getItem()), edhelSteelChainmail.getComponentChanges())) - .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_HAUBERK), - conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_HAUBERK)) + .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK), + conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SOLDIER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_SOLDIER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) - .input(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_SKIRT) + .input(EquipmentItemsME.WOODLAND_REALM_SCALE_SKIRT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) - .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_SKIRT), - conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_SKIRT)) + .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_SCALE_SKIRT), + conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_SCALE_SKIRT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WARDEN_OF_THE_GLADE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WARDEN_OF_THE_GLADE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelChainmail.getItem()), edhelSteelChainmail.getComponentChanges())) @@ -1641,7 +1643,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_HAUBERK), conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WARDEN_OF_THE_GLADE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WARDEN_OF_THE_GLADE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_SKIRT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) @@ -1653,7 +1655,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_GILDED_SCALE_SKIRT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WARRIOR_OF_THE_NIGHTSHADE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WARRIOR_OF_THE_NIGHTSHADE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelChainmail.getItem()), edhelSteelChainmail.getComponentChanges())) @@ -1665,19 +1667,19 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK), conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WARRIOR_OF_THE_NIGHTSHADE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WARRIOR_OF_THE_NIGHTSHADE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) - .input(EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK) + .input(EquipmentItemsME.WOODLAND_REALM_SCALE_SKIRT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelArmorPlate.getItem()), edhelSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(edhelSteelScaleMail.getItem()), edhelSteelScaleMail.getComponentChanges())) - .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK), - conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_SCALE_HAUBERK)) + .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_SCALE_SKIRT), + conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_SCALE_SKIRT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_COMMANDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_COMMANDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -1689,7 +1691,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.WOODLAND_REALM_SOLDIER_CHESTPLATE), conditionsFromItem(EquipmentItemsME.WOODLAND_REALM_SOLDIER_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_COMMANDER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WOODLAND_REALM_COMMANDER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .input(ResourceItemsME.FABRIC) .input(EquipmentItemsME.WOODLAND_REALM_SOLDIER_LEGGINGS) .input(ResourceItemsME.FABRIC) @@ -1760,7 +1762,7 @@ public void generate() { //region DWARVES //region EREBOR - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_SEGMENTED_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_SEGMENTED_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) @@ -1770,7 +1772,7 @@ public void generate() { conditionsFromItem(bronzeArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_LEATHER_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_LEATHER_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1783,7 +1785,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_WANDERER_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_WANDERER_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1796,7 +1798,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_LEATHER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_LEATHER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(ResourceItemsME.BRONZE_NUGGET) .input(Items.LEATHER) @@ -1808,7 +1810,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_PARTISAN_OUTFIT.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_PARTISAN_OUTFIT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) @@ -1821,7 +1823,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DWARVEN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_REINFORCED_LEATHER_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.LONGBEARD_REINFORCED_LEATHER_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1834,7 +1836,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.DWARVEN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.IRON_INGOT) .input(Items.LEATHER) .input(Items.IRON_INGOT) @@ -1844,7 +1846,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_BRACED_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_BRACED_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.IRON_INGOT) .input(Items.LEATHER) .input(Items.IRON_INGOT) @@ -1854,7 +1856,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_NASAL_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_NASAL_LEATHER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.IRON_INGOT) .input(Items.LEATHER) .input(Items.IRON_INGOT) @@ -1864,7 +1866,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_LEATHER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_LEATHER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(ResourceItemsME.BRONZE_NUGGET) .input(Items.LEATHER) @@ -1876,7 +1878,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1886,7 +1888,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GILDED_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GILDED_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.BRONZE_NUGGET) .input(EquipmentItemsME.EREBOR_MAIL_COIF) .input(ResourceItemsME.BRONZE_NUGGET) @@ -1896,7 +1898,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_MAIL_COIF)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -1906,7 +1908,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1919,7 +1921,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_PADDED_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_PADDED_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .input(Items.LEATHER) @@ -1932,7 +1934,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1944,7 +1946,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1956,7 +1958,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_CHAUSSES.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_MAIL_CHAUSSES.getDefaultStack(), "boots", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1965,7 +1967,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T5) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.IRON_INGOT) @@ -1975,7 +1977,7 @@ public void generate() { .offerTo(exporter); //t4 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelHelmetPlate.getItem()), khazadSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) @@ -1985,14 +1987,14 @@ public void generate() { conditionsFromItem(khazadSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_GILDED_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_GILDED_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T4) .input(EquipmentItemsME.EREBOR_GILDED_MAIL_COIF) .input(EquipmentItemsME.RAVENHILL_HELMET) .criterion(hasItem(EquipmentItemsME.RAVENHILL_HELMET), conditionsFromItem(EquipmentItemsME.RAVENHILL_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) @@ -2005,7 +2007,7 @@ public void generate() { conditionsFromItem(khazadSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_LONG_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_LONG_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelChainmail.getItem()), khazadSteelChainmail.getComponentChanges())) @@ -2018,7 +2020,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_BRAWLER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_BRAWLER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -2031,7 +2033,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_REINFORCED_LEATHER_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_REINFORCED_LEATHER_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -2044,7 +2046,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_REINFORCED_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_REINFORCED_COAT.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -2057,7 +2059,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_REINFORCED_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_REINFORCED_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelChainmail.getItem()), khazadSteelChainmail.getComponentChanges())) @@ -2070,7 +2072,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_SCALE_COAT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_SCALE_COAT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) @@ -2082,7 +2084,7 @@ public void generate() { conditionsFromItem(khazadSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_SCALE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_SCALE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) @@ -2094,7 +2096,7 @@ public void generate() { conditionsFromItem(khazadSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -2103,7 +2105,7 @@ public void generate() { conditionsFromItem(khazadSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) @@ -2116,7 +2118,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_SCALE_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.EREBOR_SCALE_LEGGINGS) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) @@ -2128,7 +2130,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_SCALE_LEGGINGS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .input(EquipmentItemsME.EREBOR_PLATE_HELMET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) @@ -2136,7 +2138,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_PLATE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GATEWARDEN_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GATEWARDEN_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(EquipmentItemsME.EREBOR_PLATE_HELMET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) @@ -2146,7 +2148,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_PLATE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GATEWARDEN_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GATEWARDEN_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -2159,7 +2161,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_PLATE_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GATEWARDEN_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_GATEWARDEN_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(EquipmentItemsME.EREBOR_PLATE_LEGGINGS) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) @@ -2171,7 +2173,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_PLATE_LEGGINGS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_WATCHWARDEN_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_WATCHWARDEN_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(EquipmentItemsME.EREBOR_PLATE_HELMET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) @@ -2181,7 +2183,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_PLATE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_WATCHWARDEN_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_WATCHWARDEN_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -2194,7 +2196,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_PLATE_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_WATCHWARDEN_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_WATCHWARDEN_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) .input(EquipmentItemsME.EREBOR_PLATE_LEGGINGS) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeArmorPlate.getItem()), bronzeArmorPlate.getComponentChanges())) @@ -2206,7 +2208,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_PLATE_LEGGINGS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_CAPTAIN_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.EREBOR_CAPTAIN_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .input(Items.GOAT_HORN) .input(EquipmentItemsME.EREBOR_GUARD_HELMET) .input(Items.GOAT_HORN) @@ -2214,7 +2216,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.EREBOR_GUARD_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_SENTINEL_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_SENTINEL_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T5) .input(Items.FEATHER) .input(EquipmentItemsME.RAVENHILL_WATCHWARDEN_HELMET) .input(Items.FEATHER) @@ -2224,7 +2226,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.RAVENHILL_WATCHWARDEN_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_SENTINEL_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_SENTINEL_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(goldArmorPlate.getItem()), goldArmorPlate.getComponentChanges())) .input(ResourceItemsME.FABRIC) @@ -2237,7 +2239,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.RAVENHILL_WATCHWARDEN_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_SENTINEL_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RAVENHILL_SENTINEL_LEGGINGS.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.RAVENHILL_WATCHWARDEN_LEGGINGS) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelArmorPlate.getItem()), khazadSteelArmorPlate.getComponentChanges())) @@ -2284,7 +2286,7 @@ public void generate() { //region ORCS //region MORDOR - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -2294,7 +2296,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -2304,7 +2306,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_KETTLE_HAT.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_KETTLE_HAT.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -2314,7 +2316,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_KETTLE_HAT.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_KETTLE_HAT.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -2324,7 +2326,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -2334,7 +2336,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -2344,21 +2346,21 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_KETTLE_HAT_WITH_COIF.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_KETTLE_HAT_WITH_COIF.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .input(EquipmentItemsME.ORCISH_MAIL_COIF) .input(EquipmentItemsME.MORDOR_KETTLE_HAT) .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_COIF), conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COIF)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_KETTLE_HAT_WITH_COIF.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_KETTLE_HAT_WITH_COIF.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .input(EquipmentItemsME.ORCISH_MAIL_COIF) .input(EquipmentItemsME.MORDOR_KETTLE_HAT) .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_COIF), conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COIF)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_LEATHER_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_LEATHER_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(Items.LEATHER) @@ -2371,7 +2373,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_PAINTED_LEATHER_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_PAINTED_LEATHER_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(Items.RED_DYE) @@ -2384,7 +2386,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MORDOR_LEATHER_CUIRASS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_CREST_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_CREST_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2394,7 +2396,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_CREST_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_CREST_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2404,7 +2406,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_MANDIBLE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_MANDIBLE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2414,7 +2416,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_MANDIBLE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_MANDIBLE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2424,7 +2426,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_SALLET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_SALLET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2434,7 +2436,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_SALLET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_SALLET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2444,7 +2446,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2457,7 +2459,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MORDOR_LEATHER_CUIRASS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2470,7 +2472,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MORDOR_LEATHER_CUIRASS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_GORGET_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_GORGET_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .input(Items.LEATHER) @@ -2483,7 +2485,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_GORGET_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_GORGET_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .input(Items.LEATHER) @@ -2496,7 +2498,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_REINFORCED_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_REINFORCED_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2509,7 +2511,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MORDOR_LEATHER_CUIRASS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_REINFORCED_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_REINFORCED_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2522,7 +2524,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MORDOR_LEATHER_CUIRASS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -2535,7 +2537,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -2548,7 +2550,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_PLATE_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_PLATE_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -2557,7 +2559,7 @@ public void generate() { conditionsFromItem(burzumSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_PLATE_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_PLATE_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -2566,7 +2568,7 @@ public void generate() { conditionsFromItem(burzumSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_GREAT_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_GREAT_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .input(ResourceItemsME.BURZUM_STEEL_INGOT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .input(ResourceItemsME.BURZUM_STEEL_INGOT) @@ -2576,7 +2578,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_SNOUT_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_MORDOR_SNOUT_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .input(ResourceItemsME.BURZUM_STEEL_INGOT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .input(ResourceItemsME.BURZUM_STEEL_INGOT) @@ -2586,7 +2588,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_DEGRADED_GONDORIAN_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_DEGRADED_GONDORIAN_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -2599,7 +2601,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GONDORIAN_PLATE_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_PAINTED_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_PAINTED_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .input(Items.RED_DYE) @@ -2612,7 +2614,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MORDOR_CUIRASS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_SCALE_COAT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_SCALE_COAT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2625,7 +2627,7 @@ public void generate() { .offerTo(exporter); //T5 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_URUK_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_URUK_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -2637,7 +2639,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.MORDOR_CHESTPLATE), conditionsFromItem(EquipmentItemsME.MORDOR_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_URUK_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_URUK_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ORCISH_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2648,7 +2650,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_COAT), conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_URUK_COMMANDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_URUK_COMMANDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T5) .input(Items.SKELETON_SKULL) .input(EquipmentItemsME.BLACK_URUK_PLATE_HELMET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2657,7 +2659,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.BLACK_URUK_PLATE_HELMET), conditionsFromItem(EquipmentItemsME.BLACK_URUK_PLATE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_URUK_COMMANDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_URUK_COMMANDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(Items.RED_DYE) @@ -2670,44 +2672,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.BLACK_URUK_PLATE_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_CASTELLAN_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) - .input(EquipmentItemsME.MORDOR_CHESTPLATE) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) - .criterion(hasItem(EquipmentItemsME.MORDOR_CHESTPLATE), - conditionsFromItem(EquipmentItemsME.MORDOR_CHESTPLATE)) - .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_CASTELLAN_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .input(EquipmentItemsME.ORCISH_MAIL_COAT) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) - .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_COAT), - conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COAT)) - .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BLACK_CASTELLAN_CAPE.getDefaultStack(), "back_attachment", DispositionType.EVIL) - .input(ResourceItemsME.BURZUM_STEEL_NUGGET) - .input(Items.STRING) - .input(ResourceItemsME.BURZUM_STEEL_NUGGET) - .input(Items.BLACK_DYE) - .input(ResourceItemsME.FABRIC) - .input(Items.BLACK_DYE) - .input(Items.RED_DYE) - .input(ResourceItemsME.FABRIC) - .input(Items.RED_DYE) - .criterion(hasItem(ResourceItemsME.FABRIC), - conditionsFromItem(ResourceItemsME.FABRIC)) - .offerTo(exporter); - - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_BLACK_NUMENOREAN_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_BLACK_NUMENOREAN_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -2719,7 +2684,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.MAIL_HAUBERK), conditionsFromItem(EquipmentItemsME.MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_BLACK_NUMENOREAN_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORDOR_BLACK_NUMENOREAN_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.MAIL_SKIRT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -2746,14 +2711,14 @@ public void generate() { //endregion //region DOL GULDUR - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_JAILER_COLLAR.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_JAILER_COLLAR.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.CRUDE_INGOT) .input(ResourceItemsME.CRUDE_INGOT) .input(ResourceItemsME.CRUDE_INGOT) .criterion(hasItem(ResourceItemsME.CRUDE_INGOT), conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_JAILER_COLLAR.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_JAILER_COLLAR.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.CRUDE_INGOT) .input(ResourceItemsME.CRUDE_INGOT) .input(ResourceItemsME.CRUDE_INGOT) @@ -2761,7 +2726,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_EXECUTIONER_HOOD.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_EXECUTIONER_HOOD.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -2771,7 +2736,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_EXECUTIONER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_EXECUTIONER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2783,7 +2748,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.ORCISH_LEATHER_CHESTPLATE), conditionsFromItem(EquipmentItemsME.ORCISH_LEATHER_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_EXECUTIONER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_EXECUTIONER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2796,7 +2761,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_LEATHER_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_PADDED_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_PADDED_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2809,7 +2774,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_LEATHER_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_HUNTER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_HUNTER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2819,7 +2784,7 @@ public void generate() { conditionsFromItem(burzumSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_RAIDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_RAIDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2828,7 +2793,7 @@ public void generate() { .criterion(hasItem(burzumSteelArmorPlate.getItem()), conditionsFromItem(burzumSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_RAIDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_RAIDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2837,7 +2802,7 @@ public void generate() { .criterion(hasItem(burzumSteelArmorPlate.getItem()), conditionsFromItem(burzumSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_RAIDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_RAIDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .input(Items.LEATHER) @@ -2849,7 +2814,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK), conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_RAIDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_RAIDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .input(Items.LEATHER) @@ -2861,7 +2826,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK), conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_RAIDER_COAT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_RAIDER_COAT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -2872,7 +2837,7 @@ public void generate() { .criterion(hasItem(burzumSteelScaleMail.getItem()), conditionsFromItem(burzumSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -2880,7 +2845,7 @@ public void generate() { .criterion(hasItem(burzumSteelArmorPlate.getItem()), conditionsFromItem(burzumSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -2890,7 +2855,7 @@ public void generate() { .offerTo(exporter); //T5 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_MARAUDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_MARAUDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -2902,7 +2867,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.ORCISH_SCALE_VEST), conditionsFromItem(EquipmentItemsME.ORCISH_SCALE_VEST)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_MARAUDER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_MARAUDER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ORCISH_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2914,7 +2879,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COAT)) .offerTo(exporter); // Weathered - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_MARAUDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_MARAUDER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -2926,7 +2891,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.ORCISH_SCALE_VEST), conditionsFromItem(EquipmentItemsME.ORCISH_SCALE_VEST)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_MARAUDER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_MARAUDER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ORCISH_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2938,7 +2903,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_STALKER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_STALKER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -2950,7 +2915,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.DOL_GULDUR_RAIDER_CHESTPLATE), conditionsFromItem(EquipmentItemsME.DOL_GULDUR_RAIDER_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_STALKER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DOL_GULDUR_STALKER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ORCISH_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -2962,7 +2927,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COAT)) .offerTo(exporter); // Weathered - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_STALKER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_STALKER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -2974,7 +2939,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.WEATHERED_DOL_GULDUR_RAIDER_CHESTPLATE), conditionsFromItem(EquipmentItemsME.WEATHERED_DOL_GULDUR_RAIDER_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_STALKER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WEATHERED_DOL_GULDUR_STALKER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ORCISH_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3001,7 +2966,7 @@ public void generate() { //endregion //region ISENGARD - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_LEATHER_SCOUT_CAP.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_LEATHER_SCOUT_CAP.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3011,7 +2976,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_LEATHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_LEATHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3024,14 +2989,14 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_LEATHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_LEATHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(EquipmentItemsME.URUK_HAI_LEATHER_CHESTPLATE) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(EquipmentItemsME.URUK_HAI_LEATHER_CHESTPLATE), conditionsFromItem(EquipmentItemsME.URUK_HAI_LEATHER_CHESTPLATE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_LEATHER_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_LEATHER_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3044,7 +3009,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3053,7 +3018,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_LIGHT_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_LIGHT_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -3063,14 +3028,14 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_LIGHT_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_LIGHT_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .input(EquipmentItemsME.URUK_HAI_LIGHT_HELMET) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(EquipmentItemsME.URUK_HAI_LIGHT_HELMET), conditionsFromItem(EquipmentItemsME.URUK_HAI_LIGHT_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_REINFORCED_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_REINFORCED_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -3080,14 +3045,14 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_REINFORCED_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_REINFORCED_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .input(EquipmentItemsME.URUK_HAI_REINFORCED_HELMET) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(EquipmentItemsME.URUK_HAI_REINFORCED_HELMET), conditionsFromItem(EquipmentItemsME.URUK_HAI_REINFORCED_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -3100,7 +3065,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -3112,7 +3077,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T3) .input(Items.LEATHER) .input(EquipmentItemsME.URUK_HAI_MAIL_COAT) .input(Items.LEATHER) @@ -3125,7 +3090,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.URUK_HAI_MAIL_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -3135,14 +3100,14 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .input(EquipmentItemsME.URUK_HAI_SOLDIER_HELMET) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(EquipmentItemsME.URUK_HAI_SOLDIER_HELMET), conditionsFromItem(EquipmentItemsME.URUK_HAI_SOLDIER_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -3155,7 +3120,7 @@ public void generate() { conditionsFromItem(burzumSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -3168,7 +3133,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.URUK_HAI_CUIRASS)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PLATE_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.URUK_HAI_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3180,28 +3145,28 @@ public void generate() { conditionsFromItem(EquipmentItemsME.URUK_HAI_MAIL_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_PLATE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_PLATE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T5) .input(EquipmentItemsME.URUK_HAI_PLATE_HELMET) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(EquipmentItemsME.URUK_HAI_PLATE_HELMET), conditionsFromItem(EquipmentItemsME.URUK_HAI_PLATE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_SAPPER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_SAPPER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T5) .input(EquipmentItemsME.URUK_HAI_SAPPER_HELMET) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(EquipmentItemsME.URUK_HAI_SAPPER_HELMET), conditionsFromItem(EquipmentItemsME.URUK_HAI_SAPPER_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_BERSERKER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_BERSERKER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T5) .input(EquipmentItemsME.URUK_HAI_BERSERKER_HELMET) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(EquipmentItemsME.URUK_HAI_BERSERKER_HELMET), conditionsFromItem(EquipmentItemsME.URUK_HAI_BERSERKER_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_COMMANDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_COMMANDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.URUK_HAI_PLATE_HELMET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3211,14 +3176,14 @@ public void generate() { conditionsFromItem(EquipmentItemsME.URUK_HAI_PLATE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_COMMANDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.URUK_HAI_PAINTED_COMMANDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T5) .input(EquipmentItemsME.URUK_HAI_COMMANDER_HELMET) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(EquipmentItemsME.URUK_HAI_COMMANDER_HELMET), conditionsFromItem(EquipmentItemsME.URUK_HAI_COMMANDER_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORTHANC_GUARD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORTHANC_GUARD_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -3231,7 +3196,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORTHANC_GUARD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORTHANC_GUARD_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.MAIL_SKIRT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelArmorPlate.getItem()), steelArmorPlate.getComponentChanges())) @@ -3243,7 +3208,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.MAIL_SKIRT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORTHANC_COMMANDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORTHANC_COMMANDER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T5) .input(Items.FEATHER) .input(EquipmentItemsME.ORTHANC_GUARD_HELMET) .input(Items.FEATHER) @@ -3280,7 +3245,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_SEEKER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_SEEKER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) .input(Items.LEATHER) @@ -3290,7 +3255,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_LEATHER_SCALE_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_LEATHER_SCALE_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "bones"))) .input(Items.LEATHER) @@ -3303,7 +3268,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_LEATHER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_LEATHER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3315,7 +3280,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_LACED_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_LACED_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3324,7 +3289,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_SKULLCAP_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_SKULLCAP_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -3334,7 +3299,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -3344,7 +3309,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -3357,7 +3322,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -3369,7 +3334,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_SOLDIER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -3379,7 +3344,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_SCREECHER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_SCREECHER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -3389,7 +3354,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_REINFORCED_LEATHER_SCALE_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_REINFORCED_LEATHER_SCALE_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .input(Items.LEATHER) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "bones"))) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3402,7 +3367,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GUNDABAD_LEATHER_SCALE_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_REINFORCED_LEATHER_VEST.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_REINFORCED_LEATHER_VEST.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -3415,7 +3380,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_LEATHER_SCALE_VEST)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_HOBGOBLIN_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_HOBGOBLIN_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -3428,7 +3393,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GUNDABAD_REINFORCED_LEATHER_VEST)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_HOBGOBLIN_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GUNDABAD_HOBGOBLIN_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.GUNDABAD_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3442,7 +3407,7 @@ public void generate() { //endregion //region MORIA - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(ResourceItemsME.CRUDE_INGOT) .input(Items.LEATHER) @@ -3451,7 +3416,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.CRUDE_INGOT), conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(ResourceItemsME.CRUDE_INGOT) .input(Items.LEATHER) @@ -3460,7 +3425,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.CRUDE_INGOT), conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_CUIRASS.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3472,7 +3437,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.CRUDE_INGOT), conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_BELLY_PLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_BELLY_PLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3484,30 +3449,30 @@ public void generate() { .criterion(hasItem(ResourceItemsME.CRUDE_INGOT), conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CLOTH_COAT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CLOTH_COAT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.FABRIC) - .input(ResourceItemsME.CRUDE_INGOT) + .input(ResourceItemsME.CRUDE_NUGGET) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) - .criterion(hasItem(ResourceItemsME.CRUDE_INGOT), - conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) + .criterion(hasItem(ResourceItemsME.CRUDE_NUGGET), + conditionsFromItem(ResourceItemsME.CRUDE_NUGGET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SNAGA_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) - .input(ResourceItemsME.CRUDE_INGOT) + .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) - .criterion(hasItem(ResourceItemsME.CRUDE_INGOT), - conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) + .criterion(hasItem(ResourceItemsME.CRUDE_NUGGET), + conditionsFromItem(ResourceItemsME.CRUDE_NUGGET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CRUDE_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CRUDE_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .input(ResourceItemsME.CRUDE_INGOT) @@ -3516,7 +3481,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CHARGER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CHARGER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) @@ -3525,7 +3490,7 @@ public void generate() { .criterion(hasItem(ironHelmetPlate.getItem()), conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_RUINED_DWARVEN_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_RUINED_DWARVEN_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) @@ -3534,32 +3499,32 @@ public void generate() { .criterion(hasItem(ironHelmetPlate.getItem()), conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) + .input(ResourceItemsME.CRUDE_INGOT) + .input(ResourceItemsME.CRUDE_INGOT) + .input(ResourceItemsME.CRUDE_NUGGET) .input(EquipmentItemsME.ORCISH_MAIL_HAUBERK) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) + .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.LEATHER) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) + .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.LEATHER) .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK), conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_RUINED_DWARVEN_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_RUINED_DWARVEN_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) + .input(ResourceItemsME.CRUDE_INGOT) + .input(ResourceItemsME.CRUDE_INGOT) + .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) .input(EquipmentItemsME.ORCISH_MAIL_HAUBERK) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) + .input(Items.LEATHER) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) + .input(Items.LEATHER) .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK), conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_BITER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_BITER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3568,7 +3533,7 @@ public void generate() { .criterion(hasItem(burzumSteelHelmetPlate.getItem()), conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_MANDIBLE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_MANDIBLE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3577,7 +3542,7 @@ public void generate() { .criterion(hasItem(burzumSteelHelmetPlate.getItem()), conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_REINFORCED_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_REINFORCED_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3591,7 +3556,7 @@ public void generate() { .offerTo(exporter); //T5 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SCREECHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SCREECHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -3603,7 +3568,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.MORIA_GOBLIN_REINFORCED_COAT), conditionsFromItem(EquipmentItemsME.MORIA_GOBLIN_REINFORCED_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SCREECHER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_SCREECHER_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ORCISH_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3615,7 +3580,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CHIEF_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CHIEF_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelChainmail.getItem()), burzumSteelChainmail.getComponentChanges())) @@ -3627,7 +3592,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.MORIA_GOBLIN_REINFORCED_COAT), conditionsFromItem(EquipmentItemsME.MORIA_GOBLIN_REINFORCED_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CHIEF_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CHIEF_LEGGINGS.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .input(EquipmentItemsME.ORCISH_MAIL_COAT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) @@ -3638,7 +3603,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.ORCISH_MAIL_COAT), conditionsFromItem(EquipmentItemsME.ORCISH_MAIL_COAT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CHIEF_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MORIA_GOBLIN_CHIEF_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T5) .input(Items.GOAT_HORN) .input(EquipmentItemsME.MORIA_GOBLIN_CAPTAIN_HELMET) .input(Items.GOAT_HORN) @@ -3658,7 +3623,7 @@ public void generate() { //endregion //region GOBLIN TOWN - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_CAP.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_CAP.getDefaultStack(), "helmet", DispositionType.EVIL) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) @@ -3667,7 +3632,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.FABRIC), conditionsFromItem(ResourceItemsME.FABRIC)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_BONE_MANDIBLE_CAP.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_BONE_MANDIBLE_CAP.getDefaultStack(), "helmet", DispositionType.EVIL) .input(Items.BONE) .input(EquipmentItemsME.GOBLIN_TOWN_CAP) .input(Items.BONE) @@ -3676,7 +3641,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.GOBLIN_TOWN_CAP), conditionsFromItem(EquipmentItemsME.GOBLIN_TOWN_CAP)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_CROSSBONES_HELMET.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_CROSSBONES_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) .input(Items.BONE) .input(EquipmentItemsME.GOBLIN_TOWN_CAP) .input(Items.BONE) @@ -3686,7 +3651,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GOBLIN_TOWN_CAP)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_RIBCAGE.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_RIBCAGE.getDefaultStack(), "chestplate", DispositionType.EVIL) .input(Items.BONE) .input(Items.BONE) .input(Items.BONE) @@ -3698,7 +3663,7 @@ public void generate() { .criterion(hasItem(Items.BONE), conditionsFromItem(Items.BONE)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_BONE_STRAP.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_BONE_STRAP.getDefaultStack(), "chestplate", DispositionType.EVIL) .input(ResourceItemsME.FUR) .input(Items.BONE) .input(ResourceItemsME.FUR) @@ -3730,25 +3695,25 @@ public void generate() { conditionsFromItem(ResourceItemsME.FABRIC)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), ironHelmetPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .criterion(hasItem(crudeArmorPlate.getItem()), conditionsFromItem(crudeArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_MANDIBLE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), ironHelmetPlate.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_MANDIBLE_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .criterion(hasItem(crudeArmorPlate.getItem()), conditionsFromItem(crudeArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_HEAVY_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_HEAVY_NASAL_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .input(ResourceItemsME.CRUDE_NUGGET) .input(EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET) .input(ResourceItemsME.CRUDE_NUGGET) @@ -3757,7 +3722,7 @@ public void generate() { .criterion(hasItem(EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET), conditionsFromItem(EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_SKULKER_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_SKULKER_GUARD_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .input(ResourceItemsME.CRUDE_INGOT) .input(EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET) .input(ResourceItemsME.CRUDE_INGOT) @@ -3767,16 +3732,16 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_SKULL_CAP.getDefaultStack(), "helmet", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_SKULL_CAP.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) .input(Items.SKELETON_SKULL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) .input(Items.BONE) .input(Items.BONE) .criterion(hasItem(Items.SKELETON_SKULL), conditionsFromItem(Items.SKELETON_SKULL)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_TUNNELER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_TUNNELER_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .input(Items.CANDLE) .input(EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET) .input(Items.CANDLE) @@ -3784,7 +3749,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.GOBLIN_TOWN_NASAL_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_BONE_SCALE_COAT.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_BONE_SCALE_COAT.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .input(Items.BONE) @@ -3796,19 +3761,19 @@ public void generate() { .criterion(hasItem(ResourceItemsME.CRUDE_NUGGET), conditionsFromItem(ResourceItemsME.CRUDE_NUGGET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_CRUDE_SCALE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_CRUDE_SCALE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .input(Items.BONE) .input(Items.BONE) - .input(ResourceItemsME.CRUDE_NUGGET) - .input(Items.LEATHER) - .input(ResourceItemsME.CRUDE_NUGGET) - .input(ResourceItemsME.CRUDE_NUGGET) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeArmorPlate.getItem()), crudeArmorPlate.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .input(Items.LEATHER) - .input(ResourceItemsME.CRUDE_NUGGET) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .criterion(hasItem(ResourceItemsME.CRUDE_NUGGET), conditionsFromItem(ResourceItemsME.CRUDE_NUGGET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_CARAPACE_HARNESS.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_CARAPACE_HARNESS.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(Items.BONE) .input(Items.BONE) .input(ResourceItemsME.FUR) @@ -3821,7 +3786,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.CRUDE_NUGGET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -3834,7 +3799,7 @@ public void generate() { .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_BELLY_PLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_BELLY_PLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .input(Items.BONE) .input(ResourceItemsME.FUR) .input(Items.LEATHER) @@ -3846,7 +3811,7 @@ public void generate() { .criterion(hasItem(crudeArmorPlate.getItem()), conditionsFromItem(crudeArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_REINFORCED_CARAPACE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.GOBLIN_TOWN_REINFORCED_CARAPACE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .input(Items.LEATHER) .input(Items.BONE) .input(ResourceItemsME.CRUDE_INGOT) @@ -3890,7 +3855,7 @@ public void generate() { if(recipe.noble()) { if(recipe.disposition().equals(DispositionType.GOOD)) { lowerIngredient = Items.GOLD_INGOT.getDefaultStack(); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "helmet", recipe.disposition()) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "helmet", recipe.disposition(), XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(helmetIngredient.getItem()), helmetIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) @@ -3901,7 +3866,7 @@ public void generate() { .offerTo(exporter); } else { lowerIngredient = silverArmorPlate; - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "helmet", recipe.disposition()) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "helmet", recipe.disposition(), XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(helmetIngredient.getItem()), helmetIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) @@ -3912,7 +3877,7 @@ public void generate() { .offerTo(exporter); } } else { - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "helmet", recipe.disposition()) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "helmet", recipe.disposition(), XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(helmetIngredient.getItem()), helmetIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) @@ -3935,7 +3900,7 @@ public void generate() { if(recipe.noble()) { if(recipe.disposition().equals(DispositionType.GOOD)) { upperIngredient = Items.GOLD_INGOT.getDefaultStack(); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "boots", recipe.disposition()) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "boots", recipe.disposition(), XP_T5) .input(upperIngredient.getItem()) .input(upperIngredient.getItem()) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) @@ -3945,7 +3910,7 @@ public void generate() { .offerTo(exporter); } else { upperIngredient = silverArmorPlate; - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "boots", recipe.disposition()) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "boots", recipe.disposition(), XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(upperIngredient.getItem()), upperIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(upperIngredient.getItem()), upperIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) @@ -3956,7 +3921,7 @@ public void generate() { } } else { upperIngredient = mainIngredient; - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "boots", recipe.disposition()) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, recipe.output().getDefaultStack(), "boots", recipe.disposition(), XP_T5) .componentInput(new ComponentsIngredient(Ingredient.ofItems(upperIngredient.getItem()), upperIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(upperIngredient.getItem()), upperIngredient.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(mainIngredient.getItem()), mainIngredient.getComponentChanges())) diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableGenericArmorRecipeProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableGenericArmorRecipeProvider.java index 204423c6ee..f307e1dca6 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableGenericArmorRecipeProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableGenericArmorRecipeProvider.java @@ -32,7 +32,9 @@ import java.util.concurrent.CompletableFuture; public class ArtisanTableGenericArmorRecipeProvider extends RecipeProvider { - + private static final int XP_T2 = 1; + private static final int XP_T3 = 4; + private static final int XP_T4 = 9; private final CompletableFuture registryLookup; public ArtisanTableGenericArmorRecipeProvider(FabricDataOutput output, CompletableFuture registriesFuture) { @@ -93,6 +95,10 @@ protected RecipeGenerator getRecipeGenerator(RegistryWrapper.WrapperLookup wrapp ItemStack bronzeChainmail = new ItemStack(ResourceItemsME.MAIL); bronzeChainmail.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MiddleEarth.MOD_ID, MetalTypes.BRONZE.getName()))), getPattern())); + ItemStack crudeChainmail = new ItemStack(ResourceItemsME.MAIL); + crudeChainmail.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, + Identifier.of(MiddleEarth.MOD_ID, MetalTypes.CRUDE.getName()))), getPattern())); + ItemStack steelArmorPlate = new ItemStack(ResourceItemsME.ARMOR_PLATE); steelArmorPlate.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, @@ -370,7 +376,17 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); //T3 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MAIL_COIF.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.COOKING_POT_HELMET.getDefaultStack(), "helmet", DispositionType.NEUTRAL, XP_T3) + .input(Items.IRON_INGOT) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) + .input(Items.IRON_INGOT) + .input(Items.IRON_NUGGET) + .input(Items.IRON_NUGGET) + .criterion(hasItem(ironHelmetPlate.getItem()), + conditionsFromItem(ironHelmetPlate.getItem())) + .offerTo(exporter); + + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MAIL_COIF.getDefaultStack(), "helmet", DispositionType.NEUTRAL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -380,7 +396,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.CLOSED_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.CLOSED_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.NEUTRAL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -390,21 +406,21 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.KETTLE_HAT_WITH_COIF.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.KETTLE_HAT_WITH_COIF.getDefaultStack(), "helmet", DispositionType.NEUTRAL, XP_T3) .input(EquipmentItemsME.MAIL_COIF) .input(EquipmentItemsME.KETTLE_HAT) .criterion(hasItem(EquipmentItemsME.MAIL_COIF), conditionsFromItem(EquipmentItemsME.MAIL_COIF)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.KETTLE_HAT_WITH_CLOSED_COIF.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.KETTLE_HAT_WITH_CLOSED_COIF.getDefaultStack(), "helmet", DispositionType.NEUTRAL, XP_T3) .input(EquipmentItemsME.CLOSED_MAIL_COIF) .input(EquipmentItemsME.KETTLE_HAT) .criterion(hasItem(EquipmentItemsME.CLOSED_MAIL_COIF), conditionsFromItem(EquipmentItemsME.CLOSED_MAIL_COIF)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.OPEN_FACE_HELMET.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.OPEN_FACE_HELMET.getDefaultStack(), "helmet", DispositionType.NEUTRAL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -413,7 +429,7 @@ public void generate() { .criterion(hasItem(ironChainmail.getItem()), conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WINGED_HELMET.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.WINGED_HELMET.getDefaultStack(), "helmet", DispositionType.NEUTRAL, XP_T3) .input(TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("feathers"))) .input(EquipmentItemsME.OPEN_FACE_HELMET) .input(TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("feathers"))) @@ -421,7 +437,7 @@ public void generate() { conditionsFromItem(EquipmentItemsME.OPEN_FACE_HELMET)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.NEUTRAL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -434,7 +450,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MAIL_SHIRT.getDefaultStack(), "chestplate", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MAIL_SHIRT.getDefaultStack(), "chestplate", DispositionType.NEUTRAL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -447,7 +463,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.NEUTRAL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -460,7 +476,7 @@ public void generate() { .offerTo(exporter); //T4 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.SALLET.getDefaultStack(), "helmet", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.SALLET.getDefaultStack(), "helmet", DispositionType.NEUTRAL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelHelmetPlate.getItem()), steelHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(steelScaleMail.getItem()), steelScaleMail.getComponentChanges())) @@ -841,7 +857,7 @@ public void generate() { .offerTo(exporter); //T2 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -850,7 +866,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) @@ -859,7 +875,7 @@ public void generate() { .criterion(hasItem(bronzeChainmail.getItem()), conditionsFromItem(bronzeChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) @@ -871,7 +887,7 @@ public void generate() { .criterion(hasItem(bronzeChainmail.getItem()), conditionsFromItem(bronzeChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T2) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(bronzeChainmail.getItem()), bronzeChainmail.getComponentChanges())) @@ -884,7 +900,7 @@ public void generate() { .offerTo(exporter); //T3 - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -894,7 +910,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -907,7 +923,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_MAIL_SKIRT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -919,7 +935,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_PADDED_MAIL_HAUBERK.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_PADDED_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.BRONZE_INGOT) .input(ResourceItemsME.BRONZE_INGOT) .input(Items.LEATHER) @@ -927,10 +943,11 @@ public void generate() { .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .criterion(hasItem(ironChainmail.getItem()), conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_GORGET_MAIL_HAUBERK.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.BRONZED_ELVEN_GORGET_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.BRONZE_INGOT) .input(ResourceItemsME.BRONZE_INGOT) .input(Items.LEATHER) @@ -938,11 +955,12 @@ public void generate() { .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .criterion(hasItem(ironChainmail.getItem()), conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_SILVER_PADDED_MAIL_HAUBERK.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_SILVER_PADDED_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.SILVER_NUGGET) .input(ResourceItemsME.SILVER_NUGGET) .input(Items.LEATHER) @@ -950,10 +968,11 @@ public void generate() { .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .criterion(hasItem(ironChainmail.getItem()), conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_SILVER_GORGET_MAIL_HAUBERK.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ELVEN_SILVER_GORGET_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(ResourceItemsME.SILVER_NUGGET) .input(ResourceItemsME.SILVER_NUGGET) .input(Items.LEATHER) @@ -961,6 +980,7 @@ public void generate() { .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .criterion(hasItem(ironChainmail.getItem()), conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); @@ -969,7 +989,7 @@ public void generate() { //region DWARVES - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MINER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MINER_HELMET.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T2) .input(Items.CANDLE) .input(Items.LEATHER) .input(Items.CANDLE) @@ -979,7 +999,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.FABRIC)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_GAMBESON.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_GAMBESON.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T2) .input(ResourceItemsME.FABRIC) .input(ResourceItemsME.FABRIC) .input(Items.LEATHER) @@ -992,7 +1012,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.FABRIC)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1002,7 +1022,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1015,14 +1035,14 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MINER_GAMBESON.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MINER_GAMBESON.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T3) .input(EquipmentItemsME.DWARVEN_MAIL_HAUBERK) .input(EquipmentItemsME.DWARVEN_GAMBESON) .criterion(hasItem(EquipmentItemsME.DWARVEN_MAIL_HAUBERK), conditionsFromItem(EquipmentItemsME.DWARVEN_MAIL_HAUBERK)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1034,7 +1054,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MAIL_CHAUSSES.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_MAIL_CHAUSSES.getDefaultStack(), "boots", DispositionType.GOOD, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1043,7 +1063,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T3) .input(Items.IRON_INGOT) .input(Items.IRON_INGOT) .input(Items.LEATHER) @@ -1052,7 +1072,7 @@ public void generate() { conditionsFromItem(Items.IRON_INGOT)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_SCALE_HAUBERK.getDefaultStack(), "chestplate", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) @@ -1065,7 +1085,7 @@ public void generate() { conditionsFromItem(khazadSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_SCALE_COAT.getDefaultStack(), "leggings", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_SCALE_COAT.getDefaultStack(), "leggings", DispositionType.GOOD, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(khazadSteelScaleMail.getItem()), khazadSteelScaleMail.getComponentChanges())) @@ -1077,7 +1097,7 @@ public void generate() { conditionsFromItem(khazadSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_REINFORCED_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.DWARVEN_REINFORCED_BOOTS.getDefaultStack(), "boots", DispositionType.GOOD, XP_T4) .input(ResourceItemsME.KHAZAD_STEEL_INGOT) .input(ResourceItemsME.KHAZAD_STEEL_INGOT) .input(Items.LEATHER) @@ -1106,7 +1126,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.FABRIC)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T2) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1116,7 +1136,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_LEATHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_LEATHER_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1129,7 +1149,7 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_LEATHER_SCALE_VEST.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_LEATHER_SCALE_VEST.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1142,36 +1162,37 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) .criterion(hasItem(ironChainmail.getItem()), conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_MAIL_SHIRT.getDefaultStack(), "chestplate", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_MAIL_SHIRT.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T2) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) .criterion(hasItem(ironChainmail.getItem()), conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) - .input(Items.LEATHER) - .input(Items.LEATHER) + + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) + .input(ResourceItemsME.FUR) .input(Items.LEATHER) + .input(ResourceItemsME.FUR) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1179,8 +1200,7 @@ public void generate() { .criterion(hasItem(Items.LEATHER), conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_STRIP_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_STRIP_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1192,55 +1212,55 @@ public void generate() { conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_LEG_BRACER.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_LEG_BRACER.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) .input(Items.LEATHER) - .input(Items.IRON_NUGGET) + .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.LEATHER) - .input(Items.IRON_NUGGET) - .input(Items.IRON_NUGGET) + .input(ResourceItemsME.CRUDE_NUGGET) + .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.LEATHER) .input(Items.LEATHER) .criterion(hasItem(Items.LEATHER), conditionsFromItem(Items.LEATHER)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .criterion(hasItem(ironChainmail.getItem()), - conditionsFromItem(ironChainmail.getItem())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .criterion(hasItem(crudeChainmail.getItem()), + conditionsFromItem(crudeChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_REINFORCED_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_REINFORCED_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) .input(Items.LEATHER) .input(Items.LEATHER) - .criterion(hasItem(ironChainmail.getItem()), - conditionsFromItem(ironChainmail.getItem())) + .criterion(hasItem(crudeChainmail.getItem()), + conditionsFromItem(crudeChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_REINFORCED_STRIP_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.RUSTED_ORCISH_REINFORCED_STRIP_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T2) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(crudeChainmail.getItem()), crudeChainmail.getComponentChanges())) .input(Items.LEATHER) .input(Items.LEATHER) - .criterion(hasItem(ironChainmail.getItem()), - conditionsFromItem(ironChainmail.getItem())) + .criterion(hasItem(crudeChainmail.getItem()), + conditionsFromItem(crudeChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BLACK_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BLACK_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .input(Items.LEATHER) @@ -1249,7 +1269,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.FUR)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BROWN_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BROWN_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .input(Items.LEATHER) @@ -1258,7 +1278,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.FUR)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_GRAY_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_GRAY_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .input(Items.LEATHER) @@ -1267,7 +1287,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.FUR)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_TAN_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_TAN_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .input(Items.LEATHER) @@ -1276,7 +1296,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.FUR)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_WHITE_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_WHITE_FUR_BOOTS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T2) .input(ResourceItemsME.FUR) .input(ResourceItemsME.FUR) .input(Items.LEATHER) @@ -1285,7 +1305,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.FUR)) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BRACED_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BRACED_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -1295,7 +1315,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_HELMET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironHelmetPlate.getItem()), ironHelmetPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironArmorPlate.getItem()), ironArmorPlate.getComponentChanges())) @@ -1305,7 +1325,7 @@ public void generate() { conditionsFromItem(ironHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_MAIL_COIF.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1315,7 +1335,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_MAIL_HAUBERK.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1328,7 +1348,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_MAIL_SHIRT.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_MAIL_SHIRT.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1341,7 +1361,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_MAIL_COAT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1353,7 +1373,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_REINFORCED_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_REINFORCED_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1365,7 +1385,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_REINFORCED_STRIP_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_REINFORCED_STRIP_LEATHER_SKIRT.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T3) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(ironChainmail.getItem()), ironChainmail.getComponentChanges())) @@ -1377,7 +1397,7 @@ public void generate() { conditionsFromItem(ironChainmail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_SALLET.getDefaultStack(), "helmet", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_SALLET.getDefaultStack(), "helmet", DispositionType.EVIL, XP_T4) .input(ResourceItemsME.BURZUM_STEEL_INGOT) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelHelmetPlate.getItem()), burzumSteelHelmetPlate.getComponentChanges())) .input(ResourceItemsME.BURZUM_STEEL_INGOT) @@ -1387,7 +1407,7 @@ public void generate() { conditionsFromItem(burzumSteelHelmetPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BELLY_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BELLY_PLATE_CHESTPLATE.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .input(Items.LEATHER) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -1400,7 +1420,7 @@ public void generate() { conditionsFromItem(burzumSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_SCALE_VEST.getDefaultStack(), "chestplate", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_SCALE_VEST.getDefaultStack(), "chestplate", DispositionType.EVIL, XP_T4) .input(Items.LEATHER) .input(Items.LEATHER) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelScaleMail.getItem()), burzumSteelScaleMail.getComponentChanges())) @@ -1413,7 +1433,7 @@ public void generate() { conditionsFromItem(burzumSteelScaleMail.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_REINFORCED_LEG_BRACER.getDefaultStack(), "leggings", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_REINFORCED_LEG_BRACER.getDefaultStack(), "leggings", DispositionType.EVIL, XP_T4) .input(Items.LEATHER) .input(Items.LEATHER) .input(Items.LEATHER) @@ -1425,7 +1445,7 @@ public void generate() { conditionsFromItem(burzumSteelArmorPlate.getItem())) .offerTo(exporter); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BRACED_SANDALS.getDefaultStack(), "boots", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, EquipmentItemsME.ORCISH_BRACED_SANDALS.getDefaultStack(), "boots", DispositionType.EVIL, XP_T4) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelArmorPlate.getItem()), burzumSteelArmorPlate.getComponentChanges())).input(Items.LEATHER) .input(Items.LEATHER) diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableHandheldRecipeProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableHandheldRecipeProvider.java index 12443fecb6..fe52ecde31 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableHandheldRecipeProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/ArtisanTableHandheldRecipeProvider.java @@ -38,7 +38,8 @@ import static net.minecraft.data.recipe.RecipeGenerator.hasItem; public class ArtisanTableHandheldRecipeProvider extends RecipeProvider { - + private final int XP_MEDIUM_SHIELD = 2; + private final int XP_HEAVY_SHIELD = 4; private final CompletableFuture registryLookup; public ArtisanTableHandheldRecipeProvider(FabricDataOutput output, CompletableFuture registriesFuture) { @@ -206,6 +207,7 @@ public void generate() { createArtisanTableSwordRecipe(itemLookup, recipeExporter, MetalTypes.EDHEL_STEEL, WeaponItemsME.WOODLAND_REALM_SWORD.getDefaultStack(), false, DispositionType.GOOD); createArtisanTableSwordRecipe(itemLookup, recipeExporter, MetalTypes.EDHEL_STEEL, WeaponItemsME.WOODLAND_REALM_NOBLE_SWORD.getDefaultStack(), true, DispositionType.GOOD); + createArtisanTableDaggerRecipe(itemLookup, recipeExporter, MetalTypes.EDHEL_STEEL, WeaponItemsME.WOODLAND_REALM_DAGGER.getDefaultStack(), false, DispositionType.GOOD); createArtisanTableDaggerRecipe(itemLookup, recipeExporter, MetalTypes.EDHEL_STEEL, WeaponItemsME.WOODLAND_REALM_NOBLE_DAGGER.getDefaultStack(), true, DispositionType.GOOD); createArtisanTableLongswordRecipe(itemLookup, recipeExporter, MetalTypes.EDHEL_STEEL, WeaponItemsME.WOODLAND_REALM_LONGSWORD.getDefaultStack(), false, DispositionType.GOOD); @@ -428,7 +430,7 @@ public void generate() { burzumSteelShieldPlate.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MiddleEarth.MOD_ID, MetalTypes.BURZUM_STEEL.getName()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, Items.SHIELD.getDefaultStack(), "medium_shield", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, Items.SHIELD.getDefaultStack(), "medium_shield", DispositionType.NEUTRAL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -440,7 +442,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(Items.SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROUND_SHIELD.getDefaultStack(), "medium_shield", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROUND_SHIELD.getDefaultStack(), "medium_shield", DispositionType.NEUTRAL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -452,7 +454,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROUND_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.HEATER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.HEATER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.NEUTRAL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -464,7 +466,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.HEATER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.KITE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.NEUTRAL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.KITE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.NEUTRAL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -476,7 +478,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.KITE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.GONDOR_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -488,7 +490,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GONDORIAN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.GONDOR_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -500,7 +502,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GONDORIAN_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_KINGS_GUARD_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_KINGS_GUARD_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.GONDOR_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -512,7 +514,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GONDORIAN_KINGS_GUARD_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.LAST_ALLIANCE_HEIRLOOM_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.LAST_ALLIANCE_HEIRLOOM_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.GONDOR_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -524,7 +526,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.LAST_ALLIANCE_HEIRLOOM_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_HERO_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_HERO_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.LEATHER) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -536,7 +538,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GONDORIAN_HERO_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_KNIGHT_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_KNIGHT_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.STEEL_NUGGET) .input(ResourceItemsME.GONDOR_BANNER_PATTERN) .input(ResourceItemsME.STEEL_NUGGET) @@ -550,7 +552,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GONDORIAN_KNIGHT_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_ORNAMENTED_KNIGHT_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_ORNAMENTED_KNIGHT_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.STEEL_NUGGET) .input(ResourceItemsME.GONDOR_BANNER_PATTERN) .input(ResourceItemsME.STEEL_NUGGET) @@ -564,7 +566,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GONDORIAN_ORNAMENTED_KNIGHT_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.WHITE_DYE) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -576,7 +578,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_BUCKING_HORSE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_BUCKING_HORSE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.ROHAN_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -588,7 +590,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_BUCKING_HORSE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_GALLOPING_HORSE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_GALLOPING_HORSE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.ROHAN_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -600,7 +602,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_GALLOPING_HORSE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_HORSE_HEAD_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_HORSE_HEAD_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.ROHAN_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -612,7 +614,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_HORSE_HEAD_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_PLAINSMAN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_PLAINSMAN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.YELLOW_DYE) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -624,7 +626,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_PLAINSMAN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_TWIN_HORSES_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_TWIN_HORSES_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.ROHAN_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -636,7 +638,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_TWIN_HORSES_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_EORLING_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_EORLING_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.STEEL_NUGGET) .input(Items.YELLOW_DYE) .input(ResourceItemsME.STEEL_NUGGET) @@ -650,7 +652,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_EORLING_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_ORNAMENTED_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_ORNAMENTED_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.STEEL_NUGGET) .input(ResourceItemsME.ROHAN_BANNER_PATTERN) .input(ResourceItemsME.STEEL_NUGGET) @@ -664,7 +666,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_ORNAMENTED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_ROYAL_GUARD_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.ROHIRRIC_ROYAL_GUARD_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.STEEL_NUGGET) .input(Items.YELLOW_DYE) .input(ResourceItemsME.STEEL_NUGGET) @@ -678,7 +680,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.ROHIRRIC_ROYAL_GUARD_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BLUE_OVAL_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BLUE_OVAL_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.BLUE_DYE) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -690,7 +692,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_BLUE_OVAL_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BARDING_OVAL_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BARDING_OVAL_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.BLUE_DYE) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -702,7 +704,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_BARDING_OVAL_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BLUE_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BLUE_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.IRON_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -714,7 +716,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_BLUE_BRACED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BARDING_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BARDING_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.IRON_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -726,7 +728,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_BARDING_BRACED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.STEEL_NUGGET) .input(Items.WHITE_DYE) .input(ResourceItemsME.STEEL_NUGGET) @@ -740,7 +742,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_HEAVY_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BARDING_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_BARDING_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.STEEL_NUGGET) .input(Items.BLUE_DYE) .input(ResourceItemsME.STEEL_NUGGET) @@ -754,7 +756,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_BARDING_HEAVY_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_ROYAL_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_ROYAL_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(Items.GOLD_NUGGET) .input(Items.LIGHT_BLUE_DYE) .input(Items.GOLD_NUGGET) @@ -768,7 +770,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_ROYAL_HEAVY_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_ROYAL_ROUND_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_ROYAL_ROUND_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(Items.GOLD_NUGGET) .input(Items.LIGHT_BLUE_DYE) .input(Items.GOLD_NUGGET) @@ -782,7 +784,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_ROYAL_ROUND_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_HEYDAY_ROUND_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DALISH_HEYDAY_ROUND_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.STEEL_NUGGET) .input(Items.ORANGE_DYE) .input(ResourceItemsME.STEEL_NUGGET) @@ -796,7 +798,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DALISH_HEYDAY_ROUND_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.LORIEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.LORIEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.LEATHER) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -808,7 +810,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.LORIEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.LORIEN_LAURELS_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.LORIEN_LAURELS_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.YELLOW_DYE) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -820,7 +822,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.LORIEN_LAURELS_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.LORIEN_MALLORN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.LORIEN_MALLORN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.YELLOW_DYE) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -832,7 +834,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.LORIEN_MALLORN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GALADHRIM_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GALADHRIM_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.YELLOW_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -846,7 +848,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GALADHRIM_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GALADHRIM_LORD_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GALADHRIM_LORD_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.YELLOW_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -860,7 +862,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GALADHRIM_LORD_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_BUCKLER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_BUCKLER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.COPPER_INGOT) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -872,7 +874,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_BUCKLER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_SCOUT_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_SCOUT_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.SILVER_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -883,7 +885,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_BORDER), conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_SCOUT_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_SCOUT_BRONZE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_SCOUT_BRONZE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.BRONZE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -895,7 +897,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_SCOUT_BRONZE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GALADHRIM_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GALADHRIM_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.BROWN_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -908,7 +910,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_PLATE), conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_HEAVY_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_HEAVY_GREEN_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_HEAVY_GREEN_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.GREEN_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -921,7 +923,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_PLATE), conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_HEAVY_GREEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_HEAVY_BLUE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_HEAVY_BLUE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.BLUE_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -935,7 +937,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_HEAVY_BLUE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_HEAVY_ORNAMENTED_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_HEAVY_ORNAMENTED_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.BROWN_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -948,7 +950,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_PLATE), conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_HEAVY_ORNAMENTED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_HEAVY_ORNAMENTED_GREEN_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_HEAVY_ORNAMENTED_GREEN_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.GREEN_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -962,7 +964,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_HEAVY_ORNAMENTED_GREEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_GLADE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_GLADE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.GREEN_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -976,7 +978,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_GLADE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_NIGHTSHADE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_NIGHTSHADE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.BLACK_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -989,7 +991,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_PLATE), conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.WOODLAND_REALM_NIGHTSHADE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_NIGHTSHADE_ORNAMENTED_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.WOODLAND_REALM_NIGHTSHADE_ORNAMENTED_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) .input(Items.BLACK_DYE) .input(ResourceItemsME.EDHEL_STEEL_NUGGET) @@ -1006,7 +1008,7 @@ public void generate() { - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.BRONZE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1018,7 +1020,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_CROSS_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_CROSS_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.BRONZE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1030,7 +1032,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_CROSS_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_PLATED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_PLATED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.BRONZE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1042,7 +1044,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_PLATED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_ORNAMENTED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_ORNAMENTED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.GOLD_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1054,7 +1056,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_ORNAMENTED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_REINFORCED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_REINFORCED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.IRON_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1066,7 +1068,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_REINFORCED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_BUCKLER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_BUCKLER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) .input(ResourceItemsME.BRONZE_INGOT) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) @@ -1080,7 +1082,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_BUCKLER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) .input(ResourceItemsME.KHAZAD_STEEL_INGOT) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) @@ -1094,7 +1096,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_REINFORCED_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_REINFORCED_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) .input(ResourceItemsME.KHAZAD_STEEL_INGOT) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) @@ -1108,7 +1110,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_REINFORCED_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_ORNAMENTED_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.EREBOR_ORNAMENTED_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) .input(Items.GOLD_NUGGET) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) @@ -1122,7 +1124,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.EREBOR_ORNAMENTED_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RAVENHILL_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RAVENHILL_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) .input(ResourceItemsME.KHAZAD_STEEL_INGOT) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) @@ -1136,7 +1138,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.RAVENHILL_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RAVENHILL_REINFORCED_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RAVENHILL_REINFORCED_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) .input(ResourceItemsME.KHAZAD_STEEL_INGOT) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) @@ -1150,7 +1152,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.RAVENHILL_REINFORCED_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RAVENHILL_ORNAMENTED_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RAVENHILL_ORNAMENTED_TOWER_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.GOOD, XP_HEAVY_SHIELD) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) .input(Items.GOLD_NUGGET) .input(ResourceItemsME.KHAZAD_STEEL_NUGGET) @@ -1181,7 +1183,7 @@ public void generate() { conditionsFromItem(WeaponItemsME.MORDOR_WOODEN_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_PAINTED_WOODEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_ROUND_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_ROUND_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.CRUDE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1193,7 +1195,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_ROUND_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_PAINTED_ROUND_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_PAINTED_ROUND_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.MORDOR_BANNER_PATTERN) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1205,14 +1207,14 @@ public void generate() { conditionsFromItem(ResourceItemsME.MORDOR_BANNER_PATTERN)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_PAINTED_ROUND_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_BLACK_ROUND_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_BLACK_ROUND_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(WeaponItemsME.MORDOR_PAINTED_ROUND_SHIELD) .input(Items.BLACK_DYE) .criterion(hasItem(WeaponItemsME.MORDOR_PAINTED_ROUND_SHIELD), conditionsFromItem(WeaponItemsME.MORDOR_PAINTED_ROUND_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_BLACK_ROUND_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.IRON_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1224,21 +1226,21 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_BRACED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_PAINTED_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_PAINTED_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(WeaponItemsME.MORDOR_BRACED_SHIELD) .input(ResourceItemsME.MORDOR_BANNER_PATTERN) .criterion(hasItem(WeaponItemsME.MORDOR_BRACED_SHIELD), conditionsFromItem(WeaponItemsME.MORDOR_BRACED_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_PAINTED_BRACED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_BLACK_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_BLACK_BRACED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(WeaponItemsME.MORDOR_PAINTED_BRACED_SHIELD) .input(Items.BLACK_DYE) .criterion(hasItem(WeaponItemsME.MORDOR_PAINTED_BRACED_SHIELD), conditionsFromItem(WeaponItemsME.MORDOR_PAINTED_BRACED_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_BLACK_BRACED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_LARGE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_LARGE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.IRON_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1250,21 +1252,21 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_LARGE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_PAINTED_LARGE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_PAINTED_LARGE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(WeaponItemsME.MORDOR_LARGE_SHIELD) .input(ResourceItemsME.MORDOR_BANNER_PATTERN) .criterion(hasItem(WeaponItemsME.MORDOR_LARGE_SHIELD), conditionsFromItem(WeaponItemsME.MORDOR_LARGE_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_PAINTED_LARGE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_BLACK_LARGE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_BLACK_LARGE_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(WeaponItemsME.MORDOR_PAINTED_LARGE_SHIELD) .input(Items.BLACK_DYE) .criterion(hasItem(WeaponItemsME.MORDOR_PAINTED_LARGE_SHIELD), conditionsFromItem(WeaponItemsME.MORDOR_PAINTED_LARGE_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_BLACK_LARGE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DOL_GULDUR_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DOL_GULDUR_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.IRON_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1276,7 +1278,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DOL_GULDUR_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DOL_GULDUR_PAVISE.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.DOL_GULDUR_PAVISE.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) @@ -1291,14 +1293,14 @@ public void generate() { .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.DOL_GULDUR_PAVISE).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_CONVERTED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GONDORIAN_CONVERTED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(WeaponItemsME.GONDORIAN_SHIELD) .input(ResourceItemsME.MORDOR_BANNER_PATTERN) .criterion(hasItem(WeaponItemsME.GONDORIAN_SHIELD), conditionsFromItem(WeaponItemsME.GONDORIAN_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GONDORIAN_CONVERTED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) @@ -1312,14 +1314,14 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_HEAVY_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_PAINTED_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORDOR_PAINTED_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(WeaponItemsME.MORDOR_HEAVY_SHIELD) .input(ResourceItemsME.MORDOR_BANNER_PATTERN) .criterion(hasItem(WeaponItemsME.MORDOR_HEAVY_SHIELD), conditionsFromItem(WeaponItemsME.MORDOR_HEAVY_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORDOR_PAINTED_HEAVY_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.BLACK_NUMENOREAN_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.BLACK_NUMENOREAN_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(Items.RED_DYE) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1331,7 +1333,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.BLACK_NUMENOREAN_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_HEATER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_HEATER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(ResourceItemsME.CRUDE_NUGGET) .input(ResourceItemsME.CRUDE_INGOT) .input(ResourceItemsME.CRUDE_NUGGET) @@ -1343,7 +1345,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.URUK_HAI_HEATER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) @@ -1357,28 +1359,28 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.URUK_HAI_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_WHITE_HAND_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_WHITE_HAND_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(WeaponItemsME.URUK_HAI_SHIELD) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(WeaponItemsME.URUK_HAI_SHIELD), conditionsFromItem(WeaponItemsME.URUK_HAI_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.URUK_HAI_WHITE_HAND_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_WHITE_PALMPRINT_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_WHITE_PALMPRINT_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(WeaponItemsME.URUK_HAI_SHIELD) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(WeaponItemsME.URUK_HAI_SHIELD), conditionsFromItem(WeaponItemsME.URUK_HAI_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.URUK_HAI_WHITE_PALMPRINT_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_S_RUNE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_S_RUNE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(WeaponItemsME.URUK_HAI_SHIELD) .input(ResourceItemsME.ISENGARD_BANNER_PATTERN) .criterion(hasItem(WeaponItemsME.URUK_HAI_SHIELD), conditionsFromItem(WeaponItemsME.URUK_HAI_SHIELD)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.URUK_HAI_S_RUNE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_SIEGE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.URUK_HAI_SIEGE_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .componentInput(new ComponentsIngredient(Ingredient.ofItems(burzumSteelShieldPlate.getItem()), burzumSteelShieldPlate.getComponentChanges())) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) @@ -1432,7 +1434,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GUNDABAD_PEAKS_PAINTED_WOODEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GUNDABAD_REINFORCED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GUNDABAD_REINFORCED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.CRUDE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1444,7 +1446,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GUNDABAD_REINFORCED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GUNDABAD_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GUNDABAD_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) @@ -1458,7 +1460,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GUNDABAD_HEAVY_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORIA_GOBLINS_BUCKLER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORIA_GOBLINS_BUCKLER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.CRUDE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1469,7 +1471,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_BORDER), conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORIA_GOBLINS_BUCKLER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORIA_GOBLINS_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.MORIA_GOBLINS_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) @@ -1483,7 +1485,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_PLATE)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.MORIA_GOBLINS_HEAVY_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.CRUDE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1494,7 +1496,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_BORDER), conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.RUINED_DWARVEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_CROSS_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_CROSS_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.CRUDE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1505,7 +1507,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_BORDER), conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.RUINED_DWARVEN_CROSS_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_ORNAMENTED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_ORNAMENTED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.CRUDE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1516,7 +1518,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_BORDER), conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.RUINED_DWARVEN_ORNAMENTED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_REINFORCED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_REINFORCED_SHIELD.getDefaultStack(), "medium_shield", DispositionType.GOOD, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.CRUDE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1528,7 +1530,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.RUINED_DWARVEN_REINFORCED_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_ORNAMENTED_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_ORNAMENTED_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(Items.LEATHER) .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.LEATHER) @@ -1539,7 +1541,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_BORDER), conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.RUINED_DWARVEN_ORNAMENTED_TOWER_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_REINFORCED_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.RUINED_DWARVEN_REINFORCED_TOWER_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(Items.LEATHER) .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.LEATHER) @@ -1563,7 +1565,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.CRUDE_INGOT)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GOBLIN_TOWN_BONE_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GOBLIN_TOWN_WOODEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GOBLIN_TOWN_WOODEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) .input(ResourceItemsME.CRUDE_NUGGET) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))) @@ -1574,7 +1576,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_BORDER), conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GOBLIN_TOWN_WOODEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GOBLIN_TOWN_BONE_WOODEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GOBLIN_TOWN_BONE_WOODEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(Items.BONE) .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.BONE) @@ -1585,7 +1587,7 @@ public void generate() { .criterion(hasItem(ResourceItemsME.SHIELD_BORDER), conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GOBLIN_TOWN_BONE_WOODEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GOBLIN_TOWN_LEATHER_WOODEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GOBLIN_TOWN_LEATHER_WOODEN_SHIELD.getDefaultStack(), "medium_shield", DispositionType.EVIL, XP_MEDIUM_SHIELD) .input(Items.LEATHER) .input(ResourceItemsME.CRUDE_NUGGET) .input(Items.LEATHER) @@ -1597,7 +1599,7 @@ public void generate() { conditionsFromItem(ResourceItemsME.SHIELD_BORDER)) .offerTo(exporter, Registries.ITEM.getId(WeaponItemsME.GOBLIN_TOWN_LEATHER_WOODEN_SHIELD).getPath() + "_artisan"); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GOBLIN_TOWN_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, WeaponItemsME.GOBLIN_TOWN_HEAVY_SHIELD.getDefaultStack(), "heavy_shield", DispositionType.EVIL, XP_HEAVY_SHIELD) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) .input(ResourceItemsME.BURZUM_STEEL_NUGGET) @@ -1671,6 +1673,19 @@ public void generate() { }; } + private int getXpFor(MetalTypes metalTypes) { + return switch (metalTypes) { + default -> 0; + case EMPTY -> 0; + case COPPER, TIN -> 2; + case BRONZE, CRUDE -> 3; + case IRON, SILVER, LEAD -> 4; + case STEEL, EDHEL_STEEL, KHAZAD_STEEL, BURZUM_STEEL -> 5; + case GOLD, NETHERITE -> 7; + case MITHRIL -> 12; + }; + } + private void createToolSet(RegistryEntryLookup itemLookup, RecipeExporter exporter, MetalTypes metal, ItemStack outputPickaxe, ItemStack outputAxe, ItemStack outputShovel, ItemStack outputHoe, Optional rodMetal, DispositionType dispositionType) { createArtisanTablePickaxeRecipe(itemLookup, exporter, metal, outputPickaxe, rodMetal, dispositionType); createArtisanTableAxeRecipe(itemLookup, exporter, metal, outputAxe, false, rodMetal, dispositionType); @@ -1688,6 +1703,7 @@ private void createArtisanTableSwordRecipe(RegistryEntryLookup itemLookup, getMetalIdentifier(metal))), getPattern())); ItemStack swordHilt = new ItemStack(ResourceItemsME.SWORD_HILT); + int xp = getXpFor(metal); if (!noble) { swordHilt.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, @@ -1695,9 +1711,10 @@ private void createArtisanTableSwordRecipe(RegistryEntryLookup itemLookup, } else { swordHilt.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.GOLD.getName()))), getPattern())); + xp++; } - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "sword", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "sword", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(blade.getItem()), blade.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(swordHilt.getItem()), swordHilt.getComponentChanges())) .input(stick) @@ -1716,6 +1733,7 @@ private void createArtisanTableLongswordRecipe(RegistryEntryLookup itemLoo getMetalIdentifier(metal))), getPattern())); ItemStack swordHilt = new ItemStack(ResourceItemsME.SWORD_HILT); + int xp = (int) (getXpFor(metal) * 1.5f); if (!noble) { swordHilt.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, @@ -1723,9 +1741,10 @@ private void createArtisanTableLongswordRecipe(RegistryEntryLookup itemLoo } else { swordHilt.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.GOLD.getName()))), getPattern())); + xp++; } - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "sword", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "sword", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(longBlade.getItem()), longBlade.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(swordHilt.getItem()), swordHilt.getComponentChanges())) .input(stick) @@ -1744,6 +1763,7 @@ private void createArtisanTableDaggerRecipe(RegistryEntryLookup itemLookup getMetalIdentifier(metal))), getPattern())); ItemStack swordHilt = new ItemStack(ResourceItemsME.SWORD_HILT); + int xp = (int) (getXpFor(metal) * 0.5f); if (!noble) { swordHilt.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, @@ -1751,9 +1771,10 @@ private void createArtisanTableDaggerRecipe(RegistryEntryLookup itemLookup } else { swordHilt.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.GOLD.getName()))), getPattern())); + xp++; } - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "sword", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "sword", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(shortBlade.getItem()), shortBlade.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(swordHilt.getItem()), swordHilt.getComponentChanges())) .input(stick) @@ -1770,9 +1791,10 @@ private void createArtisanTableSpearRecipe(RegistryEntryLookup itemLookup, ItemStack blade = new ItemStack(ResourceItemsME.SHORT_BLADE); blade.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(metal))), getPattern())); + int xp = (int) (getXpFor(metal) * 0.5f); if (!noble) { - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "spear", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "spear", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(blade.getItem()), blade.getComponentChanges())) .input(stick) .input(stick) @@ -1781,9 +1803,10 @@ private void createArtisanTableSpearRecipe(RegistryEntryLookup itemLookup, .offerTo(exporter); } else { ItemStack rod = new ItemStack(ResourceItemsME.ROD); + xp++; rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.GOLD.getName()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "spear", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "spear", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(blade.getItem()), blade.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) .input(stick) @@ -1810,7 +1833,7 @@ private void createArtisanTableNobleBowRecipe(RegistryEntryLookup itemLook ItemStack rod = new ItemStack(ResourceItemsME.ROD); rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.GOLD.getName()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "bow", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "bow", dispositionType, XP_MEDIUM_SHIELD) .input(Items.STICK) .input(Items.STRING) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) @@ -1839,7 +1862,7 @@ private void createArtisanTableNobleLongbowRecipe(RegistryEntryLookup item ItemStack rod = new ItemStack(ResourceItemsME.ROD); rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.GOLD.getName()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "bow", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "bow", dispositionType, 2) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of("wooden_fences"))) .input(Items.STRING) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) @@ -1856,7 +1879,7 @@ private void createArtisanTableCrossbowRecipe(RegistryEntryLookup itemLook rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.IRON.getName()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "crossbow", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "crossbow", dispositionType, 2) .input(Items.STICK) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) .input(Items.STICK) @@ -1874,7 +1897,7 @@ private void createArtisanTableNobleCrossbowRecipe(RegistryEntryLookup ite rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.GOLD.getName()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "crossbow", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "crossbow", dispositionType, 2) .input(Items.STICK) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) .input(Items.STICK) @@ -1891,12 +1914,13 @@ private void createArtisanTablePickaxeRecipe(RegistryEntryLookup itemLooku ItemStack pickaxeHead = new ItemStack(ResourceItemsME.PICKAXE_HEAD); pickaxeHead.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(metal))), getPattern())); + int xp = (int) (getXpFor(metal) * 1.5f); if (rodMetal.isPresent()){ ItemStack rod = new ItemStack(ResourceItemsME.ROD); rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(rodMetal.get()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "pickaxe", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "pickaxe", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(pickaxeHead.getItem()), pickaxeHead.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) @@ -1904,13 +1928,13 @@ private void createArtisanTablePickaxeRecipe(RegistryEntryLookup itemLooku conditionsFromItem(pickaxeHead.getItem(), itemLookup)) .offerTo(exporter, Registries.ITEM.getId(output.getItem()).getPath() + "_" + rodMetal.get().getName() + "_artisan"); } else { - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "pickaxe", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "pickaxe", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(pickaxeHead.getItem()), pickaxeHead.getComponentChanges())) .input(Items.STICK) .input(Items.STICK) .criterion(hasItem(pickaxeHead.getItem()), conditionsFromItem(pickaxeHead.getItem(), itemLookup)) - .offerTo(exporter); + .offerTo(exporter, Registries.ITEM.getId(output.getItem()).getPath() + "_artisan"); } } @@ -1922,13 +1946,14 @@ private void createArtisanTableAxeRecipe(RegistryEntryLookup itemLookup, R ItemStack axeHead = new ItemStack(ResourceItemsME.AXE_HEAD); axeHead.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(metal))), getPattern())); + int xp = (int) (getXpFor(metal) * 1.5f); if (!noble){ if (rodMetal.isPresent()){ ItemStack rod = new ItemStack(ResourceItemsME.ROD); rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(rodMetal.get()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "axe", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "axe", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(axeHead.getItem()), axeHead.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) @@ -1936,7 +1961,7 @@ private void createArtisanTableAxeRecipe(RegistryEntryLookup itemLookup, R conditionsFromItem(axeHead.getItem(), itemLookup)) .offerTo(exporter, Registries.ITEM.getId(output.getItem()).getPath() + "_" + rodMetal.get().getName() + "_artisan"); } else { - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "axe", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "axe", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(axeHead.getItem()), axeHead.getComponentChanges())) .input(stick) .input(stick) @@ -1948,7 +1973,7 @@ private void createArtisanTableAxeRecipe(RegistryEntryLookup itemLookup, R ItemStack rod = new ItemStack(ResourceItemsME.ROD); rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, Identifier.of(MetalTypes.GOLD.getName()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "axe", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "axe", dispositionType, xp + 1) .componentInput(new ComponentsIngredient(Ingredient.ofItems(axeHead.getItem()), axeHead.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) .input(stick) @@ -1962,12 +1987,13 @@ private void createArtisanTableShovelRecipe(RegistryEntryLookup itemLookup ItemStack shovelHead = new ItemStack(ResourceItemsME.SHOVEL_HEAD); shovelHead.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(metal))), getPattern())); + int xp = (int) (getXpFor(metal) * 0.5f); if (rodMetal.isPresent()){ ItemStack rod = new ItemStack(ResourceItemsME.ROD); rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(rodMetal.get()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "shovel", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "shovel", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(shovelHead.getItem()), shovelHead.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) @@ -1975,7 +2001,7 @@ private void createArtisanTableShovelRecipe(RegistryEntryLookup itemLookup conditionsFromItem(shovelHead.getItem(), itemLookup)) .offerTo(exporter, Registries.ITEM.getId(output.getItem()).getPath() + "_" + rodMetal.get().getName() + "_artisan"); } else { - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "shovel", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "shovel", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(shovelHead.getItem()), shovelHead.getComponentChanges())) .input(Items.STICK) .input(Items.STICK) @@ -1989,13 +2015,14 @@ private void createArtisanTableHoeRecipe(RegistryEntryLookup itemLookup, R ItemStack hoeHead = new ItemStack(ResourceItemsME.HOE_HEAD); hoeHead.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(metal))), getPattern())); + int xp = getXpFor(metal); if (rodMetal.isPresent()){ ItemStack rod = new ItemStack(ResourceItemsME.ROD); rod.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, getMetalIdentifier(rodMetal.get()))), getPattern())); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "hoe", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "hoe", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(hoeHead.getItem()), hoeHead.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) .componentInput(new ComponentsIngredient(Ingredient.ofItems(rod.getItem()), rod.getComponentChanges())) @@ -2003,7 +2030,7 @@ private void createArtisanTableHoeRecipe(RegistryEntryLookup itemLookup, R conditionsFromItem(hoeHead.getItem(), itemLookup)) .offerTo(exporter, Registries.ITEM.getId(output.getItem()).getPath() + "_" + rodMetal.get().getName() + "_artisan"); } else { - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "hoe", dispositionType) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "hoe", dispositionType, xp) .componentInput(new ComponentsIngredient(Ingredient.ofItems(hoeHead.getItem()), hoeHead.getComponentChanges())) .input(Items.STICK) .input(Items.STICK) @@ -2016,14 +2043,15 @@ private void createArtisanTableHoeRecipe(RegistryEntryLookup itemLookup, R private void createArtisanTableChiselRecipe(RegistryEntryLookup itemLookup, RecipeExporter exporter, MetalTypes metal, Item nugget, ItemStack output) { ItemStack shortBlade = new ItemStack(ResourceItemsME.SHORT_BLADE); shortBlade.set(DataComponentTypes.TRIM, new ArmorTrim(getArmorTrimMaterialsRegistry().getOrThrow(RegistryKey.of(RegistryKeys.TRIM_MATERIAL, - getMetalIdentifier(metal))), getPattern())); + getMetalIdentifier(metal))), getPattern())); + int xp = (int) (getXpFor(metal) * 0.5f); - ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "chisel", DispositionType.NEUTRAL) - .componentInput(new ComponentsIngredient(Ingredient.ofItems(shortBlade.getItem()), shortBlade.getComponentChanges())) - .input(nugget) - .input(Items.STICK) - .criterion(hasItem(shortBlade.getItem()), - conditionsFromItem(shortBlade.getItem(), itemLookup)) + ArtisanTableRecipeJsonBuilder.createArtisanRecipe(itemLookup, RecipeCategory.COMBAT, output, "chisel", DispositionType.NEUTRAL, xp) + .componentInput(new ComponentsIngredient(Ingredient.ofItems(shortBlade.getItem()), shortBlade.getComponentChanges())) + .input(nugget) + .input(Items.STICK) + .criterion(hasItem(shortBlade.getItem()), + conditionsFromItem(shortBlade.getItem(), itemLookup)) .offerTo(exporter, Registries.ITEM.getId(output.getItem()).getPath() + "_" + metal.getName() + "_artisan"); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/InscriptionRecipeProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/InscriptionRecipeProvider.java index 71ee86b3a9..174fc78c7f 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/InscriptionRecipeProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/InscriptionRecipeProvider.java @@ -59,7 +59,7 @@ public void generate() { //region UNBREAKING InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.UNBREAKING), 1, 5) + getEnchantment(Enchantments.UNBREAKING), 1, 1) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("resilient") .addWord("blessing") @@ -68,7 +68,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_unbreaking_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.UNBREAKING), 2, 7) + getEnchantment(Enchantments.UNBREAKING), 2, 3) .chisel(ItemTagsME.MID_CHISELS) .addWord("resilient") .addWord("blessing") @@ -77,7 +77,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_unbreaking_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.UNBREAKING), 3, 9) + getEnchantment(Enchantments.UNBREAKING), 3, 5) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("resilient") .addWord("blessing") @@ -267,7 +267,7 @@ public void generate() { //region FEATHER FALLING InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.FEATHER_FALLING), 1, 5) + getEnchantment(Enchantments.FEATHER_FALLING), 1, 3) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("sturdy") .addWord("resilient") @@ -277,7 +277,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_feather_falling_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.FEATHER_FALLING), 2, 7) + getEnchantment(Enchantments.FEATHER_FALLING), 2, 5) .chisel(ItemTagsME.MID_CHISELS) .addWord("sturdy") .addWord("resilient") @@ -287,7 +287,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_feather_falling_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.FEATHER_FALLING), 3, 9) + getEnchantment(Enchantments.FEATHER_FALLING), 3, 7) .chisel(ItemTagsME.MID_CHISELS) .addWord("sturdy") .addWord("resilient") @@ -297,7 +297,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_feather_falling_3"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.FEATHER_FALLING), 4, 11) + getEnchantment(Enchantments.FEATHER_FALLING), 4, 9) .chisel(ItemTagsME.LATE_CHISELS) .addWord("sturdy") .addWord("resilient") @@ -351,6 +351,38 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_depth_strider_3"))); //endregion + //region LURE + InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, + getEnchantment(Enchantments.LURE), 1, 2) + .chisel(ItemTagsME.EARLY_CHISELS) + .addWord("swift") + .addWord("tidal") + .addWord("collector") + .criterion(hasItem(ResourceItemsME.ADAMANT), + conditionsFromItem(ResourceItemsME.ADAMANT)) + .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_lure_1"))); + + InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, + getEnchantment(Enchantments.LURE), 2, 4) + .chisel(ItemTagsME.MID_CHISELS) + .addWord("swift") + .addWord("tidal") + .addWord("collector") + .criterion(hasItem(ResourceItemsME.ADAMANT), + conditionsFromItem(ResourceItemsME.ADAMANT)) + .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_lure_2"))); + + InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, + getEnchantment(Enchantments.LURE), 3, 6) + .chisel(ItemTagsME.MID_CHISELS) + .addWord("swift") + .addWord("tidal") + .addWord("collector") + .criterion(hasItem(ResourceItemsME.ADAMANT), + conditionsFromItem(ResourceItemsME.ADAMANT)) + .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_lure_3"))); + //endregion + //region SHARPNESS InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, getEnchantment(Enchantments.SHARPNESS), 1, 3) @@ -400,7 +432,7 @@ public void generate() { //region KNOCKBACK InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.KNOCKBACK), 1, 5) + getEnchantment(Enchantments.KNOCKBACK), 1, 4) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("forceful") .addWord("edge") @@ -409,7 +441,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_knockback_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.KNOCKBACK), 2, 7) + getEnchantment(Enchantments.KNOCKBACK), 2, 6) .chisel(ItemTagsME.MID_CHISELS) .addWord("forceful") .addWord("edge") @@ -420,7 +452,7 @@ public void generate() { //region LOOTING InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.LOOTING), 1, 5) + getEnchantment(Enchantments.LOOTING), 1, 3) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("gifted") .addWord("blessing") @@ -430,7 +462,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_looting_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.LOOTING), 2, 8) + getEnchantment(Enchantments.LOOTING), 2, 5) .chisel(ItemTagsME.MID_CHISELS) .addWord("gifted") .addWord("blessing") @@ -440,7 +472,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_looting_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.LOOTING), 3, 11) + getEnchantment(Enchantments.LOOTING), 3, 7) .chisel(ItemTagsME.LATE_CHISELS) .addWord("gifted") .addWord("blessing") @@ -504,7 +536,7 @@ public void generate() { //region SWEEPING EDGE InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.SWEEPING_EDGE), 1, 5) + getEnchantment(Enchantments.SWEEPING_EDGE), 1, 3) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("broad") .addWord("edge") @@ -514,7 +546,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_sweeping_edge_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.SWEEPING_EDGE), 2, 7) + getEnchantment(Enchantments.SWEEPING_EDGE), 2, 5) .chisel(ItemTagsME.MID_CHISELS) .addWord("broad") .addWord("edge") @@ -524,7 +556,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_sweeping_edge_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.SWEEPING_EDGE), 3, 9) + getEnchantment(Enchantments.SWEEPING_EDGE), 3, 7) .chisel(ItemTagsME.MID_CHISELS) .addWord("broad") .addWord("edge") @@ -592,7 +624,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_punch_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.PUNCH), 2, 7) + getEnchantment(Enchantments.PUNCH), 2, 8) .chisel(ItemTagsME.MID_CHISELS) .addWord("forceful") .addWord("draw") @@ -603,7 +635,7 @@ public void generate() { //region PIERCING InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.PIERCING), 1, 5) + getEnchantment(Enchantments.PIERCING), 1, 3) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("long") .addWord("point") @@ -612,7 +644,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_piercing_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.PIERCING), 2, 7) + getEnchantment(Enchantments.PIERCING), 2, 5) .chisel(ItemTagsME.MID_CHISELS) .addWord("long") .addWord("point") @@ -621,7 +653,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_piercing_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.PIERCING), 3, 9) + getEnchantment(Enchantments.PIERCING), 3, 7) .chisel(ItemTagsME.MID_CHISELS) .addWord("long") .addWord("point") @@ -630,7 +662,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_piercing_3"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.PIERCING), 4, 11) + getEnchantment(Enchantments.PIERCING), 4, 9) .chisel(ItemTagsME.LATE_CHISELS) .addWord("long") .addWord("point") @@ -642,7 +674,7 @@ public void generate() { //region QUICK CHARGE InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.QUICK_CHARGE), 1, 5) + getEnchantment(Enchantments.QUICK_CHARGE), 1, 4) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("swift") .addWord("draw") @@ -651,7 +683,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_quick_charge_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.QUICK_CHARGE), 2, 7) + getEnchantment(Enchantments.QUICK_CHARGE), 2, 6) .chisel(ItemTagsME.MID_CHISELS) .addWord("swift") .addWord("draw") @@ -660,7 +692,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_quick_charge_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.QUICK_CHARGE), 3, 9) + getEnchantment(Enchantments.QUICK_CHARGE), 3, 8) .chisel(ItemTagsME.MID_CHISELS) .addWord("swift") .addWord("draw") @@ -671,7 +703,7 @@ public void generate() { //region EFFICIENCY InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.EFFICIENCY), 1, 3) + getEnchantment(Enchantments.EFFICIENCY), 1, 2) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("swift") .addWord("collector") @@ -680,7 +712,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_efficiency_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.EFFICIENCY), 2, 5) + getEnchantment(Enchantments.EFFICIENCY), 2, 4) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("swift") .addWord("collector") @@ -689,7 +721,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_efficiency_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.EFFICIENCY), 3, 7) + getEnchantment(Enchantments.EFFICIENCY), 3, 6) .chisel(ItemTagsME.MID_CHISELS) .addWord("swift") .addWord("collector") @@ -698,7 +730,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_efficiency_3"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.EFFICIENCY), 4, 9) + getEnchantment(Enchantments.EFFICIENCY), 4, 8) .chisel(ItemTagsME.MID_CHISELS) .addWord("swift") .addWord("collector") @@ -707,7 +739,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_efficiency_4"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.EFFICIENCY), 5, 11) + getEnchantment(Enchantments.EFFICIENCY), 5, 10) .chisel(ItemTagsME.LATE_CHISELS) .addWord("swift") .addWord("collector") @@ -718,7 +750,7 @@ public void generate() { //region FORTUNE InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.FORTUNE), 1, 11) + getEnchantment(Enchantments.FORTUNE), 1, 7) .chisel(ItemTagsME.MID_CHISELS) .addWord("gifted") .addWord("blessing") @@ -728,7 +760,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_fortune_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.FORTUNE), 2, 13) + getEnchantment(Enchantments.FORTUNE), 2, 9) .chisel(ItemTagsME.MID_CHISELS) .addWord("gifted") .addWord("blessing") @@ -738,7 +770,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_fortune_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.FORTUNE), 3, 15) + getEnchantment(Enchantments.FORTUNE), 3, 11) .chisel(ItemTagsME.LATE_CHISELS) .addWord("gifted") .addWord("blessing") @@ -750,7 +782,7 @@ public void generate() { //region SILK TOUCH InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(Enchantments.SILK_TOUCH), 1, 10) + getEnchantment(Enchantments.SILK_TOUCH), 1, 5) .chisel(ItemTagsME.MID_CHISELS) .addWord("careful") .addWord("collector") @@ -763,7 +795,7 @@ public void generate() { //region AILMENT PROTECTION InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.AILMENT_PROTECTION), 1, 5) + getEnchantment(EnchantmentsME.AILMENT_PROTECTION), 1, 4) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("sturdy") .addWord("resilient") @@ -773,7 +805,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_ailment_protection_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.AILMENT_PROTECTION), 2, 7) + getEnchantment(EnchantmentsME.AILMENT_PROTECTION), 2, 6) .chisel(ItemTagsME.MID_CHISELS) .addWord("sturdy") .addWord("resilient") @@ -783,7 +815,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_ailment_protection_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.AILMENT_PROTECTION), 3, 9) + getEnchantment(EnchantmentsME.AILMENT_PROTECTION), 3, 8) .chisel(ItemTagsME.MID_CHISELS) .addWord("sturdy") .addWord("resilient") @@ -793,7 +825,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_ailment_protection_3"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.AILMENT_PROTECTION), 4, 11) + getEnchantment(EnchantmentsME.AILMENT_PROTECTION), 4, 10) .chisel(ItemTagsME.LATE_CHISELS) .addWord("sturdy") .addWord("resilient") @@ -857,7 +889,7 @@ public void generate() { //region CELERITY InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.CELERITY), 1, 10) + getEnchantment(EnchantmentsME.CELERITY), 1, 7) .chisel(ItemTagsME.MID_CHISELS) .addWord("swift") .addWord("edge") @@ -991,7 +1023,7 @@ public void generate() { //region STEALTHY_TRAIL InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.STEALTHY_TRAIL), 1, 5) + getEnchantment(EnchantmentsME.STEALTHY_TRAIL), 1, 3) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("noiseless") .addWord("traveller") @@ -1000,7 +1032,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_stealthy_trail_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.STEALTHY_TRAIL), 2, 7) + getEnchantment(EnchantmentsME.STEALTHY_TRAIL), 2, 5) .chisel(ItemTagsME.MID_CHISELS) .addWord("noiseless") .addWord("traveller") @@ -1009,7 +1041,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_stealthy_trail_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.STEALTHY_TRAIL), 3, 9) + getEnchantment(EnchantmentsME.STEALTHY_TRAIL), 3, 7) .chisel(ItemTagsME.MID_CHISELS) .addWord("noiseless") .addWord("traveller") @@ -1020,7 +1052,7 @@ public void generate() { //region STALWART InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.STALWART), 1, 9) + getEnchantment(EnchantmentsME.STALWART), 1, 8) .chisel(ItemTagsME.LATE_CHISELS) .addWord("sturdy") .addWord("point") @@ -1032,7 +1064,7 @@ public void generate() { //region STRIDE InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.STRIDE), 1, 5) + getEnchantment(EnchantmentsME.STRIDE), 1, 3) .chisel(ItemTagsME.EARLY_CHISELS) .addWord("swift") .addWord("traveller") @@ -1041,7 +1073,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_stride_1"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.STRIDE), 2, 7) + getEnchantment(EnchantmentsME.STRIDE), 2, 5) .chisel(ItemTagsME.MID_CHISELS) .addWord("swift") .addWord("traveller") @@ -1050,7 +1082,7 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "inscription_stride_2"))); InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.STRIDE), 3, 9) + getEnchantment(EnchantmentsME.STRIDE), 3, 7) .chisel(ItemTagsME.MID_CHISELS) .addWord("swift") .addWord("traveller") @@ -1061,7 +1093,7 @@ public void generate() { //region VANTAGE InscriptionRecipeJsonBuilder.createInscriptionRecipe(itemLookup, RecipeCategory.MISC, - getEnchantment(EnchantmentsME.VANTAGE), 1, 11) + getEnchantment(EnchantmentsME.VANTAGE), 1, 7) .chisel(ItemTagsME.MID_CHISELS) .addWord("long") .addWord("edge") diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/RecipeProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/RecipeProvider.java index 230b994452..661a3b76d3 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/RecipeProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/recipes/RecipeProvider.java @@ -26,6 +26,7 @@ import net.sevenstars.middleearth.datageneration.custom.AnvilShapingRecipeJsonBuilder; import net.sevenstars.middleearth.item.*; import net.sevenstars.middleearth.recipe.*; +import net.sevenstars.middleearth.utils.ItemTagsME; import java.util.List; import java.util.concurrent.CompletableFuture; @@ -50,6 +51,7 @@ public void generate() { for (StoneBlockSetBuilder record : StoneBlockSets.stoneSetsList) { if(record.hasMossy) { createStoneSetRecipes(record.mossyCobblestoneBlocks); + createStoneSetRecipes(record.mossyBrickBlocks); createStoneSetRecipes(record.mossyPolishedBlocks); createStoneSetRecipes(record.mossyPillarBlocks); createStoneSetRecipes(record.mossyTileBlocks); @@ -103,6 +105,13 @@ public void generate() { if(record.cobblestoneBlocks != null && record.baseBlocks != null) { offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.cobblestoneBlocks.base(), record.baseBlocks.base(), 1); + offerSmelting(List.of(record.cobblestoneBlocks.base()), RecipeCategory.BUILDING_BLOCKS, + record.baseBlocks.base(), 0.1f, 200, "blocks"); + + + if(record.brickworkBlocks != null) { + createBrickworkBlockRecipe(exporter, record.cobblestoneBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), record.brickworkBlocks.base()); + } } if (record.baseBlocks != null) { @@ -125,21 +134,24 @@ public void generate() { createChiseledRecipe(exporter, record.baseBlocks.base(), record.chiseledBlocks.base(), 2); offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledBlocks.base(), record.baseBlocks.base(), 1); } - if(record.chiseledBricksBlocks != null) { - createChiseledRecipe(exporter, record.baseBlocks.base(), record.chiseledBricksBlocks.base(), 2); - offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledBricksBlocks.base(), record.baseBlocks.base(), 1); + if(record.chiseledBricksBlocks != null && record.brickBlocks != null) { + createChiseledRecipe(exporter, record.brickBlocks.base(), record.chiseledBricksBlocks.base(), 2); + offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledBricksBlocks.base(), record.brickBlocks.base(), 1); } - if(record.chiseledPolishedBlocks != null) { - createChiseledRecipe(exporter, record.baseBlocks.base(), record.chiseledPolishedBlocks.base(), 2); - offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledPolishedBlocks.base(), record.baseBlocks.base(), 1); + if(record.chiseledPolishedBlocks != null && record.polishedBlocks != null) { + createChiseledRecipe(exporter, record.polishedBlocks.base(), record.chiseledPolishedBlocks.base(), 2); + offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledPolishedBlocks.base(), record.polishedBlocks.base(), 1); } - if(record.chiseledSmoothBlocks != null) { - createChiseledRecipe(exporter, record.baseBlocks.base(), record.chiseledSmoothBlocks.base(), 2); - offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledSmoothBlocks.base(), record.baseBlocks.base(), 1); + if(record.chiseledSmoothBlocks != null && record.smoothBlocks != null) { + createChiseledRecipe(exporter, record.smoothBlocks.base(), record.chiseledSmoothBlocks.base(), 2); + offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledSmoothBlocks.base(), record.smoothBlocks.base(), 1); } - if(record.chiseledTilesBlocks != null) { - createChiseledRecipe(exporter, record.baseBlocks.base(), record.chiseledTilesBlocks.base(), 2); - offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledTilesBlocks.base(), record.baseBlocks.base(), 1); + if(record.chiseledTilesBlocks != null && record.tileBlocks != null) { + createChiseledRecipe(exporter, record.tileBlocks.base(), record.chiseledTilesBlocks.base(), 2); + offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, record.chiseledTilesBlocks.base(), record.tileBlocks.base(), 1); + } + if(record.oldBlocks != null) { + createCenterSurroundRecipe(exporter, record.baseBlocks.base().asItem(), ResourceItemsME.ASH, record.oldBlocks.base().asItem(), 8); } createFilledRecipe(exporter, record.baseBlocks.base().asItem(), record.baseBlocks.trapdoor(), 3); @@ -152,11 +164,6 @@ public void generate() { createStoneTableRecipe(exporter, record.baseBlocks.base().asItem(), record.baseBlocks.table()); createStoneChairRecipe(exporter, record.baseBlocks.base().asItem(), record.baseBlocks.chair()); } - if(record.brickBlocks != null) { - if(record.tileBlocks != null) { - createBrickRecipe(exporter, record.brickBlocks.base().asItem(), record.tileBlocks.base(), 4); - } - } createStoneSetRecipes(record.baseBlocks); createStoneSetRecipes(record.cobblestoneBlocks); @@ -235,6 +242,10 @@ public void generate() { createShinglesRecipe(exporter, record.planksBlocks.base(), record.shinglesBlocks.base()); createRegularSetRecipes(record.shinglesBlocks); } + if(record.roofingBlocks != null) { + createRoofingRecipe(exporter, record.planksBlocks.slab(), record.roofingBlocks.base()); + createRegularSetRecipes(record.roofingBlocks); + } if(!record.vanilla)createVerticalSlabsRecipe(exporter, record.planksBlocks.slab(), record.planksBlocks.verticalSlab()); createSlabsFromVerticalRecipe(exporter, record.planksBlocks.verticalSlab(), record.planksBlocks.slab()); @@ -274,6 +285,8 @@ public void generate() { for(GenericBlockSetBuilder set : GenericBlockSets.genericSetsList) { if(!set.setName.contains("wood") && !set.setName.contains("thatch") && !set.setName.contains("reed") && !set.setName.contains("canvas")) { createStoneSetRecipes(set.blockSet); + } else if (set.setName.contains("thatch") || set.setName.contains("reed")) { + createRegularSetRecipes(set.blockSet); } } @@ -463,14 +476,26 @@ public void generate() { createLayerRecipe(exporter, ModBlocks.SKELETAL_PILE.asItem(), ModBlocks.SKELETAL_PILE_LAYER); createLayerRecipe(exporter, ModBlocks.WASTE_PILE.asItem(), ModBlocks.WASTE_PILE_LAYER); - createStairsRecipe(exporter, ModBlocks.GRASSY_DIRT, ModBlocks.GRASSY_DIRT_STAIRS); - offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_DIRT_SLAB, ModBlocks.GRASSY_DIRT); - createStairsRecipe(exporter, ModBlocks.GRASSY_LOAM, ModBlocks.GRASSY_LOAM_STAIRS); - offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_LOAM_SLAB, ModBlocks.GRASSY_LOAM); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.TRAVERTINE_SET.baseBlocks.base(), 4) + .pattern("CS") + .pattern("SC") + .input('C', Blocks.CALCITE) + .input('S', Blocks.SANDSTONE) + .criterion(hasItem(Blocks.CALCITE), + conditionsFromItem(Blocks.CALCITE)) + .offerTo(exporter); - createStairsRecipe(exporter, ModBlocks.GRASSY_SILT, ModBlocks.GRASSY_SILT_STAIRS); - offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_SILT_SLAB, ModBlocks.GRASSY_SILT); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.REED_THATCH.blockSet.base(), 1) + .pattern("RR") + .pattern("RR") + .input('R', ResourceItemsME.REEDS) + .criterion(hasItem(ResourceItemsME.REEDS), + conditionsFromItem(ResourceItemsME.REEDS)) + .offerTo(exporter); + + createStairsRecipe(exporter, ModBlocks.GRASSY_DIRT, ModBlocks.GRASSY_DIRT_STAIRS); + offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_DIRT_SLAB, ModBlocks.GRASSY_DIRT); createStairsRecipe(exporter, ModBlocks.PEBBLED_GRASS, ModBlocks.PEBBLED_GRASS_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.PEBBLED_GRASS_SLAB, ModBlocks.PEBBLED_GRASS); @@ -484,25 +509,29 @@ public void generate() { createStairsRecipe(exporter, ModBlocks.CHALKSOIL, ModBlocks.CHALKSOIL_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.CHALKSOIL_SLAB, ModBlocks.CHALKSOIL); - + createStairsRecipe(exporter, ModBlocks.GRASSY_CHALKSOIL, ModBlocks.GRASSY_CHALKSOIL_STAIRS); + offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_CHALKSOIL_SLAB, ModBlocks.GRASSY_CHALKSOIL); createStairsRecipe(exporter, ModBlocks.COARSE_CHALKSOIL, ModBlocks.COARSE_CHALKSOIL_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.COARSE_CHALKSOIL_SLAB, ModBlocks.COARSE_CHALKSOIL); createStairsRecipe(exporter, ModBlocks.LOAM, ModBlocks.LOAM_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.LOAM_SLAB, ModBlocks.LOAM); - + createStairsRecipe(exporter, ModBlocks.GRASSY_LOAM, ModBlocks.GRASSY_LOAM_STAIRS); + offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_LOAM_SLAB, ModBlocks.GRASSY_LOAM); createStairsRecipe(exporter, ModBlocks.COARSE_LOAM, ModBlocks.COARSE_LOAM_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.COARSE_LOAM_SLAB, ModBlocks.COARSE_LOAM); createStairsRecipe(exporter, ModBlocks.PEAT, ModBlocks.PEAT_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.PEAT_SLAB, ModBlocks.PEAT); - + createStairsRecipe(exporter, ModBlocks.GRASSY_PEAT, ModBlocks.GRASSY_PEAT_STAIRS); + offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_PEAT_SLAB, ModBlocks.GRASSY_PEAT); createStairsRecipe(exporter, ModBlocks.COARSE_PEAT, ModBlocks.COARSE_PEAT_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.COARSE_PEAT_SLAB, ModBlocks.COARSE_PEAT); createStairsRecipe(exporter, ModBlocks.SILT, ModBlocks.SILT_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.SILT_SLAB, ModBlocks.SILT); - + createStairsRecipe(exporter, ModBlocks.GRASSY_SILT, ModBlocks.GRASSY_SILT_STAIRS); + offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_SILT_SLAB, ModBlocks.GRASSY_SILT); createStairsRecipe(exporter, ModBlocks.COARSE_SILT, ModBlocks.COARSE_SILT_STAIRS); offerSlabRecipe(RecipeCategory.BUILDING_BLOCKS, ModBlocks.COARSE_SILT_SLAB, ModBlocks.COARSE_SILT); @@ -578,6 +607,27 @@ public void generate() { conditionsFromItem(GenericBlockSets.PLASTER.blockSet.base())) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModDecorativeBlocks.SIMPLE_OAK_WINDOW, 8) + .pattern("EEE") + .pattern("EGE") + .pattern("EEE") + .input('E', Blocks.OAK_LOG) + .input('G', ResourceItemsME.LEAD_NUGGET) + .criterion(hasItem(Blocks.OAK_LOG), + conditionsFromItem(Blocks.OAK_LOG)) + .offerTo(exporter); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.DRYSTONE_SET.carvedWindows.block(), 2) + .pattern("EEE") + .pattern("EGE") + .pattern("EEE") + .input('E', StoneBlockSets.DRYSTONE_SET.cobblestoneBlocks.base()) + .input('G', Items.GLASS) + .criterion(hasItem(StoneBlockSets.DRYSTONE_SET.cobblestoneBlocks.base()), + conditionsFromItem(StoneBlockSets.DRYSTONE_SET.cobblestoneBlocks.base())) + .offerTo(exporter); + createPaneRecipe(exporter, StoneBlockSets.DRYSTONE_SET.carvedWindows.block().asItem(), StoneBlockSets.DRYSTONE_SET.carvedWindows.verticalSlab(), 12); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.MEDGON_SET.carvedWindows.block(), 2) .pattern("EEE") .pattern("EGE") @@ -587,6 +637,7 @@ public void generate() { .criterion(hasItem(StoneBlockSets.MEDGON_SET.baseBlocks.base()), conditionsFromItem(StoneBlockSets.MEDGON_SET.baseBlocks.base())) .offerTo(exporter); + createPaneRecipe(exporter, StoneBlockSets.MEDGON_SET.carvedWindows.block().asItem(), StoneBlockSets.MEDGON_SET.carvedWindows.verticalSlab(), 12); ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.KHAGALABAN_SET.carvedWindows.block(), 2) .pattern("EEE") @@ -597,6 +648,7 @@ public void generate() { .criterion(hasItem(StoneBlockSets.KHAGALABAN_SET.baseBlocks.base()), conditionsFromItem(StoneBlockSets.KHAGALABAN_SET.baseBlocks.base())) .offerTo(exporter); + createPaneRecipe(exporter, StoneBlockSets.KHAGALABAN_SET.carvedWindows.block().asItem(), StoneBlockSets.KHAGALABAN_SET.carvedWindows.verticalSlab(), 12); ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.TUFF_SET.carvedWindows.block(), 2) .pattern("EEE") @@ -607,6 +659,7 @@ public void generate() { .criterion(hasItem(Blocks.TUFF), conditionsFromItem(Blocks.TUFF)) .offerTo(exporter); + createPaneRecipe(exporter, StoneBlockSets.TUFF_SET.carvedWindows.block().asItem(), StoneBlockSets.TUFF_SET.carvedWindows.verticalSlab(), 12); ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.BLACKSTONE_SET.carvedWindows.block(), 2) .pattern("EEE") @@ -617,6 +670,7 @@ public void generate() { .criterion(hasItem(Blocks.BLACKSTONE), conditionsFromItem(Blocks.BLACKSTONE)) .offerTo(exporter); + createPaneRecipe(exporter, StoneBlockSets.BLACKSTONE_SET.carvedWindows.block().asItem(), StoneBlockSets.BLACKSTONE_SET.carvedWindows.verticalSlab(), 12); ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.IZHERABAN_SET.carvedWindows.block(), 2) .pattern("EEE") @@ -627,6 +681,7 @@ public void generate() { .criterion(hasItem(StoneBlockSets.IZHERABAN_SET.baseBlocks.base()), conditionsFromItem(StoneBlockSets.IZHERABAN_SET.baseBlocks.base())) .offerTo(exporter); + createPaneRecipe(exporter, StoneBlockSets.IZHERABAN_SET.carvedWindows.block().asItem(), StoneBlockSets.IZHERABAN_SET.carvedWindows.verticalSlab(), 12); ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModDecorativeBlocks.LEAD_GLASS, 4) .pattern("LGL") @@ -659,12 +714,6 @@ public void generate() { conditionsFromItem(ModBlocks.ASH_BLOCK)) .offerTo(exporter); - /*createGildedBlockRecipe(exporter, StoneBlockSets.GREEN_TUFF_SET.chiseledBlocks.base(), StoneBlockSets.GILDED_GREEN_TUFF_SET.chiseledBlocks.base()); - createGildedBlockRecipe(exporter, StoneBlockSets.GREEN_TUFF_SET.brickBlocks.base(), StoneBlockSets.GILDED_GREEN_TUFF_SET.brickBlocks.base()); - createGildedBlockRecipe(exporter, StoneBlockSets.GREEN_TUFF_SET.polishedBlocks.base(), StoneBlockSets.GILDED_GREEN_TUFF_SET.polishedBlocks.base()); - createGildedBlockRecipe(exporter, StoneBlockSets.GREEN_TUFF_SET.chiseledTilesBlocks.base(), StoneBlockSets.GILDED_GREEN_TUFF_SET.chiseledTilesBlocks.base()); - createGildedBlockRecipe(exporter, StoneBlockSets.GREEN_TUFF_SET.smoothBlocks.base(), StoneBlockSets.GILDED_GREEN_TUFF_SET.smoothBlocks.base()); - */ ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.GILDED_GREEN_TUFF_SET.baseBlocks.base(), 5) .pattern("TNT") .pattern("NTN") @@ -675,6 +724,53 @@ public void generate() { conditionsFromItem(StoneBlockSets.GREEN_TUFF_SET.baseBlocks.base())) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.BURZUM_GABBRO_SET.chiseledBlocks.base(), 5) + .pattern("TNT") + .pattern("NTN") + .pattern("TNT") + .input('T', StoneBlockSets.GABBRO_SET.baseBlocks.base()) + .input('N', ResourceItemsME.BURZUM_STEEL_NUGGET) + .criterion(hasItem(StoneBlockSets.GABBRO_SET.baseBlocks.base()), + conditionsFromItem(StoneBlockSets.GABBRO_SET.baseBlocks.base())) + .offerTo(exporter); + createStoneSetRecipes(StoneBlockSets.BURZUM_GABBRO_SET.chiseledBlocks); + + createBrickRecipe(exporter, StoneBlockSets.BURZUM_GABBRO_SET.chiseledBlocks.base().asItem(), StoneBlockSets.BURZUM_GABBRO_SET.chiseledBricksBlocks.base(), 4); + createStoneSetRecipes(StoneBlockSets.BURZUM_GABBRO_SET.chiseledBricksBlocks); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.BURZUM_GABBRO_SET.chiseledSmoothBlocks.base(), 5) + .pattern("TNT") + .pattern("NTN") + .pattern("TNT") + .input('T', StoneBlockSets.GABBRO_SET.smoothBlocks.base()) + .input('N', ResourceItemsME.BURZUM_STEEL_NUGGET) + .criterion(hasItem(StoneBlockSets.GABBRO_SET.smoothBlocks.base()), + conditionsFromItem(StoneBlockSets.GABBRO_SET.smoothBlocks.base())) + .offerTo(exporter); + createStoneSetRecipes(StoneBlockSets.BURZUM_GABBRO_SET.chiseledSmoothBlocks); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.BURZUM_GABBRO_SET.chiseledPolishedBlocks.base(), 5) + .pattern("TNT") + .pattern("NTN") + .pattern("TNT") + .input('T', StoneBlockSets.GABBRO_SET.polishedBlocks.base()) + .input('N', ResourceItemsME.BURZUM_STEEL_NUGGET) + .criterion(hasItem(StoneBlockSets.GABBRO_SET.polishedBlocks.base()), + conditionsFromItem(StoneBlockSets.GABBRO_SET.polishedBlocks.base())) + .offerTo(exporter); + createStoneSetRecipes(StoneBlockSets.BURZUM_GABBRO_SET.chiseledPolishedBlocks); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.BURZUM_GABBRO_SET.chiseledTilesBlocks.base(), 5) + .pattern("TNT") + .pattern("NTN") + .pattern("TNT") + .input('T', StoneBlockSets.GABBRO_SET.tileBlocks.base()) + .input('N', ResourceItemsME.BURZUM_STEEL_NUGGET) + .criterion(hasItem(StoneBlockSets.GABBRO_SET.tileBlocks.base()), + conditionsFromItem(StoneBlockSets.GABBRO_SET.tileBlocks.base())) + .offerTo(exporter); + createStoneSetRecipes(StoneBlockSets.BURZUM_GABBRO_SET.chiseledTilesBlocks); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.WATTLE_TRAPDOOR, 2) .pattern("PLP") .pattern("PLP") @@ -689,66 +785,83 @@ public void generate() { createDyeableItemRecipe(exporter, ModBlocks.WATTLE_TRAPDOOR, Items.BROWN_DYE, ModBlocks.DARK_WATTLE_TRAPDOOR); createDyeableItemRecipe(exporter, ModBlocks.WATTLE_TRAPDOOR, Items.BLACK_DYE, ModBlocks.BLACK_WATTLE_TRAPDOOR); - //createBrickworkBlockRecipe(exporter, StoneBlockSets.STONE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), GenericBlockSets.MIXED_STONES_BRICKWORK.blockSet.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.CALCITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.CALCITE_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, Blocks.DEEPSLATE_TILES, GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.DEEPSLATE_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.BASALT_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.BASALT_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.ANDESITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(),StoneBlockSets.ANDESITE_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.DIORITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.DIORITE_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.GRANITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.GRANITE_SET.brickworkBlocks.base()); - - - createBrickworkBlockRecipe(exporter, StoneBlockSets.DOLOMITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.DOLOMITE_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.HEMATITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.HEMATITE_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.GNEISS_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.GNEISS_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.IZHERABAN_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.IZHERABAN_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.LIMESTONE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.LIMESTONE_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.GALONN_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.GALONN_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.GABBRO_SET.brickBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.GABBRO_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.TUFF_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.TUFF_SET.brickworkBlocks.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.BLACKSTONE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.BLACKSTONE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.STONE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.STONE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.CALCITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.CALCITE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, Blocks.DEEPSLATE_TILES, GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.DEEPSLATE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.BASALT_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.BASALT_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.ANDESITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(),StoneBlockSets.ANDESITE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.DIORITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.DIORITE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.GRANITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.GRANITE_SET.brickworkBlocks.base()); + + createBrickRecipe(exporter, Blocks.BRICKS.asItem(), GenericBlockSets.CLAY_TILING.blockSet.base(), 4); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.BLACK_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.BLUE_DYE, GenericBlockSets.BLUE_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.BROWN_DYE, GenericBlockSets.BROWN_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.CYAN_DYE, GenericBlockSets.CYAN_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.GRAY_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.GREEN_DYE, GenericBlockSets.GREEN_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.LIGHT_BLUE_DYE, GenericBlockSets.LIGHT_BLUE_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.LIGHT_GRAY_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.LIME_DYE, GenericBlockSets.LIME_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.MAGENTA_DYE, GenericBlockSets.MAGENTA_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.ORANGE_DYE, GenericBlockSets.ORANGE_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.PINK_DYE, GenericBlockSets.PINK_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.PURPLE_DYE, GenericBlockSets.PURPLE_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.RED_DYE, GenericBlockSets.RED_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.WHITE_CLAY_TILING.blockSet.base().asItem(), 8); + createCenterSurroundRecipe(exporter, GenericBlockSets.CLAY_TILING.blockSet.base().asItem(), Items.YELLOW_DYE, GenericBlockSets.YELLOW_CLAY_TILING.blockSet.base().asItem(), 8); + + //createBrickworkBlockRecipe(exporter, StoneBlockSets.DOLOMITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.DOLOMITE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.HEMATITE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.HEMATITE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.GNEISS_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.GNEISS_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.IZHERABAN_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.IZHERABAN_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.LIMESTONE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.LIMESTONE_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.GALONN_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.GALONN_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.GABBRO_SET.brickBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.GABBRO_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.TUFF_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.TUFF_SET.brickworkBlocks.base()); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.BLACKSTONE_SET.tileBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.BLACKSTONE_SET.brickworkBlocks.base()); createBrickworkBlockRecipe(exporter, StoneBlockSets.TAN_CLAY.brickBlocks.base(), GenericBlockSets.PLASTER.blockSet.base(), StoneBlockSets.TAN_CLAY.brickworkBlocks.base()); createBrickworkBlockRecipe(exporter, GenericBlockSets.MIXED_STONES.blockSet.base(), GenericBlockSets.STUCCO.blockSet.base(), GenericBlockSets.MIXED_STONES_BRICKWORK.blockSet.base()); - createBrickworkBlockRecipe(exporter, StoneBlockSets.MEDGON_SET.baseBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.MEDGON_SET.brickworkBlocks.base()); - - createCenterSurroundRecipe(exporter, Items.BRICK, Items.BLUE_DYE, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_BLUE_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_BLUE_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_BLUE_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_BLUE_ROOF_TILES.blockSet.base().asItem(), 8); - - createCenterSurroundRecipe(exporter, Items.BRICK, Items.BROWN_DYE, GenericBlockSets.BROWN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.BROWN_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_BROWN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.BROWN_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_BROWN_ROOF_TILES.blockSet.base().asItem(), 8); - - createCenterSurroundRecipe(exporter, Items.BRICK, Items.CYAN_DYE, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_CYAN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_CYAN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_CYAN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_CYAN_ROOF_TILES.blockSet.base().asItem(), 8); - - createCenterSurroundRecipe(exporter, Items.BRICK, Items.GRAY_DYE, GenericBlockSets.GRAY_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.GRAY_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_GRAY_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.GRAY_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_GRAY_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.GRAY_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_GRAY_ROOF_TILES.blockSet.base().asItem(), 8); - - createCenterSurroundRecipe(exporter, Items.BRICK, Items.GREEN_DYE, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_GREEN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_GREEN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_GREEN_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_GREEN_ROOF_TILES.blockSet.base().asItem(), 8); - - createCenterSurroundRecipe(exporter, Items.BRICK, Items.RED_DYE, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_RED_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_RED_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_RED_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_RED_ROOF_TILES.blockSet.base().asItem(), 8); - - createCenterSurroundRecipe(exporter, Items.BRICK, Items.YELLOW_DYE, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_YELLOW_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_YELLOW_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_YELLOW_ROOF_TILES.blockSet.base().asItem(), 8); - createCenterSurroundRecipe(exporter, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_YELLOW_ROOF_TILES.blockSet.base().asItem(), 8); + //createBrickworkBlockRecipe(exporter, StoneBlockSets.MEDGON_SET.baseBlocks.base(), GenericBlockSets.STUCCO.blockSet.base(), StoneBlockSets.MEDGON_SET.brickworkBlocks.base()); + + createCenterSurroundRecipe(exporter, Items.BRICK, Items.BLUE_DYE, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_BLUE_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_BLUE_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_BLUE_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.BLUE_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_BLUE_ROOF_TILES.blockSet.base().asItem(), 2); + + createCenterSurroundRecipe(exporter, Items.BRICK, Items.BROWN_DYE, GenericBlockSets.BROWN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.BROWN_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_BROWN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.BROWN_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_BROWN_ROOF_TILES.blockSet.base().asItem(), 2); + + createCenterSurroundRecipe(exporter, Items.BRICK, Items.CYAN_DYE, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_CYAN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_CYAN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_CYAN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.CYAN_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_CYAN_ROOF_TILES.blockSet.base().asItem(), 2); + + createCenterSurroundRecipe(exporter, Items.BRICK, Items.GRAY_DYE, GenericBlockSets.GRAY_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.GRAY_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_GRAY_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.GRAY_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_GRAY_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.GRAY_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_GRAY_ROOF_TILES.blockSet.base().asItem(), 2); + + createCenterSurroundRecipe(exporter, Items.BRICK, Items.GREEN_DYE, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_GREEN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_GREEN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_GREEN_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.GREEN_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_GREEN_ROOF_TILES.blockSet.base().asItem(), 2); + + createCenterSurroundRecipe(exporter, Items.BRICK, Items.RED_DYE, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_RED_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_RED_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_RED_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.RED_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_RED_ROOF_TILES.blockSet.base().asItem(), 2); + + createCenterSurroundRecipe(exporter, Items.BRICK, Items.YELLOW_DYE, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), Items.WHITE_DYE, GenericBlockSets.LIGHT_YELLOW_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), Items.LIGHT_GRAY_DYE, GenericBlockSets.BRIGHT_YELLOW_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), Items.GRAY_DYE, GenericBlockSets.OFF_YELLOW_ROOF_TILES.blockSet.base().asItem(), 2); + createCenterSurroundRecipe(exporter, GenericBlockSets.YELLOW_ROOF_TILES.blockSet.base().asItem(), Items.BLACK_DYE, GenericBlockSets.DARK_YELLOW_ROOF_TILES.blockSet.base().asItem(), 2); ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.TAN_CLAY.brickBlocks.base(), 5) .pattern(" B ") @@ -805,7 +918,7 @@ public void generate() { .offerTo(exporter, "reinforced_scaffolding"); //region CANVAS - ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.CANVAS.blockSet.base(), 2) + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.CANVAS.blockSet.base(), 3) .pattern("FF") .pattern("FF") .input('F', ResourceItemsME.FABRIC) @@ -896,7 +1009,7 @@ public void generate() { ComplexRecipeJsonBuilder.create(MountArmorTopSkullAddonRecipe::new).offerTo(exporter, "custom_mount_armor_top_skull_addon"); //region Alloying - AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "bronze", INGOT_LIQUID_VALUE * 4) + AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "bronze", INGOT_LIQUID_VALUE * 4, 4) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "copper"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "copper"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "copper"))) @@ -905,7 +1018,7 @@ public void generate() { conditionsFromItem(Items.COPPER_INGOT)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "bronze" + "_from_alloying"))); - AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "crude", INGOT_LIQUID_VALUE * 3) + AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "crude", INGOT_LIQUID_VALUE * 3, 3) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "copper"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "copper"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "tin"))) @@ -914,7 +1027,7 @@ public void generate() { conditionsFromItem(Items.COPPER_INGOT)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "crude" + "_from_alloying"))); - AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "steel", INGOT_LIQUID_VALUE * 3) + AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "steel", INGOT_LIQUID_VALUE * 3, 3) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) @@ -923,7 +1036,7 @@ public void generate() { conditionsFromItem(Items.IRON_INGOT)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "steel" + "_from_alloying_tags"))); - AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "khazad_steel", INGOT_LIQUID_VALUE * 3) + AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "khazad_steel", INGOT_LIQUID_VALUE * 3, 3) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "lead"))) @@ -932,7 +1045,7 @@ public void generate() { conditionsFromItem(Items.IRON_INGOT)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "khazad_steel" + "_from_alloying_tags"))); - AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "edhel_steel", INGOT_LIQUID_VALUE * 3) + AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "edhel_steel", INGOT_LIQUID_VALUE * 3, 3) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) @@ -941,7 +1054,7 @@ public void generate() { conditionsFromItem(Items.IRON_INGOT)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "edhel_steel" + "_from_alloying_tags"))); - AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "burzum_steel", INGOT_LIQUID_VALUE * 3) + AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "burzum_steel", INGOT_LIQUID_VALUE * 3, 3) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "iron"))) .input(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "lead"))) @@ -950,6 +1063,16 @@ public void generate() { conditionsFromItem(Items.IRON_INGOT)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "burzum_steel" + "_from_alloying_tags"))); + AlloyRecipeJsonBuilder.createAlloyRecipe(itemLookup, RecipeCategory.MISC, "chicken_nugget", INGOT_LIQUID_VALUE, 1) + .input(Items.CHICKEN) + .input(Items.WHEAT) + .input(Items.EGG) + .input(FoodItemsME.GARLIC) + .criterion(hasItem(ResourceItemsME.PTEROSAUR_NUGGET), + conditionsFromItem(ResourceItemsME.PTEROSAUR_NUGGET)) + .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, "chicken_nugget" + "_from_alloying"))); + + HotMetalsModel.nuggets.forEach(nugget -> { //createMeltRecipe(exporter, nugget, Registries.ITEM.getId(nugget).getPath().replace("_nugget", ""), INGOT_LIQUID_VALUE / 9); }); @@ -1152,9 +1275,9 @@ public void generate() { .pattern("PHP") .pattern("PPP") .input('P', TagKey.of(RegistryKeys.ITEM, Identifier.of("logs"))) - .input('H', ResourceItemsME.ASH) - .criterion(hasItem(ResourceItemsME.ASH), - conditionsFromItem(ResourceItemsME.ASH)) + .input('H', Items.HONEYCOMB) + .criterion(hasItem(Items.HONEYCOMB), + conditionsFromItem(Items.HONEYCOMB)) .offerTo(exporter); createBrickRecipe(exporter, GenericBlockSets.TREATED_WOOD.blockSet.base().asItem(), GenericBlockSets.TREATED_WOOD_BEAM.blockSet.base(), 3); @@ -1180,6 +1303,15 @@ public void generate() { .criterion(hasItem(GenericBlockSets.TREATED_WOOD_BEAM.blockSet.slab()), conditionsFromItem(GenericBlockSets.TREATED_WOOD_BEAM.blockSet.slab())) .offerTo(exporter); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.TREATED_WOOD_ROPE_FENCE, 3) + .pattern("WRW") + .pattern("WRW") + .input('W', GenericBlockSets.TREATED_WOOD.blockSet.base()) + .input('R', ModDecorativeBlocks.ROPE) + .criterion(hasItem(GenericBlockSets.TREATED_WOOD.blockSet.base()), + conditionsFromItem(GenericBlockSets.TREATED_WOOD.blockSet.base())) + .offerTo(exporter); //endregion //region AGED_WOOD @@ -1200,7 +1332,10 @@ public void generate() { createGenericRecipes(GenericBlockSets.AGED_WOOD_PANELS); createGenericRecipes(GenericBlockSets.AGED_WOOD_BOARDS); createGenericRecipes(GenericBlockSets.AGED_WOOD_FISH_CARVING); + createGenericRecipes(GenericBlockSets.AGED_WOOD_CARVED_BEAM); + createGenericRecipes(GenericBlockSets.AGED_WOOD_KNOTTED_BEAM); createShinglesRecipe(exporter, GenericBlockSets.AGED_WOOD_PLANKS.blockSet.base(), GenericBlockSets.AGED_WOOD_SHINGLES.blockSet.base()); + createGenericRecipes(GenericBlockSets.AGED_WOOD_SHINGLES); ShapelessRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_PLANKS.blockSet.base(), 4) .input(GenericBlockSets.AGED_WOOD.blockSet.base()) @@ -1218,6 +1353,8 @@ public void generate() { conditionsFromItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.slab())) .offerTo(exporter); + createBrickRecipe(exporter, GenericBlockSets.AGED_WOOD_PANELS.blockSet.base().asItem(), GenericBlockSets.AGED_WOOD_BOARDS.blockSet.base(), 4); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_FISH_CARVING.blockSet.base(), 1) .pattern("S") .pattern("S") @@ -1226,9 +1363,97 @@ public void generate() { conditionsFromItem(GenericBlockSets.AGED_WOOD_CARVING.blockSet.slab())) .offerTo(exporter); - createBrickRecipe(exporter, GenericBlockSets.AGED_WOOD_PANELS.blockSet.base().asItem(), GenericBlockSets.AGED_WOOD_BOARDS.blockSet.base(), 4); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_CARVED_BEAM.blockSet.base(), 3) + .pattern("P") + .pattern("P") + .pattern("P") + .input('P', GenericBlockSets.AGED_WOOD_BEAM.blockSet.base()) + .criterion(hasItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.base()), + conditionsFromItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.base())) + .offerTo(exporter); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_KNOTTED_BEAM.blockSet.base(), 6) + .pattern("PW") + .pattern("WP") + .pattern("PW") + .input('W', GenericBlockSets.AGED_WOOD.blockSet.base()) + .input('P', GenericBlockSets.AGED_WOOD_BEAM.blockSet.base()) + .criterion(hasItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.base()), + conditionsFromItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.base())) + .offerTo(exporter); //endregion + //region AGED_WOOD_REDDISH + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_REDDISH_BEAM.blockSet.base(), 8) + .pattern("PPP") + .pattern("PRP") + .pattern("PPP") + .input('P', GenericBlockSets.AGED_WOOD_BEAM.blockSet.base()) + .input('R', Items.RED_DYE) + .criterion(hasItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.base()), + conditionsFromItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.base())) + .offerTo(exporter); + + createGenericRecipes(GenericBlockSets.AGED_WOOD_REDDISH_BEAM); + //endregion + + //region AGED_WOOD_GILDED_CARVED_PILLAR + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_GILDED_CARVED_PILLAR.blockSet.base(), 8) + .pattern("PPP") + .pattern("PGP") + .pattern("PPP") + .input('P', GenericBlockSets.AGED_WOOD_BEAM.blockSet.base()) + .input('G', Items.GOLD_NUGGET) + .criterion(hasItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.base()), + conditionsFromItem(GenericBlockSets.AGED_WOOD_BEAM.blockSet.base())) + .offerTo(exporter); + + createGenericRecipes(GenericBlockSets.AGED_WOOD_GILDED_CARVED_PILLAR); + //endregion + + //region AGED_WOOD_GILDED_CARVED_PILLAR + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_GILDED_CARVING.blockSet.base(), 8) + .pattern("PPP") + .pattern("PGP") + .pattern("PPP") + .input('P', GenericBlockSets.AGED_WOOD_CARVING.blockSet.base()) + .input('G', Items.GOLD_NUGGET) + .criterion(hasItem(GenericBlockSets.AGED_WOOD_CARVING.blockSet.base()), + conditionsFromItem(GenericBlockSets.AGED_WOOD_CARVING.blockSet.base())) + .offerTo(exporter); + + createGenericRecipes(GenericBlockSets.AGED_WOOD_GILDED_CARVING); + //endregion + + //region AGED_WOOD_GILDED_CARVED_PILLAR + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_GILDED_HORSES.blockSet.base(), 8) + .pattern("PPP") + .pattern("PGP") + .pattern("PPP") + .input('P', GenericBlockSets.AGED_WOOD_FISH_CARVING.blockSet.base()) + .input('G', Items.GOLD_NUGGET) + .criterion(hasItem(GenericBlockSets.AGED_WOOD_FISH_CARVING.blockSet.base()), + conditionsFromItem(GenericBlockSets.AGED_WOOD_FISH_CARVING.blockSet.base())) + .offerTo(exporter); + + createGenericRecipes(GenericBlockSets.AGED_WOOD_GILDED_HORSES); + //endregion + + //region AGED_WOOD_GILDED_CARVED_PILLAR + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.AGED_WOOD_GILDED_TRIM.blockSet.base(), 8) + .pattern("PPP") + .pattern("PGP") + .pattern("PPP") + .input('P', GenericBlockSets.AGED_WOOD_PANELS.blockSet.base()) + .input('G', Items.GOLD_NUGGET) + .criterion(hasItem(GenericBlockSets.AGED_WOOD_PANELS.blockSet.base()), + conditionsFromItem(GenericBlockSets.AGED_WOOD_PANELS.blockSet.base())) + .offerTo(exporter); + + createGenericRecipes(GenericBlockSets.AGED_WOOD_GILDED_TRIM); + //endregion + + createCombinedItemRecipe(exporter, Blocks.SKELETON_SKULL, ItemTags.CANDLES, ModDecorativeBlocks.SKULL_CANDLE); ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModDecorativeBlocks.CANDLESTICK, 1) @@ -1325,6 +1550,16 @@ public void generate() { conditionsFromItem(StoneBlockSets.MEDGON_SET.baseBlocks.base())) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.BURZUM_SPIKES, 4) + .pattern(" N ") + .pattern("NBN") + .pattern("BBB") + .input('B', ResourceItemsME.BURZUM_STEEL_INGOT) + .input('N', ResourceItemsME.BURZUM_STEEL_NUGGET) + .criterion(hasItem(ResourceItemsME.BURZUM_STEEL_INGOT), + conditionsFromItem(ResourceItemsME.BURZUM_STEEL_INGOT)) + .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModDecorativeBlocks.TAPPER, 1) .pattern(" S ") .pattern("LBL") @@ -1807,11 +2042,11 @@ public void generate() { conditionsFromItem(Items.MOSS_BLOCK)) .offerTo(exporter); - ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_LOAM, 4) + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_CHALKSOIL, 4) .pattern("DM") .pattern("MD") .input('M', Items.MOSS_BLOCK) - .input('D', ModBlocks.LOAM) + .input('D', ModBlocks.CHALKSOIL) .criterion(hasItem(Items.MOSS_BLOCK), conditionsFromItem(Items.MOSS_BLOCK)) .offerTo(exporter); @@ -1825,6 +2060,24 @@ public void generate() { conditionsFromItem(Items.MOSS_BLOCK)) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_LOAM, 4) + .pattern("DM") + .pattern("MD") + .input('M', Items.MOSS_BLOCK) + .input('D', ModBlocks.LOAM) + .criterion(hasItem(Items.MOSS_BLOCK), + conditionsFromItem(Items.MOSS_BLOCK)) + .offerTo(exporter); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.GRASSY_PEAT, 4) + .pattern("DM") + .pattern("MD") + .input('M', Items.MOSS_BLOCK) + .input('D', ModBlocks.LOAM) + .criterion(hasItem(Items.MOSS_BLOCK), + conditionsFromItem(Items.MOSS_BLOCK)) + .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.PEBBLED_GRASS, 4) .pattern("DM") .pattern("MD") @@ -1834,6 +2087,36 @@ public void generate() { conditionsFromItem(Items.MOSS_BLOCK)) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.WASTE_PILE, 8) + .pattern("DDD") + .pattern("DWD") + .pattern("DDD") + .input('W', Items.ROTTEN_FLESH) + .input('D', ItemTagsME.DIRT) + .criterion(hasItem(Items.MOSS_BLOCK), + conditionsFromItem(Items.MOSS_BLOCK)) + .offerTo(exporter); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.SKELETAL_PILE, 8) + .pattern("DDD") + .pattern("DBD") + .pattern("DDD") + .input('B', ItemTagsME.BONES) + .input('D', ModBlocks.WASTE_PILE) + .criterion(hasItem(ModBlocks.WASTE_PILE), + conditionsFromItem(ModBlocks.WASTE_PILE)) + .offerTo(exporter); + + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.FOUL_DIRT, 8) + .pattern("DDD") + .pattern("DAD") + .pattern("DDD") + .input('A', ResourceItemsME.ASH) + .input('D', ModBlocks.WASTE_PILE) + .criterion(hasItem(ModBlocks.WASTE_PILE), + conditionsFromItem(ModBlocks.WASTE_PILE)) + .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.SNOWY_DIRT, 4) .pattern("DS") .pattern("SD") @@ -1843,6 +2126,23 @@ public void generate() { conditionsFromItem(Items.DIRT)) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, StoneBlockSets.DRYSTONE_SET.cobblestoneBlocks.base(), 2) + .pattern("CC") + .input('C', TagKey.of(RegistryKeys.ITEM, Identifier.of("stone_crafting_materials"))) + .criterion(hasItem(Items.COBBLESTONE), + conditionsFromItem(Items.COBBLESTONE)) + .offerTo(exporter); + //createMossyRecipe(exporter, StoneBlockSets.DRYSTONE_SET.cobblestoneBlocks.base(), StoneBlockSets.DRYSTONE_SET.mossyCobblestoneBlocks.base()); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, GenericBlockSets.FRAMED_DRYSTONE.blockSet.base(), 1) + .pattern(" S ") + .pattern("SCS") + .pattern(" S ") + .input('S', Items.STICK) + .input('C', TagKey.of(RegistryKeys.ITEM, Identifier.of("stone_crafting_materials"))) + .criterion(hasItem(StoneBlockSets.DRYSTONE_SET.cobblestoneBlocks.base()), + conditionsFromItem(StoneBlockSets.DRYSTONE_SET.cobblestoneBlocks.base())) + .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.COBBLY_DIRT, 4) .pattern("DC") .pattern("CD") @@ -1977,6 +2277,13 @@ public void generate() { conditionsFromItem(ResourceItemsME.KHAZAD_STEEL_INGOT)) .offerTo(exporter); + ShapelessRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModBlocks.EMBERS, 1) + .input(Items.MAGMA_BLOCK, 1) + .input(ResourceItemsME.ASH, 1) + .criterion(hasItem(Items.MAGMA_BLOCK), + conditionsFromItem(Items.MAGMA_BLOCK)) + .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModDecorativeBlocks.CHIMNEY, 2) .pattern(" B ") .pattern(" B ") @@ -2193,10 +2500,12 @@ public void generate() { createBannerPatternRecipe(exporter, ResourceItemsME.PIPEWEED, ResourceItemsME.PIPEWEED_BANNER_PATTERN); createBannerPatternRecipe(exporter, ModNatureBlocks.LEBETHRON_SAPLING.asItem(), ResourceItemsME.GONDOR_BANNER_PATTERN); - //createBannerPatternRecipe(exporter, WoodBlockSets.MALLORN.sapling().asItem(), ResourceItemsME.LOTHLORIEN_BANNER_PATTERN); + createBannerPatternRecipe(exporter, ModNatureBlocks.MALLORN_SAPLING.asItem(), ResourceItemsME.LOTHLORIEN_BANNER_PATTERN); createBannerPatternRecipe(exporter, Items.MAGMA_BLOCK, ResourceItemsME.MORDOR_BANNER_PATTERN); createBannerPatternRecipe(exporter, Items.HAY_BLOCK, ResourceItemsME.ROHAN_BANNER_PATTERN); createBannerPatternRecipe(exporter, Items.BONE, ResourceItemsME.MISTY_MOUNTAINS_ORCS_BANNER_PATTERN); + createBannerPatternRecipe(exporter, Items.BONE_BLOCK, ResourceItemsME.GOBLIN_SKULL_BANNER_PATTERN); + createBannerPatternRecipe(exporter, Items.SKELETON_SKULL, ResourceItemsME.SCREECHING_SKULL_BANNER_PATTERN); createBannerPatternRecipe(exporter, Items.WHITE_DYE, ResourceItemsME.ISENGARD_BANNER_PATTERN); createBannerPatternRecipe(exporter, ToolItemsME.DWARVEN_SMITHING_HAMMER, ResourceItemsME.ANVIL_BANNER_PATTERN); createBannerPatternRecipe(exporter, ResourceItemsME.BRONZE_INGOT, ResourceItemsME.BELL_BANNER_PATTERN); @@ -2254,6 +2563,8 @@ public void generate() { .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, Registries.ITEM.getId(Items.CAULDRON).getPath() + "_alt"))); createCenterSurroundRecipe(exporter, Blocks.TUFF.asItem(), Items.RAW_COPPER, StoneBlockSets.GREEN_TUFF_SET.baseBlocks.base().asItem(), 8); + createCenterSurroundRecipe(exporter, StoneBlockSets.SLATE_SET.baseBlocks.base().asItem(), Items.RAW_COPPER, StoneBlockSets.KHAGALABAN_SET.baseBlocks.base().asItem(), 8); + createCenterSurroundRecipe(exporter, Blocks.TUFF.asItem(), Items.IRON_NUGGET, StoneBlockSets.IRONSTONE_SET.baseBlocks.base().asItem(), 8); offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, ModDecorativeBlocks.BROWN_JUG, Items.CLAY); offerStonecuttingRecipe(RecipeCategory.BUILDING_BLOCKS, ModDecorativeBlocks.LARGE_JUG, Items.CLAY); @@ -2295,6 +2606,14 @@ public void generate() { .criterion(hasItem(Items.STICK), conditionsFromItem(Items.STICK)) .offerTo(exporter); + ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModNatureBlocks.THORNY_GROWTH.asItem(), 6) + .pattern("sls") + .pattern("sls") + .input('s', Items.STICK) + .input('l', FoodItemsME.TOUGH_BERRIES) + .criterion(hasItem(FoodItemsME.TOUGH_BERRIES), + conditionsFromItem(FoodItemsME.TOUGH_BERRIES)) + .offerTo(exporter); ShapedRecipeJsonBuilder.create(itemLookup, RecipeCategory.BUILDING_BLOCKS, ModNatureBlocks.GREEN_GROWTH.asItem(), 8) .pattern("lll") .pattern("lll") @@ -2685,25 +3004,25 @@ private void createMeltBulkRecipe(RecipeExporter exporter, Item input, String ou private void createMeltRecipe(RecipeExporter exporter, Item input, String output, int ingots, int amount) { switch (ingots) { - case 1 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount) + case 1 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount, 0) .input(input) .criterion(hasItem(input), conditionsFromItem(input)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, output + "_from_melting_1_" + Registries.ITEM.getId(input).getPath()))); - case 2 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 2) + case 2 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 2, 0) .input(input) .input(input) .criterion(hasItem(input), conditionsFromItem(input)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, output + "_from_melting_2_" + Registries.ITEM.getId(input).getPath()))); - case 3 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 3) + case 3 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 3,0) .input(input) .input(input) .input(input) .criterion(hasItem(input), conditionsFromItem(input)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, output + "_from_melting_3_" + Registries.ITEM.getId(input).getPath()))); - case 4 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 4) + case 4 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 4, 0) .input(input) .input(input) .input(input) @@ -2723,25 +3042,25 @@ private void createMeltBulkRecipeTag(RecipeExporter exporter, TagKey input, Stri private void createMeltRecipeTag(RecipeExporter exporter, TagKey input, String output, int ingots, int amount) { switch (ingots) { - case 1 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount) + case 1 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount, 0) .input(input) .criterion(hasItem(DecorativeItemsME.FORGE), conditionsFromItem(DecorativeItemsME.FORGE)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, output + "_from_melting_1_" + input.id().getPath()))); - case 2 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 2) + case 2 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 2, 0) .input(input) .input(input) .criterion(hasItem(DecorativeItemsME.FORGE), conditionsFromItem(DecorativeItemsME.FORGE)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, output + "_from_melting_2_" + input.id().getPath()))); - case 3 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 3) + case 3 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 3, 0) .input(input) .input(input) .input(input) .criterion(hasItem(DecorativeItemsME.FORGE), conditionsFromItem(DecorativeItemsME.FORGE)) .offerTo(exporter, String.valueOf(Identifier.of(MiddleEarth.MOD_ID, output + "_from_melting_3_" + input.id().getPath()))); - case 4 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 4) + case 4 -> AlloyRecipeJsonBuilder.createAlloyRecipe(this.itemLookup, RecipeCategory.MISC, output, amount * 4, 0) .input(input) .input(input) .input(input) @@ -2835,6 +3154,16 @@ private void createShinglesRecipe(RecipeExporter exporter, Block input, Block ou .offerTo(exporter); } + private void createRoofingRecipe(RecipeExporter exporter, Block input, Block output) { + ShapedRecipeJsonBuilder.create(this.itemLookup, RecipeCategory.BUILDING_BLOCKS, output, 2) + .pattern(" w ") + .pattern("www") + .input('w', input) + .criterion(hasItem(input), + conditionsFromItem(input)) + .offerTo(exporter); + } + private void createDoorRecipe(RecipeExporter exporter, Block input, Block output) { ShapedRecipeJsonBuilder.create(this.itemLookup, RecipeCategory.BUILDING_BLOCKS, output, 3) .pattern("ll") diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/tags/BlockTagProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/tags/BlockTagProvider.java index 578ad9a866..de4d3f9287 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/tags/BlockTagProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/tags/BlockTagProvider.java @@ -10,9 +10,11 @@ import net.minecraft.registry.tag.TagKey; import net.minecraft.util.Identifier; import net.sevenstars.middleearth.block.registration.*; +import net.sevenstars.middleearth.block.utils.BlockRecordTypes; import net.sevenstars.middleearth.datageneration.content.models.*; import net.sevenstars.middleearth.datageneration.content.tags.*; +import java.util.ArrayList; import java.util.concurrent.CompletableFuture; public class BlockTagProvider extends FabricTagProvider.BlockTagProvider { @@ -69,6 +71,7 @@ protected void configure(RegistryWrapper.WrapperLookup arg) { valueLookupBuilder(TagKey.of(RegistryKeys.BLOCK, Identifier.of( "fence_gates"))).add(FenceGates.fenceGates.toArray(new Block[0])); valueLookupBuilder(TagKey.of(RegistryKeys.BLOCK, Identifier.of( "leaves"))).add(LeavesSets.leaves.toArray(new Block[0])).add(LeavesSets.grayscaleLeaves.toArray(new Block[0])); valueLookupBuilder(TagKey.of(RegistryKeys.BLOCK, Identifier.of( "logs"))).add(Logs.logs.toArray(new Block[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.BLOCK, Identifier.of( "logs_that_burn"))).add(Logs.logs.toArray(new Block[0])); valueLookupBuilder(TagKey.of(RegistryKeys.BLOCK, Identifier.of( "pressure_plates"))).add(PressurePlates.pressurePlates.toArray(new Block[0])); valueLookupBuilder(TagKey.of(RegistryKeys.BLOCK, Identifier.of( "walls"))).add(Walls.walls.toArray(new Block[0])); valueLookupBuilder(TagKey.of(RegistryKeys.BLOCK, Identifier.of( "planks"))).add(Planks.planks.toArray(new Block[0])); @@ -120,47 +123,62 @@ protected void configure(RegistryWrapper.WrapperLookup arg) { } } - /*for (StoneBlockSets.SimpleBlockSet record : StoneBlockSets.sets) { - if (Registries.BLOCK.getId(record.base()).getPath().contains("nurgon")){ - needsIronTools.add(record.base()); - needsIronTools.add(record.slab()); - needsIronTools.add(record.verticalSlab()); - needsIronTools.add(record.stairs()); - needsIronTools.add(record.wall()); - }else if (Registries.BLOCK.getId(record.base()).getPath().contains("medgon")){ - needsDiamondTools.add(record.base()); - needsDiamondTools.add(record.slab()); - needsDiamondTools.add(record.verticalSlab()); - needsDiamondTools.add(record.stairs()); - needsDiamondTools.add(record.wall()); - } - } + BlockRecordTypes.BaseStoneSet.getAllBlocks(StoneBlockSets.NURGON_SET.baseBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.cobblestoneBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.mossyCobblestoneBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.brickBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.mossyBrickBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.crackedBrickBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.tileBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.mossyTileBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.crackedTileBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.smoothBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.mossySmoothBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.crackedSmoothBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.polishedBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.mossyPolishedBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.crackedPolishedBlocks).forEach(needsIronTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.NURGON_SET.pillarBlocks).forEach(needsIronTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.NURGON_SET.mossyPillarBlocks).forEach(needsIronTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.NURGON_SET.crackedPillarBlocks).forEach(needsIronTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.NURGON_SET.chiseledBlocks).forEach(needsIronTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.NURGON_SET.chiseledBricksBlocks).forEach(needsIronTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.NURGON_SET.chiseledPolishedBlocks).forEach(needsIronTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.NURGON_SET.chiseledSmoothBlocks).forEach(needsIronTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.NURGON_SET.chiseledTilesBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.brickworkBlocks).forEach(needsIronTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.NURGON_SET.oldBlocks).forEach(needsIronTools::add); + BlockRecordTypes.CarvedWindow.getAllBlocks(StoneBlockSets.NURGON_SET.carvedWindows).forEach(needsIronTools::add); + + BlockRecordTypes.BaseStoneSet.getAllBlocks(StoneBlockSets.MEDGON_SET.baseBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.cobblestoneBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.mossyCobblestoneBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.brickBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.mossyBrickBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.crackedBrickBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.tileBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.mossyTileBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.crackedTileBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.smoothBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.mossySmoothBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.crackedSmoothBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.polishedBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.mossyPolishedBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.crackedPolishedBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.MEDGON_SET.pillarBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.MEDGON_SET.mossyPillarBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.MEDGON_SET.crackedPillarBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.MEDGON_SET.chiseledBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.MEDGON_SET.chiseledBricksBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.MEDGON_SET.chiseledPolishedBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.MEDGON_SET.chiseledSmoothBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.PillarSet.getAllBlocks(StoneBlockSets.MEDGON_SET.chiseledTilesBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.brickworkBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.RegularSet.getAllBlocks(StoneBlockSets.MEDGON_SET.oldBlocks).forEach(needsDiamondTools::add); + BlockRecordTypes.CarvedWindow.getAllBlocks(StoneBlockSets.MEDGON_SET.carvedWindows).forEach(needsDiamondTools::add); baseStoneOverworld.add(Blocks.CALCITE); - - for (StoneBlockSets.SimpleBlockSetMain record : StoneBlockSets.setsMain) { - if(record.base() != StoneBlockSets.ASHEN_STONE.base()) baseStoneOverworld.add(record.base()); - if (Registries.BLOCK.getId(record.base()).getPath().contains("nurgon")){ - needsIronTools.add(record.base()); - needsIronTools.add(record.slab()); - needsIronTools.add(record.verticalSlab()); - needsIronTools.add(record.stairs()); - needsIronTools.add(record.wall()); - needsIronTools.add(record.stool()); - needsIronTools.add(record.table()); - needsIronTools.add(record.rocks()); - }else if (Registries.BLOCK.getId(record.base()).getPath().contains("medgon")){ - needsDiamondTools.add(record.base()); - needsDiamondTools.add(record.slab()); - needsDiamondTools.add(record.verticalSlab()); - needsDiamondTools.add(record.stairs()); - needsDiamondTools.add(record.wall()); - needsDiamondTools.add(record.stool()); - needsDiamondTools.add(record.table()); - needsDiamondTools.add(record.rocks()); - } - snapsGoatHorn.add(record.base()); - }*/ + baseStoneOverworld.add(MineablePickaxe.baseStoneOverworld.toArray(new Block[0])); cobwebs.add(Blocks.COBWEB); cobwebs.add(ModNatureBlocks.HANGING_WEBS); @@ -254,16 +272,19 @@ protected void configure(RegistryWrapper.WrapperLookup arg) { needsIronTools.add(OreRockSets.NURGON.silver_ore()); needsIronTools.add(OreRockSets.NURGON.gold_ore()); needsIronTools.add(OreRockSets.NURGON.iron_ore()); + needsIronTools.add(OreRockSets.NURGON.sapphire_ore()); + needsIronTools.add(OreRockSets.NURGON.emerald_ore()); + needsIronTools.add(OreRockSets.NURGON.ruby_ore()); needsDiamondTools.add(OreRockSets.MEDGON.lead_ore()); needsDiamondTools.add(OreRockSets.MEDGON.silver_ore()); needsDiamondTools.add(OreRockSets.MEDGON.gold_ore()); needsDiamondTools.add(OreRockSets.MEDGON.iron_ore()); - needsDiamondTools.add(OreRockSets.MEDGON.mithril_ore()); - needsDiamondTools.add(OreRockSets.MEDGON.adamant_ore()); needsDiamondTools.add(OreRockSets.MEDGON.emerald_ore()); needsDiamondTools.add(OreRockSets.MEDGON.ruby_ore()); needsDiamondTools.add(OreRockSets.MEDGON.sapphire_ore()); + needsDiamondTools.add(OreRockSets.MEDGON.adamant_ore()); + needsDiamondTools.add(OreRockSets.MEDGON.mithril_ore()); needsStoneTools.add(ModDecorativeBlocks.STONE_ANVIL); needsIronTools.add(ModDecorativeBlocks.TREATED_ANVIL); @@ -273,7 +294,7 @@ protected void configure(RegistryWrapper.WrapperLookup arg) { needsIronTools.add(ModDecorativeBlocks.TORCH_OF_ORTHANC); - needsDiamondTools.add(ModDecorativeBlocks.REINFORCED_CHEST); + needsIronTools.add(ModDecorativeBlocks.REINFORCED_CHEST); mineableAxe.add(ModDecorativeBlocks.REINFORCED_CHEST); needsDiamondTools.add(ModDecorativeBlocks.FIRE_OF_ORTHANC); @@ -293,6 +314,7 @@ protected void configure(RegistryWrapper.WrapperLookup arg) { needsStoneTools.add(ModBlocks.BRONZE_TRAPDOOR); needsStoneTools.add(ModBlocks.CRUDE_TRAPDOOR); needsIronTools.add(ModBlocks.TREATED_STEEL_TRAPDOOR); + needsIronTools.add(ModBlocks.BURZUM_SPIKES); needsStoneTools.add(ModBlocks.BRONZE_BARS); needsStoneTools.add(ModBlocks.CRUDE_BARS); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/tags/ItemTagProvider.java b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/tags/ItemTagProvider.java index d7b4d5afa8..6fb9f4e8fe 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/tags/ItemTagProvider.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/datageneration/providers/tags/ItemTagProvider.java @@ -79,17 +79,24 @@ protected void configure(RegistryWrapper.WrapperLookup arg) { valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("mod_planks"))).add(Planks.getItemPlanks().toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("planks"))).add(Planks.getItemPlanks().toArray(new Item[0])); - valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("logs"))).add(Logs.getItemPlanks().toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("wooden_slabs"))).add(Planks.getItemPlanksSlabs().toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("logs"))).add(Logs.getItemLogs().toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("logs_that_burn"))).add(Logs.getItemLogs().toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("leaves"))).add(LeavesSets.getItemLeaves().toArray(new Item[0])); - valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/weapon"))).add(WeaponEnchants.weapons.toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("axes"))).add(WeaponEnchants.axes.toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("daggers"))).add(WeaponEnchants.daggers.toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("swords"))).add(WeaponEnchants.swords.toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("spears"))).add(WeaponItemsME.spears.toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/weapon"))).add(WeaponEnchants.weapons.toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/sword"))).add(WeaponEnchants.sharpWeapons.toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/bow"))).add(Bows.bows.toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/crossbow"))).add(Crossbows.crossbows.toArray(new Item[0])); valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/durability"))).add(ArmorTags.armors.toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/durability"))).add(WeaponEnchants.weapons.toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/vanishing"))).add(ArmorTags.armors.toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/vanishing"))).add(WeaponEnchants.weapons.toArray(new Item[0])); + valueLookupBuilder(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/equippable"))).add(ArmorTags.armors.toArray(new Item[0])); ArmorTags.basicArmors.addAll(List.of(new Item[]{Items.LEATHER_HELMET, Items.LEATHER_CHESTPLATE, Items.LEATHER_LEGGINGS, Items.LEATHER_BOOTS})); ArmorTags.mediumArmors.addAll(List.of(new Item[]{Items.GOLDEN_HELMET, Items.GOLDEN_CHESTPLATE, Items.GOLDEN_LEGGINGS, Items.GOLDEN_BOOTS, diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/EntitiesME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/EntitiesME.java index e0a37e24fd..de5549f023 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/EntitiesME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/EntitiesME.java @@ -3,7 +3,6 @@ import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry; import net.minecraft.entity.*; import net.minecraft.entity.mob.HostileEntity; -import net.minecraft.entity.passive.AnimalEntity; import net.minecraft.item.Item; import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; @@ -19,7 +18,6 @@ import net.sevenstars.middleearth.entity.beasts.broadhoof.BroadhoofGoatEntity; import net.sevenstars.middleearth.entity.beasts.cave_troll.CaveTrollEntity; import net.sevenstars.middleearth.entity.beasts.great_horn.GreatHornEntity; -import net.sevenstars.middleearth.entity.beasts.trolls.TrollEntity; import net.sevenstars.middleearth.entity.beasts.trolls.petrified.PetrifiedTrollEntity; import net.sevenstars.middleearth.entity.beasts.trolls.snow.SnowTrollEntity; import net.sevenstars.middleearth.entity.beasts.trolls.stone.StoneTrollEntity; @@ -38,12 +36,11 @@ import net.sevenstars.middleearth.entity.spider.spawn.SpawnOfShelobEntity; import net.sevenstars.middleearth.item.ResourceItemsME; import net.sevenstars.middleearth.registries.RegistryAliasesME; -import net.sevenstars.of_beasts_and_wild_things.entity.EntitiesWT; import java.util.function.Supplier; public class EntitiesME { // Npc - public static final EntityType NPC = register("npc", EntityType.Builder.create(NpcEntity::new, SpawnGroup.CREATURE).dimensions(0.8f, 1.8f)); + public static final EntityType NPC = register("npc", EntityType.Builder.create(NpcEntity::new, SpawnGroup.MONSTER).dimensions(0.8f, 1.8f)); // Mounts public static final EntityType WARG = register("warg", EntityType.Builder.create(WargEntity::new, SpawnGroup.CREATURE).dimensions(1.4f, 1.4f)); @@ -62,15 +59,14 @@ public class EntitiesME { // Trolls public static final EntityType SNOW_TROLL = register("snow_troll", - EntityType.Builder.create(SnowTrollEntity::new, SpawnGroup.MONSTER).dimensions(2.2f, 2.5f)); - public static final EntityType CAVE_TROLL = register("cave_troll", - EntityType.Builder.create(CaveTrollEntity::new, SpawnGroup.MONSTER) - .dimensions(2.2f, 3.5f) + EntityType.Builder.create(SnowTrollEntity::new, SpawnGroup.CREATURE).dimensions(2.2f, 2.5f)); + public static final EntityType CAVE_TROLL = register("cave_troll", EntityType.Builder.create(CaveTrollEntity::new, SpawnGroup.MONSTER).dimensions(2.2f, 3.5f) .passengerAttachments(new Vec3d(0, 3.825, -0.65), new Vec3d(-0.8, 3.4, -1.2), new Vec3d(0.8, 3.4, -1.2))); + public static final EntityType STONE_TROLL = register("stone_troll", - EntityType.Builder.create(StoneTrollEntity::new, SpawnGroup.MONSTER).dimensions(1.4f, 3.4f)); + EntityType.Builder.create(StoneTrollEntity::new, SpawnGroup.CREATURE).dimensions(1.4f, 3.4f)); public static final EntityType PETRIFIED_TROLL = register("petrified_troll", - EntityType.Builder.create(PetrifiedTrollEntity::new, SpawnGroup.MONSTER).dimensions(1.4f, 3.4f)); + EntityType.Builder.create(PetrifiedTrollEntity::new, SpawnGroup.CREATURE).dimensions(1.4f, 3.4f)); ///* Weapons */// public static final EntityType FIRE_OF_ORTHANC = registerEntity("fire_of_orthanc", FireOfOrthancEntity::new, SpawnGroup.MISC, 0.65F, 0.65F); @@ -91,13 +87,11 @@ public class EntitiesME { public static EntityType registerEntity(String name, EntityType.EntityFactory entity, SpawnGroup spawnGroup, float width, float height) { - return Registry.register(Registries.ENTITY_TYPE, - Identifier.of(MiddleEarth.MOD_ID, name), - EntityType.Builder.create(entity, spawnGroup).dimensions(width, height).build(keyOf("name"))); + return Registry.register(Registries.ENTITY_TYPE, MiddleEarth.of(name), EntityType.Builder.create(entity, spawnGroup).dimensions(width, height).build(keyOf("name"))); } private static EntityType register(RegistryKey> key, EntityType.Builder type) { - EntityType entityType = (EntityType)Registry.register(Registries.ENTITY_TYPE, key, type.build(key)); + EntityType entityType = Registry.register(Registries.ENTITY_TYPE, key, type.build(key)); TranslationEntries.entityEntries.add(entityType); RegistryAliasesME.aliases.add(new RegistryAliasesME.Alias(Registries.ENTITY_TYPE, entityType.getUntranslatedName())); return entityType; @@ -107,10 +101,6 @@ private static EntityType.EntityFactory getBoatFactory(Supplier new BarrelEntity(type, world, itemSupplier); } - private static RegistryKey> registerRegistry(String id) { - return RegistryKey.ofRegistry(Identifier.of(MiddleEarth.MOD_ID, id)); - } - private static RegistryKey> keyOf(String id) { return RegistryKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of(MiddleEarth.MOD_ID, id)); } @@ -122,15 +112,6 @@ private static EntityType register(String id, EntityType.B public static void registerModEntities() { MiddleEarth.LOGGER.logDebugMsg("Registering Mod Entities for " + MiddleEarth.MOD_ID); - SpawnRestriction.register(SHELOBITE_LARVA, SpawnLocationTypes.ON_GROUND, - Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, HostileEntity::canSpawnInDark); - SpawnRestriction.register(SHELOBITE_SCUTTLER, SpawnLocationTypes.ON_GROUND, - Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, HostileEntity::canSpawnInDark); - SpawnRestriction.register(SPAWN_OF_SHELOB, SpawnLocationTypes.ON_GROUND, - Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, HostileEntity::canSpawnInDark); - - SpawnRestriction.register(CAVE_TROLL, SpawnLocationTypes.ON_GROUND, - Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, CaveTrollEntity::canSpawn); FabricDefaultAttributeRegistry.register(STONE_TROLL, StoneTrollEntity.setAttributes()); FabricDefaultAttributeRegistry.register(PETRIFIED_TROLL, PetrifiedTrollEntity.setAttributes()); @@ -151,8 +132,19 @@ public static void registerModEntities() { FabricDefaultAttributeRegistry.register(SNOW_TROLL, SnowTrollEntity.setAttributes()); FabricDefaultAttributeRegistry.register(NPC, NpcEntity.setAttributes()); - SpawnRestriction.register(NPC, SpawnLocationTypes.ON_GROUND, - Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, NpcEntity::canSpawn); + registerSpawnRestrictions(); + } + + private static void registerSpawnRestrictions(){ + SpawnLocation onGroundLocation = SpawnLocationTypes.ON_GROUND; + Heightmap.Type heightmapType = Heightmap.Type.MOTION_BLOCKING_NO_LEAVES; + + SpawnRestriction.register(SHELOBITE_LARVA, onGroundLocation, heightmapType, ShelobiteLarvaEntity::canSpawn); + SpawnRestriction.register(SHELOBITE_SCUTTLER, onGroundLocation, heightmapType, ShelobiteScuttlerEntity::canSpawn); + SpawnRestriction.register(SPAWN_OF_SHELOB, onGroundLocation, heightmapType, SpawnOfShelobEntity::canSpawn); + + SpawnRestriction.register(CAVE_TROLL, onGroundLocation, heightmapType, CaveTrollEntity::canSpawn); + SpawnRestriction.register(NPC, onGroundLocation, heightmapType, NpcEntity::canSpawn); } static { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/TrackedDataHandlerRegistryME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/TrackedDataHandlerRegistryME.java index ac8b3a0636..59a9af3579 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/TrackedDataHandlerRegistryME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/TrackedDataHandlerRegistryME.java @@ -8,26 +8,33 @@ import net.minecraft.util.math.BlockPos; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.beasts.great_horn.GreatHornVariant; -import net.sevenstars.middleearth.entity.npcs.renderer.NpcEntityTextureData; +import net.sevenstars.middleearth.entity.npcs.data.NpcData; +import net.sevenstars.middleearth.entity.npcs.data.NpcInitializationData; +import net.sevenstars.middleearth.entity.npcs.data.NpcTextureData; import net.sevenstars.middleearth.entity.spider.SpiderVariant; public class TrackedDataHandlerRegistryME { + public static final TrackedDataHandler NPC_DATA; + public static final TrackedDataHandler NPC_INITIALIZATION_DATA; + public static final TrackedDataHandler NPC_TEXTURE_DATA; + public static final TrackedDataHandler INITIALIZATION_TICK; public static final TrackedDataHandler FACTION_ID; public static final TrackedDataHandler NPC_DATA_ID; public static final TrackedDataHandler CATEGORY; - public static final TrackedDataHandler NPC_ENTITY_TEXTURE_DATA; public static final TrackedDataHandler STRUCTURE_MANAGER_HOST_POS; public static final TrackedDataHandler> SPIDER_VARIANT; public static final TrackedDataHandler> GREAT_HORN_VARIANT; public static void register() { + of("npc_data", NPC_DATA); + of("npc_initialization_data", NPC_INITIALIZATION_DATA); + of("npc_texture_data", NPC_TEXTURE_DATA); of("initialization_tick", INITIALIZATION_TICK); of("faction_id", FACTION_ID); of("npc_data_id", NPC_DATA_ID); of("category", CATEGORY); - of("npc_entity_texture_data", NPC_ENTITY_TEXTURE_DATA); of("structure_manager_host_pos", STRUCTURE_MANAGER_HOST_POS); of("spider_variant", SPIDER_VARIANT); of("great_horn_variant", GREAT_HORN_VARIANT); @@ -38,11 +45,13 @@ private static void of(String name, TrackedDataHandler dataHandler) { } static { + NPC_INITIALIZATION_DATA = TrackedDataHandler.create(NpcInitializationData.PACKET_CODEC); + NPC_DATA = TrackedDataHandler.create(NpcData.PACKET_CODEC); INITIALIZATION_TICK = TrackedDataHandler.create(PacketCodecs.LONG); FACTION_ID = TrackedDataHandler.create(PacketCodecs.STRING); NPC_DATA_ID = TrackedDataHandler.create(PacketCodecs.STRING); CATEGORY = TrackedDataHandler.create(PacketCodecs.STRING); - NPC_ENTITY_TEXTURE_DATA = TrackedDataHandler.create(NpcEntityTextureData.PACKET_CODEC); + NPC_TEXTURE_DATA = TrackedDataHandler.create(NpcTextureData.PACKET_CODEC); STRUCTURE_MANAGER_HOST_POS = TrackedDataHandler.create(BlockPos.PACKET_CODEC); SPIDER_VARIANT = TrackedDataHandler.create(SpiderVariant.PACKET_CODEC); GREAT_HORN_VARIANT = TrackedDataHandler.create(GreatHornVariant.PACKET_CODEC); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/AbstractBeastEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/AbstractBeastEntity.java index c168384583..13a0af28a4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/AbstractBeastEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/AbstractBeastEntity.java @@ -5,11 +5,11 @@ import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.FoodComponent; import net.minecraft.entity.*; -import net.minecraft.entity.ai.brain.MemoryModuleType; import net.minecraft.entity.ai.pathing.EntityNavigation; import net.minecraft.entity.attribute.EntityAttribute; import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.entity.damage.DamageSource; +import net.minecraft.entity.damage.DamageTypes; import net.minecraft.entity.data.DataTracker; import net.minecraft.entity.data.TrackedData; import net.minecraft.entity.data.TrackedDataHandlerRegistry; @@ -171,6 +171,10 @@ public boolean isPersistent() { return isTame() || getTameness() <= 0; } + public void resetTameness(){ + this.setTameness(75); + } + protected boolean isClientWorld() { return this.getWorld().isClient(); } @@ -190,6 +194,14 @@ public boolean isValidTarget(Entity entity) { !(this.getOwner() != null && this.getOwner().equals(livingEntity)) && // Is not its owner !(livingEntity instanceof PlayerEntity player && player.isCreative()); // Is not a creative player } + + @Override + public boolean isInvulnerableTo(ServerWorld world, DamageSource source) { + if (source.isOf(DamageTypes.IN_WALL) && this.hasPassengers() && getControllingPassenger() instanceof NpcEntity) { + return true; + } + return super.isInvulnerableTo(world, source); + } // endregion // region DataTracker diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/cave_troll/CaveTrollEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/cave_troll/CaveTrollEntity.java index 9b05a7e7ee..558f45ac6d 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/cave_troll/CaveTrollEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/cave_troll/CaveTrollEntity.java @@ -55,10 +55,12 @@ import net.sevenstars.middleearth.entity.ai.brain.MemoryModulesME; import net.sevenstars.middleearth.entity.beasts.AbstractBeastEntity; import net.sevenstars.middleearth.entity.npcs.NpcEntity; +import net.sevenstars.middleearth.entity.spider.Pouncer; import net.sevenstars.middleearth.resources.datas.common.DispositionType; import net.sevenstars.middleearth.resources.datas.common.RaceType; import net.sevenstars.middleearth.sound.SoundsME; import net.sevenstars.middleearth.utils.PlayerUtil; +import net.sevenstars.middleearth.utils.SpawnUtil; import org.jetbrains.annotations.Nullable; import java.util.List; @@ -86,7 +88,6 @@ public class CaveTrollEntity extends AbstractBeastEntity { public CaveTrollEntity(EntityType entityType, World world) { super(entityType, world); - if(scavengeLootTable == null && !world.isClient()) { if(world instanceof ServerWorld serverWorld) { @@ -232,11 +233,6 @@ else if(!itemStack.isEmpty()) { return ActionResult.PASS; // Player is of incompatible race - don't interact } - public static boolean canSpawn(EntityType type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) { - return world.getBlockState(pos.down()).isSolidBlock(world, pos.mutableCopy().up()) - && !world.getBlockState(pos.down()).isIn(BlockTags.LOGS) && world.getLightLevel(pos) < 14; - } - @Override public boolean canBeLeashed() { return false; @@ -709,7 +705,7 @@ public boolean isBondingItem(ItemStack itemStack) { } public static boolean shouldTarget(LivingEntity target) { - return target instanceof NpcEntity || target instanceof PlayerEntity; + return target instanceof NpcEntity || target instanceof PlayerEntity || target instanceof Pouncer; } @Override @@ -762,4 +758,13 @@ protected SoundEvent getRoarSound() { public void playRoarSound() { this.playSound(this.getRoarSound()); } + + public static boolean canSpawn(EntityType type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos blockPos, Random random) { + return SpawnUtil.canSpawn(blockPos, serverWorldAccess, spawnReason); + } + + @Override + public boolean canSpawn(WorldAccess world, SpawnReason spawnReason) { + return true; + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/great_horn/GreatHornEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/great_horn/GreatHornEntity.java index cd6c0bf62b..c4adf370ed 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/great_horn/GreatHornEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/great_horn/GreatHornEntity.java @@ -35,10 +35,12 @@ import net.minecraft.world.LocalDifficulty; import net.minecraft.world.ServerWorldAccess; import net.minecraft.world.World; +import net.minecraft.world.WorldAccess; import net.sevenstars.middleearth.config.ModServerConfigs; import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.entity.TrackedDataHandlerRegistryME; import net.sevenstars.middleearth.entity.beasts.AbstractBeastEntity; +import net.sevenstars.middleearth.entity.beasts.trolls.stone.StoneTrollEntity; import net.sevenstars.middleearth.entity.beasts.warg.WargEntity; import net.sevenstars.middleearth.entity.goals.BowAtEntityGoal; import net.sevenstars.middleearth.entity.goals.ChargeAttackGoal; @@ -51,6 +53,7 @@ import net.sevenstars.middleearth.resources.datas.races.RaceUtil; import net.sevenstars.middleearth.sound.SoundsME; import net.sevenstars.middleearth.utils.ItemTagsME; +import net.sevenstars.middleearth.utils.SpawnUtil; import org.jetbrains.annotations.Nullable; import org.joml.Vector3f; @@ -567,4 +570,13 @@ public GreatHornData(RegistryEntry variant) { this.variant = variant; } } + + public static boolean canSpawn(EntityType type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos blockPos, Random random) { + return SpawnUtil.canSpawn(blockPos, serverWorldAccess, spawnReason); + } + + @Override + public boolean canSpawn(WorldAccess world, SpawnReason spawnReason) { + return true; + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/trolls/stone/StoneTrollEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/trolls/stone/StoneTrollEntity.java index 7159b3677b..96988c2b41 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/trolls/stone/StoneTrollEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/trolls/stone/StoneTrollEntity.java @@ -3,6 +3,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.EquipmentSlot; +import net.minecraft.entity.SpawnReason; import net.minecraft.entity.ai.goal.AvoidSunlightGoal; import net.minecraft.entity.ai.goal.EscapeSunlightGoal; import net.minecraft.entity.conversion.EntityConversionContext; @@ -22,12 +23,17 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.ServerWorldAccess; import net.minecraft.world.World; +import net.minecraft.world.WorldAccess; import net.minecraft.world.biome.Biome; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.EntitiesME; +import net.sevenstars.middleearth.entity.beasts.cave_troll.CaveTrollEntity; import net.sevenstars.middleearth.entity.beasts.trolls.TrollEntity; import net.sevenstars.middleearth.entity.goals.BeastTargetPlayerGoal; +import net.sevenstars.middleearth.utils.SpawnUtil; import java.util.List; @@ -172,4 +178,13 @@ public void onDamaged(DamageSource damageSource) { super.onDamaged(damageSource); } } + + public static boolean canSpawn(EntityType type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos blockPos, Random random) { + return SpawnUtil.canSpawn(blockPos, serverWorldAccess, spawnReason); + } + + @Override + public boolean canSpawn(WorldAccess world, SpawnReason spawnReason) { + return true; + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargAnimations.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargAnimations.java index 5985d12384..dd373b933f 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargAnimations.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargAnimations.java @@ -1,761 +1,635 @@ package net.sevenstars.middleearth.entity.beasts.warg; import net.minecraft.client.render.entity.animation.*; -import net.minecraft.client.render.entity.model.EntityModelPartNames; public class WargAnimations { - public static final AnimationDefinition STAND_UP = AnimationDefinition.Builder.create(1.5F) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 12.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 18.1F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.8333F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createRotationalVector(-9.9621F, -2.654F, -53.0485F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createRotationalVector(9.9621F, 2.654F, -53.0485F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("root", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.3F, -25.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createRotationalVector(0.0222F, 0.2534F, -16.2F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -6.3F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -1.68F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, 3.99F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 1.7F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.9583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -1.68F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 3.25F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.4583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); + public static final AnimationDefinition IDLE = AnimationDefinition.Builder.create(1.0F).looping() + .addBoneAnimation("body_fur", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.2F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("jaw", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -2.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("jaw", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createTranslationalVector(0.0F, 0.1F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tongue", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 5.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("tongue", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.6F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 1.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 1.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 1.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body_no_legs", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.2F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .build(); - public static final AnimationDefinition SIT_DOWN = AnimationDefinition.Builder.create(1.6667F) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 17.2F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 12.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(-17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.8333F, AnimationHelper.createTranslationalVector(0.0F, 3.5F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.8333F, AnimationHelper.createTranslationalVector(0.0F, 3.5F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("root", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(-0.0131F, 0.2997F, -27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, -6.3F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); - public static final AnimationDefinition SIT = AnimationDefinition.Builder.create(4.75F).looping() - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 12.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("root", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-0.0131F, 0.2997F, -27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -6.3F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); - public static final AnimationDefinition GROOM = AnimationDefinition.Builder.create(7.0F) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 12.5F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(-35.0F, -22.5F, 42.5F), Transformation.Interpolations.CUBIC), - new Keyframe(1.5F, AnimationHelper.createRotationalVector(-36.3314F, -26.5633F, 45.7039F), Transformation.Interpolations.CUBIC), - new Keyframe(1.75F, AnimationHelper.createRotationalVector(-28.7991F, -34.6876F, 31.0148F), Transformation.Interpolations.CUBIC), - new Keyframe(2.25F, AnimationHelper.createRotationalVector(-22.0103F, -38.9941F, 19.7239F), Transformation.Interpolations.CUBIC), - new Keyframe(2.75F, AnimationHelper.createRotationalVector(-36.3314F, -26.5633F, 45.7039F), Transformation.Interpolations.CUBIC), - new Keyframe(3.0F, AnimationHelper.createRotationalVector(-28.7991F, -34.6876F, 31.0148F), Transformation.Interpolations.CUBIC), - new Keyframe(3.5F, AnimationHelper.createRotationalVector(-22.0103F, -38.9941F, 19.7239F), Transformation.Interpolations.CUBIC), - new Keyframe(4.0417F, AnimationHelper.createRotationalVector(-36.3314F, -26.5633F, 45.7039F), Transformation.Interpolations.CUBIC), - new Keyframe(4.2917F, AnimationHelper.createRotationalVector(-28.7991F, -34.6876F, 31.0148F), Transformation.Interpolations.CUBIC), - new Keyframe(4.7917F, AnimationHelper.createRotationalVector(-22.0103F, -38.9941F, 19.7239F), Transformation.Interpolations.CUBIC), - new Keyframe(5.25F, AnimationHelper.createRotationalVector(-36.3314F, -26.5633F, 45.7039F), Transformation.Interpolations.CUBIC), - new Keyframe(5.5F, AnimationHelper.createRotationalVector(-28.7991F, -34.6876F, 31.0148F), Transformation.Interpolations.CUBIC), - new Keyframe(6.0F, AnimationHelper.createRotationalVector(-22.0103F, -38.9941F, 19.7239F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 12.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.75F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.0417F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(5.25F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createRotationalVector(-17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("root", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-0.0131F, 0.2997F, -27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createRotationalVector(-0.0131F, 0.2997F, -27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -6.3F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createTranslationalVector(0.0F, -6.3F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createRotationalVector(51.0241F, -61.8087F, -83.4484F), Transformation.Interpolations.CUBIC), - new Keyframe(6.0417F, AnimationHelper.createRotationalVector(51.0241F, -61.8087F, -83.4484F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(6.9583F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); + public static final AnimationDefinition WALK = AnimationDefinition.Builder.create(2.0F).looping() + .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.1667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 21.25F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.1667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 21.25F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(-1.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(-1.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.6667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 21.25F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.6667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 21.25F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(-1.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(-1.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.1667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 21.25F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.1667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 21.25F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(-1.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(-1.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -17.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(-1.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(-1.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.8F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.8F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.8F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 0.8F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.8F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body_fur", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(-2.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(2.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(-2.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(2.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(-2.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body_fur", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("ear_right", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 27.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createRotationalVector(8.0633F, 28.924F, -8.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 27.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.7083F, AnimationHelper.createRotationalVector(8.0633F, 28.924F, -8.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 27.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.2083F, AnimationHelper.createRotationalVector(8.0633F, 28.924F, -13.0088F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, 27.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.7917F, AnimationHelper.createRotationalVector(8.0633F, 28.924F, -8.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 27.5F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("ear_right", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.7083F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.2083F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.7917F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("ear_left", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, -27.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createRotationalVector(-8.0633F, -28.924F, -8.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, -27.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.7083F, AnimationHelper.createRotationalVector(-8.0633F, -28.924F, -8.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, -27.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.2083F, AnimationHelper.createRotationalVector(-8.0633F, -28.924F, -8.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, -27.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.7917F, AnimationHelper.createRotationalVector(-8.0633F, -28.924F, -8.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, -27.5F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("ear_left", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.7083F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.2083F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.7917F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("jaw", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -3.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.9583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -3.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("jaw", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.4583F, AnimationHelper.createTranslationalVector(0.0F, 0.1F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.9583F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 0.1F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tongue", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -2.5F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("tongue", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.3F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.3F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.3F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 0.3F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.3F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.75F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("wait_tail", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(3.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(-3.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(3.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.5F, AnimationHelper.createRotationalVector(-3.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(2.0F, AnimationHelper.createRotationalVector(3.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .build(); - public static final AnimationDefinition LAY_DOWN = AnimationDefinition.Builder.create(1.7083F) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 12.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createRotationalVector(4.5336F, -2.1109F, 28.0414F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0417F, AnimationHelper.createRotationalVector(-5.9551F, 4.2595F, 22.5542F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -5.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createTranslationalVector(-3.0F, -1.5F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createRotationalVector(-17.4844F, -0.7515F, -67.3844F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("root", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-0.0131F, 0.2997F, -27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -22.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -6.3F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createTranslationalVector(0.0F, -8.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createRotationalVector(17.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0417F, AnimationHelper.createRotationalVector(17.7517F, -11.9313F, -16.3691F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createRotationalVector(22.4065F, -10.3945F, -84.5049F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(0.0F, 5.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4583F, AnimationHelper.createTranslationalVector(1.0F, 3.73F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createTranslationalVector(1.5F, 1.5F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createTranslationalVector(-4.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createRotationalVector(-7.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0417F, AnimationHelper.createRotationalVector(10.9677F, 0.0F, 4.3548F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createTranslationalVector(0.0F, -3.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - /*.addBoneAnimation("body_armor", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - ))*/ - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0417F, AnimationHelper.createRotationalVector(-31.4557F, -5.4765F, -5.3022F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createRotationalVector(-24.0752F, 6.8432F, -87.0372F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.625F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.7917F, AnimationHelper.createTranslationalVector(-0.39F, 4.81F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0417F, AnimationHelper.createTranslationalVector(1.5F, 2.49F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.7083F, AnimationHelper.createTranslationalVector(-4.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); + public static final AnimationDefinition RUN = AnimationDefinition.Builder.create(0.75F).looping() + .addBoneAnimation("body", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 7.5F), Transformation.Interpolations.LINEAR), + new Keyframe(0.2917F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -10.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 7.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(2.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body_fur", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 4.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.1667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 4.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -9.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5833F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -9.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 4.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body_fur", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.1667F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("mane", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.LINEAR), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("mane", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 32.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.4167F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -67.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 32.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.125F, AnimationHelper.createTranslationalVector(-1.39F, 2.89F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(0.0F, 4.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.4167F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5417F, AnimationHelper.createTranslationalVector(1.0F, -0.47F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 30.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5417F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -67.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 30.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createTranslationalVector(-1.25F, 3.25F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.4167F, AnimationHelper.createTranslationalVector(0.0F, 4.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.5417F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("head", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -5.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.1667F, AnimationHelper.createRotationalVector(5.0F, 0.0F, 7.5103F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 25.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5417F, AnimationHelper.createRotationalVector(-5.6173F, 0.0F, 12.5913F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -5.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("ear_right", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(3.237F, 19.8207F, -36.0243F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(3.237F, 19.8207F, -36.0243F), Transformation.Interpolations.LINEAR), + new Keyframe(0.5417F, AnimationHelper.createRotationalVector(-13.7415F, 14.4596F, -5.4885F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(3.237F, 19.8207F, -36.0243F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("ear_left", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(-3.237F, -19.8207F, -36.0243F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(-3.237F, -19.8207F, -36.0243F), Transformation.Interpolations.LINEAR), + new Keyframe(0.5417F, AnimationHelper.createRotationalVector(13.7415F, -14.4596F, -5.4885F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(-3.237F, -19.8207F, -36.0243F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("jaw", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -2.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.4447F, -0.3801F, 27.4292F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createRotationalVector(0.2503F, -0.5217F, 51.3493F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.4762F, -0.3399F, 22.4292F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.4447F, -0.3801F, 27.4292F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(1.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -35.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.1667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -3.75F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 55.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -35.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(3.0F, -3.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(-1.0F, -1.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.625F, AnimationHelper.createTranslationalVector(1.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(3.0F, -3.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -35.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.125F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -3.75F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 55.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -35.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(3.0F, -3.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createTranslationalVector(-1.0F, -1.5F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5833F, AnimationHelper.createTranslationalVector(1.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(3.0F, -3.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.625F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.125F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.4167F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.5417F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("headmane", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2083F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -2.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.LINEAR), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("headmane", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createTranslationalVector(0.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tongue", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("tongue", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-0.2F, 0.2F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("back_body", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 7.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.375F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.75F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 7.5F), Transformation.Interpolations.CUBIC) + )) + .build(); - public static final AnimationDefinition LYING = AnimationDefinition.Builder.create(1.5833F).looping() - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -5.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-3.0F, -1.5F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-17.4844F, -0.7515F, -67.3844F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("root", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -22.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -8.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(22.4065F, -10.3945F, -84.5049F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-4.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -3.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-24.0752F, 6.8432F, -87.0372F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-4.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); + public static final AnimationDefinition BITE = AnimationDefinition.Builder.create(0.75F) + .addBoneAnimation("head", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.3333F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -30.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.5417F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("jaw", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.2917F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 57.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.4583F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.625F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .build(); - public static final AnimationDefinition STAND_UP_FROM_LYING = AnimationDefinition.Builder.create(2.0F) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -5.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -22.5F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -15.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-3.0F, -1.5F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-17.4844F, -0.7515F, -67.3844F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(-8.7418F, 0.3846F, -28.7503F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createRotationalVector(-6.4713F, 5.9023F, 10.9451F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(1.0F, 6.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createTranslationalVector(3.0F, 9.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createTranslationalVector(3.0F, 10.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(17.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(8.7418F, -0.3846F, -28.7503F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createRotationalVector(6.4713F, -5.9023F, 10.9451F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(1.0F, 6.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createTranslationalVector(3.0F, 10.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("root", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -22.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -8.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(22.4065F, -10.3945F, -84.5049F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(23.7732F, -6.464F, -93.8027F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createRotationalVector(21.9621F, -11.3386F, -82.1478F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-4.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 22.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 36.25F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 23.75F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -3.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createTranslationalVector(4.0F, 5.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-24.0752F, 6.8432F, -87.0372F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(-24.9224F, 1.6426F, -98.4393F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createRotationalVector(-24.0752F, 6.8432F, -87.0372F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-4.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); + public static final AnimationDefinition SITTING = AnimationDefinition.Builder.create(5.0F).looping() + .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-1.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("head", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 42.5F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 72.5F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, -2.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(5.0F, -9.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("left_back_foot", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -90.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("left_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(2.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(5.0F, -9.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("right_back_foot", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -90.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("right_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(2.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("body_no_legs", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -37.5F), Transformation.Interpolations.LINEAR) + )) + .build(); - public static final AnimationDefinition WALK = AnimationDefinition.Builder.create(1.25F).looping() - .addBoneAnimation("root", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -35.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2083F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 25.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -35.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2083F, AnimationHelper.createTranslationalVector(0.0F, -0.25F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.875F, AnimationHelper.createTranslationalVector(0.0F, 2.42F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.9167F, AnimationHelper.createTranslationalVector(0.0F, 0.5F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(-2.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createRotationalVector(2.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(-2.5F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 35.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -35.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.875F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 35.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.875F, AnimationHelper.createTranslationalVector(0.0F, 0.67F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.84F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -45.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2083F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 35.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -45.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2083F, AnimationHelper.createTranslationalVector(0.0F, 0.67F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createTranslationalVector(-2.0F, 0.84F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.875F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 35.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -35.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.875F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 35.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.83F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(0.0F, 2.83F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.6667F, AnimationHelper.createTranslationalVector(0.0F, 0.83F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.875F, AnimationHelper.createTranslationalVector(0.0F, -0.25F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.0F, AnimationHelper.createTranslationalVector(-2.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.25F, AnimationHelper.createTranslationalVector(0.0F, 0.83F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); + public static final AnimationDefinition STANDING_TO_SITTING = AnimationDefinition.Builder.create(2.0F).looping() + .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("head", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5417F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 30.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 32.5F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(-25.8389F, 74.8249F, -37.7453F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(-3.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, -2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(3.0F, -9.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_foot", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -30.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -90.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, -2.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(3.0F, -9.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_foot", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -30.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -90.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body_no_legs", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -20.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -32.5F), Transformation.Interpolations.CUBIC) + )) + .build(); - public static final AnimationDefinition RUN = AnimationDefinition.Builder.create(0.5F).looping() - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.0833F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -12.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -60.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.1667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 27.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -60.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.1667F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4167F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -7.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 5.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -7.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.BODY, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, -2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 67.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.1667F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -50.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -25.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 67.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.0417F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.1667F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 67.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -50.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.3333F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -25.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 67.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.0833F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2083F, AnimationHelper.createTranslationalVector(0.0F, 2.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC), - new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 2.5F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.25F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -60.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 25.36F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 30.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -60.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.2917F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.4583F, AnimationHelper.createTranslationalVector(0.0F, 3.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(0.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); - - public static final AnimationDefinition BITE = AnimationDefinition.Builder.create(1f) - .addBoneAnimation("jaw", - new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), - Transformation.Interpolations.CUBIC), - new Keyframe(0.25f, AnimationHelper.createRotationalVector(0f, 0f, 42.5f), - Transformation.Interpolations.CUBIC), - new Keyframe(0.5f, AnimationHelper.createRotationalVector(0f, 0f, 0f), - Transformation.Interpolations.CUBIC))) - .addBoneAnimation("ear_left", - new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, -20f), - Transformation.Interpolations.LINEAR))) - .addBoneAnimation("ear_right", - new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, -20f), - Transformation.Interpolations.LINEAR))).build(); - - public static final AnimationDefinition EAT_FROM_HAND = AnimationDefinition.Builder.create(1.7083433f) - .addBoneAnimation(EntityModelPartNames.HEAD, - new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, -7.5f), - Transformation.Interpolations.CUBIC))) - .addBoneAnimation("jaw", - new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 0f, 0f), - Transformation.Interpolations.CUBIC), - new Keyframe(0.3433333f, AnimationHelper.createRotationalVector(0f, 0f, 0.83f), - Transformation.Interpolations.LINEAR), - new Keyframe(0.5416766f, AnimationHelper.createRotationalVector(0f, 0f, 20f), - Transformation.Interpolations.CUBIC), - new Keyframe(0.7916766f, AnimationHelper.createRotationalVector(0f, 0f, 0.83f), - Transformation.Interpolations.CUBIC), - new Keyframe(1f, AnimationHelper.createRotationalVector(0f, 0f, 20f), - Transformation.Interpolations.CUBIC), - new Keyframe(1.2083433f, AnimationHelper.createRotationalVector(0f, 0f, 0.83f), - Transformation.Interpolations.CUBIC), - new Keyframe(1.4167667f, AnimationHelper.createRotationalVector(0f, 0f, 20f), - Transformation.Interpolations.CUBIC), - new Keyframe(1.625f, AnimationHelper.createRotationalVector(0f, 0f, 0.83f), - Transformation.Interpolations.CUBIC))) - .addBoneAnimation("ear_left", - new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 57.5f, 0f), - Transformation.Interpolations.CUBIC))) - .addBoneAnimation("ear_right", - new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0f, AnimationHelper.createRotationalVector(0f, -47.5f, 0f), - Transformation.Interpolations.CUBIC))) - .addBoneAnimation("tail", - new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0f, AnimationHelper.createRotationalVector(0f, 30f, 0f), - Transformation.Interpolations.CUBIC), - new Keyframe(0.4167667f, AnimationHelper.createRotationalVector(0f, -30f, 0f), - Transformation.Interpolations.CUBIC), - new Keyframe(0.8343334f, AnimationHelper.createRotationalVector(0f, 30f, 0f), - Transformation.Interpolations.CUBIC), - new Keyframe(1.2916767f, AnimationHelper.createRotationalVector(0f, -30f, 0f), - Transformation.Interpolations.CUBIC), - new Keyframe(1.7083433f, AnimationHelper.createRotationalVector(0f, 30f, 0f), - Transformation.Interpolations.CUBIC))).build(); - - public static final AnimationDefinition STRETCH = AnimationDefinition.Builder.create(4.5F) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -42.5F), Transformation.Interpolations.CUBIC), - new Keyframe(2.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -47.5F), Transformation.Interpolations.CUBIC), - new Keyframe(2.75F, AnimationHelper.createRotationalVector(-19.4789F, -12.2725F, -20.9105F), Transformation.Interpolations.CUBIC), - new Keyframe(2.9167F, AnimationHelper.createRotationalVector(27.3541F, 12.451F, -21.648F), Transformation.Interpolations.CUBIC), - new Keyframe(3.0833F, AnimationHelper.createRotationalVector(-19.4789F, -12.2725F, -20.9105F), Transformation.Interpolations.CUBIC), - new Keyframe(3.25F, AnimationHelper.createRotationalVector(27.3541F, 12.451F, -21.648F), Transformation.Interpolations.CUBIC), - new Keyframe(3.4167F, AnimationHelper.createRotationalVector(-19.4789F, -12.2725F, -20.9105F), Transformation.Interpolations.CUBIC), - new Keyframe(3.5833F, AnimationHelper.createRotationalVector(27.3541F, 12.451F, -21.648F), Transformation.Interpolations.CUBIC), - new Keyframe(3.75F, AnimationHelper.createRotationalVector(-19.4789F, -12.2725F, -20.9105F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation(EntityModelPartNames.HEAD, new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 12.5F), Transformation.Interpolations.CUBIC), - new Keyframe(2.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 12.5F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.5F, AnimationHelper.createTranslationalVector(0.0F, -3.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.5F, AnimationHelper.createTranslationalVector(0.0F, -4.22F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.5F, AnimationHelper.createRotationalVector(12.5F, 0.0F, -65.0F), Transformation.Interpolations.CUBIC), - new Keyframe(2.5F, AnimationHelper.createRotationalVector(12.2127F, 2.6851F, -77.2127F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.ROTATE, - new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(1.5F, AnimationHelper.createRotationalVector(-17.5F, 0.0F, -62.5F), Transformation.Interpolations.CUBIC), - new Keyframe(2.5F, AnimationHelper.createRotationalVector(-17.1097F, -3.7317F, -74.4384F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .addBoneAnimation("right_front_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, - new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), - new Keyframe(4.5F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) - )) - .build(); + public static final AnimationDefinition SITTING_TO_STANDING = AnimationDefinition.Builder.create(1.5F).looping() + .addBoneAnimation("upper_body", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.625F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 5.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("body_fur", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("head", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 32.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 20.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("head", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(-25.8389F, 74.8249F, -37.7453F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(-8.1078F, 36.0076F, -17.4827F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 1.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("tail", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(-3.0F, -1.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -5.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR) + )) + .addBoneAnimation("left_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(3.0F, -9.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(1.0F, -5.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_foot", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -90.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("left_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(1.0F, 4.5F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -5.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_leg", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(3.0F, -9.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(1.0F, -4.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_foot", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -90.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("right_back_foot", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(2.0F, 1.0F, 0.0F), Transformation.Interpolations.CUBIC), + new Keyframe(0.5F, AnimationHelper.createTranslationalVector(1.0F, 3.5F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body_no_legs", new Transformation(Transformation.Targets.ROTATE, + new Keyframe(0.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -32.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.25F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -32.5F), Transformation.Interpolations.CUBIC), + new Keyframe(0.625F, AnimationHelper.createRotationalVector(0.0F, 0.0F, -15.0F), Transformation.Interpolations.CUBIC), + new Keyframe(1.0F, AnimationHelper.createRotationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .addBoneAnimation("body_no_legs", new Transformation(Transformation.Targets.MOVE_ORIGIN, + new Keyframe(0.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.25F, AnimationHelper.createTranslationalVector(1.65F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(0.625F, AnimationHelper.createTranslationalVector(1.0F, 0.0F, 0.0F), Transformation.Interpolations.LINEAR), + new Keyframe(1.0F, AnimationHelper.createTranslationalVector(0.0F, 0.0F, 0.0F), Transformation.Interpolations.CUBIC) + )) + .build(); } \ No newline at end of file diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEntity.java index ff7bbce7bc..cca0b0fb95 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEntity.java @@ -23,6 +23,7 @@ import net.minecraft.sound.SoundEvents; import net.minecraft.storage.ReadView; import net.minecraft.storage.WriteView; +import net.minecraft.text.Text; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.util.Identifier; @@ -59,6 +60,9 @@ public class WargEntity extends AbstractBeastEntity { private static final float MIN_HEALTH_BONUS = WargEntity.getChildHealthBonus(max -> 0); private static final float MAX_HEALTH_BONUS = WargEntity.getChildHealthBonus(max -> max - 1); private static final TrackedData VARIANT = DataTracker.registerData(WargEntity.class, TrackedDataHandlerRegistry.INTEGER); + private static final TrackedData EYE_VARIANT = DataTracker.registerData(WargEntity.class, TrackedDataHandlerRegistry.INTEGER); + private static final double PASSENGER_SADDLE_Y_OFFSET = 0.12; + private static final double PASSENGER_SADDLE_BACKWARD_OFFSET = 0.18; public int idleAnimationTimeout = this.random.nextInt(600) + 1700; private static final EntityDimensions BABY_BASE_DIMENSIONS = EntitiesME.WARG.getDimensions().scaled(0.5f); @@ -112,18 +116,21 @@ protected void initGoals() { protected void initDataTracker(DataTracker.Builder builder) { super.initDataTracker(builder); builder.add(VARIANT, 0); + builder.add(EYE_VARIANT, 0); } @Override - public void writeData(WriteView view) { - super.writeData(view); + protected void writeCustomData(WriteView view) { + super.writeCustomData(view); view.putInt("Variant", this.getTypeVariant()); + view.putInt("EyeVariant", this.getEyeTypeVariant()); } @Override protected void readCustomData(ReadView view) { super.readCustomData(view); this.dataTracker.set(VARIANT, view.getInt("Variant", 0)); + this.dataTracker.set(EYE_VARIANT, view.getInt("EyeVariant", 0)); } protected static float getChildHealthBonus(IntUnaryOperator randomIntGetter) { @@ -199,6 +206,9 @@ public PassiveEntity createChild(ServerWorld world, PassiveEntity entity) { int i = this.random.nextInt(9); WargVariant wargVariant = i < 4 ? this.getVariant() : (i < 8 ? wargEntity.getVariant() : Util.getRandom(WargVariant.values(), this.random)); wargEntity2.setVariant(wargVariant); + int j = this.random.nextInt(9); + WargEyeVariant eyeVariant = j < 4 ? this.getEyeVariant() : (j < 8 ? wargEntity.getEyeVariant() : Util.getRandom(WargEyeVariant.values(), this.random)); + wargEntity2.setEyeVariant(eyeVariant); this.setChildAttributes(entity, wargEntity2); } return wargEntity2; @@ -268,21 +278,27 @@ public boolean canSprintAsVehicle() { protected Vec3d getPassengerAttachmentPos(Entity passenger, EntityDimensions dimensions, float scaleFactor) { float animationSpeed = this.limbAnimator.getSpeed(); float animationProgress = this.limbAnimator.getAnimationProgress() * (MathHelper.PI / 180) * 18; + float f = this.limbAnimator.getAnimationProgress() / 20; boolean sprinting = passenger.isSprinting(); // frequency is calculated by dividing the speed of the animation by the duration of the animation. - float frequency = sprinting ? (1.2f/0.5f) : (2f/1.25f); + float frequency = sprinting ? (0.75f/1.4f) : 4; double y = sprinting ? - MathHelper.cos(animationProgress * frequency) * 0.095 * animationSpeed : - MathHelper.sin(animationProgress * frequency * 2f) * 0.06 * animationSpeed; + 0.025 - MathHelper.cos((f/frequency) * (MathHelper.PI*2)) * 0.06f : + MathHelper.cos(animationProgress * frequency) * 0.06 * animationSpeed - 0.05; if(this.isSitting()) { y = -0.5; } - return super.getPassengerAttachmentPos(passenger, dimensions, scaleFactor).add(0, y,0); + double side = 0; + double front = -PASSENGER_SADDLE_BACKWARD_OFFSET; + double x = MathHelper.cos((float)Math.toRadians(this.getBodyYaw())) * side - MathHelper.sin((float)Math.toRadians(this.getBodyYaw())) * front; + double z = MathHelper.sin((float)Math.toRadians(this.getBodyYaw())) * side + MathHelper.cos((float)Math.toRadians(this.getBodyYaw())) * front; + + return super.getPassengerAttachmentPos(passenger, dimensions, scaleFactor).add(x, y + PASSENGER_SADDLE_Y_OFFSET, z); } @Override @@ -298,7 +314,7 @@ public void tickMovement() { this.setRunning(true); } - this.idleAnimationTimeout = this.random.nextInt(600) + 1700; + //this.idleAnimationTimeout = this.random.nextInt(600) + 1700; } if(!this.isAttacking() && this.getAttacker() == null) { @@ -312,15 +328,26 @@ public void tickMovement() { @Override protected void setupAnimationStates() { + this.idleAnimationState.startIfNotRunning(this.age); if(this.isSitting()) { - this.startSittingAnimationState.startIfNotRunning(this.age); + if(!this.startSittingAnimationState.isRunning() && !this.sittingAnimationState.isRunning()) { + this.startSittingAnimationState.startIfNotRunning(this.age); + } + if(this.startSittingAnimationState.getTimeInMilliseconds(this.age) > 2000) { + this.sittingAnimationState.startIfNotRunning(this.age); + this.startSittingAnimationState.stop(); + } } - if(!this.isSitting() && this.startSittingAnimationState.isRunning()) { + else if(this.startSittingAnimationState.isRunning() || this.sittingAnimationState.isRunning()) { this.startSittingAnimationState.stop(); - this.stopSittingAnimationState.start(this.age); + this.sittingAnimationState.stop(); + this.stopSittingAnimationState.startIfNotRunning(this.age); + } + if(this.stopSittingAnimationState.getTimeInMilliseconds(this.age) > 1500) { + this.stopSittingAnimationState.stop(); } } - + @Override public boolean isCommandItem(ItemStack stack) { return stack.isIn(TagKey.of(RegistryKeys.ITEM, Identifier.of(MiddleEarth.MOD_ID, "bones"))); } @@ -330,6 +357,16 @@ public boolean isFoodItem(ItemStack itemStack) { return false; } + @Override + public boolean tryAttack(ServerWorld world, Entity target) { + boolean result = super.tryAttack(world, target); + if(result) { + this.setRunning(true); + this.getWorld().sendEntityStatus(this, EntityStatuses.PLAY_ATTACK_SOUND); + } + return result; + } + @Override public void chargeAttack() { if(!this.hasCharged()) { @@ -353,8 +390,9 @@ else if (this.getWorld().isClient) { List entities = this.getWorld().getOtherEntities(this, this.getBoundingBox().expand(0.2f, 0.0, 0.2f)); + Entity owner = this.getOwner(); for(Entity entity : entities) { - if(this.getOwner() != null && entity.getUuid() != this.getOwner().getUuid() && entity != this && !this.getPassengerList().contains(entity) && !((entity instanceof WargEntity) && !this.isTame())) { + if((owner == null || entity.getUuid() != owner.getUuid()) && entity != this && !this.getPassengerList().contains(entity) && !((entity instanceof WargEntity) && !this.isTame())) { if(getWorld() instanceof ServerWorld serverWorld) entity.damage(serverWorld, entity.getDamageSources().mobAttack(this), this.getAttackDamage()); @@ -436,6 +474,8 @@ public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty @Nullable EntityData entityData) { WargVariant variant = Util.getRandom(WargVariant.values(), this.random); setVariant(variant); + WargEyeVariant eyeVariant = Util.getRandom(WargEyeVariant.values(), this.random); + setEyeVariant(eyeVariant); return super.initialize(world, difficulty, spawnReason, entityData); } @@ -443,14 +483,23 @@ public WargVariant getVariant() { return WargVariant.byId(this.getTypeVariant() & 255); } + public WargEyeVariant getEyeVariant() { + return WargEyeVariant.byId(this.getEyeTypeVariant() & 255); + } private int getTypeVariant() { return this.dataTracker.get(VARIANT); } + private int getEyeTypeVariant() { + return this.dataTracker.get(EYE_VARIANT); + } private void setVariant(WargVariant variant) { this.dataTracker.set(VARIANT, variant.getId() & 255); } + private void setEyeVariant(WargEyeVariant variant) { + this.dataTracker.set(EYE_VARIANT, variant.getId() & 255); + } @Nullable @Override protected SoundEvent getDeathSound() { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEntityRenderState.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEntityRenderState.java index 9221b8dcf4..e68b574677 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEntityRenderState.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEntityRenderState.java @@ -9,13 +9,13 @@ @Environment(EnvType.CLIENT) public class WargEntityRenderState extends BeastEntityRenderState { WargVariant variant = WargVariant.BROWN; + public WargEyeVariant eyeVariant = WargEyeVariant.BLUE; public ItemStack armor = ItemStack.EMPTY; public ItemStack saddle = ItemStack.EMPTY; + public boolean haveEmissiveEyes; + public boolean isRunning; public AnimationState idleAnimationState = new AnimationState(); public AnimationState attackAnimationState = new AnimationState(); - public AnimationState startSittingAnimationState = new AnimationState(); - public AnimationState stopSittingAnimationState = new AnimationState(); public AnimationState sittingAnimationState = new AnimationState(); - public AnimationState chargeAnimationState = new AnimationState(); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEyeVariant.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEyeVariant.java new file mode 100644 index 0000000000..e0a629b003 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargEyeVariant.java @@ -0,0 +1,24 @@ +package net.sevenstars.middleearth.entity.beasts.warg; + +import java.util.Arrays; +import java.util.Comparator; + +public enum WargEyeVariant { + BLUE(0), + ORANGE(1); + + private static final WargEyeVariant[] BY_ID = Arrays.stream(values()).sorted(Comparator.comparingInt(WargEyeVariant::getId)).toArray(WargEyeVariant[]::new); + private final int id; + + WargEyeVariant(int id) { + this.id = id; + } + + public int getId() { + return this.id; + } + + public static WargEyeVariant byId(int id) { + return BY_ID[id % BY_ID.length]; + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargModel.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargModel.java index 7babd36652..868e026411 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargModel.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargModel.java @@ -12,71 +12,33 @@ public class WargModel extends EntityModel { private final Animation runningAnimation; private final Animation walkingAnimation; - private final Animation groomingAnimation; + private final Animation idleAnimation; private final Animation bitingAnimation; private final Animation startSittingAnimation; - private final Animation standingAnimation; - private final Animation lyingAnimation; + private final Animation stopSittingAnimation; + private final Animation sittingAnimation; public WargModel(ModelPart root) { super(root); this.warg = root.getChild("root"); - this.head = warg.getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild(EntityModelPartNames.HEAD); - this.mane = warg.getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("mane"); + ModelPart body = this.warg.getChild(EntityModelPartNames.BODY); + ModelPart upperBody = body.getChild("upper_body"); + ModelPart bodyNoLegs = upperBody.getChild("body_no_legs"); + this.head = bodyNoLegs.getChild(EntityModelPartNames.HEAD); + this.mane = bodyNoLegs.getChild("body_fur").getChild("mane"); this.walkingAnimation = WargAnimations.WALK.createAnimation(root); this.runningAnimation = WargAnimations.RUN.createAnimation(root); - this.groomingAnimation = WargAnimations.GROOM.createAnimation(root); + this.idleAnimation = WargAnimations.IDLE.createAnimation(root); this.bitingAnimation = WargAnimations.BITE.createAnimation(root); - this.startSittingAnimation = WargAnimations.SIT_DOWN.createAnimation(root); - this.standingAnimation = WargAnimations.STAND_UP.createAnimation(root); - this.lyingAnimation = WargAnimations.LYING.createAnimation(root); + this.startSittingAnimation = WargAnimations.STANDING_TO_SITTING.createAnimation(root); + this.stopSittingAnimation = WargAnimations.SITTING_TO_STANDING.createAnimation(root); + this.sittingAnimation = WargAnimations.SITTING.createAnimation(root); } - public static TexturedModelData getTexturedModelData() { - ModelData modelData = getModelData(); - ModelPartData modelPartData = modelData.getRoot(); - ModelPartData root = modelPartData.getChild("root"); - ModelPartData body = root.getChild(EntityModelPartNames.BODY); - ModelPartData upper_body = body.getChild("upper_body"); - ModelPartData head = upper_body.getChild(EntityModelPartNames.HEAD); - ModelPartData mane = upper_body.getChild("mane"); - - ModelPartData right_front_leg = upper_body.getChild("right_front_leg"); - ModelPartData left_front_leg = upper_body.getChild("left_front_leg"); - ModelPartData left_back_leg = body.addChild("left_back_leg"); - ModelPartData right_back_leg = body.getChild("right_back_leg"); - - ModelPartData right_front_leg_cube = right_front_leg.addChild("right_front_leg_cube", ModelPartBuilder.create().uv(46, 50).cuboid(-2.0F, 1.0F, -1.5F, 4.0F, 12.0F, 3.0F, new Dilation(0.0F)), ModelTransform.origin(0F, 0F, 0F)); - ModelPartData left_front_leg_cube = left_front_leg.addChild("left_front_leg_cube", ModelPartBuilder.create().uv(32, 50).cuboid(-2.0F, 1.0F, -1.0F, 4.0F, 12.0F, 3.0F, new Dilation(0.0F)), ModelTransform.origin(0F, 0F, 0F)); - ModelPartData left_back_leg_cube = left_back_leg.addChild("left_back_leg_cube", ModelPartBuilder.create().uv(0, 50).cuboid(-2.7F, 1.0F, -1.5F, 5.0F, 12.0F, 3.0F, new Dilation(0.0F)), ModelTransform.origin(0F, 0F, 0F)); - ModelPartData right_back_leg_cube = right_back_leg.addChild("right_back_leg_cube", ModelPartBuilder.create().uv(16, 50).cuboid(-2.7F, 1.0F, -1.5F, 5.0F, 12.0F, 3.0F, new Dilation(0.0F)), ModelTransform.origin(0F, 0F, 0F)); - - ModelPartData head_cube = head.addChild("head_cube", ModelPartBuilder.create().uv(39, 35).cuboid(-1.3858F, -4.1138F, -5.0F, 10.0F, 6.0F, 9.0F, new Dilation(0.0F)) - .uv(60, 59).cuboid(7.6142F, 2.8862F, -2.0F, 6.0F, 1.0F, 3.0F, new Dilation(0.05F)) - .uv(37, 18).cuboid(-2.0F, 1.25F, -4.0F, 10.0F, 3.0F, 7.0F, new Dilation(0.0F)), ModelTransform.of(0F, 0F, 0F, 0.0F, 0.0F, 0F)); - - ModelPartData mane_cube = mane.addChild("mane_cube", ModelPartBuilder.create().uv(6, 73).cuboid(-9.5F, -3.0F, 0.0F, 17.0F, 6.0F, 0.0F, new Dilation(0.0F)), ModelTransform.origin(0F, 0F, 0.0F)); - - ModelPartData tail = body.addChild("tail", ModelPartBuilder.create().uv(48, 28).cuboid(-11.0F, -4.0F, -1.5F, 13.0F, 4.0F, 3.0F, new Dilation(0.0F)), ModelTransform.of(-13.3858F, -4.1138F, -0.5F, 0.0F, 0.0F, -1.5708F)); - ModelPartData body_fur = upper_body.addChild("body_fur", ModelPartBuilder.create().uv(1, 19).cuboid(-6.5F, -5.5F, -5.0F, 13.0F, 13.0F, 10.0F, new Dilation(-0.3F)), ModelTransform.origin(7.5F, -0.25F, 1.0F)); - ModelPartData main_body = upper_body.addChild("main_body", ModelPartBuilder.create().uv(0, 0).cuboid(-13.5F, -5.0F, -4.0F, 27.0F, 10.0F, 8.0F, new Dilation(0.0F)), ModelTransform.origin(0.2F, 0.0F, 1.0F)); - - ModelPartData snout = head.addChild("snout", ModelPartBuilder.create().uv(60, 51).cuboid(-9.5F, -0.5F, -1.5F, 15.0F, 5.0F, 3.0F, new Dilation(0.0F)), ModelTransform.origin(8.1142F, -1.6138F, -0.5F)); - - ModelPartData ear_right = head.getChild("ear_right"); - ModelPartData cube_r1 = ear_right.addChild("cube_r1", ModelPartBuilder.create().uv(0, 19).cuboid(0.2802F, -4.8619F, -1.032F, 3.0F, 6.0F, 1.0F, new Dilation(0.0F)), ModelTransform.of(-1.0F, 1.0F, -0.022F, 0.0F, 0.0F, -1.0036F)); - - ModelPartData ear_left = head.getChild("ear_left"); - ModelPartData cube_r2 = ear_left.addChild("cube_r2", ModelPartBuilder.create().uv(0, 1).cuboid(0.2802F, -4.8619F, 0.01F, 3.0F, 6.0F, 1.0F, new Dilation(0.0F)), ModelTransform.of(-1.0F, 1.0F, 0.0F, 0.0F, 0.0F, -1.0036F)); - - ModelPartData jaw = head.getChild("jaw"); - ModelPartData jaw_cube = jaw.addChild("jaw_cube", ModelPartBuilder.create().uv(0, 44).cuboid(-5.5F, -0.25F, -1.5F, 15.0F, 2.0F, 3.0F, new Dilation(0.0F)) - .uv(0, 66).cuboid(-5.5F, -1.25F, -1.5F, 15.0F, 1.0F, 3.0F, new Dilation(-0.05F)), ModelTransform.origin(0F, 0F, 0F)); - - ModelPartData tongue = jaw.addChild("tongue", ModelPartBuilder.create().uv(4, 85).cuboid(-1.5F, 0.1F, -1.5F, 9.0F, -0.1F, 3.0F, new Dilation(0.0F)), ModelTransform.origin(2.0F, -0.25F, 0.0F)); - return TexturedModelData.of(modelData, 128, 128); + public static TexturedModelData getTexturedModelData() { + return TexturedModelData.of(getModelData(), 128, 128); } public static ModelData getModelData() { @@ -84,21 +46,81 @@ public static ModelData getModelData() { ModelPartData modelPartData = modelData.getRoot(); ModelPartData root = modelPartData.addChild("root", ModelPartBuilder.create(), ModelTransform.of(-1.0F, 6.0F, -2.0F, 0.0F, 1.5708F, 0.0F)); ModelPartData body = root.addChild(EntityModelPartNames.BODY, ModelPartBuilder.create(), ModelTransform.origin(-2.6142F, 2.1138F, 1.5F)); - ModelPartData upper_body = body.addChild("upper_body", ModelPartBuilder.create(), ModelTransform.origin(-0.3858F, -1.1138F, -1.5F)); - ModelPartData head = upper_body.addChild(EntityModelPartNames.HEAD, ModelPartBuilder.create(), ModelTransform.of(14.3858F, -1.8862F, 1.5F, 0.0F, 0.0F, 0.2618F)); - - ModelPartData mane = upper_body.addChild("mane", ModelPartBuilder.create(), ModelTransform.origin(5.5F, -8.0F, 1.0F)); - - ModelPartData right_front_leg = upper_body.addChild("right_front_leg", ModelPartBuilder.create(), ModelTransform.origin(10.0F, 4.0F, -1.5F)); - ModelPartData left_front_leg = upper_body.addChild("left_front_leg", ModelPartBuilder.create(), ModelTransform.origin(10.0F, 4.0F, 3.0F)); - ModelPartData left_back_leg = body.addChild("left_back_leg", ModelPartBuilder.create(), ModelTransform.origin(-9.8858F, 2.8862F, 2.0F)); - ModelPartData right_back_leg = body.addChild("right_back_leg", ModelPartBuilder.create(), ModelTransform.origin(-9.8858F, 2.8862F, -3.0F)); + ModelPartData upperBody = body.addChild("upper_body", ModelPartBuilder.create(), ModelTransform.origin(-1.3858F, -1.1138F, -1.5F)); + ModelPartData bodyNoLegs = upperBody.addChild("body_no_legs", ModelPartBuilder.create(), ModelTransform.origin(7.5F, -0.25F, 0.5F)); + ModelPartData bodyFur = bodyNoLegs.addChild("body_fur", ModelPartBuilder.create().uv(0, 0).cuboid(-6.5F, -7.5F, -6.0F, 14.0F, 15.0F, 13.0F, new Dilation(-0.3F)), ModelTransform.origin(0.0F, 0.0F, 0.0F)); + bodyFur.addChild("mane", ModelPartBuilder.create().uv(54, 15).cuboid(-9.5F, -5.0F, 0.0F, 20.0F, 8.0F, 0.0F, new Dilation(0.0F)), ModelTransform.origin(-2.0F, -6.75F, 0.5F)); + bodyNoLegs.addChild("main_body", ModelPartBuilder.create().uv(0, 49).cuboid(-0.5F, -6.0F, -5.0F, 12.0F, 12.0F, 11.0F, new Dilation(0.0F)), ModelTransform.origin(-5.3F, 0.25F, 0.0F)); + + ModelPartData head = bodyNoLegs.addChild(EntityModelPartNames.HEAD, ModelPartBuilder.create() + .uv(74, 0).cuboid(-1.5F, -3.25F, -5.0F, 10.0F, 5.0F, 10.0F, new Dilation(0.0F)) + .uv(74, 0).cuboid(-1.5F, -3.25F, -5.0F, 10.0F, 5.0F, 10.0F, new Dilation(0.025F)) + .uv(54, 31).cuboid(-2.1142F, 1.6138F, -4.0F, 10.0F, 3.0F, 8.0F, new Dilation(0.0F)), ModelTransform.origin(7.25F, -2.0F, 0.5F)); + head.addChild("snout", ModelPartBuilder.create() + .uv(54, 23).cuboid(-9.5F, 0.5F, -2.5F, 15.0F, 4.0F, 4.0F, new Dilation(0.0F)) + .uv(46, 82).cuboid(-0.644F, 4.522F, -2.5F, 6.0F, 1.0F, 4.0F, new Dilation(0.05F)), ModelTransform.origin(8.0F, -1.5F, 0.5F)); + head.addChild("ear_right", ModelPartBuilder.create(), ModelTransform.of(4.0F, -2.25F, -4.478F, 0.0F, -0.8727F, 0.0F)); + head.addChild("ear_left", ModelPartBuilder.create(), ModelTransform.of(4.0F, -2.25F, 4.522F, 0.0F, 0.8727F, 0.0F)); + ModelPartData earRight = head.getChild("ear_right"); + earRight.addChild("earR_r1", ModelPartBuilder.create().uv(82, 72).cuboid(0.2802F, -4.8619F, -1.032F, 3.0F, 6.0F, 1.0F, new Dilation(0.0F)), ModelTransform.of(-1.0F, 1.0F, -0.022F, 0.0F, 0.0F, -1.0036F)); + ModelPartData earLeft = head.getChild("ear_left"); + earLeft.addChild("earL_r1", ModelPartBuilder.create().uv(82, 79).cuboid(0.2802F, -4.8619F, 0.01F, 3.0F, 6.0F, 1.0F, new Dilation(0.0F)), ModelTransform.of(-1.0F, 1.0F, 0.0F, 0.0F, 0.0F, -1.0036F)); + ModelPartData jaw = head.addChild("jaw", ModelPartBuilder.create() + .uv(54, 42).cuboid(-5.5F, -0.25F, -2.0F, 15.0F, 2.0F, 4.0F, new Dilation(0.0F)) + .uv(46, 60).cuboid(-5.564F, -1.75F, -2.0F, 15.0F, 2.0F, 4.0F, new Dilation(-0.09F)), ModelTransform.of(3.75F, 3.25F, 0.0F, 0.0F, 0.0F, 0.2618F)); + jaw.addChild("tongue", ModelPartBuilder.create().uv(8, 78).cuboid(-1.8F, 0.1F, -1.5F, 9.0F, 0.0F, 3.0F, new Dilation(0.0F)), ModelTransform.of(2.0F, -0.25F, 0.0F, 0.0F, 0.0F, -0.0349F)); + head.addChild("headmane", ModelPartBuilder.create().uv(68, 66).cuboid(-7.5F, -5.0F, 0.0F, 15.0F, 6.0F, 0.0F, new Dilation(0.0F)), ModelTransform.origin(-1.0F, -4.25F, 0.0F)); + + ModelPartData waitTail = bodyNoLegs.addChild("wait_tail", ModelPartBuilder.create().uv(0, 28).cuboid(-0.3F, -2.0F, -5.5F, 16.0F, 10.0F, 11.0F, new Dilation(0.0F)), ModelTransform.origin(-20.5F, -3.75F, 0.5F)); + waitTail.addChild("tail", ModelPartBuilder.create(), ModelTransform.of(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -0.829F)); + ModelPartData tail = waitTail.getChild("tail"); + tail.addChild("bone fluff_r1", ModelPartBuilder.create() + .uv(0, 108).cuboid(-13.0F, -5.0F, -0.75F, 15.0F, 2.0F, 1.0F, new Dilation(0.4F)) + .uv(0, 72).cuboid(-13.0F, -5.0F, -0.75F, 15.0F, 2.0F, 1.0F, new Dilation(0.0F)) + .uv(46, 49).cuboid(-18.0F, -6.0F, -2.75F, 20.0F, 6.0F, 5.0F, new Dilation(0.0F)), ModelTransform.of(-1.5979F, 4.1769F, 0.25F, 0.0F, 0.0F, 0.1745F)); + + upperBody.addChild("right_front_leg", ModelPartBuilder.create().uv(30, 72).cuboid(-2.0F, 0.0F, -2.0F, 4.0F, 13.0F, 4.0F, new Dilation(0.01F)), ModelTransform.origin(9.0F, 4.0F, -2.5F)); + upperBody.addChild("left_front_leg", ModelPartBuilder.create().uv(30, 89).cuboid(-2.0F, 0.0F, -2.5F, 4.0F, 13.0F, 4.0F, new Dilation(0.01F)), ModelTransform.origin(9.0F, 4.0F, 5.0F)); + + ModelPartData backBody = body.addChild("back_body", ModelPartBuilder.create(), ModelTransform.origin(2.3142F, -2.1138F, -0.5F)); + ModelPartData leftBackLeg = backBody.addChild("left_back_leg", ModelPartBuilder.create().uv(46, 66).cuboid(-3.5F, -1.0F, -1.0F, 7.0F, 12.0F, 4.0F, new Dilation(0.0F)), ModelTransform.origin(-14.7F, -2.0F, 3.5F)); + leftBackLeg.addChild("left_back_foot", ModelPartBuilder.create().uv(0, 78).cuboid(-2.0F, -2.0F, -1.5F, 4.0F, 12.0F, 3.0F, new Dilation(0.01F)), ModelTransform.origin(-3.2F, 10.0F, 0.5F)); + ModelPartData rightBackLeg = backBody.addChild("right_back_leg", ModelPartBuilder.create().uv(46, 66).cuboid(-4.5F, -1.0F, -4.0F, 7.0F, 12.0F, 4.0F, new Dilation(0.0F)), ModelTransform.origin(-13.7F, -2.0F, -2.5F)); + rightBackLeg.addChild("right_back_foot", ModelPartBuilder.create().uv(0, 93).cuboid(-2.0F, -2.0F, -1.5F, 4.0F, 12.0F, 3.0F, new Dilation(0.01F)), ModelTransform.origin(-4.2F, 10.0F, -1.5F)); - ModelPartData jaw = head.addChild("jaw", ModelPartBuilder.create(), ModelTransform.origin(4.1142F, 3.1362F, -0.5F)); - - ModelPartData ear_right = head.addChild("ear_right", ModelPartBuilder.create(), ModelTransform.origin(4.1142F, -2.1138F, -3.978F)); - ModelPartData ear_left = head.addChild("ear_left", ModelPartBuilder.create(), ModelTransform.origin(4.1142F, -2.1138F, 3.022F)); + return modelData; + } + public static ModelData getEmptyModelData() { + ModelData modelData = new ModelData(); + ModelPartData modelPartData = modelData.getRoot(); + ModelPartData root = modelPartData.addChild("root", ModelPartBuilder.create(), ModelTransform.of(-1.0F, 6.0F, -2.0F, 0.0F, 1.5708F, 0.0F)); + ModelPartData body = root.addChild(EntityModelPartNames.BODY, ModelPartBuilder.create(), ModelTransform.origin(-2.6142F, 2.1138F, 1.5F)); + ModelPartData upperBody = body.addChild("upper_body", ModelPartBuilder.create(), ModelTransform.origin(-1.3858F, -1.1138F, -1.5F)); + ModelPartData bodyNoLegs = upperBody.addChild("body_no_legs", ModelPartBuilder.create(), ModelTransform.origin(7.5F, -0.25F, 0.5F)); + ModelPartData bodyFur = bodyNoLegs.addChild("body_fur", ModelPartBuilder.create(), ModelTransform.origin(0.0F, 0.0F, 0.0F)); + bodyFur.addChild("mane", ModelPartBuilder.create(), ModelTransform.origin(-2.0F, -6.75F, 0.5F)); + bodyNoLegs.addChild("main_body", ModelPartBuilder.create(), ModelTransform.origin(-5.3F, 0.25F, 0.0F)); + + ModelPartData head = bodyNoLegs.addChild(EntityModelPartNames.HEAD, ModelPartBuilder.create(), ModelTransform.origin(7.25F, -2.0F, 0.5F)); + head.addChild("snout", ModelPartBuilder.create(), ModelTransform.origin(8.0F, -1.5F, 0.5F)); + head.addChild("ear_right", ModelPartBuilder.create(), ModelTransform.of(4.0F, -2.25F, -4.478F, 0.0F, -0.8727F, 0.0F)); + head.addChild("ear_left", ModelPartBuilder.create(), ModelTransform.of(4.0F, -2.25F, 4.522F, 0.0F, 0.8727F, 0.0F)); + ModelPartData jaw = head.addChild("jaw", ModelPartBuilder.create(), ModelTransform.of(3.75F, 3.25F, 0.0F, 0.0F, 0.0F, 0.2618F)); + jaw.addChild("tongue", ModelPartBuilder.create(), ModelTransform.of(2.0F, -0.25F, 0.0F, 0.0F, 0.0F, -0.0349F)); + head.addChild("headmane", ModelPartBuilder.create(), ModelTransform.origin(-1.0F, -4.25F, 0.0F)); + + ModelPartData waitTail = bodyNoLegs.addChild("wait_tail", ModelPartBuilder.create(), ModelTransform.origin(-20.5F, -3.75F, 0.5F)); + waitTail.addChild("tail", ModelPartBuilder.create(), ModelTransform.of(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, -0.829F)); + + upperBody.addChild("right_front_leg", ModelPartBuilder.create(), ModelTransform.origin(9.0F, 4.0F, -2.5F)); + upperBody.addChild("left_front_leg", ModelPartBuilder.create(), ModelTransform.origin(9.0F, 4.0F, 5.0F)); + + ModelPartData backBody = body.addChild("back_body", ModelPartBuilder.create(), ModelTransform.origin(2.3142F, -2.1138F, -0.5F)); + ModelPartData leftBackLeg = backBody.addChild("left_back_leg", ModelPartBuilder.create(), ModelTransform.origin(-14.7F, -2.0F, 3.5F)); + leftBackLeg.addChild("left_back_foot", ModelPartBuilder.create(), ModelTransform.origin(-3.2F, 10.0F, 0.5F)); + ModelPartData rightBackLeg = backBody.addChild("right_back_leg", ModelPartBuilder.create(), ModelTransform.origin(-13.7F, -2.0F, -2.5F)); + rightBackLeg.addChild("right_back_foot", ModelPartBuilder.create(), ModelTransform.origin(-4.2F, 10.0F, -1.5F)); return modelData; } @@ -107,17 +129,25 @@ public static ModelData getModelData() { public void setAngles(WargEntityRenderState state) { super.setAngles(state); - if(!state.isSprinting && !(state.conrollingPassenger != null && state.conrollingPassenger.isSprinting()) && !state.isCharging) { - this.walkingAnimation.applyWalking(state.limbSwingAnimationProgress, state.limbSwingAmplitude, 2f, 2f); + boolean running = state.isRunning || state.isSprinting + || (state.conrollingPassenger != null && state.conrollingPassenger.isSprinting()) + || state.isCharging; + + if(!running) { + float speed = 3.5f; + if(state.conrollingPassenger != null) { + speed = 2f; + } + this.walkingAnimation.applyWalking(state.limbSwingAnimationProgress, state.limbSwingAmplitude, speed, 2f); } else { - this.runningAnimation.applyWalking(state.limbSwingAnimationProgress, state.limbSwingAmplitude, 1.2f, 1.2f); + this.runningAnimation.applyWalking(state.limbSwingAnimationProgress, state.limbSwingAmplitude, 1.4f, 1.2f); } - this.groomingAnimation.apply(state.idleAnimationState, state.age); + this.idleAnimation.apply(state.idleAnimationState, state.age); this.bitingAnimation.apply(state.attackAnimationState, state.age); this.startSittingAnimation.apply(state.startSittingAnimationState, state.age); - this.standingAnimation.apply(state.stopSittingAnimationState, state.age); - this.lyingAnimation.apply(state.sittingAnimationState, state.age); + this.stopSittingAnimation.apply(state.stopSittingAnimationState, state.age); + this.sittingAnimation.apply(state.sittingAnimationState, state.age); } } \ No newline at end of file diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargRenderer.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargRenderer.java index 16a8ee1fd2..57f0991180 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargRenderer.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargRenderer.java @@ -19,6 +19,7 @@ public class WargRenderer extends MobEntityRenderer { private static final String PATH = "textures/entities/warg/"; private static final float SIZE = 1f; + private static final int LIGHT_LEVEL_EMISSIVE_EYES = 8; public WargRenderer(EntityRendererFactory.Context context) { super(context, new WargModel(context.getPart(EntityModelLayersME.WARG)), 0.8f); @@ -34,9 +35,9 @@ public WargRenderer(EntityRendererFactory.Context context) { ); this.addFeature(new WargArmorSpineFeatureRenderer(this, context.getEntityModels(), context.getEquipmentRenderer())); this.addFeature(new WargArmorSideSkullsFeatureRenderer(this, context.getEntityModels(), context.getEquipmentRenderer())); - this.addFeature(new WargSaddleFeatureRenderer(this, context.getEntityModels(), context.getEquipmentRenderer())); this.addFeature(new WargArmorFrontSkullFeatureRenderer(this, context.getEntityModels(), context.getEquipmentRenderer())); this.addFeature(new WargArmorBackSkullFeatureRenderer(this, context.getEntityModels(), context.getEquipmentRenderer())); + this.addFeature(new WargSaddleFeatureRenderer(this, context.getEntityModels(), context.getEquipmentRenderer())); } @Override @@ -66,14 +67,12 @@ public WargEntityRenderState createRenderState() { Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_gray.png")); map.put(WargVariant.LIGHT_GRAY, Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_light_gray.png")); - map.put(WargVariant.GRAY_FACE, - Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_gray_face.png")); - map.put(WargVariant.RED_BALD, - Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_red_bald.png")); + map.put(WargVariant.SNOW, + Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_snow.png")); + map.put(WargVariant.MOTTLED, + Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_mottled.png")); map.put(WargVariant.TAN, Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_tan.png")); - map.put(WargVariant.TAN_GRAY, - Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_tan_gray.png")); }); @Override @@ -86,13 +85,16 @@ public void updateRenderState(WargEntity warg, WargEntityRenderState state, floa super.updateRenderState(warg, state, f); state.variant = warg.getVariant(); + state.eyeVariant = warg.getEyeVariant(); state.isSprinting = warg.isSprinting(); + state.isRunning = warg.isRunning(); state.isCharging = warg.isCharging(); state.isTame = warg.isTame(); state.conrollingPassenger = warg.getControllingPassenger(); state.saddle = warg.getEquippedStack(EquipmentSlot.SADDLE); state.armor = warg.getBodyArmor(); + state.haveEmissiveEyes = warg.getWorld().isNight() || warg.getWorld().getLightLevel(warg.getBlockPos()) <= LIGHT_LEVEL_EMISSIVE_EYES; state.chargeAnimationState = warg.chargeAnimationState; state.startSittingAnimationState = warg.startSittingAnimationState; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargVariant.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargVariant.java index aa7afd36b3..ec2c07f365 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargVariant.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/WargVariant.java @@ -8,10 +8,9 @@ public enum WargVariant { BLACK(1), GRAY(2), LIGHT_GRAY(3), - GRAY_FACE(4), - RED_BALD(5), - TAN(6), - TAN_GRAY(7); + SNOW(4), + MOTTLED(5), + TAN(6); private static final WargVariant[] BY_ID = Arrays.stream(values()).sorted(Comparator.comparingInt(WargVariant::getId)).toArray(WargVariant[]::new); private final int id; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorBaseAddonsModel.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorBaseAddonsModel.java index dcc35b84a8..a4704c8e66 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorBaseAddonsModel.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorBaseAddonsModel.java @@ -14,7 +14,7 @@ public WargArmorBaseAddonsModel(ModelPart root) { public static TexturedModelData getTexturedModelDataSpine() { ModelData modelData = getArmorModelData(); - ModelPartData front_armor = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_armor").getChild("front_armor"); + ModelPartData front_armor = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_no_legs").getChild("body_fur").getChild("body_armor").getChild("front_armor"); ModelPartData addons_front_armor = front_armor.addChild("addons_front_armor", ModelPartBuilder.create(), ModelTransform.origin(0.0F, 0.0F, 0.0F)); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorModel.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorModel.java index ee9fcd4a4f..9505094278 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorModel.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorModel.java @@ -13,58 +13,61 @@ public WargArmorModel(ModelPart root) { super(root); this.warg = root.getChild("root"); - this.head = warg.getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild(EntityModelPartNames.HEAD); + this.head = warg.getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_no_legs").getChild(EntityModelPartNames.HEAD); } public static TexturedModelData getTexturedModelData() { ModelData modelData = getArmorModelData(); ModelPartData upper_body = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body"); - ModelPartData body_armor = upper_body.getChild("body_armor"); - ModelPartData head = upper_body.getChild(EntityModelPartNames.HEAD); + ModelPartData body_no_legs = upper_body.getChild("body_no_legs"); + ModelPartData body_armor = body_no_legs.getChild("body_fur").getChild("body_armor"); + ModelPartData head = body_no_legs.getChild(EntityModelPartNames.HEAD); ModelPartData front_armor = body_armor.getChild("front_armor"); - ModelPartData front_armor_cube = front_armor.addChild("front_armor_cube", ModelPartBuilder.create().uv(0, 0).cuboid(-7.0F, -6.4F, -5.0F, 14.0F, 11.0F, 10.0F, new Dilation(0.0F)) - .uv(49, 0).cuboid(-4.0F, -6.5F, -5.0F, 11.0F, 8.0F, 10.0F, new Dilation(0.4F)), ModelTransform.origin(0F, 0F, 0F)); + front_armor.addChild("front_armor_cube", ModelPartBuilder.create() + .uv(0, 0).cuboid(-7.0F, -6.4F, -6.0F, 14.0F, 12.0F, 12.0F, new Dilation(0.3F)) + .uv(52, 47).cuboid(-4.0F, -6.5F, -6.0F, 11.0F, 8.0F, 12.0F, new Dilation(0.5F)), ModelTransform.origin(0F, 0F, 0F)); ModelPartData left_chains = front_armor.getChild("left_chains"); - ModelPartData chains_r1 = left_chains.addChild("chains_r1", ModelPartBuilder.create().uv(102, 24).cuboid(-6.5F, -2.0F, 0.0F, 13.0F, 10.0F, 0.0F, new Dilation(0.1F)), ModelTransform.of(0.0F, 0.0F, 0.0F, 0.0007F, -0.0076F, -0.0002F)); + left_chains.addChild("chains_r1", ModelPartBuilder.create().uv(34, 69).cuboid(-6.5F, -2.0F, 1.5F, 13.0F, 10.0F, 0.0F, new Dilation(0.1F)), ModelTransform.origin(0.0F, 0.0F, 0.0F)); ModelPartData right_chains = front_armor.getChild("right_chains"); - ModelPartData chains_r2 = right_chains.addChild("chains_r2", ModelPartBuilder.create().uv(102, 24).cuboid(-6.5F, -2.0F, 0.0F, 13.0F, 10.0F, 0.0F, new Dilation(0.1F)), ModelTransform.of(0.0F, -1.0F, 0.0F, 0.0007F, 0.0076F, 0.1744F)); + right_chains.addChild("chains_r2", ModelPartBuilder.create().uv(34, 69).cuboid(-6.5F, -3.0F, -1.5F, 13.0F, 10.0F, 0.0F, new Dilation(0.1F)), ModelTransform.origin(0.0F, 0.0F, 0.0F)); - ModelPartData back_armor = body_armor.getChild("back_armor"); - ModelPartData backlegplate_r1 = back_armor.addChild("backlegplate_r1", ModelPartBuilder.create().uv(42, 62).cuboid(-8.2F, -6.5F, -5.0F, 15.0F, 9.0F, 10.0F, new Dilation(0.5F)), ModelTransform.of(0.0F, 0.0F, 0.0F, -3.1416F, 0.0F, 3.1416F)); - ModelPartData backarmor_r1 = back_armor.addChild("backarmor_r1", ModelPartBuilder.create().uv(37, 36).cuboid(-7.8F, -6.5F, -5.0F, 14.0F, 11.0F, 10.0F, new Dilation(0.0F)), ModelTransform.of(0.0F, 0.1F, 0.0F, -3.1416F, 0.0F, 3.1416F)); + ModelPartData back_armor = body_no_legs.getChild("back_armor"); + back_armor.addChild("backlegplate_r1", ModelPartBuilder.create().uv(0, 45).cuboid(-8.2F, -6.5F, -5.0F, 15.0F, 9.0F, 11.0F, new Dilation(0.7F)), ModelTransform.of(-0.5F, 0.0F, 0.5F, 3.1416F, 0.0F, -3.1416F)); + back_armor.addChild("backarmor_r1", ModelPartBuilder.create().uv(0, 24).cuboid(-7.8F, -6.5F, -5.0F, 14.0F, 10.0F, 11.0F, new Dilation(0.3F)), ModelTransform.of(-0.7F, -0.9F, 0.5F, 3.1416F, 0.0F, -3.1416F)); ModelPartData head_armor = head.getChild("head_armor"); - ModelPartData Lbone_snout_r1 = head_armor.addChild("Lbone_snout_r1", ModelPartBuilder.create().uv(101, 0).cuboid(-7.2076F, -0.8956F, -2.3986F, 11.0F, 6.0F, 0.0F, new Dilation(0.0F)), ModelTransform.of(7.4218F, 1.1634F, -4.1014F, -2.7477F, -0.1032F, -3.0907F)); - ModelPartData Lbone_snout_r2 = head_armor.addChild("Lbone_snout_r2", ModelPartBuilder.create().uv(101, 0).cuboid(-7.2076F, -0.8956F, 2.3986F, 11.0F, 6.0F, 0.0F, new Dilation(0.0F)), ModelTransform.of(7.4218F, 1.1634F, 3.1014F, 2.7477F, 0.1032F, -3.0907F)); - ModelPartData underhelmet_r1 = head_armor.addChild("underhelmet_r1", ModelPartBuilder.create().uv(5, 57).cuboid(-3.2F, -6.6623F, -3.8552F, 11.0F, 9.0F, 8.0F, new Dilation(-0.3F)), ModelTransform.of(5.859F, 2.9485F, -0.4F, -3.1416F, 0.0F, 3.1416F)); - ModelPartData helmet_r1 = head_armor.addChild("helmet_r1", ModelPartBuilder.create().uv(3, 23).cuboid(-3.2F, -6.2623F, -4.8552F, 11.0F, 13.0F, 10.0F, new Dilation(-0.1F)), ModelTransform.of(5.859F, 1.9485F, -0.4F, -3.1416F, 0.0F, 3.1416F)); + head_armor.addChild("Lbone_snout_r1", ModelPartBuilder.create().uv(60, 67).cuboid(-7.2076F, -0.8956F, -2.3986F, 11.0F, 6.0F, 0.0F, new Dilation(0.0F)), ModelTransform.of(6.4218F, 0.1634F, -4.6014F, -2.7477F, -0.1032F, -3.0907F)); + head_armor.addChild("Lbone_snout_r2", ModelPartBuilder.create().uv(60, 67).cuboid(-7.2076F, -0.8956F, 2.3986F, 11.0F, 6.0F, 0.0F, new Dilation(0.0F)), ModelTransform.of(6.4218F, 0.1634F, 3.6014F, 2.7477F, 0.1032F, -3.0907F)); + head_armor.addChild("underhelmet_r1", ModelPartBuilder.create().uv(62, 4).cuboid(-3.2F, -6.6623F, -5.3552F, 11.0F, 9.0F, 10.0F, new Dilation(-0.3F)), ModelTransform.of(5.859F, 2.9485F, -0.9F, -3.1416F, 0.0F, 3.1416F)); + head_armor.addChild("helmet_r1", ModelPartBuilder.create().uv(50, 23).cuboid(-3.2F, -6.2623F, -5.3552F, 11.0F, 13.0F, 11.0F, new Dilation(-0.1F)), ModelTransform.of(5.859F, 0.9485F, -0.4F, -3.1416F, 0.0F, 3.1416F)); ModelPartData snout2 = head_armor.getChild("snout2"); - ModelPartData snout_r1 = snout2.addChild("snout_r1", ModelPartBuilder.create().uv(36, 23).cuboid(-6.2076F, 0.1044F, 2.1F, 13.0F, 5.0F, 3.0F, new Dilation(0.1F)), ModelTransform.of(0.0F, 0.0F, 0.0F, -3.1416F, 0.0F, 3.1416F)); - ModelPartData snout_r2 = snout2.addChild("snout_r2", ModelPartBuilder.create().uv(98, 35).cuboid(-5.2076F, 3.2829F, 2.1F, 1.0F, 1.0F, 3.0F, new Dilation(0.0F)), ModelTransform.of(0.0F, -4.2F, 0.0F, -3.1416F, 0.0F, 3.1416F)); + snout2.addChild("snout_r1", ModelPartBuilder.create().uv(0, 65).cuboid(-6.2076F, 0.1044F, 1.6F, 13.0F, 5.0F, 4.0F, new Dilation(0.1F)), ModelTransform.of(0.0F, 0.0F, 0.0F, -3.1416F, 0.0F, 3.1416F)); + snout2.addChild("snout_r2", ModelPartBuilder.create().uv(52, 18).cuboid(-5.2076F, 3.2829F, 1.6F, 1.0F, 1.0F, 4.0F, new Dilation(0.0F)), ModelTransform.of(0.0F, -4.2F, 0.0F, -3.1416F, 0.0F, 3.1416F)); return TexturedModelData.of(modelData, 128, 128); } public static ModelData getArmorModelData() { - ModelData modelData = getModelData(); + ModelData modelData = getEmptyModelData(); ModelPartData upper_body = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body"); - ModelPartData head = upper_body.getChild(EntityModelPartNames.HEAD); - ModelPartData body_armor = upper_body.addChild("body_armor", ModelPartBuilder.create(), ModelTransform.origin(0.0F, -1.0F, 2.0F)); + ModelPartData body_no_legs = upper_body.getChild("body_no_legs"); + ModelPartData head = body_no_legs.getChild(EntityModelPartNames.HEAD); + ModelPartData body_armor = body_no_legs.getChild("body_fur").addChild("body_armor", ModelPartBuilder.create(), ModelTransform.origin(-6.5F, -2.75F, 1.5F)); ModelPartData front_armor = body_armor.addChild("front_armor", ModelPartBuilder.create(), ModelTransform.origin(7.8F, 1.5F, -1.0F)); ModelPartData left_chains = front_armor.addChild("left_chains", ModelPartBuilder.create(), ModelTransform.origin(0.5F, -3.5F, 5.3F)); - ModelPartData right_chains = front_armor.addChild("right_chains", ModelPartBuilder.create(), ModelTransform.of(0.5F, -2.5F, -5.3F, 0.0F, 0.0F, -0.1745F)); + ModelPartData right_chains = front_armor.addChild("right_chains", ModelPartBuilder.create(), ModelTransform.origin(0.5F, -2.5F, -5.3F)); - ModelPartData back_armor = body_armor.addChild("back_armor", ModelPartBuilder.create(), ModelTransform.origin(-7.2F, 1.5F, -1.0F)); + ModelPartData back_armor = body_no_legs.addChild("back_armor", ModelPartBuilder.create(), ModelTransform.origin(-13.7F, 1.25F, 0.5F)); - ModelPartData head_armor = head.addChild("head_armor", ModelPartBuilder.create(), ModelTransform.origin(0.0F, 0.0F, 0.0F)); + ModelPartData head_armor = head.addChild("head_armor", ModelPartBuilder.create(), ModelTransform.origin(-0.1142F, 1.8638F, 0.5F)); - ModelPartData snout2 = head_armor.addChild("snout2", ModelPartBuilder.create(), ModelTransform.origin(7.3218F, -2.3967F, 3.1F)); + ModelPartData snout2 = head_armor.addChild("snout2", ModelPartBuilder.create(), ModelTransform.origin(7.3218F, -3.3967F, 3.1F)); return modelData; } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorSideAddonsModel.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorSideAddonsModel.java index 88b36e06a0..5591ecbf24 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorSideAddonsModel.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorSideAddonsModel.java @@ -16,10 +16,10 @@ public WargArmorSideAddonsModel(ModelPart root) { public static TexturedModelData getTexturedModelDataSideSkulls() { ModelData modelData = getArmorModelData(); - ModelPartData front_armor = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_armor").getChild("front_armor"); + ModelPartData front_armor = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_no_legs").getChild("body_fur").getChild("body_armor").getChild("front_armor"); ModelPartData addons_front_armor = front_armor.addChild("addons_front_armor", ModelPartBuilder.create(), ModelTransform.origin(0.0F, 0.0F, 0.0F)); - ModelPartData skulls = addons_front_armor.addChild("skulls", ModelPartBuilder.create(), ModelTransform.origin(0.0F, 0.0F, 0.0F)); + ModelPartData skulls = addons_front_armor.addChild("skulls", ModelPartBuilder.create(), ModelTransform.origin(0.0F, 0.0F, 1.0F)); ModelPartData skull_01 = skulls.addChild("skull_01", ModelPartBuilder.create(), ModelTransform.of(0.092F, 2.1315F, 6.8137F, -2.7489F, -0.3054F, 3.1416F)); ModelPartData cube_r1 = skull_01.addChild("cube_r1", ModelPartBuilder.create().uv(0, 0).cuboid(-1.0F, -6.0F, 0.0F, 2.0F, 6.0F, 0.0F, new Dilation(0.0F)), ModelTransform.of(-2.0F, -2.0F, 0.0F, -0.7969F, -0.0393F, 0.3624F)); ModelPartData skull_hat_r1 = skull_01.addChild("skull_hat_r1", ModelPartBuilder.create().uv(24, 0).cuboid(-3.0F, -3.5F, -3.0F, 6.0F, 8.0F, 6.0F, new Dilation(-0.75F)), ModelTransform.of(-2.0F, 0.0F, 0.0F, -0.2182F, 0.2182F, 0.0F)); @@ -28,6 +28,7 @@ public static TexturedModelData getTexturedModelDataSideSkulls() { ModelPartData cube_r2 = skull_02.addChild("cube_r2", ModelPartBuilder.create().uv(0, 32).cuboid(-1.0F, -6.0F, 0.0F, 2.0F, 6.0F, 0.0F, new Dilation(0.0F)), ModelTransform.of(1.692F, -2.8685F, -1.8863F, -0.4037F, -0.2145F, -0.1479F)); ModelPartData skull_hat_r2 = skull_02.addChild("skull_hat_r2", ModelPartBuilder.create().uv(24, 32).cuboid(-3.0F, -3.5F, -3.0F, 6.0F, 9.0F, 6.0F, new Dilation(-0.75F)) .uv(0, 32).cuboid(-3.0F, -3.5F, -3.0F, 6.0F, 7.0F, 6.0F, new Dilation(-1.0F)), ModelTransform.of(1.5129F, -0.8639F, -1.0609F, 0.1309F, -0.1745F, 0.0F)); + skull_02.addChild("back_body_no_legs", ModelPartBuilder.create(), ModelTransform.origin(-4.5F, -3.0F, -6.0F)); return TexturedModelData.of(modelData, 128, 128); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorTopAddonsModel.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorTopAddonsModel.java index ef282adf67..69d712e870 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorTopAddonsModel.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargArmorTopAddonsModel.java @@ -15,7 +15,7 @@ public WargArmorTopAddonsModel(ModelPart root) { public static TexturedModelData getTexturedModelDataFront() { ModelData modelData = getArmorModelData(); - ModelPartData body_armor = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_armor"); + ModelPartData body_armor = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_no_legs").getChild("body_fur").getChild("body_armor"); ModelPartData armor_addons = body_armor.addChild("armor_addons", ModelPartBuilder.create(), ModelTransform.origin(-5.0F, -5.0F, -4.0F)); ModelPartData front_addons = armor_addons.addChild("front_addons", ModelPartBuilder.create(), ModelTransform.origin(0.0F, 0.0F, 0.0F)); @@ -31,7 +31,7 @@ public static TexturedModelData getTexturedModelDataFront() { public static TexturedModelData getTexturedModelDataBack() { ModelData modelData = getArmorModelData(); - ModelPartData body_armor = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_armor"); + ModelPartData body_armor = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_no_legs").getChild("body_fur").getChild("body_armor"); ModelPartData armor_addons = body_armor.addChild("armor_addons", ModelPartBuilder.create(), ModelTransform.origin(-5.0F, -5.0F, -4.0F)); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargEyesFeatureRenderer.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargEyesFeatureRenderer.java index ac529d1543..ddb67d0fda 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargEyesFeatureRenderer.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargEyesFeatureRenderer.java @@ -1,22 +1,43 @@ package net.sevenstars.middleearth.entity.beasts.warg.features; +import com.google.common.collect.Maps; +import net.minecraft.client.render.OverlayTexture; +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.entity.feature.FeatureRenderer; +import net.minecraft.client.render.entity.feature.FeatureRendererContext; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.util.Identifier; +import net.minecraft.util.Util; import net.sevenstars.middleearth.MiddleEarth; -import net.sevenstars.middleearth.entity.beasts.warg.WargEntity; +import net.sevenstars.middleearth.client.RenderUtil; +import net.sevenstars.middleearth.entity.beasts.warg.WargEyeVariant; import net.sevenstars.middleearth.entity.beasts.warg.WargEntityRenderState; import net.sevenstars.middleearth.entity.beasts.warg.WargModel; -import net.minecraft.client.render.RenderLayer; -import net.minecraft.client.render.entity.feature.EyesFeatureRenderer; -import net.minecraft.client.render.entity.feature.FeatureRendererContext; -import net.minecraft.util.Identifier; +import java.util.Map; + +public class WargEyesFeatureRenderer extends FeatureRenderer { + private static final String PATH = "textures/entities/warg/eyes/"; + private static final Identifier EMISSIVE_TEXTURE = Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_eyes_emissive.png"); + private static final Map LOCATION_BY_VARIANT = + Util.make(Maps.newEnumMap(WargEyeVariant.class), (map) -> { + map.put(WargEyeVariant.BLUE, + Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_eyes_blue.png")); + map.put(WargEyeVariant.ORANGE, + Identifier.of(MiddleEarth.MOD_ID, PATH + "warg_eyes_orange.png")); + }); -public class WargEyesFeatureRenderer extends EyesFeatureRenderer { - private static final RenderLayer SKIN = RenderLayer.getEyes(Identifier.of(MiddleEarth.MOD_ID, "textures/entities/warg/feature/warg_eyes.png")); public WargEyesFeatureRenderer(FeatureRendererContext featureRendererContext) { super(featureRendererContext); } @Override - public RenderLayer getEyesTexture() { - return SKIN; + public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, WargEntityRenderState state, float limbAngle, float limbDistance) { + RenderUtil.renderCutoutTexture(this.getContextModel(), matrices, vertexConsumers, + LOCATION_BY_VARIANT.get(state.eyeVariant), light, OverlayTexture.DEFAULT_UV); + + if(state.haveEmissiveEyes) { + RenderUtil.renderEmissiveTexture(this.getContextModel(), matrices, vertexConsumers, + EMISSIVE_TEXTURE, light, OverlayTexture.DEFAULT_UV); + } } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargSaddleFeatureRenderer.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargSaddleFeatureRenderer.java index 1bcd13ac4e..ffa5688756 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargSaddleFeatureRenderer.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargSaddleFeatureRenderer.java @@ -32,13 +32,8 @@ public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, if(!itemStack.isEmpty()) { VertexConsumer vertexConsumer = ItemRenderer.getArmorGlintConsumer(vertexConsumers, RenderLayer.getArmorCutoutNoCull(Identifier.of(MiddleEarth.MOD_ID, "textures/entities/warg/feature/warg_saddle.png")), itemStack.hasGlint()); - if(!hasArmor) { - matrices.scale(0.9f, 0.9f, 0.9f); - matrices.translate(0, 0.05f, 0); - } - model.setAngles(state); - model.render(matrices, vertexConsumer, light, OverlayTexture.DEFAULT_UV); + model.renderSaddle(matrices, vertexConsumer, light, OverlayTexture.DEFAULT_UV); } } } \ No newline at end of file diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargSaddleModel.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargSaddleModel.java index fb81ab4aa5..9880a5bfa4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargSaddleModel.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/beasts/warg/features/WargSaddleModel.java @@ -1,35 +1,83 @@ package net.sevenstars.middleearth.entity.beasts.warg.features; -import net.minecraft.client.render.entity.model.EntityModel; +import net.minecraft.client.render.VertexConsumer; import net.minecraft.client.model.*; import net.minecraft.client.render.entity.model.EntityModelPartNames; -import net.sevenstars.middleearth.entity.beasts.warg.WargEntityRenderState; +import net.minecraft.client.util.math.MatrixStack; import net.sevenstars.middleearth.entity.beasts.warg.WargModel; public class WargSaddleModel extends WargModel { private final ModelPart warg; private final ModelPart saddle; - private float dilation; - private float position; + private final ModelPart bodyFur; + private final ModelPart mainBody; + private final ModelPart head; + private final ModelPart waitTail; + private final ModelPart rightFrontLeg; + private final ModelPart leftFrontLeg; + private final ModelPart backBody; + public WargSaddleModel(ModelPart root) { super(root); this.warg = root.getChild("root"); - this.saddle = this.warg.getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("saddle"); - this.dilation = 0; - this.position = 0; + ModelPart body = this.warg.getChild(EntityModelPartNames.BODY); + ModelPart upperBody = body.getChild("upper_body"); + ModelPart bodyNoLegs = upperBody.getChild("body_no_legs"); + this.saddle = bodyNoLegs.getChild("saddle"); + this.bodyFur = bodyNoLegs.getChild("body_fur"); + this.mainBody = bodyNoLegs.getChild("main_body"); + this.head = bodyNoLegs.getChild(EntityModelPartNames.HEAD); + this.waitTail = bodyNoLegs.getChild("wait_tail"); + this.rightFrontLeg = upperBody.getChild("right_front_leg"); + this.leftFrontLeg = upperBody.getChild("left_front_leg"); + this.backBody = body.getChild("back_body"); } + public static TexturedModelData getTexturedModelData() { - ModelData modelData = getModelData(); - ModelPartData upperBody = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body"); + ModelData modelData = getEmptyModelData(); + ModelPartData bodyNoLegs = modelData.getRoot().getChild("root").getChild(EntityModelPartNames.BODY).getChild("upper_body").getChild("body_no_legs"); + + ModelPartData saddle = bodyNoLegs.addChild("saddle", ModelPartBuilder.create(), ModelTransform.origin(-9.5F, -3.75F, -4.5F)); + + saddle.addChild("cube_r3", ModelPartBuilder.create().uv(26, 12).cuboid(-2.5F, -0.5F, -7.0F, 11.0F, 16.0F, 11.0F, new Dilation(0.4F)), ModelTransform.of(-1.0F, -2.0F, 2.0F, 0.0F, -1.5708F, 0.0F)); - ModelPartData saddle = upperBody.addChild("saddle", ModelPartBuilder.create(), ModelTransform.origin(1.0F, -4.0F, -4.0F)); + ModelPartData cloth = saddle.addChild("cloth", ModelPartBuilder.create(), ModelTransform.origin(-1.0F, -2.0F, 2.0F)); + cloth.addChild("cube_r4", ModelPartBuilder.create().uv(4, 44).cuboid(-2.5F, -0.5F, -9.0F, 11.0F, 16.0F, 12.0F, new Dilation(0.2F)), ModelTransform.of(-3.0F, 0.25F, 0.0F, 0.0F, -1.5708F, 0.0F)); - ModelPartData cube_r1 = saddle.addChild("cube_r1", ModelPartBuilder.create().uv(23, 97).cuboid(-2.5F, -5.5F, -9.0F, 11.0F, 5.0F, 0.0F, new Dilation(0.0F)), ModelTransform.of(-3.0F, -2.0F, 2.0F, 0.0F, -1.5708F, 0.0F)); - ModelPartData cube_r2 = saddle.addChild("cube_r2", ModelPartBuilder.create().uv(70, 32).cuboid(1.5F, 10.5F, -9.0F, 3.0F, 5.0F, 3.0F, new Dilation(0.1F)) - .uv(69, 19).cuboid(-0.5F, 15.5F, -9.0F, 7.0F, 5.0F, 3.0F, new Dilation(0.1F)) - .uv(20, 8).cuboid(-2.5F, 16.5F, -9.0F, 11.0F, 16.0F, 15.0F, new Dilation(0.1F)), ModelTransform.of(-1.0F, -19.0F, 2.0F, 0.0F, -1.5708F, 0.0F)); + saddle.addChild("saddle_addons", ModelPartBuilder.create(), ModelTransform.origin(-6.0F, -2.0F, 2.0F)); return TexturedModelData.of(modelData, 128, 128); } + + public void renderSaddle(MatrixStack matrices, VertexConsumer vertices, int light, int overlay) { + boolean bodyFurVisible = this.bodyFur.visible; + boolean mainBodyVisible = this.mainBody.visible; + boolean headVisible = this.head.visible; + boolean waitTailVisible = this.waitTail.visible; + boolean rightFrontLegVisible = this.rightFrontLeg.visible; + boolean leftFrontLegVisible = this.leftFrontLeg.visible; + boolean backBodyVisible = this.backBody.visible; + + this.bodyFur.visible = false; + this.mainBody.visible = false; + this.head.visible = false; + this.waitTail.visible = false; + this.rightFrontLeg.visible = false; + this.leftFrontLeg.visible = false; + this.backBody.visible = false; + + try { + super.render(matrices, vertices, light, overlay); + } + finally { + this.bodyFur.visible = bodyFurVisible; + this.mainBody.visible = mainBodyVisible; + this.head.visible = headVisible; + this.waitTail.visible = waitTailVisible; + this.rightFrontLeg.visible = rightFrontLegVisible; + this.leftFrontLeg.visible = leftFrontLegVisible; + this.backBody.visible = backBodyVisible; + } + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/CustomBowAttackGoal.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/CustomBowAttackGoal.java index 037dddeaa0..61c2163e98 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/CustomBowAttackGoal.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/CustomBowAttackGoal.java @@ -1,5 +1,6 @@ package net.sevenstars.middleearth.entity.goals; +import net.minecraft.entity.attribute.EntityAttributes; import net.sevenstars.middleearth.item.items.weapons.ranged.CustomLongbowWeaponItem; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; @@ -120,7 +121,17 @@ public void tick() { this.backward = true; } - this.actor.getMoveControl().strafeTo(this.backward ? -0.5F : 0.5F, this.movingToLeft ? 0.5F : -0.5F); + float input = 0.5F; + if (this.actor.hasVehicle() && this.actor.getVehicle() instanceof LivingEntity mount) { + double speed = mount.getAttributeValue(EntityAttributes.MOVEMENT_SPEED); + input = (float)Math.max(0.15F, Math.min(0.3F, speed * input)); + } + + this.actor.getMoveControl().strafeTo( + this.backward ? -input : input, + this.movingToLeft ? input : -input + ); + Entity var7 = this.actor.getControllingVehicle(); if (var7 instanceof MobEntity mobEntity) { mobEntity.lookAtEntity(livingEntity, 30.0F, 30.0F); @@ -137,7 +148,7 @@ public void tick() { } else if (bl) { int i = this.actor.getItemUseTime(); ItemStack itemStack = this.actor.getMainHandStack(); - if (i >= 20) { + if (i >= 20 && !livingEntity.isInvulnerable()) { if(itemStack.getItem() instanceof CustomLongbowWeaponItem) { if(i >= 30) { this.actor.shootAt(livingEntity, 2.5f); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/NpcDoorInteractGoal.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/NpcDoorInteractGoal.java new file mode 100644 index 0000000000..6d7ec54e49 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/NpcDoorInteractGoal.java @@ -0,0 +1,20 @@ +package net.sevenstars.middleearth.entity.goals; + +import net.minecraft.block.BlockState; +import net.minecraft.entity.ai.goal.LongDoorInteractGoal; +import net.minecraft.entity.mob.MobEntity; +import net.sevenstars.middleearth.block.registration.ModBlocks; + +public class NpcDoorInteractGoal extends LongDoorInteractGoal { + public NpcDoorInteractGoal(MobEntity mob, boolean delayedClose) { + super(mob, delayedClose); + } + + @Override + protected void setDoorOpen(boolean open) { + BlockState blockState = this.mob.getWorld().getBlockState(this.doorPos); + if(blockState.isOf(ModBlocks.TREATED_STEEL_DOOR)) + return; + super.setDoorOpen(open); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/TargetPlayerDiplomacyGoal.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/TargetPlayerDiplomacyGoal.java index 4420e2547b..904fe0994d 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/TargetPlayerDiplomacyGoal.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/goals/TargetPlayerDiplomacyGoal.java @@ -23,6 +23,8 @@ public boolean canStart() { if(mob.getTarget() instanceof PlayerEntity playerEntity && !playerEntity.isCreative() && !playerEntity.isSpectator()) { try { Faction currentFaction = FactionLookup.getFactionById(mob.getWorld(), mob.getFactionIdentifier()); + if(currentFaction == null) + return true; Faction playerFaction = PlayerUtil.fetchFaction(playerEntity); if(playerFaction != null && !currentFaction.isHostileToward(playerFaction.getId())) return false; } catch (Exception e) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/NpcEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/NpcEntity.java index 83304b0f01..5e1edcb7c4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/NpcEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/NpcEntity.java @@ -1,6 +1,7 @@ package net.sevenstars.middleearth.entity.npcs; -import net.minecraft.block.entity.BedBlockEntity; +import com.mojang.serialization.Codec; +import net.minecraft.block.BlockState; import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.BlocksAttacksComponent; import net.minecraft.enchantment.EnchantmentHelper; @@ -9,6 +10,7 @@ import net.minecraft.entity.attribute.DefaultAttributeContainer; import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.entity.damage.DamageSource; +import net.minecraft.entity.damage.DamageTypes; import net.minecraft.entity.data.DataTracker; import net.minecraft.entity.data.TrackedData; import net.minecraft.entity.data.TrackedDataHandlerRegistry; @@ -31,7 +33,7 @@ import net.minecraft.loot.context.LootWorldContext; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; -import net.minecraft.registry.tag.BlockTags; +import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundEvents; import net.minecraft.storage.ReadView; @@ -41,45 +43,61 @@ import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.random.Random; -import net.minecraft.world.Difficulty; -import net.minecraft.world.LocalDifficulty; -import net.minecraft.world.World; -import net.minecraft.world.WorldAccess; +import net.minecraft.world.*; import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.block.registration.ModBlocks; +import net.sevenstars.middleearth.block.registration.ModDecorativeBlocks; import net.sevenstars.middleearth.block.special.structureManager.StructureManagerBlockEntity; import net.sevenstars.middleearth.entity.EntityAttributesME; +import net.sevenstars.middleearth.entity.TrackedDataHandlerRegistryME; import net.sevenstars.middleearth.entity.beasts.AbstractBeastEntity; +import net.sevenstars.middleearth.entity.beasts.broadhoof.BroadhoofGoatEntity; +import net.sevenstars.middleearth.entity.beasts.cave_troll.CaveTrollEntity; +import net.sevenstars.middleearth.entity.beasts.trolls.TrollEntity; import net.sevenstars.middleearth.entity.beasts.trolls.snow.SnowTrollEntity; import net.sevenstars.middleearth.entity.goals.*; -import net.sevenstars.middleearth.entity.npcs.data.NpcEntityDataHolder; -import net.sevenstars.middleearth.entity.npcs.renderer.NpcEntityTextureData; -import net.sevenstars.middleearth.entity.npcs.renderer.NpcRenderedPart; +import net.sevenstars.middleearth.entity.npcs.data.NpcData; +import net.sevenstars.middleearth.entity.npcs.data.NpcInitializationData; +import net.sevenstars.middleearth.entity.npcs.data.NpcTextureData; import net.sevenstars.middleearth.entity.npcs.initializer.NpcEntityInitializer; import net.sevenstars.middleearth.entity.npcs.initializer.NpcSpawnEggHelper; +import net.sevenstars.middleearth.entity.npcs.renderer.NpcRenderedPart; +import net.sevenstars.middleearth.entity.spider.Pouncer; import net.sevenstars.middleearth.entity.spider.larva.ShelobiteLarvaEntity; import net.sevenstars.middleearth.entity.spider.scuttler.ShelobiteScuttlerEntity; import net.sevenstars.middleearth.entity.spider.spawn.SpawnOfShelobEntity; import net.sevenstars.middleearth.exceptions.FactionIdentifierException; import net.sevenstars.middleearth.item.items.weapons.ranged.CustomLongbowWeaponItem; import net.sevenstars.middleearth.resources.StateSaverAndLoader; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.runtime.CombatArchetypeRuntimeData; import net.sevenstars.middleearth.resources.datas.common.EntityCategories; -import net.sevenstars.middleearth.resources.datas.common.FactionType; import net.sevenstars.middleearth.resources.datas.factions.Faction; import net.sevenstars.middleearth.resources.datas.factions.FactionLookup; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.LootData; import net.sevenstars.middleearth.resources.persistent_datas.PlayerData; import net.sevenstars.middleearth.utils.ItemTagsME; +import net.sevenstars.middleearth.utils.SpawnUtil; import net.sevenstars.of_beasts_and_wild_things.entity.snail.SnailEntity; import org.jetbrains.annotations.Nullable; import java.util.Objects; import java.util.Optional; -public class NpcEntity extends PassiveEntity implements EquipmentHolder, CrossbowUser { - // Data to use - NpcEntityDataHolder entityDataHolder; +public class NpcEntity extends PathAwareEntity implements EquipmentHolder, CrossbowUser { + public static class KeyStrings { + public static final String DATA = "NpcData"; + public static final String INITIALIZATION_DATA = "InitializationData"; + public static final String TEXTURE_DATA = "TextureData"; + public static final String IS_FIGHTING = "IsFighting"; + } + // [TrackedDatas] + private static final TrackedData NPC_DATA; + private static final TrackedData NPC_INITIALIZATION_DATA; + private static final TrackedData NPC_TEXTURE_DATA; + private static final TrackedData IS_FIGHTING; + private static final TrackedData USING_ITEM = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistry.INTEGER); private static final TrackedData CROSSBOW_CHARGING = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistry.BOOLEAN); @@ -107,8 +125,107 @@ public void start() { public NpcEntity(EntityType entityType, World world) { super(entityType, world); - this.entityDataHolder = new NpcEntityDataHolder(this); this.updateAttackType(); + this.navigation.setCanOpenDoors(true); + } + + @Nullable + public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty, SpawnReason spawnReason, EntityData entityData) { + this.saveSpawnReason(spawnReason); + return super.initialize(world, difficulty, spawnReason, entityData); + } + + // [IsFighting] + public void setFighting(boolean state){ + this.dataTracker.set(IS_FIGHTING, state); + } + public boolean getFighting(){ + return this.dataTracker.get(IS_FIGHTING); + } + // [IsBlocking] // TODO + public void setBlocking(boolean state){ + //this.dataTracker.set(IS_FIGHTING, state); + } + public boolean getBlocking(){ + return false; //this.dataTracker.get(IS_FIGHTING); + } + // [NpcTextureData] + public void saveNpcTextureData(NpcTextureData npcTextureData) { + this.dataTracker.set(NPC_TEXTURE_DATA, npcTextureData); + } + public NpcTextureData retrieveNpcTextureData() { + return this.dataTracker.get(NPC_TEXTURE_DATA); + } + public boolean hasTextureData(){ + return retrieveNpcTextureData().get(NpcRenderedPart.BODY) != null; + } + public boolean shouldRefreshVisuals() { + return this.retrieveNpcTextureData().needToBeRefreshed(); + } + // [NpcInitializationData] + public void saveNpcInitializationData(NpcInitializationData npcInitializationData) { + this.dataTracker.set(NPC_INITIALIZATION_DATA, npcInitializationData); + } + public NpcInitializationData retrieveNpcInitializationData() { + return this.dataTracker.get(NPC_INITIALIZATION_DATA); + } + public void prepare() { + NpcInitializationData npcInitializationData = retrieveNpcInitializationData(); + boolean result = npcInitializationData.tryToInitialize(this); + if(result) + resetInitializationData(); + } + + public void resetInitializationData() { + this.dataTracker.set(NPC_INITIALIZATION_DATA, new NpcInitializationData()); + } + // [NpcTypeIdentifier] + public void prepareNpcIdentifier(Identifier npcTypeIdentifier){ + NpcInitializationData newNpcInitializationData = this.retrieveNpcInitializationData().withType(npcTypeIdentifier); + this.saveNpcInitializationData(newNpcInitializationData); + } + // [NpcData] + public void saveNpcData(NpcData npcData) { + this.dataTracker.set(NPC_DATA, npcData); + } + public NpcData retrieveNpcData() { + return this.dataTracker.get(NPC_DATA); + } + // [NpcType] + public NpcType getNpcType(){ + return retrieveNpcData().getNpcType(); + } + public void saveNpcType(RegistryEntry npcType){ + NpcData newNpcData = this.retrieveNpcData().withType(npcType); + this.saveNpcData(newNpcData); + } + // [Loot Data] + public LootData retrieveLootData(){ + NpcType npcType = retrieveNpcData().getNpcType(); + if(npcType == null) + return null; + return npcType.getLootData(); + } + // [Category] + public EntityCategories getNpcCategory() { + return retrieveNpcData().getCategory(); + } + public void saveCategory(EntityCategories category) { + NpcData newNpcData = this.retrieveNpcData().withCategory(category); + this.saveNpcData(newNpcData); + } + // [SpawnReason] + private void saveSpawnReason(SpawnReason spawnReason) { + NpcData newNpcData = this.retrieveNpcData().withSpawnReason(spawnReason); + this.saveNpcData(newNpcData); + } + public SpawnReason getSpawnReason() { + return this.retrieveNpcData().getSpawnReason(); + } + // [StructureManager] + public void assignStructureManager(StructureManagerBlockEntity blockEntity){ + NpcData newNpcData = this.retrieveNpcData().withStructureManagerPos(blockEntity.getPos()); + this.saveNpcData(newNpcData); } public static DefaultAttributeContainer.Builder setAttributes() { @@ -123,22 +240,23 @@ protected void initGoals() { this.goalSelector.add(6, new LookAtEntityGoal(this, PlayerEntity.class, 8.0F)); this.goalSelector.add(6, new LookAroundGoal(this)); this.targetSelector.add(1, new RevengeGoal(this)); - //this.targetSelector.add(2, new TargetEvilBeastsGoal(this)); this.targetSelector.add(3, new TargetPlayerDiplomacyGoal(this)); - this.targetSelector.add(4, new TargetNPCDiplomacyGoal(this)); + this.targetSelector.add(4, new NpcDoorInteractGoal(this, true)); + this.targetSelector.add(5, new TargetNPCDiplomacyGoal(this)); this.targetSelector.add(6, new ActiveTargetGoal<>(this, SnowTrollEntity.class, true)); this.targetSelector.add(7, new ActiveTargetGoal<>(this, SpawnOfShelobEntity.class, true)); this.targetSelector.add(8, new ActiveTargetGoal<>(this, ShelobiteScuttlerEntity.class, true)); this.targetSelector.add(9, new ActiveTargetGoal<>(this, ShelobiteLarvaEntity.class, true)); + this.targetSelector.add(10, new ActiveTargetGoal<>(this, AbstractHorseEntity.class, true)); } @Override protected void initDataTracker(DataTracker.Builder builder) { - if(entityDataHolder == null) - entityDataHolder = new NpcEntityDataHolder(this); - super.initDataTracker(builder); - entityDataHolder.initDataTracker(builder); + builder.add(NPC_INITIALIZATION_DATA, new NpcInitializationData()); + builder.add(NPC_DATA, new NpcData()); + builder.add(NPC_TEXTURE_DATA, new NpcTextureData()); + builder.add(IS_FIGHTING, false); builder.add(CROSSBOW_CHARGING, false); builder.add(USING_ITEM, 0); } @@ -146,34 +264,61 @@ protected void initDataTracker(DataTracker.Builder builder) { @Override public void writeData(WriteView view) { super.writeData(view); - this.writeEntityData(view); + writeCustomData(view); } @Override - public boolean canUseRangedWeapon(RangedWeaponItem weapon) { - return true; + public void writeCustomData(WriteView view) { + super.writeCustomData(view); + view.put(KeyStrings.DATA, NpcData.CODEC, this.retrieveNpcData()); + view.put(KeyStrings.INITIALIZATION_DATA, NpcInitializationData.CODEC, this.retrieveNpcInitializationData()); + view.put(KeyStrings.TEXTURE_DATA, NpcTextureData.CODEC, this.retrieveNpcTextureData()); + view.put(KeyStrings.IS_FIGHTING, Codec.BOOL, this.getFighting()); } @Override public void readData(ReadView view) { super.readData(view); - this.readEntityData(view); + readCustomData(view); } @Override - public @Nullable ItemStack getPickBlockStack() { - return NpcSpawnEggHelper.getSpawnEgg(getWorld(), getNpcData().getId()); - } + public void readCustomData(ReadView view) { + super.readCustomData(view); + NpcData foundNpcData = view.read(KeyStrings.DATA, NpcData.CODEC).orElse(new NpcData()); + NpcInitializationData foundNpcInitializationData = view.read(KeyStrings.INITIALIZATION_DATA, NpcInitializationData.CODEC).orElse(new NpcInitializationData()); + NpcTextureData foundNpcTextureData = view.read(KeyStrings.TEXTURE_DATA, NpcTextureData.CODEC).orElse(new NpcTextureData()); + boolean isFighting = view.read(KeyStrings.IS_FIGHTING, Codec.BOOL).orElse(false); + + String npcDataId = view.read("NpcDataId", Codec.STRING).orElse(null); + if(npcDataId != null){ + foundNpcInitializationData = foundNpcInitializationData.withType(MiddleEarth.fetchId(npcDataId)); + foundNpcData = new NpcData(); + foundNpcTextureData = new NpcTextureData(); + isFighting = false; + } - private void writeEntityData(WriteView view){ - entityDataHolder.writeEntityData( view); - } + this.dataTracker.set(NPC_DATA, foundNpcData); + this.dataTracker.set(NPC_INITIALIZATION_DATA, foundNpcInitializationData); + this.dataTracker.set(NPC_TEXTURE_DATA, foundNpcTextureData); + this.dataTracker.set(IS_FIGHTING, isFighting); + + foundNpcInitializationData.tryToInitialize(this); - private void readEntityData(ReadView view) { - entityDataHolder.readEntityData(view); this.updateAttackType(); } + @Override + public boolean canUseRangedWeapon(RangedWeaponItem weapon) { + return true; + } + + @Override + public @Nullable ItemStack getPickBlockStack() { + if(getNpcType() == null) + return ItemStack.EMPTY; + return NpcSpawnEggHelper.getSpawnEgg(getWorld(), getNpcType().getId()); + } public void updateAttackType() { if (this.getWorld() != null && !this.getWorld().isClient) { this.goalSelector.remove(this.meleeAttackGoal); @@ -207,86 +352,18 @@ public void updateTargetGoals() { //} } - public static boolean canSpawn(EntityType type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) { - return world.getBlockState(pos.down()).isSolidBlock(world, pos.mutableCopy().up()) - && !world.getBlockState(pos.down()).isIn(BlockTags.LOGS); - } - //region [DATA TRANSFER] - // SETTERS - public void assignStructureManager(StructureManagerBlockEntity blockEntity){ - entityDataHolder.assignStructureManager(blockEntity); - } - public void assignBed(BedBlockEntity bedBlockEntity){ - entityDataHolder.assignBed(bedBlockEntity); - } - public void setFighting(boolean state){ - entityDataHolder.setFighting(state); - } - public void setInitializationTick() { - entityDataHolder.setInitializationTick(this.getWorld().getTickOrder()); - } - public void setBlocking(boolean blockingState){ - entityDataHolder.setBlockingState(blockingState); - } - public void setNpcData(Identifier npcDataIdentifier){ - entityDataHolder.setNpcData(npcDataIdentifier); - } - public void setNpcData(NpcData npcData){ - entityDataHolder.setNpcData(npcData); - CombatArchetypeRuntimeData combatArchetypeRuntimeData = npcData.getCombatArchetypeRuntime(); - entityDataHolder.setCombatRuntimeData(combatArchetypeRuntimeData); - entityDataHolder.setFactionId(npcData.getFactionIdentifier()); - entityDataHolder.setNpcCategory(npcData.getNpcTextureData(getWorld()).getRandomCategory().name()); - - /*switch (combatArchetypeRuntimeData.getArchetype()){ - case MELEE -> NpcBrain.setMeleeActivities((Brain) this.brain, this, (MeleeCombatArchetypeRuntimeData) combatArchetypeRuntimeData); - case RANGED -> NpcBrain.setRangedActivities((Brain) this.brain, this, (RangedCombatArchetypeRuntimeData) combatArchetypeRuntimeData); - }*/ - } - - public void setNpcTextureData(NpcEntityTextureData npcEntityTextureData){ - entityDataHolder.setNpcTextureData(npcEntityTextureData); - } - // GETTERS - public Identifier getNpcDataIdentifier(){ - NpcData npcData = entityDataHolder.getNpcData(); - if(npcData == null) - return null; - return npcData.getId(); - } - public NpcData getNpcData(){ - return entityDataHolder.getNpcData(); - } - public boolean getFighting(){ - return entityDataHolder.getFighting(); + public Identifier getNpcTypeIdentifier(){ + return retrieveNpcData().getNpcTypeId(); } public Identifier getFactionIdentifier(){ - return entityDataHolder.getFactionId(); - } - public Long getInitializationTick() { - return entityDataHolder.getInitializationTick(); - } - public CombatArchetypeRuntimeData getCombatRuntimeData(){ - return entityDataHolder.getCombatRuntimeData(); - } - @Override - public boolean isBlocking() { - return entityDataHolder.isBlocking(); - } - public EntityCategories getNpcCategory() { - return entityDataHolder.getNpcCategory(); + Faction faction = getFaction(); + if(faction == null) return null; + return faction.getId(); } public BlockPos getStructureManagerHostPos() { - return entityDataHolder.getStructureManagerPos(); - } - public BlockPos getAssignedBedPos() { - return entityDataHolder.getAssignedBedPos(); - } - - public NpcEntityTextureData getNpcTextureData() { - return this.entityDataHolder.getNpcTextureData(); + return this.retrieveNpcData().getStructureManagerPos(); } //endregion @@ -294,6 +371,8 @@ public void tryToInitializeData(){ if(Objects.equals(getBlockPos(), new BlockPos(0, 0, 0))) // 0,0,0 is what's used for commands, needs to be delayed return; + this.prepare(); + World world = getWorld(); if(world.isClient) return; @@ -305,23 +384,20 @@ public void tryToInitializeData(){ } } - public void initializeForCurrentNpcData() { - if(this.getNpcData() == null) - return; - World world = getWorld(); - if(world.isClient) - return; - if(world instanceof ServerWorld serverWorld){ - NpcEntityInitializer.initializeNpcForCurrentData(this, serverWorld, getNpcData().getId()); + @Override + public boolean isInvulnerableTo(ServerWorld world, DamageSource source) { + if (source.isOf(DamageTypes.IN_WALL) && this.hasVehicle()) { + return true; } + return super.isInvulnerableTo(world, source); } @Override protected void mobTick(ServerWorld world) { tryToInitializeData(); - CombatArchetypeRuntimeData runtimeData = getCombatRuntimeData(); - if(runtimeData != null) - runtimeData.tick(this, world); + //CombatArchetypeRuntimeData runtimeData = getCombatRuntimeData(); + // if(runtimeData != null) + // runtimeData.tick(this, world); /*Profiler profiler = Profilers.get(); profiler.push("npcBrain"); @@ -337,6 +413,23 @@ protected void mobTick(ServerWorld world) { } } + @Override + protected Vec3d getPassengerAttachmentPos(Entity passenger, EntityDimensions dimensions, float scaleFactor) { + Vec3d pos = super.getPassengerAttachmentPos(passenger, dimensions, scaleFactor); + + Vec3d offset = new Vec3d( + 0.0, + -0.3 * scaleFactor, + -0.25 * scaleFactor + ); + + return pos.add(rotatePoint(offset, this.getYaw())); + } + + private static Vec3d rotatePoint(Vec3d point, float yaw) { + return point.rotateY(-yaw * ((float)Math.PI / 180F)); + } + @Override public boolean isUsingItem() { boolean value = super.isUsingItem(); @@ -403,6 +496,7 @@ private void setupAnimationStates() { if(bowPullProgress > 0) { this.aimingState.startIfNotRunning(this.age); } + } @Override @@ -412,7 +506,7 @@ public boolean shouldControlVehicles() { @Override protected boolean couldAcceptPassenger() { - return false; + return !this.hasVehicle(); } @Override @@ -421,42 +515,71 @@ protected void initEquipment(Random random, LocalDifficulty localDifficulty) { } @Override - public void onDeath(DamageSource damageSource) { - if(getVehicle() != null && getVehicle() instanceof LivingEntity vehicleEntity){ + public void onDeath(DamageSource source) { + if(getVehicle() != null && getVehicle() instanceof LivingEntity vehicleEntity && vehicleEntity.getControllingPassenger() == this){ vehicleEntity.equipStack(EquipmentSlot.SADDLE, Items.AIR.getDefaultStack()); vehicleEntity.equipStack(EquipmentSlot.BODY, Items.AIR.getDefaultStack()); + vehicleEntity.removeAllPassengers(); if(vehicleEntity instanceof AbstractHorseEntity abstractHorseEntity){ abstractHorseEntity.setTame(false); + abstractHorseEntity.resetLoveTicks(); + abstractHorseEntity.setSprinting(false); + abstractHorseEntity.setOwner(null); } if(vehicleEntity instanceof AbstractBeastEntity abstractBeastEntity){ - abstractBeastEntity.setTameness(0); + abstractBeastEntity.resetTameness(); } } - super.onDeath(damageSource); - if(entityDataHolder.getStructureManagerPos() != null){ - StructureManagerBlockEntity.triggerDeathSignal(getStructureManagerHostPos(), this); + BlockPos structureManagerPos = getStructureManagerHostPos(); + if(structureManagerPos != null){ + StructureManagerBlockEntity.triggerDeathSignal(structureManagerPos, this); } + super.onDeath(source); } - @Override - protected void dropLoot(ServerWorld world, DamageSource damageSource, boolean causedByPlayer) { + private boolean canDropLoot(DamageSource damageSource, boolean causedByPlayer){ boolean canDropLoot = false; - if(causedByPlayer){ - if(damageSource.getAttacker() instanceof PlayerEntity player){ - PlayerData data = StateSaverAndLoader.getPlayerState(player); - if(data == null) - canDropLoot = true; - else if(data.getFaction() == null) + if(!causedByPlayer) + return canDropLoot; + if(damageSource == null) + return canDropLoot; + + if(damageSource.getAttacker() instanceof PlayerEntity player){ + PlayerData data = StateSaverAndLoader.getPlayerState(player); + if(data == null) + canDropLoot = true; + else if(data.getFaction() == null) + canDropLoot = true; + else{ + try{ + Faction faction = FactionLookup.getFactionById(getWorld(), data.getFaction()); + if(faction.isHostileToward(this.getFactionIdentifier())) + canDropLoot = true; + } catch (FactionIdentifierException e){ canDropLoot = true; - else - canDropLoot = data.getFaction().compareTo(getFactionIdentifier()) != 0; + } } } - if(!canDropLoot) + return canDropLoot; + } + + protected void drop(ServerWorld world, DamageSource damageSource) { + if(!canDropLoot(damageSource, damageSource.getAttacker() != null && damageSource.getAttacker().isPlayer())) return; + super.drop(world, damageSource); + } + + protected int getExperienceToDrop(ServerWorld world) { + LootData lootData = retrieveLootData(); + if(lootData == null) + return 1; + return lootData.getExperience(world); + } - RegistryKey lootTableRegistryKey = RegistryKey.of(RegistryKeys.LOOT_TABLE, getNpcData().getId().withPrefixedPath("entities/")); + @Override + protected void dropLoot(ServerWorld world, DamageSource damageSource, boolean causedByPlayer) { + RegistryKey lootTableRegistryKey = RegistryKey.of(RegistryKeys.LOOT_TABLE, getNpcType().getId().withPrefixedPath("entities/")); LootTable lootTable = world.getServer().getReloadableRegistries().getLootTable(lootTableRegistryKey); if (lootTable != null) { @@ -466,7 +589,7 @@ else if(data.getFaction() == null) .addOptional(LootContextParameters.ATTACKING_ENTITY, damageSource.getAttacker()) .addOptional(LootContextParameters.DIRECT_ATTACKING_ENTITY, damageSource.getSource()); PlayerEntity playerEntity = this.getAttackingPlayer(); - if (causedByPlayer && playerEntity != null) { + if (playerEntity != null) { builder = builder.add(LootContextParameters.LAST_DAMAGE_PLAYER, playerEntity).luck(playerEntity.getLuck()); } @@ -477,10 +600,11 @@ else if(data.getFaction() == null) @Override public boolean isPersistent() { - //if(getBrain() == null) return super.isPersistent(); - if(getStructureManagerHostPos() != null) return true; - //if(getBrain().getOptionalMemory(MemoryModulesME.STRUCTURE_MANAGER_HOST_POS).isPresent()) - // return getWorld().getBlockEntity(getBrain().getOptionalMemory(MemoryModulesME.STRUCTURE_MANAGER_HOST_POS).get()) != null; + BlockPos structureManagerPos = getStructureManagerHostPos(); + if(structureManagerPos == null) + return super.isPersistent(); + if(getWorld().getBlockEntity(structureManagerPos) instanceof StructureManagerBlockEntity structureManagerBlockEntity) + return true; return super.isPersistent(); } @@ -490,7 +614,10 @@ public void setCustomName(@Nullable Text name) { } protected Faction getFaction(){ - Identifier factionId = getFactionIdentifier(); + NpcData data = retrieveNpcData(); + if(data == null) + return null; + Identifier factionId = data.getFaction(); if(factionId == null) return null; try { @@ -517,12 +644,8 @@ public boolean isInAttackRange(LivingEntity entity) { @Override public boolean tryAttack(ServerWorld world, Entity target) { - if(hasVehicle() && getVehicle() instanceof AbstractBeastEntity mountEntity){ - return mountEntity.tryAttack((ServerWorld) target.getWorld(), target); - } - this.getWorld().sendEntityStatus(this, EntityStatuses.PLAY_ATTACK_SOUND); - boolean bl; + boolean targetDamaged; float damage = 1.0f; try{ Optional damageOpt = Optional.of(this.getAttributeValue(EntityAttributes.ATTACK_DAMAGE)); @@ -535,8 +658,12 @@ public boolean tryAttack(ServerWorld world, Entity target) { var bonusDamage = itemStack.getItem().getBonusAttackDamage(target, enchantmentDamage, damageSource); var finalDamage = damage + bonusDamage; - bl = target.damage(world, damageSource, finalDamage); - if (bl) { + if(hasVehicle() && getVehicle() instanceof AbstractBeastEntity mountEntity){ + mountEntity.tryAttack((ServerWorld) target.getWorld(), target); + } + + targetDamaged = target.damage(world, damageSource, finalDamage); + if (targetDamaged) { LivingEntity livingEntity; float g = this.getAttackKnockbackAgainst(target, damageSource); if (g > 0.0f && target instanceof LivingEntity) { @@ -551,8 +678,9 @@ public boolean tryAttack(ServerWorld world, Entity target) { EnchantmentHelper.onTargetDamaged(world, target, damageSource); this.onAttacking(target); this.playAttackSound(); + } - return bl; + return targetDamaged; } @Override @@ -566,10 +694,10 @@ public void tickRiding() { @Override protected Text getDefaultName() { - if(this.getNpcDataIdentifier() == null) { - return Text.translatable("npc_data."+ MiddleEarth.MOD_ID +".npc"); + if(this.getNpcTypeIdentifier() == null) { + return Text.translatable("npc_type."+ MiddleEarth.MOD_ID +".npc"); } - return Text.translatable(this.getNpcDataIdentifier().toTranslationKey("npc_data")); + return Text.translatable(this.getNpcTypeIdentifier().toTranslationKey("npc_type")); } @Override @@ -583,68 +711,17 @@ protected void takeShieldHit(ServerWorld world, LivingEntity attacker) { } } - /*public Optional getHurtBy() { - return this.getBrain() - .getOptionalRegisteredMemory(MemoryModuleType.HURT_BY) - .map(DamageSource::getAttacker) - .filter(attacker -> attacker instanceof LivingEntity) - .map(livingAttacker -> (LivingEntity)livingAttacker); - }*/ - @Override public boolean canTarget(LivingEntity target) { return shouldTarget(this, target) && super.canTarget(target); } public static boolean shouldTarget(NpcEntity npcEntity, LivingEntity target){ - if(target instanceof SnailEntity || target instanceof HostileEntity || target instanceof SnowTrollEntity) + // TODO : datadriven + if(target instanceof SnailEntity || target instanceof HostileEntity || target instanceof SnowTrollEntity || target instanceof Pouncer) + return true; + if(!npcEntity.isInSameTeam(target)){ return true; - Faction faction = npcEntity.getFaction(); - if(faction != null){ - if(target instanceof PlayerEntity player && player.canTakeDamage()){ - var playerFaction = StateSaverAndLoader.getPlayerState(player).getFaction(); - if(playerFaction == null) - return true; - if(faction.isHostileToward(playerFaction)) - return true; - } - - if(target instanceof NpcEntity targetNpcEntity){ - if(targetNpcEntity.hasVehicle() && targetNpcEntity.getVehicle() instanceof AbstractHorseEntity) - return false; - - Faction targetFaction = targetNpcEntity.getFaction(); - if(targetFaction == null || faction.isHostileToward(targetFaction.getId())) - return true; - else if(targetFaction.getFactionType() == FactionType.SUBFACTION){ - if(faction.isHostileToward(targetFaction.getParentFaction(npcEntity.getWorld()).getId())) - return true; - } - } - - if(target instanceof AbstractHorseEntity abstractHorseEntity){ - if(abstractHorseEntity.hasPassengers()){ - var entityList = abstractHorseEntity.getPassengersDeep(); - for(Entity entity : entityList){ - if(entity instanceof NpcEntity targetNpcEntity){ - Faction targetFaction = targetNpcEntity.getFaction(); - if(targetFaction == null || faction.isHostileToward(targetFaction.getId())) - return true; - else if(targetFaction.getFactionType() == FactionType.SUBFACTION){ - if(faction.isHostileToward(targetFaction.getParentFaction(npcEntity.getWorld()).getId())) - return true; - } - } - } - if(abstractHorseEntity instanceof AbstractBeastEntity abstractBeastEntity){ - if(abstractBeastEntity.getDisposition() != faction.getDisposition()){ - return true; - } - } - } - } - - // Beasts/mobs (spiders, trolls, etc, other data set.) } return false; } @@ -655,16 +732,6 @@ public int getTickAttackSpeedCooldown(){ return (int)this.getAttributes().getValue(EntityAttributes.ATTACK_SPEED); } - public boolean hasTextureData(){ - return getNpcTextureData().get(NpcRenderedPart.BODY) != null; - } - - @Nullable - @Override - public PassiveEntity createChild(ServerWorld world, PassiveEntity entity) { - return null; - } - @Override public boolean canBeLeashed() { return false; @@ -731,30 +798,46 @@ public boolean isReadyToShoot() { //return false; } - public void shootAt(LivingEntity livingEntity) { - try{ - this.shootAt(livingEntity, BowItem.getPullProgress(getItemUseTime()), 2f); - } catch (IllegalArgumentException e){ - this.shootAt(livingEntity, CustomLongbowWeaponItem.getPullProgressLongbow(getItemUseTime()), 3f); - } - } - private void shootAt(LivingEntity target, float pullProgress, float powerModifier) { - if(!isReadyToShoot()) + if (!isReadyToShoot()) return; - ItemStack shotFromItem = this.getMainHandStack(); - ItemStack itemStack2 = this.getProjectileType(shotFromItem); - PersistentProjectileEntity persistentProjectileEntity = this.createArrowProjectile(itemStack2, pullProgress, shotFromItem); - double xDifference = target.getX() - this.getX(); - double heightDifference = target.getBodyY(0.3f) - persistentProjectileEntity.getY(); - double zDifference = target.getZ() - this.getZ(); - double angle = Math.sqrt(xDifference * xDifference + zDifference * zDifference); - World var15 = this.getWorld(); - if (var15 instanceof ServerWorld serverWorld) { - ProjectileEntity.spawnWithVelocity(persistentProjectileEntity, serverWorld, itemStack2, xDifference, heightDifference + angle * (double)0.2F, zDifference, 1.6F * powerModifier, (float)(14 - serverWorld.getDifficulty().getId() * 4)); - } - - this.playSound(SoundEvents.ENTITY_ARROW_SHOOT, 1.0F, 1.0F / (this.getRandom().nextFloat() * 0.4F + 0.8F)); + + ItemStack weapon = this.getMainHandStack(); + ItemStack projectileStack = this.getProjectileType(weapon); + + PersistentProjectileEntity projectile = this.createArrowProjectile(projectileStack, pullProgress, weapon); + + double distanceX = target.getX() - this.getX(); + double distanceZ = target.getZ() - this.getZ(); + double horizontalDistance = Math.sqrt(distanceX * distanceX + distanceZ * distanceZ); + + double distanceY = target.getBodyY(0.3F) - projectile.getY(); + + float scale = this.getScale(); + float velocity = 1.6F * powerModifier; + + // Reduce the vanilla arc compensation for larger entities and faster arrows. + double arcCompensation = horizontalDistance * (0.2F / (scale * powerModifier)); + + if (this.getWorld() instanceof ServerWorld serverWorld) { + ProjectileEntity.spawnWithVelocity( + projectile, + serverWorld, + projectileStack, + distanceX, + distanceY + arcCompensation, + distanceZ, + velocity, + (float) (14 - serverWorld.getDifficulty().getId() * 4) + ); + } + + this.playSound( + SoundEvents.ENTITY_ARROW_SHOOT, + 1.0F, + 1.0F / (this.getRandom().nextFloat() * 0.4F + 0.8F) + ); + stopAiming(); } @@ -763,6 +846,13 @@ public void shootAt(LivingEntity target, float pullProgress) { this.shootAt(target, 1, pullProgress); } + public void shootAt(LivingEntity livingEntity) { + try{ + this.shootAt(livingEntity, BowItem.getPullProgress(getItemUseTime()), 2f); + } catch (IllegalArgumentException e){ + this.shootAt(livingEntity, CustomLongbowWeaponItem.getPullProgressLongbow(getItemUseTime()), 3f); + } + } public void shootCrossbowAt(LivingEntity target) { this.shootAt(target, 1, 1.25f); } @@ -781,7 +871,64 @@ public void postShoot() { this.dataTracker.set(CROSSBOW_CHARGING, false); } + @Override + protected boolean isInSameTeam(Entity other) { + if(other instanceof NpcEntity npc){ + return !isHostileToward(npc); + } + else if(other instanceof PlayerEntity player){ + return !isHostileTowardPlayer(player); + } + return !isHostileToward(other); + } + + private boolean isHostileTowardPlayer(PlayerEntity player) { + if(player.getWorld().isClient || !player.canTakeDamage()) + return false; + PlayerData playerData = StateSaverAndLoader.getPlayerState(player); + if(playerData == null || playerData.getFaction() == null) + return true; + Faction ownFaction = getFaction(); + if(ownFaction == null) + return true; + if(ownFaction.isHostileToward(playerData.getFaction())) + return true; + return false; + } + + private boolean isHostileToward(Entity other) { + if(other instanceof SnailEntity || other instanceof HostileEntity || other instanceof TrollEntity || other instanceof Pouncer) + return true; + + if(!other.hasPassengers()) + return false; + + if(other.getControllingPassenger() instanceof NpcEntity npc && isHostileToward(npc)) { + return true; + } + return false; + } + + private boolean isHostileToward(NpcEntity npc) { + Faction ownFaction = getFaction(); + if(ownFaction == null) + return true; + Identifier otherNpcFaction = npc.getFactionIdentifier(); + if(otherNpcFaction == null) + return true; + if(ownFaction.isHostileToward(otherNpcFaction)) + return true; + return false; + } + + public static boolean canSpawn(EntityType type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos blockPos, Random random) { + return SpawnUtil.canSpawn(blockPos, serverWorldAccess, spawnReason); + } + static { - NpcEntityDataHolder.initialize(); + NPC_DATA = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistryME.NPC_DATA); + NPC_INITIALIZATION_DATA = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistryME.NPC_INITIALIZATION_DATA); + NPC_TEXTURE_DATA = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistryME.NPC_TEXTURE_DATA); + IS_FIGHTING = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistry.BOOLEAN); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcData.java new file mode 100644 index 0000000000..2bd148bd0b --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcData.java @@ -0,0 +1,153 @@ +package net.sevenstars.middleearth.entity.npcs.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.entity.SpawnReason; +import net.minecraft.network.RegistryByteBuf; +import net.minecraft.network.codec.PacketCodec; +import net.minecraft.network.codec.PacketCodecs; +import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.sevenstars.middleearth.registries.DynamicRegistriesME; +import net.sevenstars.middleearth.resources.datas.common.EntityCategories; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; + +import java.util.Optional; + +public class NpcData { + public static final Codec CODEC; + public static final PacketCodec PACKET_CODEC; + + private RegistryEntry type; + private EntityCategories category; + private final SpawnReason spawnReason; + private final Optional structureManagerPos; + + static { + CODEC = RecordCodecBuilder.create((instance) -> instance.group( + DynamicRegistriesME.NPC_TYPE_CODEC.optionalFieldOf("Type").forGetter(NpcData::getOptionalType), + Codec.STRING.optionalFieldOf("Category").forGetter(NpcData::getOptionalCategory), + Codec.STRING.optionalFieldOf("SpawnReason").forGetter(NpcData::getOptionalSpawnReason), + BlockPos.CODEC.optionalFieldOf("StructureManagerPos").forGetter((data) -> data.structureManagerPos) + ).apply(instance, NpcData::new)); + + PACKET_CODEC = PacketCodec.tuple( + PacketCodecs.optional(PacketCodecs.registryEntry(DynamicRegistriesME.NPC_TYPE)), NpcData::getOptionalType, + PacketCodecs.optional(PacketCodecs.STRING), NpcData::getOptionalCategory, + PacketCodecs.optional(PacketCodecs.STRING), NpcData::getOptionalSpawnReason, + PacketCodecs.optional(BlockPos.PACKET_CODEC), NpcData::getOptionalStructureManagerPos, + NpcData::new); + } + + public NpcData(Optional> type, Optional category, Optional spawnReason, Optional structureManagerPos) { + this.type = type.orElse(null); + this.category = category.map(value -> parseEnum(EntityCategories.class, value)).orElse(null); + this.spawnReason = spawnReason.map(value -> parseEnum(SpawnReason.class, value)).orElse(null); + this.structureManagerPos = structureManagerPos == null || structureManagerPos.isEmpty() ? Optional.empty() : structureManagerPos; + } + + public NpcData(RegistryEntry type, EntityCategories category, SpawnReason spawnReason, Optional structureManagerPos) { + this.type = type; + this.category = category; + this.spawnReason = spawnReason; + this.structureManagerPos = structureManagerPos == null || structureManagerPos.isEmpty() ? Optional.empty() : structureManagerPos; + } + + public NpcData() { + this.type = null; + this.category = null; + this.spawnReason = null; + this.structureManagerPos = Optional.empty(); + } + + // [BUILDERS] + public NpcData withType(RegistryEntry type) { + return new NpcData(type, category, spawnReason, structureManagerPos); + } + + public NpcData withCategory(EntityCategories category) { + return new NpcData(this.type, category, this.spawnReason, this.structureManagerPos); + } + + public NpcData withSpawnReason(SpawnReason spawnReason) { + return new NpcData(this.type, this.category, spawnReason, this.structureManagerPos); + } + + public NpcData withStructureManagerPos(BlockPos structureManagerPos) { + return new NpcData(this.type, this.category, this.spawnReason, Optional.of(structureManagerPos)); + } + public NpcData withType(World world, Identifier npcDataIdentifier) { + if(npcDataIdentifier == null || world == null) + return this; + + Registry registry = world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC_TYPE); + NpcType npcType = registry.get(npcDataIdentifier); + if(npcType == null) + return this; + return this.withType(registry.getEntry(npcType)); + } + + public Identifier getNpcTypeId() { + if(type == null){ + return null; + } + return type.getKey() + .map(RegistryKey::getValue) + .orElse(null); + } + + public Identifier getFaction() { + if(type == null) + return null; + return type.value().getFactionIdentifier(); + } + + + public EntityCategories getCategory() { + return category; + } + + public SpawnReason getSpawnReason() { + return spawnReason; + } + + public NpcType getNpcType() { + if(type == null) + return null; + return type.value(); + } + + private Optional> getOptionalType() { + return type != null ? Optional.of(type) : Optional.empty(); + } + + + private Optional getOptionalCategory() { + return category != null ? Optional.of(category.name()) : Optional.empty(); + } + private Optional getOptionalSpawnReason() { + return spawnReason != null ? Optional.of(spawnReason.name()) : Optional.empty(); + } + + private Optional getOptionalStructureManagerPos() { + return structureManagerPos; + } + + public BlockPos getStructureManagerPos() { + return structureManagerPos.orElse(null); + } + + + private static > E parseEnum(Class type, String value) { + try { + return Enum.valueOf(type, value); + } catch (IllegalArgumentException e) { + return null; + } + } + +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcEntityDataHolder.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcEntityDataHolder.java deleted file mode 100644 index 43b2f41b67..0000000000 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcEntityDataHolder.java +++ /dev/null @@ -1,285 +0,0 @@ -package net.sevenstars.middleearth.entity.npcs.data; - -import com.mojang.serialization.Codec; -import net.minecraft.block.Block; -import net.minecraft.block.entity.BedBlockEntity; -import net.minecraft.entity.ai.brain.Brain; -import net.minecraft.entity.data.DataTracker; -import net.minecraft.entity.data.TrackedData; -import net.minecraft.entity.data.TrackedDataHandlerRegistry; -import net.minecraft.nbt.NbtCompound; -import net.minecraft.storage.ReadView; -import net.minecraft.storage.WriteView; -import net.minecraft.util.Identifier; -import net.minecraft.util.math.BlockPos; -import net.sevenstars.middleearth.block.special.structureManager.StructureManagerBlockEntity; -import net.sevenstars.middleearth.entity.TrackedDataHandlerRegistryME; -import net.sevenstars.middleearth.entity.ai.brain.MemoryModulesME; -import net.sevenstars.middleearth.entity.npcs.NpcEntity; -import net.sevenstars.middleearth.entity.npcs.renderer.NpcEntityTextureData; -import net.sevenstars.middleearth.registries.DynamicRegistriesME; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.CombatArchetypeData; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.RangedCombatArchetypeData; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.runtime.CombatArchetypeRuntimeData; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.runtime.MeleeCombatArchetypeRuntimeData; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.runtime.RangedCombatArchetypeRuntimeData; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.utils.CombatArchetypeDataUtil; -import net.sevenstars.middleearth.resources.datas.common.EntityCategories; -import net.sevenstars.middleearth.resources.datas.common.RaceType; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.races.Race; -import net.sevenstars.middleearth.resources.datas.races.RaceLookup; - -import java.util.Optional; - -public class NpcEntityDataHolder { - NpcEntity owner; - - private static final TrackedData CATEGORY; - private static final TrackedData FACTION_ID; - private static final TrackedData NPC_DATA_ID; - private static final TrackedData INITIALIZATION_TICK; - private static final TrackedData TEXTURE_DATA; - private static final TrackedData> STRUCTURE_MANAGER_POS; - private static final TrackedData> BED_POS; - private static final TrackedData FIGHTING; - private static final TrackedData BLOCKING; - private static final TrackedData COMBAT_RUNTIME_DATA; - - public NpcEntityDataHolder(NpcEntity npcEntity) { - owner = npcEntity; - } - - public static void initialize() { - // This calls the { static } block - } - - public void initDataTracker(DataTracker.Builder builder) { - builder.add(INITIALIZATION_TICK, 0l); - builder.add(CATEGORY, ""); - builder.add(FACTION_ID, ""); - builder.add(NPC_DATA_ID, ""); - builder.add(TEXTURE_DATA, new NpcEntityTextureData()); - builder.add(STRUCTURE_MANAGER_POS, Optional.empty()); - builder.add(BED_POS, Optional.empty()); - builder.add(FIGHTING, false); - builder.add(BLOCKING, false); - builder.add(COMBAT_RUNTIME_DATA, new NbtCompound()); - assignStructureManager(null); - assignBed(null); - } - - public void assignStructureManager(StructureManagerBlockEntity blockEntity) { - if(owner == null) return; - boolean hasStructure = blockEntity != null; - if(hasStructure) this.owner.getDataTracker().set(STRUCTURE_MANAGER_POS, Optional.of(blockEntity.getPos())); - } - - public void assignBed(BedBlockEntity bedBlockEntity) { - if(owner == null ) return; - if(bedBlockEntity != null) { - this.owner.getDataTracker().set(BED_POS, Optional.of(bedBlockEntity.getPos())); - } - } - - public void writeEntityData(WriteView view) { - DataTracker dataTracker = owner.getDataTracker(); - - view.put("NpcDataId", Codec.STRING, dataTracker.get(NPC_DATA_ID)); - view.put("FactionId", Codec.STRING, dataTracker.get(FACTION_ID)); - view.put("EntityCategory", Codec.STRING, dataTracker.get(CATEGORY)); - view.put("NpcTextureData", NpcEntityTextureData.CODEC, dataTracker.get(TEXTURE_DATA)); - view.put("StructureManagerPos", BlockPos.CODEC, dataTracker.get(STRUCTURE_MANAGER_POS).orElse(new BlockPos(0, 0, 0))); - view.put("BedPos", BlockPos.CODEC, dataTracker.get(BED_POS).orElse(new BlockPos(0, 0, 0))); - view.put("InitializationTick", Codec.LONG, dataTracker.get(INITIALIZATION_TICK)); - view.put("CombatRuntimeData", NbtCompound.CODEC, dataTracker.get(COMBAT_RUNTIME_DATA)); - } - - public void readEntityData(ReadView view) { - DataTracker dataTracker = owner.getDataTracker(); - - view.read("NpcDataId", Codec.STRING) - .ifPresent(this::setNpcData); - view.read("FactionId", Identifier.CODEC) - .ifPresent(this::setFactionId); - view.read("EntityCategory", Codec.STRING) - .ifPresent(this::setNpcCategory); - view.read("NpcTextureData", NpcEntityTextureData.CODEC) - .ifPresent(this::setNpcTextureData); - view.read("StructureManagerPos", BlockPos.CODEC) - .ifPresent(this::setStructureManagerPos); - view.read("BedPos", BlockPos.CODEC) - .ifPresent(this::setBedPos); - view.read("InitializationTick", Codec.LONG) - .ifPresent(x -> dataTracker.set(INITIALIZATION_TICK, x)); - view.read("CombatRuntimeData", NbtCompound.CODEC) - .ifPresent(this::setCombatRuntimeData); - - owner.tryToInitializeData(); - - if(owner.isAiDisabled() && getNpcDataId() != null){ - owner.initializeForCurrentNpcData(); - } - } - - public void setFactionId(Identifier identifier) { - if(identifier == null) - return; - this.owner.getDataTracker().set(FACTION_ID, identifier.toString()); - } - - public Identifier getFactionId() { - return Identifier.of(this.owner.getDataTracker().get(FACTION_ID)); - } - - public void setNpcData(Identifier id) { - setNpcData(id.toString()); - } - - public void setNpcData(NpcData npcData) { - setNpcData(npcData.getId().toString()); - } - - public void setNpcData(String value) { - if(value == null || value.isEmpty()) - return; - this.owner.getDataTracker().set(NPC_DATA_ID, value); - } - - public Identifier getNpcDataId() { - return Identifier.of(this.owner.getDataTracker().get(NPC_DATA_ID)); - } - - public NpcData getNpcData() { - var id = getNpcDataId(); - if(id == null) - return null; - return owner.getWorld().getRegistryManager().getOrThrow(DynamicRegistriesME.NPC).get(id); - } - - protected RaceType getRaceType(){ - if(getNpcDataId() == null || getNpcData() == null) - return null; - Race race = RaceLookup.getRace(owner.getWorld(), getNpcData().getRace()); - if(race == null) - return null; - return race.getRaceType(); - } - - public void setNpcCategory(String entityCategory) { - if(entityCategory.isEmpty()) - return; - this.owner.getDataTracker().set(CATEGORY, entityCategory); - } - - public void setNpcTextureData(NpcEntityTextureData npcEntityTextureData) { - if(npcEntityTextureData == null) - return; - this.owner.getDataTracker().set(TEXTURE_DATA, npcEntityTextureData); - } - - public void setStructureManagerPos(BlockPos blockPos) { - if(blockPos == null) this.owner.getDataTracker().set(STRUCTURE_MANAGER_POS, Optional.empty()); - else this.owner.getDataTracker().set(STRUCTURE_MANAGER_POS, Optional.of(blockPos)); - } - - public void setBedPos(BlockPos blockPos) { - if(blockPos == null) this.owner.getDataTracker().set(BED_POS, Optional.empty()); - else this.owner.getDataTracker().set(BED_POS, Optional.of(blockPos)); - } - - public void setCombatRuntimeData(CombatArchetypeRuntimeData runtimeData){ - setCombatRuntimeData(runtimeData.getNbt()); - } - - public void setCombatRuntimeData(NbtCompound nbt){ - this.owner.getDataTracker().set(COMBAT_RUNTIME_DATA, nbt); - } - public CombatArchetypeRuntimeData getCombatRuntimeData(){ - NbtCompound nbt = this.owner.getDataTracker().get(COMBAT_RUNTIME_DATA); - return buildCombatRuntimeData(nbt); - } - public CombatArchetypeRuntimeData buildCombatRuntimeData(NbtCompound nbt){ - CombatArchetypeData dataFound = CombatArchetypeDataUtil.create(nbt.getCompoundOrEmpty("data")); - if(dataFound == null) - return null; - CombatArchetypeRuntimeData combatArchetype = switch (dataFound.getArchetype()){ - case MELEE -> new MeleeCombatArchetypeRuntimeData((MeleeCombatArchetypeData) dataFound); - case RANGED -> new RangedCombatArchetypeRuntimeData((RangedCombatArchetypeData) dataFound); - case HYBRID -> null; - case SHIELDED -> null; - case LANCERS -> null; - case SENTINEL -> null; - case BRAWLER -> null; - case BEAST_RIDER -> null; - }; - - return combatArchetype; - } - - public void setFighting(boolean state){ - this.owner.getDataTracker().set(FIGHTING, state); - } - - public boolean getFighting(){ - return this.owner.getDataTracker().get(FIGHTING); - } - - public void setInitializationTick(long tick) { - this.owner.getDataTracker().set(INITIALIZATION_TICK, tick); - } - - public Long getInitializationTick() { - return this.owner.getDataTracker().get(INITIALIZATION_TICK); - } - public void setBlockingState(boolean state) { - var blockingItem = this.owner.getBlockingItem(); - if(blockingItem == null){ - return; - } - this.owner.getDataTracker().set(BLOCKING, state); - this.owner.getOffHandStack().getUseAction(); - } - public boolean isBlocking() { - return this.owner.getDataTracker().get(BLOCKING); - } - public EntityCategories getNpcCategory() { - var category = this.owner.getDataTracker().get(CATEGORY); - if(category == null || category.isEmpty()) - return null; - return EntityCategories.valueOf(category); - } - public BlockPos getStructureManagerPos() { - return this.owner.getDataTracker().get(STRUCTURE_MANAGER_POS).orElse(null); - /*if(this.owner.getBrain().getOptionalMemory(MemoryModulesME.STRUCTURE_MANAGER_HOST_POS).isPresent()){ - return this.owner.getBrain().getOptionalMemory(MemoryModulesME.STRUCTURE_MANAGER_HOST_POS).get(); - } - return null;*/ - } - - public BlockPos getAssignedBedPos() { - return this.owner.getDataTracker().get(BED_POS).orElse(null); - /*if(this.owner.getBrain().getOptionalMemory(MemoryModulesME.ASSIGNED_BED_POS).isPresent()){ - return this.owner.getBrain().getOptionalMemory(MemoryModulesME.ASSIGNED_BED_POS).get(); - } - return null;*/ - } - - public NpcEntityTextureData getNpcTextureData() { - return this.owner.getDataTracker().get(TEXTURE_DATA); - } - - static { - INITIALIZATION_TICK = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistryME.INITIALIZATION_TICK); - FACTION_ID = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistryME.FACTION_ID); - NPC_DATA_ID = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistryME.NPC_DATA_ID); - CATEGORY = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistryME.CATEGORY); - TEXTURE_DATA = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistryME.NPC_ENTITY_TEXTURE_DATA); - STRUCTURE_MANAGER_POS = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistry.OPTIONAL_BLOCK_POS); - BED_POS = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistry.OPTIONAL_BLOCK_POS); - FIGHTING = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistry.BOOLEAN); - BLOCKING = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistry.BOOLEAN); - COMBAT_RUNTIME_DATA = DataTracker.registerData(NpcEntity.class, TrackedDataHandlerRegistry.NBT_COMPOUND); - } -} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcInitializationData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcInitializationData.java new file mode 100644 index 0000000000..3e3b06a22e --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcInitializationData.java @@ -0,0 +1,106 @@ +package net.sevenstars.middleearth.entity.npcs.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.network.RegistryByteBuf; +import net.minecraft.network.codec.PacketCodec; +import net.minecraft.network.codec.PacketCodecs; +import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.util.Identifier; +import net.minecraft.world.World; +import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.entity.npcs.NpcEntity; +import net.sevenstars.middleearth.registries.DynamicRegistriesME; +import net.sevenstars.middleearth.resources.datas.common.EntityCategories; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; + +import java.util.List; +import java.util.Optional; +import java.util.Random; + +public class NpcInitializationData { + public static final Codec CODEC; + public static final PacketCodec PACKET_CODEC; + + private Identifier type; + private Boolean isRandom; + + static { + CODEC = RecordCodecBuilder.create((instance) -> instance.group( + Codec.STRING.optionalFieldOf("Type").forGetter(NpcInitializationData::getOptionalType), + Codec.BOOL.optionalFieldOf("IsRandom").forGetter(NpcInitializationData::getOptionalRandom) + ).apply(instance, NpcInitializationData::new)); + + PACKET_CODEC = PacketCodec.tuple( + PacketCodecs.optional(PacketCodecs.STRING), NpcInitializationData::getOptionalType, + PacketCodecs.optional(PacketCodecs.BOOLEAN), NpcInitializationData::getOptionalRandom, + NpcInitializationData::new); + } + + + public NpcInitializationData(Optional type, Optional isRandom) { + this.type = type.map(MiddleEarth::fetchId).orElse(null); + this.isRandom = isRandom == null || isRandom.isEmpty() || isRandom.get() == false ? null : isRandom.get(); + } + + public NpcInitializationData(Identifier type, Boolean isRandom) { + this.type = type; + this.isRandom = isRandom; + } + + public NpcInitializationData() { + this.type = null; + this.isRandom = null; + } + + public NpcInitializationData withType(Identifier newType) { + return new NpcInitializationData(newType, this.isRandom); + } + + + private Optional getOptionalType() { + return type != null ? Optional.of(type.toString()) : Optional.empty(); + } + + + private Optional getOptionalRandom() { + return isRandom != null ? Optional.of(isRandom) : Optional.empty(); + } + + + public boolean tryToInitialize(NpcEntity entity) { + World world = entity.getWorld(); + if(world == null) + return false; + + if(isRandom != null && isRandom){ + Registry registry = world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC_TYPE); + List> entryList = registry.streamKeys().toList(); + Random random = new Random(); + RegistryKey randomKey = entryList.get(random.nextInt(entryList.size())); + this.type = randomKey.getValue(); + this.isRandom = false; + } + + if(type != null){ + Registry registry = world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC_TYPE); + NpcType npcType = registry.get(type); + if(npcType == null) + return false; + RegistryEntry entry = registry.getEntry(npcType); + this.type = null; + EntityCategories category = null; + if(!npcType.hasCategory(world, category)) + category = npcType.getNpcTextureData(world).getRandomCategory(); + + entity.saveCategory(category); + entity.saveNpcType(entry); + + return true; + } + + return false; + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/renderer/NpcEntityTextureData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcTextureData.java similarity index 83% rename from middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/renderer/NpcEntityTextureData.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcTextureData.java index d85e9ee556..0e0f594d3a 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/renderer/NpcEntityTextureData.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/data/NpcTextureData.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.entity.npcs.renderer; +package net.sevenstars.middleearth.entity.npcs.data; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; @@ -8,9 +8,10 @@ import net.minecraft.network.codec.PacketCodecs; import net.minecraft.util.Identifier; import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.entity.npcs.renderer.NpcRenderedPart; import net.sevenstars.middleearth.resources.datas.texture_presets.SimplifiedTexturePreset; -public class NpcEntityTextureData { +public class NpcTextureData { private Identifier simplifiedSkin; private Identifier simplifiedEar; private Identifier simplifiedFeet; @@ -36,14 +37,14 @@ public class NpcEntityTextureData { private Boolean eyeIsEmissive; - public static final Codec CODEC = RecordCodecBuilder.create((instance) -> instance.group( - NbtCompound.CODEC.fieldOf("dynamic").forGetter(NpcEntityTextureData::writeDynamic), - NbtCompound.CODEC.fieldOf("simplified").forGetter(NpcEntityTextureData::writeSimplified) - ).apply(instance, NpcEntityTextureData::new)); + public static final Codec CODEC = RecordCodecBuilder.create((instance) -> instance.group( + NbtCompound.CODEC.fieldOf("dynamic").forGetter(NpcTextureData::writeDynamic), + NbtCompound.CODEC.fieldOf("simplified").forGetter(NpcTextureData::writeSimplified) + ).apply(instance, NpcTextureData::new)); - public static final PacketCodec PACKET_CODEC; + public static final PacketCodec PACKET_CODEC; - public NpcEntityTextureData(NbtCompound dynamic, NbtCompound simplified) + public NpcTextureData(NbtCompound dynamic, NbtCompound simplified) { this.simplifiedSkin = MiddleEarth.fetchId(simplified.getString("skin", null)); this.simplifiedEar = MiddleEarth.fetchId(simplified.getString("ear", null)); @@ -138,7 +139,7 @@ private NbtCompound writeDynamic() { return nbt; } - public NpcEntityTextureData() { + public NpcTextureData() { this.eyeIsEmissive = false; } @@ -153,63 +154,63 @@ public void withSimplifiedPreset(SimplifiedTexturePreset preset) { this.simplifiedNose = preset.nose; } - public NpcEntityTextureData withSkinTexture(Identifier texture){ + public NpcTextureData withSkinTexture(Identifier texture){ this.bodyTexture = texture; return this; } - public NpcEntityTextureData withHeadTexture(Identifier texture){ + public NpcTextureData withHeadTexture(Identifier texture){ this.headTexture = texture; return this; } - public NpcEntityTextureData withFeetTexture(Identifier texture){ + public NpcTextureData withFeetTexture(Identifier texture){ this.feetTexture = texture; return this; } - public NpcEntityTextureData withScarTexture(Identifier texture){ + public NpcTextureData withScarTexture(Identifier texture){ this.scarTexture = texture; return this; } - public NpcEntityTextureData withEarTexture(Identifier texture){ + public NpcTextureData withEarTexture(Identifier texture){ this.earTexture = texture; return this; } - public NpcEntityTextureData withNoseTexture(Identifier texture){ + public NpcTextureData withNoseTexture(Identifier texture){ this.noseTexture = texture; return this; } - public NpcEntityTextureData withEyeTexture(Identifier eyeTexture, Identifier eyeEmissiveTexture, Boolean isEmissive){ + public NpcTextureData withEyeTexture(Identifier eyeTexture, Identifier eyeEmissiveTexture, Boolean isEmissive){ this.eyeTexture = eyeTexture; this.eyeEmissiveTexture = eyeEmissiveTexture; this.eyeIsEmissive = isEmissive; return this; } - public NpcEntityTextureData withHairTexture(Identifier texture){ + public NpcTextureData withHairTexture(Identifier texture){ this.hairTexture = texture; return this; } - public NpcEntityTextureData withHairAddonTexture(Identifier texture){ + public NpcTextureData withHairAddonTexture(Identifier texture){ this.hairAddonTexture = texture; return this; } - public NpcEntityTextureData withEyebrowTexture(Identifier texture){ + public NpcTextureData withEyebrowTexture(Identifier texture){ this.eyebrowTexture = texture; return this; } - public NpcEntityTextureData withBeardTexture(Identifier texture){ + public NpcTextureData withBeardTexture(Identifier texture){ this.beardTexture = texture; return this; } - public NpcEntityTextureData withBeardAddonTexture(Identifier texture){ + public NpcTextureData withBeardAddonTexture(Identifier texture){ this.beardAddonTexture = texture; return this; } - public NpcEntityTextureData withClothingTexture(Identifier textureBase, Identifier textureOver, Identifier textureExtra){ + public NpcTextureData withClothingTexture(Identifier textureBase, Identifier textureOver, Identifier textureExtra){ this.clothingBaseTexture = textureBase; this.clothingOverTexture = textureOver; this.clothingExtraTexture = textureExtra; @@ -243,9 +244,9 @@ public Boolean isEyeEmissive() { } static { PACKET_CODEC = PacketCodec.tuple( - PacketCodecs.NBT_COMPOUND, NpcEntityTextureData::writeDynamic, - PacketCodecs.NBT_COMPOUND, NpcEntityTextureData::writeSimplified, - NpcEntityTextureData::new); + PacketCodecs.NBT_COMPOUND, NpcTextureData::writeDynamic, + PacketCodecs.NBT_COMPOUND, NpcTextureData::writeSimplified, + NpcTextureData::new); } public boolean needToBeRefreshed() { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityBuilder.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityBuilder.java index 75dba7c4ca..ab129cac49 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityBuilder.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityBuilder.java @@ -5,7 +5,7 @@ import net.minecraft.world.World; import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.entity.npcs.NpcEntity; -import net.sevenstars.middleearth.resources.datas.npcs.NpcDataLookup; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcTypeLookup; import org.jetbrains.annotations.Nullable; public class NpcEntityBuilder { @@ -19,8 +19,8 @@ public NpcEntityBuilder(World world, @Nullable BlockPos pos){ this.entity.setPosition(pos.toCenterPos()); } - public NpcEntityBuilder withNpcData(Identifier identifier){ - this.entity.setNpcData(NpcDataLookup.getNpcData(this.world, identifier)); + public NpcEntityBuilder withNpcType(Identifier identifier) { + this.entity.prepareNpcIdentifier(identifier); return this; } @@ -33,4 +33,5 @@ public NpcEntity forceBuild() { this.entity.tryToInitializeData(); return this.entity; } + } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializer.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializer.java index c94f4a3e05..c6d49b9f82 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializer.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializer.java @@ -5,15 +5,11 @@ import net.minecraft.entity.EquipmentHolder; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.SpawnReason; -import net.minecraft.entity.attribute.EntityAttribute; -import net.minecraft.entity.attribute.EntityAttributeInstance; -import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.entity.passive.AbstractHorseEntity; import net.minecraft.entity.passive.HorseEntity; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.registry.DynamicRegistryManager; -import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.entry.RegistryEntry; @@ -30,12 +26,10 @@ import net.sevenstars.middleearth.registries.DynamicRegistriesME; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventDataLookup; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; import java.util.List; -import java.util.Objects; import java.util.Optional; -import java.util.Random; public class NpcEntityInitializer { public static final Identifier RANDOM = MiddleEarth.of("full_random"); @@ -45,67 +39,36 @@ public static void initializeNpcEntity(ServerWorld serverWorld, NpcEntity npcEnt } private static void initializeForServer(ServerWorld serverWorld, NpcEntity npcEntity){ - Identifier currentNpcDataId = npcEntity.getNpcDataIdentifier(); - - if(Objects.equals(currentNpcDataId, RANDOM)){ - var ids = serverWorld.getRegistryManager().getOptional(DynamicRegistriesME.NPC).get().getIds(); - - Random random = new Random(); - currentNpcDataId = ids.stream().toList().get(random.nextInt(ids.size())); - } else if(!NpcEntityInitializerUtil.characterIdentifierExist(serverWorld, currentNpcDataId)){ + Identifier npcTypeId = npcEntity.getNpcTypeIdentifier(); + if(!NpcEntityInitializerUtil.characterIdentifierExist(serverWorld, npcTypeId)) + { BiomeEventData.ContextualizedBiomeData contextualizedBiomeData = null; try{ contextualizedBiomeData = findContextualizedNpcData(serverWorld, npcEntity); - currentNpcDataId = contextualizedBiomeData.npcData().getId(); + if(contextualizedBiomeData == null) + { + npcEntity.discard(); + return; + } + NpcType npcType = contextualizedBiomeData.npcType(); + npcTypeId = npcType.getId(); } catch (Exception e){ + MiddleEarth.LOGGER.logError("NpcEntity initializer failed : ", e); npcEntity.discard(); return; } - - if(contextualizedBiomeData.hasMount() != null && !npcEntity.hasVehicle()) { - generateMountData(serverWorld, contextualizedBiomeData, npcEntity); - } } - NpcGenerator.generateCharacterTextures(serverWorld, currentNpcDataId, npcEntity); + npcEntity.prepareNpcIdentifier(npcTypeId); + npcEntity.prepare(); + NpcGenerator.generateCharacterTextures(serverWorld, npcEntity); npcEntity.updateTargetGoals(); - npcEntity.setInitializationTick(); } - - private static void generateMountData(ServerWorld serverWorld, BiomeEventData.ContextualizedBiomeData contextualizedBiomeData, NpcEntity npcEntity) { - // Assign mount if needed - if(contextualizedBiomeData.hasMount() != null && !npcEntity.hasVehicle()){ - Entity mount = contextualizedBiomeData.hasMount().spawn(serverWorld, npcEntity.getBlockPos(), SpawnReason.JOCKEY); - if(mount instanceof HorseEntity horseEntity) - horseEntity.initialize(serverWorld, serverWorld.getLocalDifficulty(npcEntity.getBlockPos()), SpawnReason.JOCKEY, null); - else if(mount instanceof AbstractBeastEntity beastEntity){ - beastEntity.initialize(serverWorld, serverWorld.getLocalDifficulty(npcEntity.getBlockPos()), SpawnReason.JOCKEY, null); - } - - if(mount instanceof AbstractHorseEntity abstractHorseEntity){ - abstractHorseEntity.setOwner(npcEntity); - abstractHorseEntity.setTame(true); - if(contextualizedBiomeData.mountArmor() != null) - abstractHorseEntity.equipBodyArmor(contextualizedBiomeData.mountArmor()); - - if(mount instanceof AbstractBeastEntity abstractBeastEntity){ - abstractBeastEntity.tameBeast(npcEntity); - } - } - if(contextualizedBiomeData.hasMount().isIn(TagKey.of(RegistryKeys.ENTITY_TYPE, Identifier.of("can_equip_saddle"))) && mount instanceof EquipmentHolder equipmentHolder){ - equipmentHolder.equipStack(EquipmentSlot.SADDLE, new ItemStack(Items.SADDLE)); - } - - npcEntity.startRiding(mount); - } - } - - private static BiomeEventData.ContextualizedBiomeData findContextualizedNpcData(ServerWorld world, NpcEntity npcEntity) throws Exception { + private static BiomeEventData.ContextualizedBiomeData findContextualizedNpcData(ServerWorld world, NpcEntity npcEntity) { BlockPos blockPos = npcEntity.getBlockPos(); RegistryEntry biome = world.getBiome(blockPos); - Registry structureRegistry = world.getRegistryManager() - .getOrThrow(RegistryKeys.STRUCTURE); + Registry structureRegistry = world.getRegistryManager().getOrThrow(RegistryKeys.STRUCTURE); List structureStarts = world.getStructureAccessor().getStructureStarts(world.getChunk(blockPos).getPos(), s -> true); for (StructureStart structureStart : structureStarts) { @@ -117,22 +80,17 @@ private static BiomeEventData.ContextualizedBiomeData findContextualizedNpcData( } } - BiomeEventData.ContextualizedBiomeData contextualizedBiomeData = BiomeEventDataLookup.findNpcDataForBiome(world, biome, npcEntity); - if(contextualizedBiomeData != null){ - return contextualizedBiomeData; - } else { - throw new Exception(); - } + return BiomeEventDataLookup.findNpcDataForBiome(world, biome, npcEntity); } public static boolean shouldInitialize(ServerWorld serverWorld, NpcEntity npcEntity){ - Identifier currentNpcDataId = npcEntity.getNpcDataIdentifier(); + Identifier currentNpcDataId = npcEntity.getNpcTypeIdentifier(); if(currentNpcDataId == null) return true; DynamicRegistryManager registryManager = serverWorld.getRegistryManager(); - Optional> optionalEntry = registryManager.getOptional(DynamicRegistriesME.NPC).get().getEntry(currentNpcDataId); + Optional> optionalEntry = registryManager.getOptional(DynamicRegistriesME.NPC_TYPE).get().getEntry(currentNpcDataId); if(!npcEntity.hasTextureData()) @@ -144,9 +102,9 @@ public static boolean assignBedToNpc(NpcEntity npcEntity, BedBlock bedBlock){ return true; } - public static void initializeNpcForCurrentData(NpcEntity npcEntity, ServerWorld serverWorld, Identifier npcDataId) { - boolean shouldRefreshVisuals = npcEntity.getNpcTextureData().needToBeRefreshed(); + public static void initializeNpcForCurrentData(NpcEntity npcEntity, ServerWorld serverWorld) { + boolean shouldRefreshVisuals = npcEntity.shouldRefreshVisuals(); if(shouldRefreshVisuals) - NpcGenerator.generateCharacterTextures(serverWorld, npcDataId, npcEntity); + NpcGenerator.generateCharacterTextures(serverWorld, npcEntity); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializerClient.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializerClient.java index 3b4c7acade..dc5b704e57 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializerClient.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializerClient.java @@ -11,9 +11,8 @@ public static void initializeNpcEntity(ClientWorld clientWorld, NpcEntity npcEnt } private static void initializeForClient(World clientWorld, NpcEntity npcEntity) { - Identifier currentNpcDataId = npcEntity.getNpcDataIdentifier(); - if(NpcEntityInitializerUtil.characterIdentifierExist(clientWorld, currentNpcDataId)){ - NpcGenerator.generateCharacterTextures(clientWorld, currentNpcDataId, npcEntity); + if(NpcEntityInitializerUtil.characterIdentifierExist(clientWorld, npcEntity.getNpcTypeIdentifier())){ + NpcGenerator.generateCharacterTextures(clientWorld, npcEntity); } } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializerUtil.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializerUtil.java index 242aa97b34..13a4a0637c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializerUtil.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcEntityInitializerUtil.java @@ -1,18 +1,17 @@ package net.sevenstars.middleearth.entity.npcs.initializer; import net.minecraft.registry.DynamicRegistryManager; -import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.Identifier; import net.minecraft.world.World; import net.sevenstars.middleearth.registries.DynamicRegistriesME; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; - -import java.util.Optional; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; public class NpcEntityInitializerUtil { - public static boolean characterIdentifierExist(World world, Identifier unitIdentifier){ + public static boolean characterIdentifierExist(World world, Identifier typeId){ + if(typeId == null) + return false; DynamicRegistryManager registryManager = world.getRegistryManager(); - Optional> optionalEntry = registryManager.getOptional(DynamicRegistriesME.NPC).get().getEntry(unitIdentifier); - return !optionalEntry.isEmpty(); + NpcType type = registryManager.getOrThrow(DynamicRegistriesME.NPC_TYPE).get(typeId); + return type != null; } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcGenerator.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcGenerator.java index 89e4ef458a..ec43a4ad21 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcGenerator.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcGenerator.java @@ -1,19 +1,19 @@ package net.sevenstars.middleearth.entity.npcs.initializer; import net.minecraft.registry.DynamicRegistryManager; -import net.minecraft.registry.Registry; import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.server.world.ServerWorld; import net.minecraft.util.Identifier; import net.minecraft.world.World; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.npcs.NpcEntity; -import net.sevenstars.middleearth.entity.npcs.renderer.NpcEntityTextureData; +import net.sevenstars.middleearth.entity.npcs.data.NpcTextureData; import net.sevenstars.middleearth.registries.CharacterPatternsRegistryME; -import net.sevenstars.middleearth.registries.DynamicRegistriesME; import net.sevenstars.middleearth.resources.datas.common.CharacterMaterialTypes; import net.sevenstars.middleearth.resources.datas.common.CharacterPatternTypes; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.NpcUtil; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcUtil; +import net.sevenstars.middleearth.resources.datas.npc_types.data.MountData; import net.sevenstars.middleearth.resources.datas.texture_presets.CharacterTexturePattern; import net.sevenstars.middleearth.resources.datas.texture_presets.ClothingSelection; import net.sevenstars.middleearth.resources.datas.texture_presets.TexturePresetDataPool; @@ -21,48 +21,60 @@ import java.util.Optional; public class NpcGenerator { - public static void generateCharacterTextures(World world, Identifier currentNpcDataId, NpcEntity npcEntity) { + public static void generateCharacterTextures(World world, NpcEntity npcEntity) { // Get npc data String currentStep = "Fetching datas"; + Identifier currentNpcTypeId = npcEntity.getNpcTypeIdentifier(); + try{ - currentStep = "Getting registry for npc data id : %s".formatted(currentNpcDataId); - DynamicRegistryManager registryManager = world.getRegistryManager(); - Optional> npcRegistry = registryManager.getOptional(DynamicRegistriesME.NPC); - NpcData npcData = npcRegistry.get().get(currentNpcDataId); currentStep = "Aligning data with npc entity..."; - npcEntity.setNpcData(npcData); + npcEntity.prepareNpcIdentifier(currentNpcTypeId); + npcEntity.prepare(); + NpcType currentNpcType = npcEntity.getNpcType(); + currentStep = "Applying attributes..."; - npcData.applyAttributes(npcEntity); + currentNpcType.applyAttributes(npcEntity); currentStep = "Getting npc texture data..."; - TexturePresetDataPool textureData = npcData.getNpcTextureData(world); + TexturePresetDataPool textureData = currentNpcType.getNpcTextureData(world); currentStep = "Creating texture identity..."; TexturePresetDataPool.Identity identity = TexturePresetDataPool.Identity.create(textureData, npcEntity.getNpcCategory()); if(identity == null) identity = TexturePresetDataPool.Identity.create(textureData); - NpcEntityTextureData entityTextureData = new NpcEntityTextureData(); + NpcTextureData entityTextureData = new NpcTextureData(); currentStep = "Generating skin..."; entityTextureData = generateSkinTextureData(entityTextureData, identity); currentStep = "Generating eyes..."; - entityTextureData = generateEyeTextureData(entityTextureData, identity, npcData.getNpcTextureData(world).haveEmissiveEyes(identity)); + entityTextureData = generateEyeTextureData(entityTextureData, identity, currentNpcType.getNpcTextureData(world).haveEmissiveEyes(identity)); currentStep = "Generating hair..."; entityTextureData = generateHairTextureData(entityTextureData, identity, world.getRegistryManager()); currentStep = "Generating clothing..."; entityTextureData = generateClothingTextureData(entityTextureData, identity); - npcEntity.setNpcTextureData(entityTextureData); + npcEntity.saveNpcTextureData(entityTextureData); - NpcUtil.equipAll(npcEntity, npcData.getGear()); + NpcUtil.equipAll(npcEntity, currentNpcType.getGear()); npcEntity.updateAttackType(); + spawnMount(npcEntity); + } catch (Exception exception){ - MiddleEarth.LOGGER.logError(String.format("NpcEntityInitializer::Couldn't generate %s because of : %s | Triggered by %s", currentNpcDataId, exception.getLocalizedMessage(), currentStep)); - if(!npcEntity.isRemoved()) - npcEntity.discard(); + MiddleEarth.LOGGER.logError(String.format("NpcEntityInitializer::Couldn't generate %s because of : %s | Triggered by %s", currentNpcTypeId, exception.getLocalizedMessage(), currentStep)); } } - public static NpcEntityTextureData generateSkinTextureData(NpcEntityTextureData npcTextureData, TexturePresetDataPool.Identity textureIdentity) { + private static void spawnMount(NpcEntity entity) { + if(entity.getWorld() instanceof ServerWorld serverWorld) + { + NpcType type = entity.getNpcType(); + if(type == null || !type.hasMount()) + return; + MountData mountData = type.getMountData(); + mountData.createEntity(serverWorld, entity); + } + } + + public static NpcTextureData generateSkinTextureData(NpcTextureData npcTextureData, TexturePresetDataPool.Identity textureIdentity) { Identifier materialId = TexturePresetDataPool.getRawMaterial(textureIdentity, CharacterMaterialTypes.SKIN); Identifier bodyPatternId = TexturePresetDataPool.getRawPattern(textureIdentity, CharacterPatternTypes.BODY); Identifier headPatternId = TexturePresetDataPool.getRawPattern(textureIdentity, CharacterPatternTypes.HEAD); @@ -91,49 +103,49 @@ public static NpcEntityTextureData generateSkinTextureData(NpcEntityTextureData return npcTextureData; } - public static NpcEntityTextureData generateEyeTextureData(NpcEntityTextureData npcEntityTextureData, TexturePresetDataPool.Identity textureIdentity, boolean haveEmissiveEyes) { + public static NpcTextureData generateEyeTextureData(NpcTextureData npcTextureData, TexturePresetDataPool.Identity textureIdentity, boolean haveEmissiveEyes) { Identifier materialId = TexturePresetDataPool.getRawMaterial(textureIdentity, CharacterMaterialTypes.EYE); Identifier patternId = TexturePresetDataPool.getRawPattern(textureIdentity, CharacterPatternTypes.EYE); - npcEntityTextureData = npcEntityTextureData.withEyeTexture(TexturePresetDataPool.buildId(patternId, materialId), TexturePresetDataPool.buildId(Identifier.of(patternId.getPath() + "_emissive"), materialId), haveEmissiveEyes); + npcTextureData = npcTextureData.withEyeTexture(TexturePresetDataPool.buildId(patternId, materialId), TexturePresetDataPool.buildId(Identifier.of(patternId.getPath() + "_emissive"), materialId), haveEmissiveEyes); - return npcEntityTextureData; + return npcTextureData; } - public static NpcEntityTextureData generateHairTextureData(NpcEntityTextureData npcEntityTextureData, TexturePresetDataPool.Identity textureIdentity, DynamicRegistryManager manager) { + public static NpcTextureData generateHairTextureData(NpcTextureData npcTextureData, TexturePresetDataPool.Identity textureIdentity, DynamicRegistryManager manager) { Identifier globalHairMaterialId = TexturePresetDataPool.getRawMaterial(textureIdentity, CharacterMaterialTypes.HAIR); // Hair Identifier hairPatternId = TexturePresetDataPool.getRawPattern(textureIdentity, CharacterPatternTypes.HAIR); Optional> foundHairPattern = CharacterPatternsRegistryME.get(manager, CharacterPatternTypes.HAIR, hairPatternId); if(foundHairPattern.isPresent() && foundHairPattern.get().value() instanceof CharacterTexturePattern pattern){ - npcEntityTextureData = npcEntityTextureData.withHairTexture(TexturePresetDataPool.buildId(hairPatternId, globalHairMaterialId)); + npcTextureData = npcTextureData.withHairTexture(TexturePresetDataPool.buildId(hairPatternId, globalHairMaterialId)); if(pattern.hasAddonRawValue()){ - npcEntityTextureData = npcEntityTextureData.withHairAddonTexture(TexturePresetDataPool.buildAddonId(hairPatternId, globalHairMaterialId)); + npcTextureData = npcTextureData.withHairAddonTexture(TexturePresetDataPool.buildAddonId(hairPatternId, globalHairMaterialId)); } } // Eyebrow Identifier eyebrowPatternId = TexturePresetDataPool.getRawPattern(textureIdentity, CharacterPatternTypes.EYEBROW); Optional> foundEyebrowPattern = CharacterPatternsRegistryME.get(manager, CharacterPatternTypes.EYEBROW, eyebrowPatternId); if(foundEyebrowPattern.isPresent()){ - npcEntityTextureData = npcEntityTextureData.withEyebrowTexture(TexturePresetDataPool.buildId(eyebrowPatternId, globalHairMaterialId)); + npcTextureData = npcTextureData.withEyebrowTexture(TexturePresetDataPool.buildId(eyebrowPatternId, globalHairMaterialId)); } // Beard Identifier beardPatternId = TexturePresetDataPool.getRawPattern(textureIdentity, CharacterPatternTypes.BEARD); Optional> foundBeardPattern = CharacterPatternsRegistryME.get(manager, CharacterPatternTypes.BEARD, beardPatternId); if(foundBeardPattern.isPresent() && foundBeardPattern.get().value() instanceof CharacterTexturePattern pattern){ - npcEntityTextureData = npcEntityTextureData.withBeardTexture(TexturePresetDataPool.buildId(beardPatternId, globalHairMaterialId)); + npcTextureData = npcTextureData.withBeardTexture(TexturePresetDataPool.buildId(beardPatternId, globalHairMaterialId)); if(pattern.hasAddonRawValue()){ - npcEntityTextureData = npcEntityTextureData.withBeardAddonTexture(TexturePresetDataPool.buildAddonId(beardPatternId, globalHairMaterialId)); + npcTextureData = npcTextureData.withBeardAddonTexture(TexturePresetDataPool.buildAddonId(beardPatternId, globalHairMaterialId)); } } - return npcEntityTextureData; + return npcTextureData; } - public static NpcEntityTextureData generateClothingTextureData(NpcEntityTextureData npcEntityTextureData, TexturePresetDataPool.Identity textureIdentity) { + public static NpcTextureData generateClothingTextureData(NpcTextureData npcTextureData, TexturePresetDataPool.Identity textureIdentity) { ClothingSelection data = TexturePresetDataPool.getClothing(textureIdentity); - npcEntityTextureData = npcEntityTextureData.withClothingTexture(data.base(), data.over(), data.extra()); + npcTextureData = npcTextureData.withClothingTexture(data.base(), data.over(), data.extra()); - return npcEntityTextureData; + return npcTextureData; } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcSpawnEggHelper.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcSpawnEggHelper.java index 14fcab600e..97f1b2f1d9 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcSpawnEggHelper.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/initializer/NpcSpawnEggHelper.java @@ -1,54 +1,74 @@ package net.sevenstars.middleearth.entity.npcs.initializer; +import net.minecraft.client.MinecraftClient; import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.CustomModelDataComponent; import net.minecraft.component.type.NbtComponent; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NbtCompound; +import net.minecraft.nbt.NbtElement; +import net.minecraft.nbt.NbtOps; +import net.minecraft.registry.DynamicRegistryManager; +import net.minecraft.registry.RegistryOps; +import net.minecraft.registry.RegistryWrapper; import net.minecraft.text.Text; import net.minecraft.util.Identifier; import net.minecraft.world.World; import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.entity.npcs.NpcEntity; +import net.sevenstars.middleearth.entity.npcs.data.NpcInitializationData; import net.sevenstars.middleearth.item.DataComponentTypesME; import net.sevenstars.middleearth.item.EggItemsME; import net.sevenstars.middleearth.item.dataComponents.FactionDataComponent; import net.sevenstars.middleearth.item.dataComponents.RaceDataComponent; import net.sevenstars.middleearth.registries.DynamicRegistriesME; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; import java.util.List; public class NpcSpawnEggHelper { - public static ItemStack getSpawnEgg(NpcData npcData) { - if(npcData == null) + public static ItemStack getSpawnEgg(NpcType npcType, RegistryWrapper.WrapperLookup wrapper) { + if(npcType == null) return ItemStack.EMPTY; - return buildItemStackBasedOnNpcData(npcData); + return buildItemStackBasedOnNpcData(npcType, wrapper); } public static ItemStack getSpawnEgg(World world, Identifier identifier) { - NpcData npcData = world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC).get(identifier); - return buildItemStackBasedOnNpcData(npcData); + NpcType npcType = world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC_TYPE).get(identifier); + RegistryWrapper.WrapperLookup wrapperLookup = world.getRegistryManager(); + return buildItemStackBasedOnNpcData(npcType, wrapperLookup); } - private static ItemStack buildItemStackBasedOnNpcData(NpcData npcData) { - if(npcData == null) + private static ItemStack buildItemStackBasedOnNpcData(NpcType npcType, RegistryWrapper.WrapperLookup wrapper) { + if(npcType == null) return ItemStack.EMPTY; - Identifier itemId = MiddleEarth.append(npcData.getId(), "_spawn_egg"); + Identifier itemId = MiddleEarth.append(npcType.getId(), "_spawn_egg"); ItemStack itemStack = new ItemStack(EggItemsME.NPC_SPAWN_EGG); - NbtCompound compound = new NbtCompound(); - compound.putString("id", MiddleEarth.of("npc").toString()); - compound.putString("NpcDataId", npcData.getId().toString()); + NbtCompound compoundData = new NbtCompound(); + compoundData.putString("id", MiddleEarth.of("npc").toString()); - itemStack.set(DataComponentTypes.ENTITY_DATA, NbtComponent.of(compound)); - itemStack.set(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(npcData.getFactionIdentifier())); - itemStack.set(DataComponentTypesME.RACE_DATA, new RaceDataComponent(npcData.getRace())); + NpcInitializationData npcInitializationData = new NpcInitializationData(npcType.getId(), false); + + RegistryOps ops = RegistryOps.of( + NbtOps.INSTANCE, + wrapper + ); + + NbtElement element = NpcInitializationData.CODEC + .encodeStart(ops, npcInitializationData) + .getOrThrow(); + compoundData.put(NpcEntity.KeyStrings.INITIALIZATION_DATA, element); + + itemStack.set(DataComponentTypes.ENTITY_DATA, NbtComponent.of(compoundData)); + itemStack.set(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(npcType.getFactionIdentifier())); + itemStack.set(DataComponentTypesME.RACE_DATA, new RaceDataComponent(npcType.getRace())); itemStack.set(DataComponentTypes.ITEM_NAME, Text.translatable(itemId.toTranslationKey("item"))); itemStack.set(DataComponentTypes.CUSTOM_MODEL_DATA, new CustomModelDataComponent( List.of(), List.of(), - List.of(npcData.getId().getPath().replaceAll("\\.", "_") + "_spawn_egg"), + List.of(npcType.getId().getPath().replaceAll("\\.", "_") + "_spawn_egg"), List.of())); return itemStack; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/renderer/NpcEntityRenderer.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/renderer/NpcEntityRenderer.java index c69dfe9a93..cf9af481bd 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/renderer/NpcEntityRenderer.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/npcs/renderer/NpcEntityRenderer.java @@ -13,7 +13,6 @@ import net.minecraft.client.render.entity.model.ArmorEntityModel; import net.minecraft.client.render.entity.model.BipedEntityModel; import net.minecraft.client.render.entity.model.EntityModelLayers; -import net.minecraft.client.texture.Sprite; import net.minecraft.client.texture.SpriteAtlasTexture; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.EntityPose; @@ -28,9 +27,11 @@ import net.minecraft.util.math.Vec3d; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.client.ModTexturedRenderLayers; +import net.sevenstars.middleearth.client.RenderUtil; import net.sevenstars.middleearth.config.ModClientConfigs; import net.sevenstars.middleearth.entity.EntityModelLayersME; import net.sevenstars.middleearth.entity.npcs.NpcEntity; +import net.sevenstars.middleearth.entity.npcs.data.NpcTextureData; import net.sevenstars.middleearth.entity.npcs.renderer.features.ear.EarFeatureRenderer; import net.sevenstars.middleearth.entity.npcs.renderer.features.feet.FeetFeatureRenderer; import net.sevenstars.middleearth.entity.npcs.renderer.features.hair.HairFeatureRenderer; @@ -39,7 +40,6 @@ import net.sevenstars.middleearth.registries.AtlasesME; import net.sevenstars.middleearth.registries.CharacterClothesRegistryME; import net.sevenstars.middleearth.utils.ItemTagsME; -import net.sevenstars.middleearth.utils.ItemUtil; import org.jetbrains.annotations.Nullable; public class NpcEntityRenderer extends BipedEntityRenderer { @@ -94,7 +94,7 @@ public void updateRenderState(NpcEntity npcEntity, NpcEntityRenderState npcEntit npcEntityRenderState.aimingState = npcEntity.aimingState; super.updateRenderState(npcEntity, npcEntityRenderState, tickDelta); - var npcTextureData = npcEntity.getNpcTextureData(); + NpcTextureData npcTextureData = npcEntity.retrieveNpcTextureData(); float currentLightLevel = npcEntity.getWorld().getLightLevel(npcEntity.getBlockPos()); npcEntityRenderState.pose = npcEntity.getPose(); @@ -130,9 +130,8 @@ public void updateRenderState(NpcEntity npcEntity, NpcEntityRenderState npcEntit npcEntityRenderState.clothingOver = npcTextureData.get(NpcRenderedPart.CLOTHING_OVER); npcEntityRenderState.clothingExtra = npcTextureData.get(NpcRenderedPart.CLOTHING_EXTRA); - long initializationTick = npcEntity.getInitializationTick(); long age = npcEntity.age; - npcEntityRenderState.blinking = (initializationTick + age) % BLINKING_INTERVAL >= BLINKING_INTERVAL - BLINKING_DURATION; + npcEntityRenderState.blinking = (0 + age) % BLINKING_INTERVAL >= BLINKING_INTERVAL - BLINKING_DURATION; } ItemStack currentHelmet = npcEntity.getEquippedStack(EquipmentSlot.HEAD); if(currentHelmet == null || currentHelmet.isEmpty()){ @@ -277,20 +276,7 @@ private void renderComplexVersion(MatrixStack matrices, VertexConsumerProvider v } private void renderTexture(MatrixStack matrices, VertexConsumer vertexConsumer, Identifier textureId, int light, int overlay, boolean isEmissive){ - RenderLayer renderLayer = ModTexturedRenderLayers.getCharacterTexturesRenderLayer(); - render(matrices, vertexConsumer, renderLayer, textureId, light, overlay); - } - - private void render(MatrixStack matrices, VertexConsumer vertexConsumer, RenderLayer renderLayer, Identifier textureId, int light, int overlay){ - Sprite sprite = characterTextureAtlas.getSprite(textureId); - renderModel(sprite, matrices, vertexConsumer, light, overlay); - } - - private void renderModel(Sprite sprite, MatrixStack matrices, VertexConsumer vertexConsumer, int light, int overlay){ - if(sprite != null){ - VertexConsumer newLayerVertexConsumer = sprite.getTextureSpecificVertexConsumer(vertexConsumer); - model.render(matrices, newLayerVertexConsumer, light, overlay); - } + RenderUtil.renderAtlasTexture(characterTextureAtlas, model, matrices, vertexConsumer, textureId, light, overlay); } @Override diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/larva/ShelobiteLarvaEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/larva/ShelobiteLarvaEntity.java index 7428559091..c4b841143d 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/larva/ShelobiteLarvaEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/larva/ShelobiteLarvaEntity.java @@ -2,17 +2,6 @@ import net.minecraft.block.BlockState; import net.minecraft.entity.*; -import net.minecraft.entity.spawn.SpawnContext; -import net.minecraft.registry.RegistryKeys; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.registry.tag.TagKey; -import net.minecraft.storage.ReadView; -import net.minecraft.storage.WriteView; -import net.minecraft.util.Identifier; -import net.minecraft.world.LocalDifficulty; -import net.minecraft.world.ServerWorldAccess; -import net.sevenstars.middleearth.MiddleEarth; -import net.minecraft.entity.EntityType; import net.minecraft.entity.ai.goal.*; import net.minecraft.entity.ai.pathing.EntityNavigation; import net.minecraft.entity.ai.pathing.SpiderNavigation; @@ -26,19 +15,32 @@ import net.minecraft.entity.effect.StatusEffects; import net.minecraft.entity.mob.HostileEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.spawn.SpawnContext; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.registry.tag.TagKey; import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; +import net.minecraft.storage.ReadView; +import net.minecraft.storage.WriteView; +import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.LocalDifficulty; +import net.minecraft.world.ServerWorldAccess; import net.minecraft.world.World; +import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.TrackedDataHandlerRegistryME; +import net.sevenstars.middleearth.entity.beasts.cave_troll.CaveTrollEntity; import net.sevenstars.middleearth.entity.goals.FollowDifferentMobGoal; import net.sevenstars.middleearth.entity.npcs.NpcEntity; import net.sevenstars.middleearth.entity.spider.SpiderVariant; import net.sevenstars.middleearth.entity.spider.scuttler.ShelobiteScuttlerEntity; import net.sevenstars.middleearth.registries.DynamicRegistriesME; import net.sevenstars.middleearth.registries.content.spidervariants.SpiderVariantRegistry; +import net.sevenstars.middleearth.utils.SpawnUtil; import org.jetbrains.annotations.Nullable; import java.util.Optional; @@ -78,6 +80,7 @@ protected void initGoals() { this.targetSelector.add(1, new RevengeGoal(this)); this.targetSelector.add(2, new ActiveTargetGoal<>(this, PlayerEntity.class, true)); this.targetSelector.add(3, new ActiveTargetGoal<>(this, NpcEntity.class, true)); + this.targetSelector.add(4, new ActiveTargetGoal<>(this, CaveTrollEntity.class, true)); } @Nullable @@ -151,6 +154,11 @@ public void tickMovement() { } } + @Override + protected int getExperienceToDrop(ServerWorld world) { + return 1; + } + public SpiderVariant getVariant() { return getRegistryVariant().value(); } @@ -234,4 +242,10 @@ protected void readCustomData(ReadView view) { ATTACK_FLAG = DataTracker.registerData(ShelobiteLarvaEntity.class, TrackedDataHandlerRegistry.BOOLEAN); VARIANT = DataTracker.registerData(ShelobiteLarvaEntity.class, TrackedDataHandlerRegistryME.SPIDER_VARIANT); } + + public static boolean canSpawn(EntityType type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos blockPos, Random random) { + if(spawnReason != SpawnReason.NATURAL) + return ShelobiteLarvaEntity.canSpawnInDark(type, serverWorldAccess, spawnReason, blockPos, random); + return SpawnUtil.canSpawn(blockPos, serverWorldAccess, spawnReason); + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/scuttler/ShelobiteScuttlerEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/scuttler/ShelobiteScuttlerEntity.java index 8b80a7025c..21fbdcbe18 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/scuttler/ShelobiteScuttlerEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/scuttler/ShelobiteScuttlerEntity.java @@ -2,27 +2,12 @@ import com.google.common.collect.ImmutableList; import com.mojang.serialization.Dynamic; +import net.minecraft.block.BlockState; import net.minecraft.entity.*; import net.minecraft.entity.ai.brain.Brain; import net.minecraft.entity.ai.brain.MemoryModuleType; import net.minecraft.entity.ai.brain.sensor.Sensor; import net.minecraft.entity.ai.brain.sensor.SensorType; -import net.minecraft.entity.spawn.SpawnContext; -import net.minecraft.particle.BlockStateParticleEffect; -import net.minecraft.particle.ParticleTypes; -import net.minecraft.registry.RegistryKeys; -import net.minecraft.registry.entry.RegistryEntry; -import net.minecraft.registry.tag.BlockTags; -import net.minecraft.registry.tag.TagKey; -import net.minecraft.server.world.ServerWorld; -import net.minecraft.storage.ReadView; -import net.minecraft.storage.WriteView; -import net.minecraft.util.Identifier; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.random.Random; -import net.minecraft.world.LocalDifficulty; -import net.minecraft.world.ServerWorldAccess; -import net.minecraft.block.BlockState; import net.minecraft.entity.ai.goal.*; import net.minecraft.entity.ai.pathing.EntityNavigation; import net.minecraft.entity.ai.pathing.SpiderNavigation; @@ -36,20 +21,39 @@ import net.minecraft.entity.effect.StatusEffects; import net.minecraft.entity.mob.HostileEntity; import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.spawn.SpawnContext; +import net.minecraft.particle.BlockStateParticleEffect; +import net.minecraft.particle.ParticleTypes; +import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.registry.tag.BlockTags; +import net.minecraft.registry.tag.TagKey; +import net.minecraft.server.world.ServerWorld; import net.minecraft.sound.SoundEvent; import net.minecraft.sound.SoundEvents; +import net.minecraft.storage.ReadView; +import net.minecraft.storage.WriteView; +import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.LocalDifficulty; +import net.minecraft.world.ServerWorldAccess; import net.minecraft.world.World; import net.minecraft.world.WorldAccess; +import net.minecraft.world.biome.Biome; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.TrackedDataHandlerRegistryME; +import net.sevenstars.middleearth.entity.beasts.cave_troll.CaveTrollEntity; import net.sevenstars.middleearth.entity.goals.SpiderPonceAtTargetGoal; import net.sevenstars.middleearth.entity.npcs.NpcEntity; import net.sevenstars.middleearth.entity.spider.Pouncer; import net.sevenstars.middleearth.entity.spider.SpiderVariant; import net.sevenstars.middleearth.registries.DynamicRegistriesME; import net.sevenstars.middleearth.registries.content.spidervariants.SpiderVariantRegistry; +import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventDataLookup; +import net.sevenstars.middleearth.utils.SpawnUtil; import org.jetbrains.annotations.Nullable; import java.util.Optional; @@ -125,9 +129,22 @@ public EntityData initialize(ServerWorldAccess world, LocalDifficulty difficulty return super.initialize(world, difficulty, spawnReason, entityData); } - public static boolean canSpawn(EntityType type, WorldAccess world, SpawnReason spawnReason, BlockPos pos, Random random) { - return world.getBlockState(pos.down()).isSolidBlock(world, pos.mutableCopy().up()) - && !world.getBlockState(pos.down()).isIn(BlockTags.LOGS); + @Override + public boolean isPersistent() { + return false; + } + + public static boolean canSpawn(EntityType type, WorldAccess worldAccess, SpawnReason spawnReason, BlockPos pos, Random random) { + BlockPos below = pos.down(); + boolean isOnSolidGround = worldAccess.getBlockState(below).isSolidBlock(worldAccess, below); + boolean isNotOnTopOfLogs = !worldAccess.getBlockState(below).isIn(BlockTags.LOGS); + + if (spawnReason == SpawnReason.NATURAL && worldAccess instanceof World world) { + RegistryEntry biome = world.getBiome(pos); + boolean canSpawn = BiomeEventDataLookup.canEntitySpawn(world, biome, pos, type, random); + return isOnSolidGround && isNotOnTopOfLogs && canSpawn; + } + return isOnSolidGround && isNotOnTopOfLogs; } @Override @@ -151,6 +168,7 @@ protected void initGoals() { this.targetSelector.add(1, new RevengeGoal(this)); this.targetSelector.add(2, new ActiveTargetGoal<>(this, PlayerEntity.class, true)); this.targetSelector.add(3, new ActiveTargetGoal<>(this, NpcEntity.class, true)); + this.targetSelector.add(4, new ActiveTargetGoal<>(this, CaveTrollEntity.class, true)); } public double getMountedHeightOffset() { @@ -267,6 +285,11 @@ public void tickMovement() { } } + @Override + protected int getExperienceToDrop(ServerWorld world) { + return 6 + this.random.nextInt(3); + } + public SpiderVariant getVariant() { return getRegistryVariant().value(); } @@ -356,6 +379,12 @@ protected void readCustomData(ReadView view) { VARIANT = DataTracker.registerData(ShelobiteScuttlerEntity.class, TrackedDataHandlerRegistryME.SPIDER_VARIANT); } + public static boolean canSpawn(EntityType type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos blockPos, Random random) { + if(spawnReason != SpawnReason.NATURAL) + return ShelobiteScuttlerEntity.canSpawnInDark(type, serverWorldAccess, spawnReason, blockPos, random); + return SpawnUtil.canSpawn(blockPos, serverWorldAccess, spawnReason); + } + public static class SpiderData implements EntityData { public final RegistryEntry variant; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/spawn/SpawnOfShelobEntity.java b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/spawn/SpawnOfShelobEntity.java index d3655362e6..ddc9410d8b 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/spawn/SpawnOfShelobEntity.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/entity/spider/spawn/SpawnOfShelobEntity.java @@ -33,12 +33,11 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; -import net.minecraft.world.Difficulty; -import net.minecraft.world.LocalDifficulty; -import net.minecraft.world.ServerWorldAccess; -import net.minecraft.world.World; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.*; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.TrackedDataHandlerRegistryME; +import net.sevenstars.middleearth.entity.beasts.cave_troll.CaveTrollEntity; import net.sevenstars.middleearth.entity.goals.PounceRetreatGoal; import net.sevenstars.middleearth.entity.goals.ShieldAgainstProjectileGoal; import net.sevenstars.middleearth.entity.goals.SmartProjectileAttackGoal; @@ -52,6 +51,7 @@ import net.sevenstars.middleearth.entity.spider.scuttler.ShelobiteScuttlerEntity; import net.sevenstars.middleearth.registries.DynamicRegistriesME; import net.sevenstars.middleearth.registries.content.spidervariants.SpiderVariantRegistry; +import net.sevenstars.middleearth.utils.SpawnUtil; import org.jetbrains.annotations.Nullable; import java.util.Optional; @@ -110,6 +110,7 @@ protected void initGoals() { this.targetSelector.add(1, new RevengeGoal(this)); this.targetSelector.add(2, new ActiveTargetGoal<>(this, PlayerEntity.class, true)); this.targetSelector.add(3, new ActiveTargetGoal<>(this, NpcEntity.class, true)); + this.targetSelector.add(4, new ActiveTargetGoal<>(this, CaveTrollEntity.class, true)); } @Nullable @@ -258,6 +259,12 @@ public void tickMovement() { leapingTicks++; } } + + @Override + protected int getExperienceToDrop(ServerWorld world) { + return 13 + this.random.nextInt(4); + } + public SpiderVariant getVariant() { return getRegistryVariant().value(); } @@ -378,4 +385,15 @@ protected void readCustomData(ReadView view) { BLOCK_FLAG = DataTracker.registerData(SpawnOfShelobEntity.class, TrackedDataHandlerRegistry.INTEGER); VARIANT = DataTracker.registerData(SpawnOfShelobEntity.class, TrackedDataHandlerRegistryME.SPIDER_VARIANT); } + + public static boolean canSpawn(EntityType type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos blockPos, Random random) { + if(spawnReason != SpawnReason.NATURAL) + return SpawnOfShelobEntity.canSpawnInDark(type, serverWorldAccess, spawnReason, blockPos, random); + return SpawnUtil.canSpawn(blockPos, serverWorldAccess, spawnReason); + } + + @Override + public boolean canSpawn(WorldAccess world, SpawnReason spawnReason) { + return true; + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/event/ModEvents.java b/middle-earth/src/main/java/net/sevenstars/middleearth/event/ModEvents.java index 24b3969b80..3f39d7f318 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/event/ModEvents.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/event/ModEvents.java @@ -89,7 +89,7 @@ public static void register(){ float hardness = blockState.getBlock().getHardness(); if (hasEnchant) { - if (!playerEntity.isCreative()) { + if (!playerEntity.isCreative() && !playerEntity.isSneaking()) { assert toolComponent != null; if (toolComponent.isCorrectForDrops(blockState)){ if (playerEntity.getFacing() == Direction.DOWN || playerEntity.getFacing() == Direction.UP){ @@ -124,7 +124,7 @@ public static void register(){ float hardness = blockState.getBlock().getHardness(); if (hasEnchant) { - if (!playerEntity.isCreative()) { + if (!playerEntity.isCreative() && !playerEntity.isSneaking()) { assert toolComponent != null; if (toolComponent.isCorrectForDrops(blockState)){ int[] blockCount = new int[]{16}; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/artisantable/ArtisanTableScreenHandler.java b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/artisantable/ArtisanTableScreenHandler.java index 6584ed175d..05bda8adf5 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/artisantable/ArtisanTableScreenHandler.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/artisantable/ArtisanTableScreenHandler.java @@ -3,21 +3,20 @@ import com.google.common.collect.Lists; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; -import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.ExperienceOrbEntity; import net.minecraft.recipe.ServerRecipeManager; +import net.minecraft.screen.*; import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.Vec3d; +import net.minecraft.world.WorldEvents; import net.sevenstars.middleearth.block.registration.ModDecorativeBlocks; import net.sevenstars.middleearth.block.special.forge.MultipleStackRecipeInput; -import net.sevenstars.middleearth.block.special.shapingAnvil.ShapingAnvilBlockEntity; import net.sevenstars.middleearth.gui.ModScreenHandlers; import net.sevenstars.middleearth.item.DataComponentTypesME; import net.sevenstars.middleearth.item.dataComponents.ArtisanDataComponent; -import net.sevenstars.middleearth.network.packets.C2S.AnvilIndexPacket; import net.sevenstars.middleearth.network.packets.C2S.ArtisanIndexPacket; import net.sevenstars.middleearth.network.packets.S2C.ArtisanRecipePacket; -import net.sevenstars.middleearth.network.packets.S2C.ShapingAnvilRecipePacket; -import net.sevenstars.middleearth.recipe.AnvilShapingRecipe; import net.sevenstars.middleearth.recipe.ArtisanRecipe; import net.sevenstars.middleearth.recipe.RecipesME; import net.sevenstars.middleearth.resources.datas.common.DispositionType; @@ -30,10 +29,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.recipe.RecipeEntry; -import net.minecraft.screen.Property; -import net.minecraft.screen.ScreenHandler; -import net.minecraft.screen.ScreenHandlerContext; -import net.minecraft.screen.ScreenHandlerType; import net.minecraft.screen.slot.Slot; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; @@ -61,6 +56,7 @@ public class ArtisanTableScreenHandler extends ScreenHandler { final CraftingResultInventory output; private PlayerEntity playerEntity; private ArtisanTableInputsShape inputsShape = null; + private int xp = 0; private String disposition; private boolean isCreative; @@ -116,6 +112,8 @@ public boolean canInsert(ItemStack stack) { public void onTakeItem(PlayerEntity player, ItemStack itemStack) { itemStack.onCraftByPlayer(player, itemStack.getCount()); ArtisanTableScreenHandler.this.output.unlockLastRecipe(player, this.getInputStacks()); + player.addExperience(getExperience(world)); + ArtisanTableScreenHandler.this.xp = 0; for(int y = 0; y < 3; y++) { for(int x = 0; x < 3; x++) { @@ -183,6 +181,10 @@ public void setSelectedRecipe(int index) { ClientPlayNetworking.send(anvilIndexPacket); } + private int getExperience(World world) { + return ArtisanTableScreenHandler.this.xp; + } + public int getAvailableRecipeCount() { return this.availableRecipes.size(); } @@ -296,6 +298,7 @@ void populateResult(PlayerEntity player) { ItemStack itemStack = recipeEntry.value().craft(new MultipleStackRecipeInput(inputs), this.world.getRegistryManager()); itemStack.set(DataComponentTypesME.ARTISAN_DATA, new ArtisanDataComponent(player.getUuid())); + this.xp = recipeEntry.value().xp; if (itemStack.get(DataComponentTypes.MAX_DAMAGE) != null){ int maxDamage = (int) (itemStack.getMaxDamage() + itemStack.getMaxDamage() * 0.25); @@ -310,6 +313,7 @@ void populateResult(PlayerEntity player) { } } else { this.outputSlot.setStackNoCallbacks(ItemStack.EMPTY); + this.xp = 0; } this.sendContentUpdates(); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/artisantable/ArtisanTableSlot.java b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/artisantable/ArtisanTableSlot.java index 74fe1591d6..abe893d69c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/artisantable/ArtisanTableSlot.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/artisantable/ArtisanTableSlot.java @@ -32,7 +32,8 @@ public boolean canInsert(ItemStack stack) { if(!isEnabled()) return false; if(inputType == InputType.ANY) return super.canInsert(stack); - else if(inputType == InputType.HANDLE && !(stack.isOf(Items.STICK) || stack.isOf(ResourceItemsME.ROD))) { + else if(inputType == InputType.HANDLE && !(stack.isOf(Items.STICK) || stack.isOf(ResourceItemsME.ROD) + || stack.isOf(Items.BONE) || stack.isOf(ResourceItemsME.DIRTY_BONE))) { return false; } else if(inputType == InputType.HILT && !(stack.isOf(ResourceItemsME.SWORD_HILT))) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/inscriptiontable/InscriptionTableScreenHandler.java b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/inscriptiontable/InscriptionTableScreenHandler.java index af8adfb89d..fa24159263 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/inscriptiontable/InscriptionTableScreenHandler.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/inscriptiontable/InscriptionTableScreenHandler.java @@ -15,7 +15,9 @@ import net.minecraft.recipe.RecipeEntry; import net.minecraft.recipe.ServerRecipeManager; import net.minecraft.recipe.input.SingleStackRecipeInput; +import net.minecraft.registry.RegistryKeys; import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.registry.tag.TagKey; import net.minecraft.screen.*; import net.minecraft.screen.slot.Slot; import net.minecraft.server.network.ServerPlayerEntity; @@ -103,7 +105,9 @@ public Identifier getBackgroundSprite() { this.addSlot(new Slot(this.input, 2, 180, 48){ @Override public boolean canInsert(ItemStack stack) { - return (stack.isEnchantable() || stack.hasEnchantments()) && !stack.isOf(Items.BOOK); + return (stack.isIn(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/bow"))) || + stack.isIn(TagKey.of(RegistryKeys.ITEM, Identifier.of("minecraft", "enchantable/crossbow"))) + || stack.isEnchantable() || stack.hasEnchantments()) && !stack.isOf(Items.BOOK); } }); @@ -347,13 +351,7 @@ public ItemStack quickMove(PlayerEntity player, int slot) { ItemStack originalStack = invSlot.getStack(); Item item = originalStack.getItem(); stack = originalStack.copy(); - if (slot == 6){ - item.onCraft(originalStack, player.getWorld()); - if (!this.insertItem(originalStack, 4, this.slots.size(), true)) { - return ItemStack.EMPTY; - } - invSlot.onQuickTransfer(originalStack, stack); - } else if(slot < this.input.size()) { + if(slot < this.input.size()) { if(!this.insertItem(originalStack, this.input.size(), this.slots.size(), true)) { return ItemStack.EMPTY; } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/map/MapScreenController.java b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/map/MapScreenController.java index 42c2364178..182b84d2f9 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/map/MapScreenController.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/map/MapScreenController.java @@ -26,15 +26,15 @@ public MapScreenController(World world, PlayerEntity player) { this.player = player; } - public boolean open() { + public boolean open(boolean canTeleport) { MinecraftClient mc = MinecraftClient.getInstance(); if(world.isClient) { if (mc.currentScreen == null) { screen = new MapScreen(); isInDimension = ModDimensions.isInMiddleEarth(world); - hasTeleportPermission = player.hasPermissionLevel(2); + hasTeleportPermission = canTeleport; screen.playerIsInDimension = isInDimension; screen.hasTeleportPermission = hasTeleportPermission; screen.isFullscreen = false; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/onboarding/onboarding_faction/OnboardingFactionScreenController.java b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/onboarding/onboarding_faction/OnboardingFactionScreenController.java index 38a0f96503..4ccf4a0d37 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/onboarding/onboarding_faction/OnboardingFactionScreenController.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/onboarding/onboarding_faction/OnboardingFactionScreenController.java @@ -7,7 +7,6 @@ import net.minecraft.client.network.AbstractClientPlayerEntity; import net.minecraft.client.network.ClientPlayerEntity; import net.minecraft.client.world.ClientWorld; -import net.minecraft.entity.attribute.EntityAttributeInstance; import net.minecraft.registry.Registry; import net.minecraft.text.MutableText; import net.minecraft.text.Text; @@ -24,7 +23,6 @@ import net.sevenstars.middleearth.gui.utils.widgets.searchbar.SearchBarResultType; import net.sevenstars.middleearth.network.packets.C2S.*; import net.sevenstars.middleearth.registries.DynamicRegistriesME; -import net.sevenstars.middleearth.resources.datas.attributes.AttributePool; import net.sevenstars.middleearth.resources.datas.attributes.AttributePoolElement; import net.sevenstars.middleearth.resources.datas.common.DispositionType; import net.sevenstars.middleearth.resources.datas.common.FactionType; @@ -32,7 +30,7 @@ import net.sevenstars.middleearth.resources.datas.factions.FactionLookup; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; import net.sevenstars.middleearth.resources.datas.races.Race; import net.sevenstars.middleearth.resources.datas.races.RaceStatTooltip; import org.joml.Vector2d; @@ -349,7 +347,8 @@ private void setRace(Integer index){ selectedRace = currentFaction.getRaces(world).get(index); currentNpcEntity = new NpcEntity(EntitiesME.NPC, world); - currentNpcEntity.setNpcData(currentFaction.getRandomNpcDataIdentifier()); + currentNpcEntity.prepareNpcIdentifier(currentFaction.getRandomNpcDataIdentifier()); + currentNpcEntity.prepare(); updateNpcPreview(); } @@ -362,7 +361,7 @@ public void updateNpcPreview(boolean forced){ Faction currentFaction = getCurrentFaction(); if(!forced){ - if(currentNpcEntity != null && currentFaction != null && currentNpcEntity.getFactionIdentifier() == currentFaction.getId() && currentNpcEntity.getNpcData().getRace() == selectedRace.getId()) + if(currentNpcEntity != null && currentFaction != null && currentNpcEntity.getFactionIdentifier() == currentFaction.getId() && currentNpcEntity.getNpcType().getRace() == selectedRace.getId()) return; } @@ -372,7 +371,7 @@ public void updateNpcPreview(boolean forced){ var idList = currentFaction.getAllNpcDatas().values().stream().flatMap(List::stream).toList(); // filter list by race - var optionalNpcRegistry = world.getRegistryManager().getOptional(DynamicRegistriesME.NPC); + var optionalNpcRegistry = world.getRegistryManager().getOptional(DynamicRegistriesME.NPC_TYPE); if(optionalNpcRegistry.isEmpty()) return; @@ -392,8 +391,8 @@ public void updateNpcPreview(boolean forced){ this.screen.elements.npcPreviewWidget.updateEntity(id, selectedRace, clientWorld, false); } - private boolean filterNpc(Registry registry, Identifier elementToFilter){ - NpcData foundData = registry.get(elementToFilter); + private boolean filterNpc(Registry registry, Identifier elementToFilter){ + NpcType foundData = registry.get(elementToFilter); if(foundData == null) return false; if(selectedRace == null) diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/playerbook/PlayerBookScreen.java b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/playerbook/PlayerBookScreen.java index 2a85a49597..da20b7f08c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/playerbook/PlayerBookScreen.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/playerbook/PlayerBookScreen.java @@ -89,7 +89,7 @@ public void render(DrawContext context, int mouseX, int mouseY, float deltaTicks int startTooltipY = (context.getScaledWindowHeight() / 2) - (int)(HEIGHT * 0.295f) + (index * 18); if (mouseX >= startTooltipX && mouseX <= startTooltipX + (chapter.name.length() * 4.75) + 5 && mouseY >= startTooltipY && mouseY <= startTooltipY + 9) { context.drawOrderedTooltip(this.client.textRenderer, Lists.transform( - List.of(Text.translatable("screen." + MiddleEarth.MOD_ID + ".navigate_to") + List.of(Text.translatable("screen." + MiddleEarth.MOD_ID + ".playerbook.navigate_to") ), Text::asOrderedText), mouseX, mouseY); text.formatted(Formatting.UNDERLINE); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/sack/SackSlot.java b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/sack/SackSlot.java index 7228b40e3a..9b39c5ee59 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/sack/SackSlot.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/sack/SackSlot.java @@ -2,6 +2,7 @@ import net.minecraft.inventory.Inventory; import net.minecraft.item.ItemStack; +import net.minecraft.registry.tag.ItemTags; import net.minecraft.screen.slot.Slot; import net.sevenstars.middleearth.item.DecorativeItemsME; @@ -12,7 +13,7 @@ public SackSlot(Inventory inventory, int index, int x, int y) { @Override public boolean canInsert(ItemStack stack) { - if(stack.isOf(DecorativeItemsME.SACK)) return false; + if(stack.isOf(DecorativeItemsME.SACK) || stack.isIn(ItemTags.SHULKER_BOXES)) return false; return super.canInsert(stack); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/utils/widgets/PlayableNpcPreviewWidget.java b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/utils/widgets/PlayableNpcPreviewWidget.java index 934981ab72..6ab3d68cf7 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/gui/utils/widgets/PlayableNpcPreviewWidget.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/gui/utils/widgets/PlayableNpcPreviewWidget.java @@ -121,9 +121,9 @@ public void updateEntity(Identifier npcDataIdentifier, Race race, ClientWorld wo haveBeenInitialized = true; NpcEntity npcEntity = new NpcEntityBuilder(world, null) - .withNpcData(npcDataIdentifier) + .withNpcType(npcDataIdentifier) .forceBuild(); - + npcEntity.prepare(); npcEntity.setAiDisabled(deactivatedAI); npcEntity.setBodyYaw(currentAngle); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/DecorativeItemsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/DecorativeItemsME.java index c5e6ead89f..7436f68fc3 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/DecorativeItemsME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/DecorativeItemsME.java @@ -122,7 +122,7 @@ public class DecorativeItemsME { public static final Item REINFORCED_CHEST = registerItem("reinforced_chest", (settings) -> new BlockItem(ModDecorativeBlocks.REINFORCED_CHEST, settings), new Item.Settings()); public static final Item SACK = registerItem("sack", - (settings) -> new BlockItem(ModDecorativeBlocks.SACK, settings), new Item.Settings()); + (settings) -> new BlockItem(ModDecorativeBlocks.SACK, settings), new Item.Settings().maxCount(1)); public static final Item WOOD_PILE = registerItem("wood_pile", (settings) -> new BlockItem(ModDecorativeBlocks.WOOD_PILE, settings), new Item.Settings()); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/EquipmentItemsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/EquipmentItemsME.java index b5da7a4a5d..1cb3ec3727 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/EquipmentItemsME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/EquipmentItemsME.java @@ -1489,14 +1489,14 @@ public class EquipmentItemsME { (settings) -> new CustomHelmetItem(ArmorMaterialsME.BURZUM_STEEL_T5, settings), new Item.Settings() .component(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(FactionRegistry.MORDOR))); public static final Item BLACK_CASTELLAN_CHESTPLATE = registerCustomModelArmorPiece("black_castellan_chestplate", - (settings) -> new CustomChestplateItem(ArmorMaterialsME.STEEL_T5, settings), new Item.Settings() + (settings) -> new CustomChestplateItem(ArmorMaterialsME.BURZUM_STEEL_T5, settings), new Item.Settings() .component(DataComponentTypesME.BACK_ATTACHMENT_DATA, BackAttachmentDataComponent.newBackAttachment(BackAttachmentsME.BLACK_CASTELLAN_CAPE)) .component(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(FactionRegistry.MORDOR))); public static final Item BLACK_CASTELLAN_LEGGINGS = registerArmorPiece("black_castellan_leggings", - (settings) -> new CustomLeggingsItem(ArmorMaterialsME.STEEL_T5, settings), new Item.Settings() + (settings) -> new CustomLeggingsItem(ArmorMaterialsME.BURZUM_STEEL_T5, settings), new Item.Settings() .component(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(FactionRegistry.MORDOR))); public static final Item BLACK_CASTELLAN_BOOTS = registerArmorPiece("black_castellan_boots", - (settings) -> new CustomBootsItem(ArmorMaterialsME.STEEL_T5, settings), new Item.Settings() + (settings) -> new CustomBootsItem(ArmorMaterialsME.BURZUM_STEEL_T5, settings), new Item.Settings() .component(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(FactionRegistry.MORDOR))); public static final Item MORDOR_BLACK_NUMENOREAN_PLATE_HELMET = registerCustomModelArmorPiece("mordor_black_numenorean_plate_helmet", diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/ResourceItemsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/ResourceItemsME.java index 11c4b06c89..ef1a08d684 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/ResourceItemsME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/ResourceItemsME.java @@ -290,6 +290,17 @@ public class ResourceItemsME { Item::new, new Item.Settings().maxCount(1).rarity(Rarity.EPIC) .component(DataComponentTypes.PROVIDES_BANNER_PATTERNS, BannerPatternTagsME.SNAIL_PATTERN_ITEM)); + public static final Item PTEROSAUR_NUGGET = registerHiddenItem("pterosaur_nugget", + HotChickenFoodItem::new, new Item.Settings()); + public static final Item THERAPOD_NUGGET = registerHiddenItem("therapod_nugget", + HotChickenFoodItem::new, new Item.Settings()); + public static final Item CERATOPSIAN_NUGGET = registerHiddenItem("ceratopsian_nugget", + HotChickenFoodItem::new, new Item.Settings()); + public static final Item THYREOPHORAN_NUGGET = registerHiddenItem("thyreophoran_nugget", + HotChickenFoodItem::new, new Item.Settings()); + public static final Item SAUROPOD_NUGGET = registerHiddenItem("sauropod_nugget", + HotChickenFoodItem::new, new Item.Settings().maxCount(16)); + private static Item registerItem(String name, Function factory, Item.Settings settings) { Item item = factory.apply(settings.registryKey(ModBlocks.keyOfItem(name))); ItemGroupsME.RESOURCES_CONTENTS.add(item.getDefaultStack()); @@ -297,6 +308,12 @@ private static Item registerItem(String name, Function fact RegistryAliasesME.aliases.add(new RegistryAliasesME.Alias(Registries.ITEM, name)); return Registry.register(Registries.ITEM, Identifier.of(MiddleEarth.MOD_ID, name), item); } + private static Item registerHiddenItem(String name, Function factory, Item.Settings settings) { + Item item = factory.apply(settings.registryKey(ModBlocks.keyOfItem(name))); + TranslationEntries.itemEntries.add(item); + RegistryAliasesME.aliases.add(new RegistryAliasesME.Alias(Registries.ITEM, name)); + return Registry.register(Registries.ITEM, Identifier.of(MiddleEarth.MOD_ID, name), item); + } public static void registerModItems() { MiddleEarth.LOGGER.logDebugMsg("Registering Mod Resource Items for " + MiddleEarth.MOD_ID); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/ToolItemsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/ToolItemsME.java index d1b77a5e2f..f360040ace 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/ToolItemsME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/ToolItemsME.java @@ -37,6 +37,8 @@ public class ToolItemsME { (settings) -> new SmithingHammerItem(settings, ToolMaterialsME.COPPER_HAMMER, -3.5f), new Item.Settings()); public static final Item BRONZE_SMITHING_HAMMER = registerItemHandheld("bronze_smithing_hammer", (settings) -> new SmithingHammerItem(settings, ToolMaterialsME.BRONZE_HAMMER, -3.35f), new Item.Settings()); + public static final Item CRUDE_SMITHING_HAMMER = registerItemHandheld("crude_smithing_hammer", + (settings) -> new SmithingHammerItem(settings, ToolMaterialsME.CRUDE_HAMMER, -3.35f), new Item.Settings()); public static final Item SMITHING_HAMMER = registerItemHandheld("smithing_hammer", (settings) -> new SmithingHammerItem(settings, ToolMaterialsME.STEEL_HAMMER, -3.2f), new Item.Settings()); @@ -64,10 +66,10 @@ public class ToolItemsME { public static final Item IRON_CHISEL = registerItemHandheld("iron_chisel", Item::new, new Item.Settings().maxCount(1) - .component(DataComponentTypes.MAX_DAMAGE, 2)); + .component(DataComponentTypes.MAX_DAMAGE, 4)); public static final Item STEEL_CHISEL = registerItemHandheld("steel_chisel", Item::new, new Item.Settings().maxCount(1) - .component(DataComponentTypes.MAX_DAMAGE, 4)); + .component(DataComponentTypes.MAX_DAMAGE, 16)); public static final Item MITHRIL_CHISEL = registerItemHandheld("mithril_chisel", Item::new, new Item.Settings().maxCount(1)); @@ -81,7 +83,7 @@ public class ToolItemsME { (settings) -> new HoeItem(ToolMaterialsME.BRONZE, -2.0f, -1.0f, settings), new Item.Settings()); public static final Item CRUDE_PICKAXE = registerItemHandheld("crude_pickaxe", - Item::new, new Item.Settings().pickaxe(ToolMaterialsME.CRUDE, 1.0f, -2.8f)); + Item::new, new Item.Settings().pickaxe(ToolMaterialsME.CRUDE, 0.5f, -2.8f)); public static final Item CRUDE_AXE = registerItemDualModel("crude_axe", (settings) -> new AxeItem(ToolMaterialsME.CRUDE, 6.0f, -3.0f, settings), new Item.Settings()); public static final Item CRUDE_SHOVEL = registerItemHandheld("crude_shovel", @@ -101,7 +103,7 @@ public class ToolItemsME { public static final Item BURZUM_STEEL_PICKAXE = registerItemHandheld("burzum_steel_pickaxe", Item::new, new Item.Settings().pickaxe(ToolMaterialsME.BURZUM_STEEL, 1.0f, -2.8f)); public static final Item BURZUM_STEEL_AXE = registerItemDualModel("burzum_steel_axe", - (settings) -> new CustomAxeWeaponItem(ToolMaterialsME.STEEL, settings), new Item.Settings()); + (settings) -> new CustomAxeWeaponItem(ToolMaterialsME.BURZUM_STEEL, settings), new Item.Settings()); public static final Item BURZUM_STEEL_SHOVEL = registerItemHandheld("burzum_steel_shovel", (settings) -> new ShovelItem(ToolMaterialsME.BURZUM_STEEL, 1.5f, -3.0f, settings), new Item.Settings()); public static final Item BURZUM_STEEL_HOE = registerItemHandheld("burzum_steel_hoe", @@ -135,7 +137,7 @@ public class ToolItemsME { (settings) -> new ShovelItem(ToolMaterialsME.MITHRIL, 1.5f, -3.0f, settings), new Item.Settings().fireproof() .component(DataComponentTypes.UNBREAKABLE, Unit.INSTANCE)); public static final Item MITHRIL_HOE = registerItemHandheld("mithril_hoe", - (settings) -> new HoeItem(ToolMaterialsME.MITHRIL, -2.0f, -1.0f, settings), new Item.Settings().fireproof() + (settings) -> new HoeItem(ToolMaterialsME.MITHRIL, -2.0f, 1.0f, settings), new Item.Settings().fireproof() .component(DataComponentTypes.UNBREAKABLE, Unit.INSTANCE)); public static final Item PIPE = registerItem2dGUI3dPerson("pipe", diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/WeaponItemsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/WeaponItemsME.java index 43ac85d8d3..46440829c0 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/WeaponItemsME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/WeaponItemsME.java @@ -445,6 +445,9 @@ public class WeaponItemsME { public static final Item WOODLAND_REALM_LONGSWORD = registerItemWithModel("woodland_realm_longsword", (settings) -> new CustomLongswordWeaponItem(ToolMaterialsME.EDHEL_STEEL, settings), new Item.Settings() .component(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(FactionRegistry.WOODLAND_REALM)), true); + public static final Item WOODLAND_REALM_DAGGER = registerItemWithModel("woodland_realm_dagger", + (settings) -> new CustomDaggerWeaponItem(ToolMaterialsME.EDHEL_STEEL, settings), new Item.Settings() + .component(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(FactionRegistry.WOODLAND_REALM)), false); public static final Item WOODLAND_REALM_AXE = registerItemWithModel("woodland_realm_axe", (settings) -> new CustomAxeWeaponItem(ToolMaterialsME.EDHEL_STEEL, settings), new Item.Settings() .component(DataComponentTypesME.FACTION_DATA, new FactionDataComponent(FactionRegistry.WOODLAND_REALM)), true); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/HotChickenFoodItem.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/HotChickenFoodItem.java new file mode 100644 index 0000000000..1fed8dd317 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/HotChickenFoodItem.java @@ -0,0 +1,36 @@ +package net.sevenstars.middleearth.item.items; + +import net.minecraft.component.DataComponentTypes; +import net.sevenstars.middleearth.item.DataComponentTypesME; +import net.sevenstars.middleearth.resources.datas.common.RaceType; +import net.sevenstars.middleearth.resources.datas.races.RaceUtil; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.effect.StatusEffectInstance; +import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +public class HotChickenFoodItem extends Item { + public HotChickenFoodItem(Settings settings) { + super(settings); + } + + @Override + public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user) { + if(world.isClient) return super.finishUsing(stack, world, user); + + if(user instanceof PlayerEntity playerEntity) { + if (!stack.isEmpty() && stack.get(DataComponentTypesME.TEMPERATURE_DATA) != null) { + int temperature = stack.get(DataComponentTypesME.TEMPERATURE_DATA).temperature(); + float percentage = 1; + if(stack.get(DataComponentTypes.FOOD) != null) { + percentage = 15 + (float)stack.get(DataComponentTypes.FOOD).nutrition() / 13; + } + playerEntity.setFireTicks((int) (temperature * percentage)); + } + } + return super.finishUsing(stack, world, user); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/MiddleEarthMapItem.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/MiddleEarthMapItem.java index aa4df48f0e..7626f69304 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/MiddleEarthMapItem.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/MiddleEarthMapItem.java @@ -1,25 +1,32 @@ package net.sevenstars.middleearth.item.items; -import net.fabricmc.api.EnvType; -import net.fabricmc.api.Environment; +import me.lucko.fabric.api.permissions.v0.Permissions; +import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.ActionResult; import net.minecraft.util.Hand; import net.minecraft.world.World; -import net.sevenstars.middleearth.gui.map.MapScreenController; +import net.sevenstars.middleearth.network.packets.S2C.PacketOpenMapScreen; +import net.sevenstars.middleearth.permissions.PermissionsME; public class MiddleEarthMapItem extends Item { public MiddleEarthMapItem(Settings settings) { super(settings); } - @Environment(EnvType.CLIENT) @Override public ActionResult use(World world, PlayerEntity user, Hand hand) { - MapScreenController controller = new MapScreenController(world, user); - if(controller.open()) - return super.use(world, user, hand); - return ActionResult.FAIL; + if (world.isClient) { + return ActionResult.SUCCESS; + } + if(user instanceof ServerPlayerEntity serverPlayerEntity) { + boolean canTeleport = PermissionsME.checkMapTeleport(serverPlayerEntity); + PacketOpenMapScreen packet = new PacketOpenMapScreen(canTeleport); + ServerPlayNetworking.send(serverPlayerEntity, packet); + return ActionResult.SUCCESS; + } + return ActionResult.PASS; } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/OrcishFoodItem.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/OrcishFoodItem.java index fba6989200..a833030586 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/OrcishFoodItem.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/OrcishFoodItem.java @@ -16,9 +16,8 @@ public OrcishFoodItem(Settings settings) { } @Override - public boolean onStoppedUsing(ItemStack stack, World world, LivingEntity user, int remainingUseTicks) { - super.onStoppedUsing(stack, world, user, remainingUseTicks); - if(world.isClient) return false; + public ItemStack finishUsing(ItemStack stack, World world, LivingEntity user) { + if(world.isClient) return super.finishUsing(stack, world, user); if(user instanceof PlayerEntity playerEntity) { RaceType raceType = RaceUtil.getRaceType(playerEntity); @@ -28,6 +27,6 @@ public boolean onStoppedUsing(ItemStack stack, World world, LivingEntity user, i } } - return true; + return super.finishUsing(stack, world, user); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/weapons/CustomLongswordWeaponItem.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/weapons/CustomLongswordWeaponItem.java index a6973b2513..0a79836d7c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/weapons/CustomLongswordWeaponItem.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/items/weapons/CustomLongswordWeaponItem.java @@ -1,25 +1,19 @@ package net.sevenstars.middleearth.item.items.weapons; -import net.minecraft.component.DataComponentTypes; -import net.minecraft.component.type.BlocksAttacksComponent; import net.minecraft.item.Item; -import net.minecraft.registry.tag.DamageTypeTags; -import net.minecraft.sound.SoundEvents; import net.sevenstars.middleearth.item.utils.WeaponTypesME; import net.minecraft.item.ToolMaterial; -import java.util.List; -import java.util.Optional; - public class CustomLongswordWeaponItem extends ReachWeaponItem { public CustomLongswordWeaponItem(ToolMaterial toolMaterial, Item.Settings settings) { - super(toolMaterial, WeaponTypesME.LONGSWORD, settings - .component(DataComponentTypes.BLOCKS_ATTACKS, + super(toolMaterial, WeaponTypesME.LONGSWORD, settings); + // Keep in case of pvp re-balancing feedbacks + /*.component(DataComponentTypes.BLOCKS_ATTACKS, new BlocksAttacksComponent(0.25F, 1.0F, List.of( new BlocksAttacksComponent.DamageReduction(90.0F, Optional.empty(), 0.0F, 1.0F)), new BlocksAttacksComponent.ItemDamage(3.0F, 1.0F, 1.0F), Optional.of(DamageTypeTags.BYPASSES_SHIELD), Optional.of(SoundEvents.ITEM_SHIELD_BLOCK), Optional.of(SoundEvents.ITEM_SHIELD_BREAK))) - .component(DataComponentTypes.BREAK_SOUND, SoundEvents.ITEM_SHIELD_BREAK)); + .component(DataComponentTypes.BREAK_SOUND, SoundEvents.ITEM_SHIELD_BREAK)*/ this.type = WeaponTypesME.LONGSWORD; } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ItemGroupsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ItemGroupsME.java index 74d8569097..634f75cdeb 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ItemGroupsME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ItemGroupsME.java @@ -1,15 +1,17 @@ package net.sevenstars.middleearth.item.utils; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; +import net.minecraft.client.MinecraftClient; import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.CustomModelDataComponent; import net.minecraft.component.type.NbtComponent; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; +import net.minecraft.item.equipment.trim.ArmorTrimMaterial; import net.minecraft.nbt.NbtCompound; -import net.minecraft.registry.Registries; -import net.minecraft.registry.Registry; -import net.minecraft.registry.RegistryWrapper; +import net.minecraft.nbt.NbtElement; +import net.minecraft.nbt.NbtOps; +import net.minecraft.registry.*; import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.text.Text; import net.minecraft.util.Identifier; @@ -18,11 +20,12 @@ import net.sevenstars.middleearth.block.registration.ModNatureBlocks; import net.sevenstars.middleearth.block.registration.StoneBlockSets; import net.sevenstars.middleearth.block.registration.WoodBlockSets; -import net.sevenstars.middleearth.entity.npcs.initializer.NpcEntityInitializer; +import net.sevenstars.middleearth.entity.npcs.NpcEntity; +import net.sevenstars.middleearth.entity.npcs.data.NpcInitializationData; import net.sevenstars.middleearth.entity.npcs.initializer.NpcSpawnEggHelper; import net.sevenstars.middleearth.item.*; import net.sevenstars.middleearth.registries.DynamicRegistriesME; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; import java.util.Comparator; import java.util.LinkedList; @@ -30,34 +33,6 @@ import java.util.function.Predicate; public class ItemGroupsME { - - private static final Comparator> NPC_DATA_COMPARATOR = Comparator.comparing(RegistryEntry::value, Comparator.comparing(NpcData::getId)); - - private static void addNpcEggs(ItemGroup.Entries entries, RegistryWrapper.Impl registryWrapper, Predicate> filter, ItemGroup.StackVisibility stackVisibility) { - Identifier randomSpawnEggId = MiddleEarth.of("npc_random_spawn_egg"); - - ItemStack randomNpcSpawnEgg = new ItemStack(EggItemsME.NPC_SPAWN_EGG); - - NbtCompound randomCompound = new NbtCompound(); - randomCompound.putString("id", MiddleEarth.of("npc").toString()); - randomCompound.putString("NpcDataId", NpcEntityInitializer.RANDOM.toString()); - randomNpcSpawnEgg.set(DataComponentTypes.ENTITY_DATA, NbtComponent.of(randomCompound)); - randomNpcSpawnEgg.set(DataComponentTypes.ITEM_NAME, Text.translatable(randomSpawnEggId.toTranslationKey("item"))); - randomNpcSpawnEgg.set(DataComponentTypes.CUSTOM_MODEL_DATA, new CustomModelDataComponent( - List.of(), - List.of(), - List.of(randomSpawnEggId.getPath().replaceAll("\\.", "_")), - List.of())); - - entries.add(randomNpcSpawnEgg); - - registryWrapper.streamEntries().filter(filter).sorted(NPC_DATA_COMPARATOR).forEach(reference -> { - ItemStack spawnEgg = NpcSpawnEggHelper.getSpawnEgg(reference.value()); - entries.add(spawnEgg, stackVisibility); - }); - } - - public static final List STONE_BLOCKS_CONTENTS = new LinkedList<>(); public static final ItemGroup STONE_BLOCKS = FabricItemGroup.builder() .displayName(Text.translatable(MiddleEarth.of("stone_blocks").toTranslationKey("itemGroup"))) @@ -99,6 +74,7 @@ private static void addNpcEggs(ItemGroup.Entries entries, RegistryWrapper.Impl new ItemStack(ResourceItemsME.MITHRIL_INGOT)) .entries((displayContext, entries) -> { for (ItemStack item : RESOURCES_CONTENTS) { - entries.add(item); + entries.addAll(ItemGroupsUtil.processResourceItem(item, displayContext)); } }) .build(); @@ -176,27 +152,28 @@ private static void addNpcEggs(ItemGroup.Entries entries, RegistryWrapper.Impl addNpcEggs( + displayContext.lookup().getOptional(DynamicRegistriesME.NPC_TYPE) + .ifPresent(registryWrapper -> ItemGroupsUtil.addNpcEggs( entries, registryWrapper, registryEntry -> true, + displayContext.lookup(), ItemGroup.StackVisibility.PARENT_AND_SEARCH_TABS)); }) .build(); public static void register() { - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "stone_blocks"), STONE_BLOCKS); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "wood_blocks"), WOOD_BLOCKS); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "misc_blocks"), MISC_BLOCKS); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "decorative"), DECORATIVES_BLOCKS); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "nature_blocks"), NATURE_BLOCKS); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "food_items"), FOOD); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "weapon_items"), WEAPONS); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "equipment_items"), EQUIPMENT); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "tool_items"), TOOLS); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "resource_items"), RESOURCES); - Registry.register(Registries.ITEM_GROUP, Identifier.of(MiddleEarth.MOD_ID, "spawn_egg_items"), SPAWN_EGGS); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("stone_blocks"), STONE_BLOCKS); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("wood_blocks"), WOOD_BLOCKS); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("misc_blocks"), MISC_BLOCKS); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("decorative"), DECORATIVES_BLOCKS); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("nature_blocks"), NATURE_BLOCKS); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("food_items"), FOOD); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("weapon_items"), WEAPONS); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("equipment_items"), EQUIPMENT); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("tool_items"), TOOLS); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("resource_items"), RESOURCES); + Registry.register(Registries.ITEM_GROUP, MiddleEarth.of("spawn_egg_items"), SPAWN_EGGS); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ItemGroupsUtil.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ItemGroupsUtil.java new file mode 100644 index 0000000000..3770145844 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ItemGroupsUtil.java @@ -0,0 +1,147 @@ +package net.sevenstars.middleearth.item.utils; + +import net.minecraft.client.MinecraftClient; +import net.minecraft.component.DataComponentTypes; +import net.minecraft.component.type.CustomModelDataComponent; +import net.minecraft.component.type.NbtComponent; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraft.item.equipment.trim.ArmorTrim; +import net.minecraft.item.equipment.trim.ArmorTrimMaterial; +import net.minecraft.item.equipment.trim.ArmorTrimMaterials; +import net.minecraft.item.equipment.trim.ArmorTrimPattern; +import net.minecraft.nbt.NbtCompound; +import net.minecraft.nbt.NbtElement; +import net.minecraft.nbt.NbtOps; +import net.minecraft.registry.*; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.text.Text; +import net.minecraft.util.Identifier; +import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.entity.npcs.NpcEntity; +import net.sevenstars.middleearth.entity.npcs.data.NpcInitializationData; +import net.sevenstars.middleearth.entity.npcs.initializer.NpcSpawnEggHelper; +import net.sevenstars.middleearth.item.EggItemsME; +import net.sevenstars.middleearth.item.ResourceItemsME; +import net.sevenstars.middleearth.registries.DynamicRegistriesME; +import net.sevenstars.middleearth.resources.datas.factions.Faction; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Comparator; +import java.util.List; +import java.util.function.Predicate; + +public class ItemGroupsUtil { + private static final Comparator> NPC_DATA_COMPARATOR = Comparator.comparing(RegistryEntry::value, Comparator.comparing(NpcType::getId)); + + public static void addNpcEggs(ItemGroup.Entries entries, RegistryWrapper.Impl registryWrapper, Predicate> filter, RegistryWrapper.WrapperLookup lookup, ItemGroup.StackVisibility stackVisibility) { + Identifier randomSpawnEggId = MiddleEarth.of("npc_random_spawn_egg"); + + ItemStack randomNpcSpawnEgg = new ItemStack(EggItemsME.NPC_SPAWN_EGG); + + NbtCompound compoundData = new NbtCompound(); + compoundData.putString("id", MiddleEarth.of("npc").toString()); + + NpcInitializationData npcInitializationData = new NpcInitializationData(null, true); + + RegistryOps ops = RegistryOps.of( + NbtOps.INSTANCE, + lookup + ); + + NbtElement element = NpcInitializationData.CODEC + .encodeStart(ops, npcInitializationData) + .getOrThrow(); + compoundData.put(NpcEntity.KeyStrings.INITIALIZATION_DATA, element); + + randomNpcSpawnEgg.set(DataComponentTypes.ENTITY_DATA, NbtComponent.of(compoundData)); + randomNpcSpawnEgg.set(DataComponentTypes.ITEM_NAME, Text.translatable(randomSpawnEggId.toTranslationKey("item"))); + randomNpcSpawnEgg.set(DataComponentTypes.CUSTOM_MODEL_DATA, new CustomModelDataComponent( + List.of(), + List.of(), + List.of(randomSpawnEggId.getPath().replaceAll("\\.", "_")), + List.of())); + + entries.add(randomNpcSpawnEgg); + + registryWrapper.streamEntries().filter(filter).sorted(NPC_DATA_COMPARATOR).forEach(reference -> { + ItemStack spawnEgg = NpcSpawnEggHelper.getSpawnEgg(reference.value(), lookup); + entries.add(spawnEgg, stackVisibility); + }); + } + + private static ItemStack addTrim(Item partItem, RegistryWrapper.WrapperLookup wrapper, RegistryKey reference) { + ItemStack item = partItem.getDefaultStack(); + RegistryEntry.Reference material = wrapper.getOptional(RegistryKeys.TRIM_MATERIAL).orElseThrow().getOrThrow(reference); + RegistryEntry.Reference pattern = wrapper.getOptional(RegistryKeys.TRIM_PATTERN).orElseThrow().getOptional(RegistryKey.of(RegistryKeys.TRIM_PATTERN, MiddleEarth.of( "smithing_part"))).orElse(null); + item.set(DataComponentTypes.TRIM, new ArmorTrim(material , pattern)); + return item; + } + + public static Collection processResourceItem(ItemStack itemStack, ItemGroup.DisplayContext displayContext) { + if(PART_LIST.contains(itemStack.getItem())) { + return processSmithingMaterial(itemStack.getItem(), displayContext); + } + return List.of(itemStack); + } + + private static Collection processSmithingMaterial(Item item, ItemGroup.DisplayContext displayContext) { + RegistryWrapper.WrapperLookup wrapper = displayContext.lookup(); + List trimSet = new ArrayList<>(); + for(RegistryKey trimKey : METAL_LIST){ + trimSet.add(addTrim(item, wrapper, trimKey)); + } + return trimSet; + } + + private static final List PART_LIST = List.of( + ResourceItemsME.ROD, + ResourceItemsME.LARGE_ROD, + ResourceItemsME.PICKAXE_HEAD, + ResourceItemsME.AXE_HEAD, + ResourceItemsME.SHOVEL_HEAD, + ResourceItemsME.HOE_HEAD, + ResourceItemsME.SHORT_BLADE, + ResourceItemsME.BLADE, + ResourceItemsME.LONG_BLADE, + ResourceItemsME.SWORD_HILT, + ResourceItemsME.MAIL_RING, + ResourceItemsME.MAIL, + ResourceItemsME.SCALE, + ResourceItemsME.SCALE_MAIL, + ResourceItemsME.ARMOR_PLATE, + ResourceItemsME.HELMET_PLATE, + ResourceItemsME.SHIELD_BORDER, + ResourceItemsME.SHIELD_PLATE + ); + + private static final List> METAL_LIST = List.of( + SmithingTrimMaterialsME.TIN, + ArmorTrimMaterials.COPPER, + SmithingTrimMaterialsME.BRONZE, + SmithingTrimMaterialsME.CRUDE, + ArmorTrimMaterials.IRON, + SmithingTrimMaterialsME.SILVER, + SmithingTrimMaterialsME.LEAD, + ArmorTrimMaterials.GOLD, + SmithingTrimMaterialsME.STEEL, + SmithingTrimMaterialsME.EDHEL_STEEL, + SmithingTrimMaterialsME.KHAZAD_STEEL, + SmithingTrimMaterialsME.BURZUM_STEEL, + SmithingTrimMaterialsME.MITHRIL + ); + + public static Collection addFactionBanners(RegistryWrapper.WrapperLookup lookup) { + List bannerList = new ArrayList<>(); + List> factions = lookup.getOrThrow(DynamicRegistriesME.FACTION).streamEntries().toList(); + for(RegistryEntry.Reference factionReference : factions){ + ItemStack bannerItem = factionReference.value().getBannerItem(lookup); + if(!bannerItem.isEmpty()) + bannerList.add(bannerItem); + } + return bannerList; + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ToolMaterialsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ToolMaterialsME.java index c7e57d22be..aa5bcd8532 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ToolMaterialsME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/item/utils/ToolMaterialsME.java @@ -13,13 +13,14 @@ public class ToolMaterialsME { public static final ToolMaterial BURZUM_STEEL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 1561, 7.0f, 2.0f, 10, ItemTagsME.BURZUM_STEEL_TOOL_MATERIALS); public static final ToolMaterial EDHEL_STEEL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 1561, 7.0f, 2.0f, 10, ItemTagsME.EDHEL_STEEL_TOOL_MATERIALS); public static final ToolMaterial KHAZAD_STEEL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 1561, 7.0f, 2.0f, 10, ItemTagsME.KHAZAD_STEEL_TOOL_MATERIALS); - public static final ToolMaterial MITHRIL = new ToolMaterial(BlockTags.INCORRECT_FOR_NETHERITE_TOOL, 2031, 9.0f, 1.0f, 15, ItemTagsME.MITHRIL_TOOL_MATERIALS); + public static final ToolMaterial MITHRIL = new ToolMaterial(BlockTags.INCORRECT_FOR_NETHERITE_TOOL, 2031, 10.0f, 0.0f, 15, ItemTagsME.MITHRIL_TOOL_MATERIALS); public static final ToolMaterial WEAVER_STING = new ToolMaterial(BlockTags.INCORRECT_FOR_STONE_TOOL, 1561, 4.0f, 1.0f, 5, ItemTagsME.SPIDER_TOOL_MATERIALS); public static final ToolMaterial MORGUL_KNIFE = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 2, 7.0f, 2.0f, 10, ItemTagsME.BURZUM_STEEL_TOOL_MATERIALS); public static final ToolMaterial COPPER_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 32, 7.0f, 2.0f, 10, ItemTagsME.COPPER_TOOL_MATERIALS); public static final ToolMaterial BRONZE_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 128, 7.0f, 2.0f, 10, ItemTagsME.BRONZE_TOOL_MATERIALS); + public static final ToolMaterial CRUDE_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 128, 7.0f, 2.0f, 10, ItemTagsME.CRUDE_TOOL_MATERIALS); public static final ToolMaterial STEEL_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 256, 7.0f, 2.0f, 10, ItemTagsME.STEEL_TOOL_MATERIALS); public static final ToolMaterial NOBLE_STEEL_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 512, 7.0f, 2.0f, 10, ItemTagsME.STEEL_TOOL_MATERIALS); @@ -33,6 +34,5 @@ public class ToolMaterialsME { public static final ToolMaterial BURZUM_STEEL_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 256, 7.0f, 2.0f, 10, ItemTagsME.BURZUM_STEEL_TOOL_MATERIALS); public static final ToolMaterial BURZUM_NOBLE_STEEL_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 512, 7.0f, 2.0f, 10, ItemTagsME.BURZUM_STEEL_TOOL_MATERIALS); - public static final ToolMaterial MITHRIL_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 1024, 7.0f, 2.0f, 10, ItemTagsME.MITHRIL_TOOL_MATERIALS); - ; + public static final ToolMaterial MITHRIL_HAMMER = new ToolMaterial(BlockTags.INCORRECT_FOR_WOODEN_TOOL, 1024, 7.0f, 0.0f, 10, ItemTagsME.MITHRIL_TOOL_MATERIALS); } \ No newline at end of file diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/FilledMapItemMixin.java b/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/FilledMapItemMixin.java new file mode 100644 index 0000000000..cd8270ba0b --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/FilledMapItemMixin.java @@ -0,0 +1,35 @@ +package net.sevenstars.middleearth.mixin; + +import net.minecraft.block.BlockState; +import net.minecraft.block.MapColor; +import net.minecraft.item.FilledMapItem; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.BlockView; +import net.sevenstars.middleearth.MiddleEarth; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +@Mixin(FilledMapItem.class) +public class FilledMapItemMixin { + @Redirect( + method = "updateColors", + at = @At( + value = "INVOKE", + target = "Lnet/minecraft/block/BlockState;getMapColor(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/block/MapColor;" + ) + ) + private MapColor preventNullMapColor(BlockState state, BlockView world, BlockPos pos) { + MapColor color = state.getMapColor(world, pos); + //debug(state, world, pos); + return color == null ? MapColor.CLEAR : color; + } + + private void debug(BlockState state, BlockView world, BlockPos pos) { + MapColor color = state.getMapColor(world, pos); + + if (color == null) { + MiddleEarth.LOGGER.logError("Null map color at " + pos+ " block " + state.toString()); + } + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/ServerWorldMixin.java b/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/ServerWorldMixin.java index 751c277b5d..7124cd2649 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/ServerWorldMixin.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/ServerWorldMixin.java @@ -29,8 +29,15 @@ private void tickChunk(WorldChunk chunk, int randomTickSpeed, CallbackInfo ci) { // Reason of addition // MC-188578 - Sleeping in a bed in a custom dimension doesn't set time to day // Link : https://bugs.mojang.com/browse/MC-188578 - @Inject(method = "wakeSleepingPlayers", at = @At(value = "RETURN")) + @Inject(method = "wakeSleepingPlayers", at = @At("TAIL")) private void wakeSleepingPlayers(CallbackInfo ci) { + ServerWorld world = (ServerWorld) (Object) this; + + if (world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)) { + long currentTimeOfDay = world.getTimeOfDay() + 24000L; + world.setTimeOfDay(currentTimeOfDay - currentTimeOfDay % 24000L); + } + // The math is like vanilla (ServerWorld lines ~[310-319]) if (server.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE)) { long currentTimeOfDay = server.getWorld(World.OVERWORLD).getTimeOfDay() + 24000L; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/SpawnHelperMixin.java b/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/SpawnHelperMixin.java new file mode 100644 index 0000000000..c44be43ca2 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/mixin/SpawnHelperMixin.java @@ -0,0 +1,30 @@ +package net.sevenstars.middleearth.mixin; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnGroup; +import net.minecraft.entity.SpawnReason; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.SpawnHelper; +import net.minecraft.world.biome.SpawnSettings; +import net.minecraft.world.gen.StructureAccessor; +import net.minecraft.world.gen.chunk.ChunkGenerator; +import net.sevenstars.middleearth.utils.SpawnUtil; +import net.sevenstars.middleearth.world.dimension.ModDimensions; +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.CallbackInfoReturnable; + +@Mixin(SpawnHelper.class) +public class SpawnHelperMixin { + + @Inject(method = "canSpawn", at = @At("HEAD"), cancellable = true) + private static void canSpawnMixin(ServerWorld world, SpawnGroup group, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, SpawnSettings.SpawnEntry spawnEntry, BlockPos.Mutable pos, double squaredDistance, CallbackInfoReturnable cir) { + EntityType type = spawnEntry.type(); + // Only checks if in the MEM dimension (TODO : make it more datadrivne) + if (world.getRegistryKey().equals(ModDimensions.ME_DIMENSION_KEY) && !SpawnUtil.canCreatureSpawn(type, world, SpawnReason.NATURAL, pos, world.getRandom())) { + cir.setReturnValue(false); + } + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/network/ModClientNetworkHandler.java b/middle-earth/src/main/java/net/sevenstars/middleearth/network/ModClientNetworkHandler.java index 743e5e3a7f..d056e1e8e9 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/network/ModClientNetworkHandler.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/network/ModClientNetworkHandler.java @@ -17,6 +17,7 @@ public static void register(IConnectionToServer connection) { ClientPlayNetworking.registerGlobalReceiver(InscriptionEnchantInfoPacket.ID, wrapClientHandler(connection, InscriptionEnchantInfoPacket::process)); ClientPlayNetworking.registerGlobalReceiver(ShapingAnvilRecipePacket.ID, wrapClientHandler(connection, ShapingAnvilRecipePacket::process)); ClientPlayNetworking.registerGlobalReceiver(ArtisanRecipePacket.ID, wrapClientHandler(connection, ArtisanRecipePacket::process)); + ClientPlayNetworking.registerGlobalReceiver(PacketOpenMapScreen.ID, wrapClientHandler(connection, PacketOpenMapScreen::process)); } private static > ClientPlayNetworking.PlayPayloadHandler wrapClientHandler(IConnectionToServer connection, BiConsumer consumer) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/network/ModServerNetworkHandler.java b/middle-earth/src/main/java/net/sevenstars/middleearth/network/ModServerNetworkHandler.java index ef5db54300..c6e0672154 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/network/ModServerNetworkHandler.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/network/ModServerNetworkHandler.java @@ -22,6 +22,7 @@ public static void register(IConnectionToClient connection) { PayloadTypeRegistry.playS2C().register(InscriptionEnchantInfoPacket.ID, InscriptionEnchantInfoPacket.CODEC); PayloadTypeRegistry.playS2C().register(ShapingAnvilRecipePacket.ID, ShapingAnvilRecipePacket.CODEC); PayloadTypeRegistry.playS2C().register(ArtisanRecipePacket.ID, ArtisanRecipePacket.CODEC); + PayloadTypeRegistry.playS2C().register(PacketOpenMapScreen.ID, PacketOpenMapScreen.CODEC); // REGISTRY : Client to server PayloadTypeRegistry.playC2S().register(PacketStructureManagerRespawnEntities.ID, PacketStructureManagerRespawnEntities.CODEC); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/network/packets/C2S/PacketTeleportToDynamicWorldCoordinate.java b/middle-earth/src/main/java/net/sevenstars/middleearth/network/packets/C2S/PacketTeleportToDynamicWorldCoordinate.java index 1e5b3ed8ee..b449ae9da8 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/network/packets/C2S/PacketTeleportToDynamicWorldCoordinate.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/network/packets/C2S/PacketTeleportToDynamicWorldCoordinate.java @@ -1,8 +1,10 @@ package net.sevenstars.middleearth.network.packets.C2S; +import me.lucko.fabric.api.permissions.v0.Permissions; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.network.contexts.ServerPacketContext; import net.sevenstars.middleearth.network.packets.ClientToServerPacket; +import net.sevenstars.middleearth.permissions.PermissionsME; import net.sevenstars.middleearth.world.dimension.ModDimensions; import net.minecraft.network.RegistryByteBuf; import net.minecraft.network.codec.PacketCodec; @@ -37,6 +39,8 @@ public PacketCodec stre @Override public void process(ServerPacketContext context) { context.player().getServer().execute(() -> { + if(!PermissionsME.checkMapTeleport(context.player())) + return; Vec3d coordinates = new Vec3d(xCoordinate, ModDimensions.getDimensionHeight((int)xCoordinate, (int)zCoordinate).y, zCoordinate); ModDimensions.teleportPlayerToMe(context.player(), coordinates, false, false); }); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/network/packets/S2C/PacketOpenMapScreen.java b/middle-earth/src/main/java/net/sevenstars/middleearth/network/packets/S2C/PacketOpenMapScreen.java new file mode 100644 index 0000000000..8ba1b9ac71 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/network/packets/S2C/PacketOpenMapScreen.java @@ -0,0 +1,42 @@ +package net.sevenstars.middleearth.network.packets.S2C; + +import net.fabricmc.api.EnvType; +import net.fabricmc.api.Environment; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.network.RegistryByteBuf; +import net.minecraft.network.codec.PacketCodec; +import net.minecraft.network.codec.PacketCodecs; +import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.gui.map.MapScreenController; +import net.sevenstars.middleearth.network.contexts.ClientPacketContext; +import net.sevenstars.middleearth.network.packets.ServerToClientPacket; + +public class PacketOpenMapScreen extends ServerToClientPacket { + public static final Id ID = new Id<>(MiddleEarth.of("packet_open_map_screen")); + public static final PacketCodec CODEC = PacketCodec.tuple( + PacketCodecs.BOOLEAN, p -> p.canTeleport, + PacketOpenMapScreen::new + ); + private final boolean canTeleport; + + public PacketOpenMapScreen(boolean canTeleport) { + this.canTeleport = canTeleport; + } + @Override + public Id getId() { + return ID; + } + + @Override + public PacketCodec streamCodec() { + return CODEC; + } + + @Override + @Environment(EnvType.CLIENT) + public void process(ClientPacketContext context) { + PlayerEntity player = context.player(); + MapScreenController controller = new MapScreenController(player.getWorld(), player); + controller.open(canTeleport); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/permissions/PermissionsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/permissions/PermissionsME.java new file mode 100644 index 0000000000..99e6e58ec2 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/permissions/PermissionsME.java @@ -0,0 +1,10 @@ +package net.sevenstars.middleearth.permissions; + +import me.lucko.fabric.api.permissions.v0.Permissions; +import net.minecraft.server.network.ServerPlayerEntity; + +public class PermissionsME { + public static boolean checkMapTeleport(ServerPlayerEntity player) { + return Permissions.check(player, "middle-earth.map-teleport", 2); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/recipe/AlloyingRecipe.java b/middle-earth/src/main/java/net/sevenstars/middleearth/recipe/AlloyingRecipe.java index 8a61db933f..0d602275cd 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/recipe/AlloyingRecipe.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/recipe/AlloyingRecipe.java @@ -22,17 +22,19 @@ public class AlloyingRecipe implements Recipe { public final String output; public final int amount; public final List inputs; - final CraftingRecipeCategory category; - final String group; + private final CraftingRecipeCategory category; + private final String group; + private final int xp; private IngredientPlacement ingredientPlacement; - public AlloyingRecipe(String group, CraftingRecipeCategory category, String output, List recipeItems, int amount) { + public AlloyingRecipe(String group, CraftingRecipeCategory category, String output, List recipeItems, int amount, int xp) { this.output = output; this.group = group; this.inputs = recipeItems; this.amount = amount; this.category = category; + this.xp = xp; } public DefaultedList getIngredients() { @@ -88,6 +90,10 @@ public int getAmount() { return amount; } + public int getXp() { + return xp; + } + @Override public RecipeSerializer> getSerializer() { return Serializer.INSTANCE; @@ -130,7 +136,8 @@ protected Serializer() { CraftingRecipeCategory.CODEC.fieldOf("category").orElse(CraftingRecipeCategory.MISC).forGetter(recipe -> recipe.category), Codec.STRING.fieldOf("output").forGetter(recipe -> recipe.output), Ingredient.CODEC.listOf().fieldOf("ingredients").forGetter(recipe -> recipe.inputs), - Codec.INT.fieldOf("amount").forGetter(recipe -> recipe.amount) + Codec.INT.fieldOf("amount").forGetter(recipe -> recipe.amount), + Codec.INT.fieldOf("xp").forGetter(recipe -> recipe.xp) ).apply(instance, AlloyingRecipe::new)); this.packetCodec = PacketCodec.ofStatic(Serializer::write, Serializer::read); @@ -154,7 +161,8 @@ private static AlloyingRecipe read(RegistryByteBuf buf) { int i = buf.readVarInt(); DefaultedList defaultedList = DefaultedList.ofSize(i); defaultedList.replaceAll(empty -> Ingredient.PACKET_CODEC.decode(buf)); - return new AlloyingRecipe(string, craftingRecipeCategory, output, defaultedList, amount); + int xp = buf.readVarInt(); + return new AlloyingRecipe(string, craftingRecipeCategory, output, defaultedList, amount, xp); } private static void write(RegistryByteBuf buf, AlloyingRecipe recipe) { @@ -166,6 +174,7 @@ private static void write(RegistryByteBuf buf, AlloyingRecipe recipe) { for (Ingredient ingredient : recipe.inputs) { Ingredient.PACKET_CODEC.encode(buf, ingredient); } + buf.writeVarInt(recipe.xp); } } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/recipe/ArtisanRecipe.java b/middle-earth/src/main/java/net/sevenstars/middleearth/recipe/ArtisanRecipe.java index 8d7a5a77f6..77d4bcc21b 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/recipe/ArtisanRecipe.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/recipe/ArtisanRecipe.java @@ -22,12 +22,14 @@ public class ArtisanRecipe implements Recipe { public final ItemStack output; public final String disposition; public final List inputs; + public final int xp; - public ArtisanRecipe(String category, ItemStack output, List recipeItems, String disposition) { + public ArtisanRecipe(String category, ItemStack output, List recipeItems, String disposition, int xp) { this.category = category; this.output = output; this.inputs = recipeItems; this.disposition = disposition; + this.xp = xp; } public ArtisanRecipe(String category, ItemStack output, List recipeItems) { @@ -35,6 +37,7 @@ public ArtisanRecipe(String category, ItemStack output, List recipeI this.output = output; this.inputs = recipeItems; this.disposition = null; + this.xp = 0; } public ItemStack createIcon() { @@ -77,6 +80,10 @@ public ItemStack getOutput() { return output; } + public int getXp() { + return xp; + } + public DefaultedList getIngredients() { DefaultedList defaultedList = DefaultedList.of(); defaultedList.addAll(this.inputs); @@ -129,7 +136,8 @@ protected Serializer() { Codec.STRING.fieldOf("category").forGetter(recipe -> recipe.category), ItemStack.CODEC.fieldOf("output").forGetter(recipe -> recipe.output), Ingredient.CODEC.listOf().fieldOf("ingredients").forGetter(recipe -> recipe.inputs), - Codec.STRING.fieldOf("disposition").forGetter(recipe -> recipe.disposition) + Codec.STRING.fieldOf("disposition").forGetter(recipe -> recipe.disposition), + Codec.INT.fieldOf("xp").forGetter(recipe -> recipe.xp) ).apply(instance, ArtisanRecipe::new)); this.packetCodec = PacketCodec.ofStatic(Serializer::write, Serializer::read); @@ -152,7 +160,8 @@ private static ArtisanRecipe read(RegistryByteBuf buf) { DefaultedList defaultedList = DefaultedList.ofSize(i); defaultedList.replaceAll(empty -> CustomIngredientImpl.PACKET_CODEC.decode(buf)); String disposition = buf.readString(); - return new ArtisanRecipe(category, output, defaultedList, disposition); + int xp = buf.readVarInt(); + return new ArtisanRecipe(category, output, defaultedList, disposition, xp); } private static void write(RegistryByteBuf buf, ArtisanRecipe recipe) { @@ -163,6 +172,7 @@ private static void write(RegistryByteBuf buf, ArtisanRecipe recipe) { CustomIngredientImpl.PACKET_CODEC.encode(buf, ingredient); } buf.writeString(recipe.disposition); + buf.writeVarInt(recipe.xp); } } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/DynamicRegistriesME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/DynamicRegistriesME.java index 3a5a08bf10..04b2b95c99 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/DynamicRegistriesME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/DynamicRegistriesME.java @@ -1,10 +1,13 @@ package net.sevenstars.middleearth.registries; +import com.mojang.serialization.Codec; import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator; import net.fabricmc.fabric.api.event.registry.DynamicRegistries; import net.minecraft.registry.Registry; import net.minecraft.registry.RegistryBuilder; import net.minecraft.registry.RegistryKey; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.registry.entry.RegistryFixedCodec; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.datageneration.providers.dynamic.GreatHornVariantsProvider; import net.sevenstars.middleearth.datageneration.providers.dynamic.*; @@ -14,13 +17,13 @@ import net.sevenstars.middleearth.registries.content.greathornvariants.GreatHornVariantRegistry; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; import net.sevenstars.middleearth.registries.content.spidervariants.SpiderVariantRegistry; import net.sevenstars.middleearth.registries.content.structuremanagerdatas.StructureManagerDataRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; import net.sevenstars.middleearth.resources.datas.texture_presets.TexturePresetDataPool; import net.sevenstars.middleearth.resources.datas.races.Race; import net.sevenstars.middleearth.resources.datas.texture_presets.CharacterTextureMaterial; @@ -30,7 +33,8 @@ public class DynamicRegistriesME extends net.sevenstars.api.registries.DynamicRegistries { public static final RegistryKey> RACE = RegistryKey.ofRegistry(MiddleEarth.of("race")); public static final RegistryKey> FACTION = RegistryKey.ofRegistry(MiddleEarth.of("faction")); - public static final RegistryKey> NPC = RegistryKey.ofRegistry(MiddleEarth.of("npc")); + public static final RegistryKey> NPC_TYPE = RegistryKey.ofRegistry(MiddleEarth.of("npc_type")); + public static final Codec> NPC_TYPE_CODEC = RegistryFixedCodec.of(DynamicRegistriesME.NPC_TYPE); public static final RegistryKey> STRUCTURE_MANAGER_DATA = RegistryKey.ofRegistry(MiddleEarth.of("structure_manager_data")); public static final RegistryKey> BIOME_EVENT = RegistryKey.ofRegistry(MiddleEarth.of("biome_event")); public static final RegistryKey> STRUCTURE_EVENT = RegistryKey.ofRegistry(MiddleEarth.of("structure_event")); @@ -51,14 +55,13 @@ public class DynamicRegistriesME extends net.sevenstars.api.registries.DynamicRe public static void register() { MiddleEarth.LOGGER.logDebugMsg("Registering Dynamic Entries for " + MiddleEarth.MOD_ID); DynamicRegistries.registerSynced(RACE, Race.CODEC); - DynamicRegistries.registerSynced(NPC, NpcData.CODEC); + DynamicRegistries.registerSynced(NPC_TYPE, NpcType.CODEC); DynamicRegistries.registerSynced(FACTION, Faction.CODEC); DynamicRegistries.registerSynced(BIOME_EVENT, BiomeEventData.CODEC); DynamicRegistries.registerSynced(STRUCTURE_EVENT, BiomeEventData.CODEC); DynamicRegistries.registerSynced(STRUCTURE_MANAGER_DATA, StructureManagerData.CODEC); DynamicRegistries.registerSynced(TEXTURE_PRESETS, TexturePresetDataPool.CODEC); - DynamicRegistries.registerSynced(SKIN_PATTERN, CharacterTexturePattern.CODEC); DynamicRegistries.registerSynced(EYE_PATTERN, CharacterTexturePattern.CODEC); DynamicRegistries.registerSynced(HAIR_PATTERN, CharacterTexturePattern.CODEC); @@ -73,7 +76,7 @@ public static void register() { public static void prepareBoostrap(RegistryBuilder registryBuilder) { registryBuilder.addRegistry(RACE, RaceRegistry::bootstrap); - registryBuilder.addRegistry(NPC, NpcRegistry::bootstrap); + registryBuilder.addRegistry(NPC_TYPE, NpcRegistry::bootstrap); registryBuilder.addRegistry(FACTION, FactionRegistry::bootstrap); registryBuilder.addRegistry(BIOME_EVENT, BiomeEventRegistry::bootstrap); registryBuilder.addRegistry(STRUCTURE_EVENT, BiomeEventRegistry::bootstrapStructureEvents); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/RegistriesME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/RegistriesME.java index 036f11f2d5..19c6271a4a 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/RegistriesME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/RegistriesME.java @@ -462,6 +462,17 @@ public static void registerComposterBlocks() { registry.add(ModNatureBlocks.FOREST_MOSS_CARPET, 0.30f); registry.add(ModNatureBlocks.FOREST_MOSS_BLOCK, 0.65f); + registry.add(ModNatureBlocks.AZALEA_FLOWER_GROWTH, 0.50f); + registry.add(ModNatureBlocks.DRY_GROWTH, 0.35f); + registry.add(ModNatureBlocks.GREEN_GROWTH, 0.50f); + registry.add(ModNatureBlocks.IVY_GROWTH, 0.50f); + registry.add(ModNatureBlocks.LILAC_FLOWER_GROWTH, 0.50f); + registry.add(ModNatureBlocks.PINK_FLOWER_GROWTH, 0.50f); + registry.add(ModNatureBlocks.RED_FLOWER_GROWTH, 0.50f); + registry.add(ModNatureBlocks.THORNY_GROWTH, 0.35f); + registry.add(ModNatureBlocks.WHITE_FLOWER_GROWTH, 0.50f); + registry.add(ModNatureBlocks.YELLOW_FLOWER_GROWTH, 0.50f); + registry.add(ModNatureBlocks.ELANOR, 0.65f); registry.add(ModNatureBlocks.MALLOS, 0.65f); registry.add(ModNatureBlocks.NIPHREDIL, 0.65f); @@ -480,10 +491,13 @@ public static void registerComposterBlocks() { registry.add(ModNatureBlocks.WHITE_FLOWERS, 0.65f); registry.add(ModNatureBlocks.YELLOW_FLOWERS, 0.65f); + registry.add(ModNatureBlocks.AZALEA_FLOWER_GROWTH, 0.65f); + registry.add(ModNatureBlocks.BLUE_LAVENDER, 0.65f); registry.add(ModNatureBlocks.LAVENDER, 0.65f); registry.add(ModNatureBlocks.WHITE_LAVENDER, 0.65f); registry.add(ModNatureBlocks.YELLOW_TROLLIUS, 0.65f); + registry.add(ModNatureBlocks.HOBBIT_SUNFLOWERS, 0.65f); registry.add(ModNatureBlocks.ATHELAS, 0.30f); @@ -491,6 +505,7 @@ public static void registerComposterBlocks() { registry.add(ModNatureBlocks.DYING_GRASS, 0.30f); registry.add(ModNatureBlocks.FROZEN_GRASS, 0.10f); registry.add(ModNatureBlocks.GRIM_GRASS, 0.30f); + registry.add(ModNatureBlocks.SHORT_HOGWEED, 0.30f); registry.add(ModNatureBlocks.HOGWEED, 0.30f); registry.add(ModNatureBlocks.MEADOWGRASS, 0.30f); registry.add(ModNatureBlocks.SPARSE_GRASS, 0.30f); @@ -524,6 +539,10 @@ public static void registerComposterBlocks() { registry.add(ModNatureBlocks.LARGE_BLUE_FESCUE, 0.30f); registry.add(ModNatureBlocks.LARGE_BUSH, 0.30f); registry.add(ModNatureBlocks.LARGE_SHRIVELED_SHRUB, 0.10f); + registry.add(ModNatureBlocks.LILY_PADS, 0.65f); + registry.add(ModNatureBlocks.FLOWERING_LILY_PADS, 0.65f); + registry.add(ModNatureBlocks.SMALL_LILY_PADS, 0.65f); + registry.add(ModNatureBlocks.SMALL_FLOWERING_LILY_PADS, 0.65f); registry.add(ModNatureBlocks.RED_HEATHER_BUSH, 0.30f); registry.add(ModNatureBlocks.RUSHES, 0.30f); registry.add(ModNatureBlocks.BRAMBLES_OF_MORDOR, 0.10f); @@ -533,11 +552,13 @@ public static void registerComposterBlocks() { registry.add(ModNatureBlocks.SHORT_REEDS, 0.30f); registry.add(ModNatureBlocks.SHORT_CATTAILS, 0.30f); registry.add(ModNatureBlocks.SHORT_BULRUSH, 0.30f); + registry.add(ModNatureBlocks.TALL_CATTAILS, 0.30f); registry.add(ModNatureBlocks.HEATHER, 0.50f); registry.add(ModNatureBlocks.RED_HEATHER, 0.50f); registry.add(ModNatureBlocks.DEAD_HEATHER, 0.30f); registry.add(ModNatureBlocks.DRY_HEATHER, 0.30f); registry.add(ModNatureBlocks.HEATH, 0.30f); + registry.add(ModNatureBlocks.TALL_BULRUSH, 0.30f); registry.add(ModNatureBlocks.SHRIVELED_SHRUB, 0.30f); @@ -554,7 +575,7 @@ public static void registerComposterBlocks() { registry.add(ModNatureBlocks.TRUMPET_SHROOM, 0.65f); registry.add(ModNatureBlocks.TALL_TRUMPET_SHROOM, 0.85f); registry.add(ModNatureBlocks.TUBESHRROM, 0.65f); - registry.add(ModNatureBlocks.TALL_TRUMPET_SHROOM, 0.85f); + registry.add(ModNatureBlocks.TALL_TUBESHROOM, 0.85f); registry.add(ModNatureBlocks.VIOLET_CAPS, 0.65f); registry.add(ModNatureBlocks.WHITE_MUSHROOM, 0.65f); registry.add(ModNatureBlocks.YELLOW_AMANITA, 0.65f); @@ -587,9 +608,7 @@ public static void registerComposterBlocks() { }); registry.add(ModNatureBlocks.LEBETHRON_LEAVES, 0.3F); - registry.add(ModNatureBlocks.BERRY_HOLLY_LEAVES, 0.4F); - registry.add(ModNatureBlocks.DRY_LARCH_LEAVES, 0.2F); registry.add(ModNatureBlocks.FLOWERING_MALLORN_LEAVES, 0.4F); @@ -645,11 +664,11 @@ public static void registerComposterBlocks() { registry.add(FoodItemsME.SACK_OF_HORSEFEED, 1.0F); registry.add(ResourceItemsME.STRAW, 0.3F); - registry.add(ResourceItemsME.REEDS, 0.3F); registry.add(ResourceItemsME.FLAX, 0.3F); registry.add(ResourceItemsME.PIPEWEED, 0.3F); + registry.add(ResourceItemsME.DRIED_PIPEWEED, 0.3F); registry.add(ResourceItemsME.PINECONE, 0.3F); registry.add(ResourceItemsME.BELL_PEPPER_SEEDS, 0.3F); @@ -687,6 +706,10 @@ public static void registerCauldronBehaviour() { CauldronBehavior.WATER_CAULDRON_BEHAVIOR.map().put(item, COOL_DOWN_METAL); }); + HotMetalsModel.nuggies.forEach(item -> { + CauldronBehavior.WATER_CAULDRON_BEHAVIOR.map().put(item, COOL_DOWN_METAL); + }); + SimpleDyeableItemModel.items.forEach(item -> { CauldronBehavior.WATER_CAULDRON_BEHAVIOR.map().put(item, CLEAN_EQUIPMENT); }); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/StructureManagerDataRegistryME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/StructureManagerDataRegistryME.java index a78ce4b658..7e4649c3f4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/StructureManagerDataRegistryME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/StructureManagerDataRegistryME.java @@ -7,11 +7,10 @@ import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.Identifier; import net.sevenstars.middleearth.MiddleEarth; -import net.sevenstars.middleearth.datageneration.content.TranslationEntries; import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.*; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.pools.*; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.SpawnNestNodeData; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.StructureManagerData; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.StructureSpawnNestPool; @@ -46,23 +45,23 @@ private static StructureManagerData register(Registerable static { GONDOR_GENERIC_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "gondor_generic_nests"), List.of( new SpawnNestNodeData(MiddleEarth.fetchId("gondor_generic_nests.captain_nest"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.LEADER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.KNIGHT.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.VETERAN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_LEADER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_KNIGHT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_VETERAN).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("gondor_generic_nests.barrack_nest"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.SOLDIER.getId()).SetRangeAmount(2,3), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.VETERAN.getId()).SetRangeAmount(2,3), - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.MILITIA.getId()).SetRangeAmount(2,4) + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_SOLDIER).SetRangeAmount(2,3), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_VETERAN).SetRangeAmount(2,3), + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_MILITIA).SetRangeAmount(2,4) )), new SpawnNestNodeData(MiddleEarth.fetchId("gondor_generic_nests.worker_nest"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.DALE_PEASANT.getValue()).SetRangeAmount(1,3) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.DALE_PEASANT).SetRangeAmount(1,3) )), new SpawnNestNodeData(MiddleEarth.fetchId("gondor_generic_nests.prisoner_nest"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.SNAGA.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.DALE_PEASANT.getValue()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, NpcRegistry.DALE_PEASANT.getValue()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.DALE_PEASANT.getValue()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_SNAGA).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.DALE_PEASANT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, NpcRegistry.DALE_PEASANT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.DALE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("gondor_generic_nests.stable_nest"), 1500, List.of( new StructureSpawnNestPool(EntityType.HORSE, 5).SetFixAmount(1), @@ -73,24 +72,24 @@ private static StructureManagerData register(Registerable EREBOR_GENERIC_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "erebor_generic_nests"), List.of( new SpawnNestNodeData(MiddleEarth.fetchId("erebor_generic_nests.captain_nest"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.LEADER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.GATEWARDEN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.ELITE.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_LEADER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_GATEWARDEN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_ELITE).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("erebor_generic_nests.barrack_nest"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.SOLDIER.getId()).SetRangeAmount(2,3), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.ARCHER.getId()).SetRangeAmount(2,3), - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.MILITIA.getId()).SetRangeAmount(2,4) + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_SOLDIER).SetRangeAmount(2,3), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_ARCHER).SetRangeAmount(2,3), + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_MILITIA).SetRangeAmount(2,4) )), new SpawnNestNodeData(MiddleEarth.fetchId("erebor_generic_nests.worker_nest"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.MINER.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.PEASANT.getId()).SetRangeAmount(1,3) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_MINER).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_PEASANT).SetRangeAmount(1,3) )), new SpawnNestNodeData(MiddleEarth.fetchId("erebor_generic_nests.prisoner_nest"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.SNAGA.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.DALE_PEASANT.getValue()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, NpcRegistry.DALE_PEASANT.getValue()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.DALE_PEASANT.getValue()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_SNAGA).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.DALE_PEASANT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, NpcRegistry.DALE_PEASANT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.DALE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("erebor_generic_nests.stable_nest"), 1500, List.of( new StructureSpawnNestPool(EntitiesME.BROADHOOF_GOAT, 5).SetFixAmount(1), @@ -101,34 +100,34 @@ private static StructureManagerData register(Registerable DALE_KEEP_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "dale_keep_nests"), List.of( new SpawnNestNodeData(MiddleEarth.fetchId("dale_keep_nests.captain"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.VETERAN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.SERGEANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_VETERAN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_SERGEANT).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("dale_keep_nests.stable_carers"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.PEASANT.getId()).SetFixAmount(2) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_PEASANT).SetFixAmount(2) )), new SpawnNestNodeData(MiddleEarth.fetchId("dale_keep_nests.stable"), 1500, List.of( new StructureSpawnNestPool(EntityType.DONKEY, 1).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("dale_keep_nests.small_prisoner_cell"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.THIEF.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.THUG.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.CHIEFTAIN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_THIEF).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_THUG).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_CHIEFTAIN).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("dale_keep_nests.large_prisoner_cell"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.THIEF.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.THUG.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.CHIEFTAIN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_THIEF).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_THUG).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_CHIEFTAIN).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("dale_keep_nests.soldier"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 4).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.SOLDIER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.ARCHER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.MILITIA.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 4).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_SOLDIER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_ARCHER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_MILITIA).SetFixAmount(1) )), new SpawnNestNodeData(MiddleEarth.fetchId("dale_keep_nests.elite"), 1500, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 4).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.KNIGHT.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.VETERAN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.SOLDIER.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 4).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_KNIGHT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_VETERAN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_SOLDIER).SetFixAmount(1) )) )); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/BiomeEventRegistry.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/BiomeEventRegistry.java index 4649a7de9e..d8e6a2b35a 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/BiomeEventRegistry.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/BiomeEventRegistry.java @@ -2,6 +2,7 @@ import net.minecraft.registry.*; import net.minecraft.util.Identifier; +import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.structure.Structure; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.registries.DynamicRegistriesME; @@ -15,12 +16,24 @@ public class BiomeEventRegistry { public final static RegistryKey DEFAULT = DynamicRegistriesME.of(BIOME_EVENT_KEY, MiddleEarth.of("default")); - public final static RegistryKey CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.BASIC_CAVE.getValue()); - public final static RegistryKey FUNGUS_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.FUNGUS_CAVE.getValue()); + // region CAVES + public final static RegistryKey BASIC_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.BASIC_CAVE.getValue()); + public final static RegistryKey LUSH_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LUSH_CAVE.getValue()); public final static RegistryKey DRIPSTONE_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.DRIPSTONE_CAVE.getValue()); public final static RegistryKey DOLOMITE_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.DOLOMITE_CAVE.getValue()); + public final static RegistryKey GALONN_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.GALONN_CAVE.getValue()); + public final static RegistryKey GILDED_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.GILDED_CAVE.getValue()); + public final static RegistryKey IZHERABAN_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.IZHERABAN_CAVE.getValue()); + public final static RegistryKey LIMESTONE_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LIMESTONE_CAVE.getValue()); public final static RegistryKey MOUNTAIN_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MOUNTAIN_CAVE.getValue()); public final static RegistryKey MUD_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MUD_CAVE.getValue()); + public final static RegistryKey FUNGUS_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.FUNGUS_CAVE.getValue()); + public final static RegistryKey BASALT_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.BASALT_CAVE.getValue()); + public final static RegistryKey MAGMA_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MAGMA_CAVE.getValue()); + public final static RegistryKey MITHRIL_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MITHRIL_CAVE.getValue()); + public final static RegistryKey DRY_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.DRY_CAVE.getValue()); + public final static RegistryKey ICE_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.ICE_CAVE.getValue()); + // endregion // region STRUCTURES public final static RegistryKey WLR_HALL_STRUCTURE = register("woodland_realm_hall"); @@ -36,6 +49,11 @@ public class BiomeEventRegistry { public final static RegistryKey OLD_RHUDAUR = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.OLD_RHUDAUR.getValue()); // endregion + // region TROLLSHAWS // + public final static RegistryKey TROLLSHAWS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.TROLLSHAWS.getValue()); + + // endregion + // region MORDOR public final static RegistryKey MORDOR = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MORDOR.getValue()); public final static RegistryKey MORDOR_ASHEN_FOREST = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MORDOR_ASHEN_FOREST.getValue()); @@ -63,8 +81,6 @@ public class BiomeEventRegistry { public final static RegistryKey EPHEL_DUATH = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.EPHEL_DUATH.getValue()); public final static RegistryKey ERED_LITHUI_BASE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.ERED_LITHUI_BASE.getValue()); public final static RegistryKey ERED_LITHUI = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.ERED_LITHUI.getValue()); - public final static RegistryKey BASALT_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.BASALT_CAVE.getValue()); - public final static RegistryKey MAGMA_CAVE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MAGMA_CAVE.getValue()); // endregion // region DOL GULDUR // @@ -75,74 +91,78 @@ public class BiomeEventRegistry { // endregion // region ISENGARD // - public final static RegistryKey ISENGARD = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.ISENGARD.getValue()); - public final static RegistryKey NAN_CURUNIR = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.NAN_CURUNIR.getValue()); + public final static RegistryKey ISENGARD = of(MEBiomeKeys.ISENGARD); + public final static RegistryKey NAN_CURUNIR = of(MEBiomeKeys.NAN_CURUNIR); // endregion // region GUNDABAD - public final static RegistryKey GUNDABAD_PLAINS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.GUNDABAD_PLAINS.getValue()); - public final static RegistryKey GUNDABAD_WOODS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.GUNDABAD_WOODS.getValue()); - public final static RegistryKey MOUNT_GUNDABAD_BASE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MOUNT_GUNDABAD_BASE.getValue()); - public final static RegistryKey MOUNT_GUNDABAD = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MOUNT_GUNDABAD.getValue()); - public final static RegistryKey MISTY_MOUNTAINS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MISTY_MOUNTAINS.getValue()); + public final static RegistryKey GUNDABAD_PLAINS = of(MEBiomeKeys.GUNDABAD_PLAINS); + public final static RegistryKey GUNDABAD_WOODS = of(MEBiomeKeys.GUNDABAD_WOODS); + public final static RegistryKey MOUNT_GUNDABAD_BASE = of(MEBiomeKeys.MOUNT_GUNDABAD_BASE); + public final static RegistryKey MOUNT_GUNDABAD = of(MEBiomeKeys.MOUNT_GUNDABAD); + public final static RegistryKey MISTY_MOUNTAINS = of(MEBiomeKeys.MISTY_MOUNTAINS); // endregion // MORIA - public final static RegistryKey CELEBDIL_BASE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.CELEBDIL_BASE.getValue()); - public final static RegistryKey EREGION = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.EREGION.getValue()); + public final static RegistryKey CELEBDIL_BASE = of(MEBiomeKeys.CELEBDIL_BASE); + public final static RegistryKey EREGION = of(MEBiomeKeys.EREGION); // region GONDOR - public final static RegistryKey GONDOR = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.GONDOR.getValue()); - public final static RegistryKey OSGILIATH = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.OSGILIATH.getValue()); - public final static RegistryKey ANORIEN = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.ANORIEN.getValue()); - public final static RegistryKey BELFALAS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.BELFALAS.getValue()); - public final static RegistryKey ITHILIEN_GLADE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.ITHILIEN_GLADE.getValue()); - public final static RegistryKey PELENNOR_FIELDS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.PELENNOR_FIELDS.getValue()); - public final static RegistryKey LAMEDON = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LAMEDON.getValue()); - public final static RegistryKey LEBENNIN = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LEBENNIN.getValue()); - public final static RegistryKey LOSSARNACH = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LOSSARNACH.getValue()); - public final static RegistryKey LOSSARNACH_VALLEY = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LOSSARNACH_VALLEY.getValue()); - public final static RegistryKey BLACKROOT_VALE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.BLACKROOT_VALE.getValue()); + public final static RegistryKey GONDOR = of(MEBiomeKeys.GONDOR); + public final static RegistryKey OSGILIATH = of(MEBiomeKeys.OSGILIATH); + public final static RegistryKey ANORIEN = of(MEBiomeKeys.ANORIEN); + public final static RegistryKey BELFALAS = of(MEBiomeKeys.BELFALAS); + public final static RegistryKey ITHILIEN_GLADE = of(MEBiomeKeys.ITHILIEN_GLADE); + public final static RegistryKey PELENNOR_FIELDS = of(MEBiomeKeys.PELENNOR_FIELDS); + public final static RegistryKey LAMEDON = of(MEBiomeKeys.LAMEDON); + public final static RegistryKey LEBENNIN = of(MEBiomeKeys.LEBENNIN); + public final static RegistryKey LOSSARNACH = of(MEBiomeKeys.LOSSARNACH); + public final static RegistryKey LOSSARNACH_VALLEY = of(MEBiomeKeys.LOSSARNACH_VALLEY); + public final static RegistryKey BLACKROOT_VALE = of(MEBiomeKeys.BLACKROOT_VALE); // endregion // region ROHAN - public final static RegistryKey ROHAN = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.ROHAN.getValue()); - public final static RegistryKey ROHAN_FIELD = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.ROHAN_FIELD.getValue()); - public final static RegistryKey THE_WOLD = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.THE_WOLD.getValue()); - public final static RegistryKey THE_WOLD_WHEAT_FIELD = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.THE_WOLD_WHEAT_FIELD.getValue()); + public final static RegistryKey ROHAN = of(MEBiomeKeys.ROHAN); + public final static RegistryKey ROHAN_FIELD = of(MEBiomeKeys.ROHAN_FIELD); + public final static RegistryKey THE_WOLD = of(MEBiomeKeys.THE_WOLD); + public final static RegistryKey THE_WOLD_WHEAT_FIELD = of(MEBiomeKeys.THE_WOLD_WHEAT_FIELD); // endregion // region DALE - public final static RegistryKey DALE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.DALE.getValue()); - public final static RegistryKey DALE_CITY = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.DALE_CITY.getValue()); - public final static RegistryKey DALE_MEADOW = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.DALE_MEADOW.getValue()); + public final static RegistryKey DALE = of(MEBiomeKeys.DALE); + public final static RegistryKey DALE_CITY = of(MEBiomeKeys.DALE_CITY); + public final static RegistryKey DALE_MEADOW = of(MEBiomeKeys.DALE_MEADOW); // endregion // region LONGBEARDS - public final static RegistryKey LONELY_MOUNTAIN_TAIGA = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LONELY_MOUNTAIN_TAIGA.getValue()); - public final static RegistryKey LONELY_MOUNTAIN_FOOTHILLS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LONELY_MOUNTAIN_FOOTHILLS.getValue()); - public final static RegistryKey IRON_HILLS_PLAINS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.IRON_HILLS_PLAINS.getValue()); - public final static RegistryKey IRON_HILLS_BASE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.IRON_HILLS_BASE.getValue()); - public final static RegistryKey GREY_PLAINS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.GREY_PLAINS.getValue()); + public final static RegistryKey LONELY_MOUNTAIN_TAIGA = of(MEBiomeKeys.LONELY_MOUNTAIN_TAIGA); + public final static RegistryKey LONELY_MOUNTAIN_FOOTHILLS = of(MEBiomeKeys.LONELY_MOUNTAIN_FOOTHILLS); + public final static RegistryKey IRON_HILLS_PLAINS = of(MEBiomeKeys.IRON_HILLS_PLAINS); + public final static RegistryKey IRON_HILLS_BASE = of(MEBiomeKeys.IRON_HILLS_BASE); + public final static RegistryKey GREY_PLAINS = of(MEBiomeKeys.GREY_PLAINS); // endregion // region LOTHLORIEN - public final static RegistryKey LOTHLORIEN = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LOTHLORIEN.getValue()); - public final static RegistryKey LOTHLORIEN_GLADE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LOTHLORIEN_GLADE.getValue()); - public final static RegistryKey LOTHLORIEN_BLOSSOM = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LOTHLORIEN_BLOSSOM.getValue()); - public final static RegistryKey LORIEN_EDGE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.LORIEN_EDGE.getValue()); + public final static RegistryKey LOTHLORIEN = of(MEBiomeKeys.LOTHLORIEN); + public final static RegistryKey LOTHLORIEN_GLADE = of(MEBiomeKeys.LOTHLORIEN_GLADE); + public final static RegistryKey LOTHLORIEN_BLOSSOM = of(MEBiomeKeys.LOTHLORIEN_BLOSSOM); + public final static RegistryKey LORIEN_EDGE = of(MEBiomeKeys.LORIEN_EDGE); // endregion // region WOODLAND_REALM - public final static RegistryKey WOODLAND_REALM = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.WOODLAND_REALM.getValue()); - public final static RegistryKey WOODLAND_GLADE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.WOODLAND_GLADE.getValue()); - public final static RegistryKey AUTUMN_WOODLAND = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.AUTUMN_WOODLAND.getValue()); - public final static RegistryKey WOODLAND_FOOTHILLS = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.WOODLAND_FOOTHILLS.getValue()); - public final static RegistryKey MIRKWOOD = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.MIRKWOOD.getValue()); + public final static RegistryKey WOODLAND_REALM = of(MEBiomeKeys.WOODLAND_REALM); + public final static RegistryKey WOODLAND_GLADE = of(MEBiomeKeys.WOODLAND_GLADE); + public final static RegistryKey AUTUMN_WOODLAND = of(MEBiomeKeys.AUTUMN_WOODLAND); + public final static RegistryKey WOODLAND_FOOTHILLS = of(MEBiomeKeys.WOODLAND_FOOTHILLS); + public final static RegistryKey MIRKWOOD = of(MEBiomeKeys.MIRKWOOD); // endregion - public final static RegistryKey SHIRE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.SHIRE.getValue()); - public final static RegistryKey SHIRE_EDGE = DynamicRegistriesME.of(BIOME_EVENT_KEY, MEBiomeKeys.SHIRE_EDGE.getValue()); + public final static RegistryKey SHIRE = of(MEBiomeKeys.SHIRE); + public final static RegistryKey SHIRE_EDGE = of(MEBiomeKeys.SHIRE_EDGE); + + private static RegistryKey of(RegistryKey key){ + return DynamicRegistriesME.of(BIOME_EVENT_KEY, key.getValue()); + } public static void bootstrapStructureEvents(Registerable context) { RegistryEntryLookup registryEntryLookup = context.getRegistryLookup(STRUCTURE_EVENT_KEY); @@ -155,18 +175,34 @@ public static void bootstrap(Registerable context) { RegistryEntryLookup registryEntryLookup = context.getRegistryLookup(BIOME_EVENT_KEY); register(context, registryEntryLookup, DEFAULT, GenericHostilesBiomeEventPool.EMPTY); - register(context, registryEntryLookup, CAVE, GenericHostilesBiomeEventPool.CAVE); - register(context, registryEntryLookup, FUNGUS_CAVE, GenericHostilesBiomeEventPool.CAVE); + + + register(context, registryEntryLookup, BASIC_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, LUSH_CAVE , GenericHostilesBiomeEventPool.CAVE); register(context, registryEntryLookup, DRIPSTONE_CAVE, GenericHostilesBiomeEventPool.CAVE); register(context, registryEntryLookup, DOLOMITE_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, GALONN_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, GILDED_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, IZHERABAN_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, LIMESTONE_CAVE, GenericHostilesBiomeEventPool.CAVE); register(context, registryEntryLookup, MOUNTAIN_CAVE, GenericHostilesBiomeEventPool.CAVE); register(context, registryEntryLookup, MUD_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, FUNGUS_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, BASALT_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, MAGMA_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, MITHRIL_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, DRY_CAVE, GenericHostilesBiomeEventPool.CAVE); + register(context, registryEntryLookup, ICE_CAVE, GenericHostilesBiomeEventPool.CAVE); - register(context, registryEntryLookup, ANDUIN_VALES , GenericHostilesBiomeEventPool.BRIGANDS); + + register(context, registryEntryLookup, ANDUIN_VALES , GenericHostilesBiomeEventPool.ANDUIN); register(context, registryEntryLookup, ENEDWAITH , GenericHostilesBiomeEventPool.BRIGANDS); register(context, registryEntryLookup, MINHIRIATH , GenericHostilesBiomeEventPool.BRIGANDS); register(context, registryEntryLookup, OLD_RHUDAUR , GenericHostilesBiomeEventPool.BRIGANDS); + register(context, registryEntryLookup, TROLLSHAWS , TrollShawBiomeEventPool.TROLLSHAWS); + + register(context, registryEntryLookup, MORDOR, MordorBiomeEventPool.DEFAULT); register(context, registryEntryLookup, MORDOR_ASHEN_FOREST, MordorBiomeEventPool.SCOUTS); register(context, registryEntryLookup, MORDOR_HILL , MordorBiomeEventPool.DEFAULT); @@ -193,8 +229,6 @@ public static void bootstrap(Registerable context) { register(context, registryEntryLookup, EPHEL_DUATH , MordorBiomeEventPool.SCOUTS); register(context, registryEntryLookup, ERED_LITHUI_BASE , MordorBiomeEventPool.SCOUTS); register(context, registryEntryLookup, ERED_LITHUI , MordorBiomeEventPool.SCOUTS); - register(context, registryEntryLookup, BASALT_CAVE , MordorBiomeEventPool.CAVE); - register(context, registryEntryLookup, MAGMA_CAVE , MordorBiomeEventPool.CAVE); register(context, registryEntryLookup, DOL_GULDUR , MordorBiomeEventPool.DOL_GULDUR); register(context, registryEntryLookup, DOL_GULDUR_HILL , MordorBiomeEventPool.DOL_GULDUR); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/DaleBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/DaleBiomeEventPool.java index 7663f792f1..8b8fc0d6c6 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/DaleBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/DaleBiomeEventPool.java @@ -1,10 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.minecraft.entity.EntityType; -import net.sevenstars.middleearth.registries.content.npcs.pools.DalishNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.RohirricNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -12,13 +10,12 @@ public class DaleBiomeEventPool { public final static BiomeEventData DEFAULT; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(DalishNpcDataPool.MILITIA).withWeight(7), - new BiomeNpcSpawningData(DalishNpcDataPool.SOLDIER).withWeight(3), - new BiomeNpcSpawningData(DalishNpcDataPool.ELITE_ARCHER).withWeight(3), - new BiomeNpcSpawningData(DalishNpcDataPool.KNIGHT).withWeight(1), - new BiomeNpcSpawningData(DalishNpcDataPool.KNIGHT).withWeight(2).withMount(EntityType.HORSE), - new BiomeNpcSpawningData(DalishNpcDataPool.SERGEANT).withWeight(1) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.DALE_MILITIA).withWeight(7).withSameNpcType(5, 256), + new WildSpawnEventData(NpcRegistry.DALE_SOLDIER).withWeight(3).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.DALE_ELITE_ARCHER).withWeight(3).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.DALE_KNIGHT).withWeight(1).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.DALE_SERGEANT).withWeight(0).withSameNpcType(0, 512) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GenericHostilesBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GenericHostilesBiomeEventPool.java index 65ae6c4905..6f1fed4fef 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GenericHostilesBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GenericHostilesBiomeEventPool.java @@ -1,53 +1,151 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.minecraft.entity.EntityType; +import net.minecraft.util.math.Vec3i; import net.sevenstars.middleearth.entity.EntitiesME; -import net.sevenstars.middleearth.registries.content.npcs.pools.BrigandNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.GoblinTownNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.WildGoblinNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; public class GenericHostilesBiomeEventPool { + public final static List WILD_BRIGANDS_EASY; + public final static BiomeEventData CAVE; public final static BiomeEventData BRIGANDS; public final static BiomeEventData ANDUIN; public final static BiomeEventData EMPTY; static { - ANDUIN = new BiomeEventData(List.of( - new BiomeNpcSpawningData(BrigandNpcDataPool.CHIEFTAIN).withMount(EntityType.HORSE), - new BiomeNpcSpawningData(BrigandNpcDataPool.CHIEFTAIN), - new BiomeNpcSpawningData(BrigandNpcDataPool.MERCENARY).withWeight(4), - new BiomeNpcSpawningData(BrigandNpcDataPool.THIEF).withWeight(7).withNightRequired().withLightLevelMax(5), - new BiomeNpcSpawningData(BrigandNpcDataPool.THUG).withWeight(8), - - new BiomeNpcSpawningData(GoblinTownNpcDataPool.GOBLIN).withWeight(5), - new BiomeNpcSpawningData(GoblinTownNpcDataPool.SCOUT).withWeight(4), - new BiomeNpcSpawningData(GoblinTownNpcDataPool.WARRIOR).withWeight(3).withNightRequired().withLightLevelMax(5), - new BiomeNpcSpawningData(GoblinTownNpcDataPool.RIDER).withMount(EntitiesME.WARG).withWeight(2), - new BiomeNpcSpawningData(GoblinTownNpcDataPool.VETERAN).withNightRequired().withLightLevelMax(5) - )); + WILD_BRIGANDS_EASY = List.of( + new WildSpawnEventData(NpcRegistry.BRIGAND_CHIEFTAIN).lightShouldBeBetween(0, 7).requireNight().withSameNpcType(0, 512), + new WildSpawnEventData(NpcRegistry.BRIGAND_MERCENARY).withWeight(3).lightShouldBeBetween(0, 7).requireNight().withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.BRIGAND_THIEF).withWeight(5).lightShouldBeBetween(0, 7).requireNight().withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.BRIGAND_THUG).withWeight(5).lightShouldBeBetween(0, 7).requireNight().withSameNpcType(5, 256) + ); - BRIGANDS = new BiomeEventData(List.of( - new BiomeNpcSpawningData(BrigandNpcDataPool.CHIEFTAIN).withMount(EntityType.HORSE), - new BiomeNpcSpawningData(BrigandNpcDataPool.CHIEFTAIN), - new BiomeNpcSpawningData(BrigandNpcDataPool.MERCENARY).withWeight(3), - new BiomeNpcSpawningData(BrigandNpcDataPool.THIEF).withWeight(5), - new BiomeNpcSpawningData(BrigandNpcDataPool.THUG).withWeight(5) - )); + BRIGANDS = new BiomeEventData(false, WILD_BRIGANDS_EASY); - CAVE = new BiomeEventData(List.of( - new BiomeNpcSpawningData(WildGoblinNpcDataPool.GATHERER).withLightLevelMax(5), - new BiomeNpcSpawningData(WildGoblinNpcDataPool.SCOUT).withLightLevelMax(5), - new BiomeNpcSpawningData(WildGoblinNpcDataPool.WARRIOR).withLightLevelMax(3), - new BiomeNpcSpawningData(WildGoblinNpcDataPool.RIDER).withMount(EntitiesME.CAVE_TROLL).withLightLevelMax(3), - new BiomeNpcSpawningData(WildGoblinNpcDataPool.BRUTE).withLightLevelMax(1) - )); + ANDUIN = new BiomeEventData( false, List.of( + //Npcs + new WildSpawnEventData(NpcRegistry.BRIGAND_CHIEFTAIN).withSameNpcType(0, 512).lightShouldBeAtMost(7), + new WildSpawnEventData(NpcRegistry.BRIGAND_MERCENARY).withWeight(4).withSameNpcType(1, 512).lightShouldBeAtMost(7), + new WildSpawnEventData(NpcRegistry.BRIGAND_THIEF).withWeight(7).requireNight().lightShouldBeAtMost(5).withSameNpcType(3, 512).lightShouldBeAtMost(7), + new WildSpawnEventData(NpcRegistry.BRIGAND_THUG).withWeight(8).requireNight().withSameNpcType(5, 512).lightShouldBeAtMost(7), - EMPTY = new BiomeEventData(List.of( + new WildSpawnEventData(NpcRegistry.GOBLIN_TOWN_GOBLIN).withWeight(5).lightShouldBeBetween(0, 7).withSameNpcType(5, 256).requireNight(), + new WildSpawnEventData(NpcRegistry.GOBLIN_TOWN_SCOUT).withWeight(4).lightShouldBeBetween(0, 7).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.GOBLIN_TOWN_WARRIOR).withWeight(3).lightShouldBeBetween(0, 7).withSameNpcType(1, 256).requireNight(), + new WildSpawnEventData(NpcRegistry.GOBLIN_TOWN_RIDER).withWeight(2).lightShouldBeBetween(0, 7).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.GOBLIN_TOWN_VETERAN).withWeight(2).lightShouldBeBetween(0, 7).withSameNpcType(0, 256).requireNight() )); + + CAVE = new BiomeEventData(false, List.of( + // Higher Levels + //Creatures + new WildSpawnEventData(EntitiesME.SHELOBITE_SCUTTLER) + .lightShouldBeBetween(0, 7) + .withDiscardChance(0.35) + .shouldSpawnAbove(0) + .withSameEntity(15, 128) + .withoutEntitySurfaceOnly() + .structureManagerRadiusAvoidance(64), + // Npcs + new WildSpawnEventData(NpcRegistry.WILD_GOBLIN_GATHERER) + .lightShouldBeBetween(0, 7) + .withoutSkyRequirement() + .withSameNpcType(4, 64) + .withSameEntity(35, 128) + .withoutEntitySurfaceOnly() + .structureManagerRadiusAvoidance(64), + new WildSpawnEventData(NpcRegistry.WILD_GOBLIN_SCOUT) + .lightShouldBeBetween(0, 7) + .withoutSkyRequirement() + .withSameNpcType(7, 64) + .withSameEntity(35, 128) + .withoutEntitySurfaceOnly() + .structureManagerRadiusAvoidance(64), + new WildSpawnEventData(NpcRegistry.WILD_GOBLIN_WARRIOR) + .lightShouldBeBetween(0, 7) + .withoutSkyRequirement() + .shouldSpawnAbove(0) + .withSameNpcType(4, 64) + .withDiscardChance(0.45) + .withSameEntity(35, 128) + .withoutEntitySurfaceOnly(), + new WildSpawnEventData(NpcRegistry.WILD_GOBLIN_BRUTE) + .lightShouldBeBetween(0, 7) + .withoutSkyRequirement() + .shouldSpawnAbove(0) + .withSameNpcType(3, 128) + .withDiscardChance(0.65) + .withSameEntity(35, 128) + .withoutEntitySurfaceOnly(), + // Lower Levels (Medium Difficulty) + //Npcs + new WildSpawnEventData(NpcRegistry.WILD_GOBLIN_WARRIOR) + .lightShouldBeBetween(0, 7) + .withoutSkyRequirement() + .shouldSpawnBelow(0) + .withSameNpcTypeLimitAmount(10) + .withDiscardChance(0.05) + .withSameEntity(50, 128) + .withoutEntitySurfaceOnly(), + new WildSpawnEventData(NpcRegistry.WILD_GOBLIN_BRUTE) + .lightShouldBeBetween(0, 7) + .withoutSkyRequirement() + .shouldSpawnBelow(0) + .withSameNpcType(3, 64) + .withDiscardChance(0.15) + .withoutEntitySurfaceOnly(), + new WildSpawnEventData(NpcRegistry.WILD_GOBLIN_RIDER) + .lightShouldBeBetween(0, 7) + .shouldSpawnBelow(0) + .withoutSkyRequirement() + .withSameNpcType(1, 128) + .withDiscardChance(0.3) + .withSameEntity(50, 128) + .withoutEntitySurfaceOnly() + .withMinimumSpaceCubeSize(new Vec3i(3, 5, 3)), + //Creatures + new WildSpawnEventData(EntitiesME.CAVE_TROLL) + .shouldSpawnBetween(16, -32) + .lightShouldBeBetween(0, 7) + .withDiscardChance(0.16) + .withSameEntity(3, 128) + .requireUnderground() + .withoutEntitySurfaceOnly(), + new WildSpawnEventData(EntitiesME.SHELOBITE_SCUTTLER) + .shouldSpawnBetween(0, -32) + .withDiscardChance(0.15) + .lightShouldBeBetween(0, 7) + .requireUnderground() + .withSameEntity(35, 128) + .withoutEntitySurfaceOnly(), + // Very Low Levels (Higher Difficulty) + //Creatures + new WildSpawnEventData(EntitiesME.CAVE_TROLL) + .shouldSpawnBelow(-16) + .lightShouldBeBetween(0, 7) + .requireUnderground() + .withSameEntity(3, 128) + .withoutEntitySurfaceOnly(), + new WildSpawnEventData(EntitiesME.SHELOBITE_SCUTTLER) + .shouldSpawnBelow(-32) + .withDiscardChance(0.25) + .lightShouldBeBetween(0, 7) + .requireUnderground() + .withSameEntity(50, 128) + .withoutEntitySurfaceOnly(), + new WildSpawnEventData(EntitiesME.SPAWN_OF_SHELOB) + .shouldSpawnBelow(-32) + .withDiscardChance(0.35) + .withSameEntity(1, 64) + .lightShouldBeBetween(0, 7) + .requireUnderground() + .withoutEntitySurfaceOnly() + )); + + EMPTY = new BiomeEventData(false, List.of()); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GondorBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GondorBiomeEventPool.java index 8a2613923e..bfa88db850 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GondorBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GondorBiomeEventPool.java @@ -1,13 +1,9 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; import net.minecraft.entity.EntityType; -import net.minecraft.registry.Registries; -import net.sevenstars.middleearth.entity.EntitiesME; -import net.sevenstars.middleearth.item.EquipmentItemsME; -import net.sevenstars.middleearth.registries.content.npcs.pools.GondorianNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.MordorNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -17,32 +13,29 @@ public class GondorBiomeEventPool { public final static BiomeEventData OSGILIATH; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(GondorianNpcDataPool.MILITIA).withWeight(5), - new BiomeNpcSpawningData(GondorianNpcDataPool.SOLDIER).withWeight(4), - new BiomeNpcSpawningData(GondorianNpcDataPool.KNIGHT).withWeight(2), - new BiomeNpcSpawningData(GondorianNpcDataPool.KNIGHT).withWeight(1).withMount(EntityType.HORSE, EquipmentItemsME.GONDORIAN_HORSE_ARMOR.asItem()), - new BiomeNpcSpawningData(GondorianNpcDataPool.VETERAN).withWeight(2), - new BiomeNpcSpawningData(GondorianNpcDataPool.LEADER) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.GONDOR_MILITIA).withWeight(5).withSameNpcType(5, 128), + new WildSpawnEventData(NpcRegistry.GONDOR_SOLDIER).withWeight(4).withSameNpcType(3, 128), + new WildSpawnEventData(NpcRegistry.GONDOR_KNIGHT).withWeight(2).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.GONDOR_VETERAN).withWeight(2).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.GONDOR_LEADER).withSameNpcType(0, 512) )); - PEASANT_FIEF = new BiomeEventData(List.of( - new BiomeNpcSpawningData(GondorianNpcDataPool.MILITIA).withWeight(6), - new BiomeNpcSpawningData(GondorianNpcDataPool.SOLDIER).withWeight(3), - new BiomeNpcSpawningData(GondorianNpcDataPool.SOLDIER).withWeight(1).withMount(EntityType.HORSE), - new BiomeNpcSpawningData(GondorianNpcDataPool.KNIGHT).withWeight(1), - new BiomeNpcSpawningData(GondorianNpcDataPool.KNIGHT).withWeight(1).withMount(EntityType.HORSE) + PEASANT_FIEF = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.GONDOR_MILITIA).withWeight(6).withSameNpcType(4, 256), + new WildSpawnEventData(NpcRegistry.GONDOR_SOLDIER).withWeight(3).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.GONDOR_KNIGHT).withWeight(1).withSameNpcType(0, 256) )); - OSGILIATH = new BiomeEventData(List.of( - new BiomeNpcSpawningData(MordorNpcDataPool.SCOUT).withWeight(4), - new BiomeNpcSpawningData(MordorNpcDataPool.MILITIA).withWeight(3), - new BiomeNpcSpawningData(MordorNpcDataPool.WARRIOR).withWeight(2), - new BiomeNpcSpawningData(GondorianNpcDataPool.SOLDIER).withWeight(7), - new BiomeNpcSpawningData(GondorianNpcDataPool.KNIGHT).withWeight(2), - new BiomeNpcSpawningData(GondorianNpcDataPool.KNIGHT).withWeight(2).withMount(EntityType.HORSE), - new BiomeNpcSpawningData(GondorianNpcDataPool.VETERAN).withWeight(2) - )); + OSGILIATH = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.MORDOR_SCOUT).withWeight(4).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_MILITIA).withWeight(3).withSameNpcType(4, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_WARRIOR).withWeight(2).withSameNpcType(1, 256), + + new WildSpawnEventData(NpcRegistry.GONDOR_SOLDIER).withWeight(7).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.GONDOR_KNIGHT).withWeight(2).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.GONDOR_VETERAN).withWeight(2).withSameNpcType(0, 256) + )).withMoreWildSpawns(GenericHostilesBiomeEventPool.WILD_BRIGANDS_EASY); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GundabadBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GundabadBiomeEventPool.java index 0fcef2b32d..105db27721 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GundabadBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/GundabadBiomeEventPool.java @@ -1,9 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.sevenstars.middleearth.entity.EntitiesME; -import net.sevenstars.middleearth.registries.content.npcs.pools.GundabadNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -12,21 +11,22 @@ public class GundabadBiomeEventPool { public final static BiomeEventData SCOUTS; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(GundabadNpcDataPool.GOBLIN).withWeight(6), - new BiomeNpcSpawningData(GundabadNpcDataPool.SCOUT).withWeight(7), - new BiomeNpcSpawningData(GundabadNpcDataPool.MILITIA).withWeight(6), - new BiomeNpcSpawningData(GundabadNpcDataPool.WARRIOR).withWeight(5), - new BiomeNpcSpawningData(GundabadNpcDataPool.MILITIA).withWeight(4).withMount(EntitiesME.WARG), - new BiomeNpcSpawningData(GundabadNpcDataPool.VETERAN).withWeight(2), - new BiomeNpcSpawningData(GundabadNpcDataPool.LEADER) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.GUNDABAD_GOBLIN).withWeight(6).withSameNpcType(4, 128), + new WildSpawnEventData(NpcRegistry.GUNDABAD_SCOUT).withWeight(7).withSameNpcType(3, 128), + new WildSpawnEventData(NpcRegistry.GUNDABAD_MILITIA).withWeight(6).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.GUNDABAD_WARRIOR).withWeight(5).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.GUNDABAD_RIDER).withWeight(2).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.GUNDABAD_VETERAN).withWeight(2).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.GUNDABAD_LEADER).withSameNpcType(0, 512) )); - SCOUTS = new BiomeEventData(List.of( - new BiomeNpcSpawningData(GundabadNpcDataPool.SCOUT).withWeight(4), - new BiomeNpcSpawningData(GundabadNpcDataPool.MILITIA).withWeight(3), - new BiomeNpcSpawningData(GundabadNpcDataPool.WARRIOR).withWeight(2), - new BiomeNpcSpawningData(GundabadNpcDataPool.MILITIA).withWeight(2).withMount(EntitiesME.WARG) + + SCOUTS = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.GUNDABAD_SCOUT).withWeight(4).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.GUNDABAD_MILITIA).withWeight(3).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.GUNDABAD_WARRIOR).withWeight(2).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.GUNDABAD_RIDER).withSameNpcType(0, 256) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/IsengardBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/IsengardBiomeEventPool.java index c6f3d67522..7199f5d3a7 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/IsengardBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/IsengardBiomeEventPool.java @@ -1,11 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.sevenstars.middleearth.entity.EntitiesME; -import net.sevenstars.middleearth.registries.content.npcs.pools.GondorianNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.IsengardNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.IsengardNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -14,21 +11,19 @@ public class IsengardBiomeEventPool { public final static BiomeEventData SCOUTS; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(IsengardNpcDataPool.SNAGA).withWeight(6), - new BiomeNpcSpawningData(IsengardNpcDataPool.WARRIOR).withWeight(5), - new BiomeNpcSpawningData(IsengardNpcDataPool.WARRIOR).withWeight(4).withMount(EntitiesME.WARG), - new BiomeNpcSpawningData(IsengardNpcDataPool.URUK_HAI_SCOUT).withWeight(8), - new BiomeNpcSpawningData(IsengardNpcDataPool.URUK_HAI_SOLDIER).withWeight(7), - new BiomeNpcSpawningData(IsengardNpcDataPool.URUK_HAI_VETERAN).withWeight(4), - new BiomeNpcSpawningData(IsengardNpcDataPool.URUK_HAI_BERSERKER).withWeight(2), - new BiomeNpcSpawningData(IsengardNpcDataPool.URUK_HAI_LEADER) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.ISENGARD_ORC_SNAGA).withWeight(6).withSameNpcType(6, 256), + new WildSpawnEventData(NpcRegistry.ISENGARD_ORC_WARRIOR).withWeight(5).withSameNpcType(4, 256), + new WildSpawnEventData(NpcRegistry.ISENGARD_URUK_HAI_SCOUT).withWeight(8).withSameNpcType(5, 256), + new WildSpawnEventData(NpcRegistry.ISENGARD_URUK_HAI_SOLDIER).withWeight(7).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.ISENGARD_URUK_HAI_VETERAN).withWeight(4).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.ISENGARD_URUK_HAI_BERSERKER).withWeight(2).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.ISENGARD_URUK_HAI_LEADER).withSameNpcType(0, 256) )); - SCOUTS = new BiomeEventData(List.of( - new BiomeNpcSpawningData(IsengardNpcDataPool.URUK_HAI_SCOUT).withWeight(3), - new BiomeNpcSpawningData(IsengardNpcDataPool.WARRIOR).withWeight(2), - new BiomeNpcSpawningData(IsengardNpcDataPool.WARRIOR).withWeight(2).withMount(EntitiesME.WARG) + SCOUTS = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.ISENGARD_URUK_HAI_SCOUT).withWeight(3).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.ISENGARD_ORC_WARRIOR).withWeight(2).withSameNpcType(1, 256) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/LongbeardsBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/LongbeardsBiomeEventPool.java index df33432f01..202b405cb9 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/LongbeardsBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/LongbeardsBiomeEventPool.java @@ -1,10 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.sevenstars.middleearth.entity.EntitiesME; -import net.sevenstars.middleearth.registries.content.npcs.pools.EreborNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.GundabadNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -13,23 +11,22 @@ public class LongbeardsBiomeEventPool { public final static BiomeEventData GREY_PLAINS; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(EreborNpcDataPool.MILITIA).withWeight(6), - new BiomeNpcSpawningData(EreborNpcDataPool.SOLDIER).withWeight(5), - new BiomeNpcSpawningData(EreborNpcDataPool.VETERAN).withWeight(2), - new BiomeNpcSpawningData(EreborNpcDataPool.VETERAN).withWeight(1).withMount(EntitiesME.BROADHOOF_GOAT), - new BiomeNpcSpawningData(EreborNpcDataPool.ELITE).withWeight(1) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.EREBOR_MILITIA).withWeight(6).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.EREBOR_SOLDIER).withWeight(5).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.EREBOR_VETERAN).withWeight(2).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.EREBOR_ELITE).withWeight(1).withSameNpcType(0, 256) )); - GREY_PLAINS = new BiomeEventData(List.of( - new BiomeNpcSpawningData(EreborNpcDataPool.MILITIA).withWeight(4), - new BiomeNpcSpawningData(EreborNpcDataPool.SOLDIER).withWeight(3), - new BiomeNpcSpawningData(EreborNpcDataPool.VETERAN).withWeight(1), + GREY_PLAINS = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.EREBOR_MILITIA).withWeight(4).withSameNpcType(2, 256).lightShouldBeAtLeast(5), + new WildSpawnEventData(NpcRegistry.EREBOR_SOLDIER).withWeight(3).withSameNpcType(1, 256).lightShouldBeAtLeast(5), + new WildSpawnEventData(NpcRegistry.EREBOR_VETERAN).withWeight(1).withSameNpcType(0, 256).lightShouldBeAtLeast(5), - new BiomeNpcSpawningData(GundabadNpcDataPool.SCOUT).withWeight(5), - new BiomeNpcSpawningData(GundabadNpcDataPool.MILITIA).withWeight(4), - new BiomeNpcSpawningData(GundabadNpcDataPool.WARRIOR).withWeight(3), - new BiomeNpcSpawningData(GundabadNpcDataPool.MILITIA).withWeight(2).withMount(EntitiesME.WARG) + new WildSpawnEventData(NpcRegistry.GUNDABAD_SCOUT).withWeight(5).withSameNpcType(2, 256).requireNight().lightShouldBeBetween(0, 7), + new WildSpawnEventData(NpcRegistry.GUNDABAD_MILITIA).withWeight(4).withSameNpcType(2, 256).requireNight().lightShouldBeBetween(0, 7), + new WildSpawnEventData(NpcRegistry.GUNDABAD_WARRIOR).withWeight(3).withSameNpcType(1, 256).requireNight().lightShouldBeBetween(0, 7), + new WildSpawnEventData(NpcRegistry.GUNDABAD_RIDER).withWeight(2).withSameNpcType(0, 256) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/LothlorienBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/LothlorienBiomeEventPool.java index 7c88a03d06..1ebbc644e6 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/LothlorienBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/LothlorienBiomeEventPool.java @@ -1,8 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.sevenstars.middleearth.registries.content.npcs.pools.LorienNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -11,18 +11,18 @@ public class LothlorienBiomeEventPool { public final static BiomeEventData SCOUTS; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(LorienNpcDataPool.CIVILIAN).withWeight(10), - new BiomeNpcSpawningData(LorienNpcDataPool.RANGER).withWeight(9), - new BiomeNpcSpawningData(LorienNpcDataPool.WARRIOR).withWeight(7), - new BiomeNpcSpawningData(LorienNpcDataPool.KNIGHT).withWeight(4), - new BiomeNpcSpawningData(LorienNpcDataPool.EGLADIL_SENTINEL), - new BiomeNpcSpawningData(LorienNpcDataPool.EGLADIL_COMMANDER) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.LOTHLORIEN_CIVILIAN).withWeight(10).withSameNpcType(3, 256).shouldSpawnAbove(64), + new WildSpawnEventData(NpcRegistry.LOTHLORIEN_RANGER).withWeight(9).withSameNpcType(2, 256).shouldSpawnAbove(64), + new WildSpawnEventData(NpcRegistry.LOTHLORIEN_WARRIOR).withWeight(7).withSameNpcType(2, 256).shouldSpawnAbove(64), + new WildSpawnEventData(NpcRegistry.LOTHLORIEN_KNIGHT).withWeight(4).withSameNpcType(1, 256).shouldSpawnAbove(64), + new WildSpawnEventData(NpcRegistry.LOTHLORIEN_EGLADIL_SENTINEL).withSameNpcType(1, 256).shouldSpawnAbove(64), + new WildSpawnEventData(NpcRegistry.LOTHLORIEN_EGLADIL_COMMANDER).withSameNpcType(0, 256).shouldSpawnAbove(64) )); - SCOUTS = new BiomeEventData(List.of( - new BiomeNpcSpawningData(LorienNpcDataPool.RANGER).withWeight(4), - new BiomeNpcSpawningData(LorienNpcDataPool.SENTINEL).withWeight(1) + SCOUTS = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.LOTHLORIEN_RANGER).withWeight(4).withSameNpcType(2, 256).shouldSpawnAbove(64), + new WildSpawnEventData(NpcRegistry.LOTHLORIEN_SENTINEL).withWeight(1).withSameNpcType(1, 256).shouldSpawnAbove(64) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/MordorBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/MordorBiomeEventPool.java index 2d5812d31b..3b437cc412 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/MordorBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/MordorBiomeEventPool.java @@ -1,10 +1,9 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; import net.sevenstars.middleearth.entity.EntitiesME; -import net.sevenstars.middleearth.registries.content.npcs.pools.GondorianNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.MordorNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -13,55 +12,46 @@ public class MordorBiomeEventPool { public final static BiomeEventData NURN; public final static BiomeEventData SCOUTS; public final static BiomeEventData ITHILIEN; - public final static BiomeEventData CAVE; public final static BiomeEventData DOL_GULDUR; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(MordorNpcDataPool.SNAGA).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.SCOUT).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.MILITIA).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.WARRIOR).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.MILITIA).withWeight(3).withMount(EntitiesME.WARG), - new BiomeNpcSpawningData(MordorNpcDataPool.VETERAN).withWeight(2), - new BiomeNpcSpawningData(MordorNpcDataPool.CAPTAIN) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.MORDOR_SNAGA).withWeight(5).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_SCOUT).withWeight(5).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_MILITIA).withWeight(5).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_WARRIOR).withWeight(5).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_VETERAN).withWeight(2).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_CAPTAIN).withSameNpcType(0, 512), + new WildSpawnEventData(EntitiesME.CAVE_TROLL).withSameEntity(1, 256).withEntitySurfaceOnly() )); - NURN = new BiomeEventData(List.of( - new BiomeNpcSpawningData(MordorNpcDataPool.SNAGA).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.SCOUT).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.MILITIA).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.WARRIOR).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.MILITIA).withWeight(3).withMount(EntitiesME.WARG) + NURN = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.MORDOR_SNAGA).withWeight(5).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_SCOUT).withWeight(5).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_MILITIA).withWeight(5).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_WARRIOR).withWeight(5).withSameNpcType(1, 256) )); - SCOUTS = new BiomeEventData(List.of( - new BiomeNpcSpawningData(MordorNpcDataPool.SCOUT).withWeight(4), - new BiomeNpcSpawningData(MordorNpcDataPool.MILITIA).withWeight(3), - new BiomeNpcSpawningData(MordorNpcDataPool.WARRIOR).withWeight(2), - new BiomeNpcSpawningData(MordorNpcDataPool.MILITIA).withWeight(2).withMount(EntitiesME.WARG) + SCOUTS = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.MORDOR_SCOUT).withWeight(4).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_MILITIA).withWeight(3).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_WARRIOR).withWeight(2).withSameNpcType(0, 256) )); + ITHILIEN = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.MORDOR_SCOUT).withWeight(4).withSameNpcType(4, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_MILITIA).withWeight(3).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_WARRIOR).withWeight(2).withSameNpcType(2, 256), - ITHILIEN = new BiomeEventData(List.of( - new BiomeNpcSpawningData(MordorNpcDataPool.SCOUT).withWeight(4), - new BiomeNpcSpawningData(MordorNpcDataPool.MILITIA).withWeight(3), - new BiomeNpcSpawningData(MordorNpcDataPool.WARRIOR).withWeight(2), - - new BiomeNpcSpawningData(GondorianNpcDataPool.SOLDIER).withWeight(4), - new BiomeNpcSpawningData(GondorianNpcDataPool.KNIGHT).withWeight(1) - )); - - CAVE = new BiomeEventData(List.of( - new BiomeNpcSpawningData(MordorNpcDataPool.SNAGA).withWeight(3), - new BiomeNpcSpawningData(MordorNpcDataPool.SCOUT).withWeight(3), - new BiomeNpcSpawningData(MordorNpcDataPool.WARRIOR).withWeight(2) + new WildSpawnEventData(NpcRegistry.GONDOR_SOLDIER).withWeight(4).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.GONDOR_KNIGHT).withWeight(1).withSameNpcType(0, 256) )); - DOL_GULDUR = new BiomeEventData(List.of( - new BiomeNpcSpawningData(MordorNpcDataPool.DOL_GULDUR_SCOUT).withWeight(5), - new BiomeNpcSpawningData(MordorNpcDataPool.DOL_GULDUR_WARRIOR).withWeight(2), - new BiomeNpcSpawningData(MordorNpcDataPool.DOL_GULDUR_WARRIOR).withWeight(1).withMount(EntitiesME.WARG) + DOL_GULDUR = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.MORDOR_SCOUT).withWeight(4).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORDOR_SNAGA).withWeight(4).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.DOL_GULDUR_SCOUT).withWeight(5).withSameNpcType(4, 256), + new WildSpawnEventData(NpcRegistry.DOL_GULDUR_WARRIOR).withWeight(2).withSameNpcType(1, 256) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/MoriaBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/MoriaBiomeEventPool.java index b412687f0c..d681c087ce 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/MoriaBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/MoriaBiomeEventPool.java @@ -1,10 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.sevenstars.middleearth.entity.EntitiesME; -import net.sevenstars.middleearth.registries.content.npcs.pools.BrigandNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.MoriaNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -13,21 +11,21 @@ public class MoriaBiomeEventPool { public final static BiomeEventData EREGION; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(MoriaNpcDataPool.GOBLIN).withWeight(7).withUndegroundRequired(), - new BiomeNpcSpawningData(MoriaNpcDataPool.MILITIA).withWeight(5), - new BiomeNpcSpawningData(MoriaNpcDataPool.SCOUT).withWeight(4), - new BiomeNpcSpawningData(MoriaNpcDataPool.WARRIOR).withWeight(6).withNightRequired(), - new BiomeNpcSpawningData(MoriaNpcDataPool.RIDER).withWeight(4).withMount(EntitiesME.WARG), - new BiomeNpcSpawningData(MoriaNpcDataPool.VETERAN).withWeight(3).withNightRequired(), - new BiomeNpcSpawningData(MoriaNpcDataPool.CHIEF).withNightRequired() + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.MORIA_GOBLIN).withWeight(7).withSameNpcType(4, 256).requireUnderground(), + new WildSpawnEventData(NpcRegistry.MORIA_WARRIOR).withWeight(6).withSameNpcType(2, 256).requireUnderground(), + new WildSpawnEventData(NpcRegistry.MORIA_MILITIA).withWeight(5).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.MORIA_SCOUT).withWeight(4).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.MORIA_RIDER).withWeight(4).withSameNpcType(0, 256).withoutSkyRequirement(), + new WildSpawnEventData(NpcRegistry.MORIA_VETERAN).withWeight(3).withSameNpcType(0, 256).requireNight(), + new WildSpawnEventData(NpcRegistry.MORIA_CHIEF).withSameNpcType(0, 512).requireNight() )); - EREGION = new BiomeEventData(List.of( - new BiomeNpcSpawningData(BrigandNpcDataPool.THIEF).withWeight(2), - new BiomeNpcSpawningData(BrigandNpcDataPool.THUG).withWeight(1), - new BiomeNpcSpawningData(MoriaNpcDataPool.SCOUT).withWeight(3), - new BiomeNpcSpawningData(MoriaNpcDataPool.RIDER).withMount(EntitiesME.WARG) - )); + EREGION = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.BRIGAND_THIEF).withSameNpcType(3, 256).withWeight(2), + new WildSpawnEventData(NpcRegistry.BRIGAND_THUG).withSameNpcType(2, 256).withWeight(1), + new WildSpawnEventData(NpcRegistry.MORIA_SCOUT).withSameNpcType(3, 256).withWeight(3), + new WildSpawnEventData(NpcRegistry.MORIA_RIDER).withSameNpcType(0, 512) + )).withMoreWildSpawns(GenericHostilesBiomeEventPool.WILD_BRIGANDS_EASY); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/RohanBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/RohanBiomeEventPool.java index b9761c2430..a3ae3eecf0 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/RohanBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/RohanBiomeEventPool.java @@ -1,13 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.minecraft.entity.EntityType; -import net.minecraft.registry.Registries; -import net.sevenstars.middleearth.item.EquipmentItemsME; -import net.sevenstars.middleearth.registries.content.npcs.pools.GondorianNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.MordorNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.RohirricNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -15,13 +10,11 @@ public class RohanBiomeEventPool { public final static BiomeEventData DEFAULT; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(RohirricNpcDataPool.MILITIA).withWeight(7), - new BiomeNpcSpawningData(RohirricNpcDataPool.SOLDIER).withWeight(3), - new BiomeNpcSpawningData(RohirricNpcDataPool.SOLDIER).withWeight(2).withMount(EntityType.HORSE), - new BiomeNpcSpawningData(RohirricNpcDataPool.KNIGHT).withWeight(2), - new BiomeNpcSpawningData(RohirricNpcDataPool.KNIGHT).withWeight(1).withMount(EntityType.HORSE, EquipmentItemsME.ROHIRRIC_HORSE_ARMOR.asItem()), - new BiomeNpcSpawningData(RohirricNpcDataPool.EORLING_MARSHAL).withWeight(1) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.ROHAN_MILITIA).withWeight(7).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.ROHAN_SOLDIER).withWeight(3).withSameNpcType(2, 256), + new WildSpawnEventData(NpcRegistry.ROHAN_KNIGHT).withWeight(2).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.ROHAN_EORLING_MARSHAL).withWeight(1).withSameNpcType(0, 512) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/ShireBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/ShireBiomeEventPool.java index 8e2a395d90..e75d0bd2a1 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/ShireBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/ShireBiomeEventPool.java @@ -1,8 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.sevenstars.middleearth.registries.content.npcs.pools.ShireNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -10,10 +10,10 @@ public class ShireBiomeEventPool { public final static BiomeEventData DEFAULT; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(ShireNpcDataPool.PEASANT).withWeight(12), - new BiomeNpcSpawningData(ShireNpcDataPool.MILITIA).withWeight(3), - new BiomeNpcSpawningData(ShireNpcDataPool.SHIRRIFF) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.SHIRE_PEASANT).withWeight(12).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.SHIRE_MILITIA).withWeight(3).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.SHIRE_SHIRRIFF).withSameNpcType(0, 256) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/TrollShawBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/TrollShawBiomeEventPool.java new file mode 100644 index 0000000000..0c3615ff2e --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/TrollShawBiomeEventPool.java @@ -0,0 +1,18 @@ +package net.sevenstars.middleearth.registries.content.biomevents.pools; + +import net.sevenstars.middleearth.entity.EntitiesME; +import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; + +import java.util.List; + +public class TrollShawBiomeEventPool { + public final static BiomeEventData TROLLSHAWS; + + static { + TROLLSHAWS = new BiomeEventData(false, List.of( + new WildSpawnEventData(EntitiesME.STONE_TROLL).withSameEntity(3, 256).requireNight().requireSky().withEntitySurfaceOnly(), + new WildSpawnEventData(EntitiesME.GREAT_HORN).withSameEntity(3, 256).requireSky() + )); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/WoodlandRealmBiomeEventPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/WoodlandRealmBiomeEventPool.java index b64735217b..6fd742f873 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/WoodlandRealmBiomeEventPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/biomevents/pools/WoodlandRealmBiomeEventPool.java @@ -1,9 +1,8 @@ package net.sevenstars.middleearth.registries.content.biomevents.pools; -import net.sevenstars.middleearth.entity.EntitiesME; -import net.sevenstars.middleearth.registries.content.npcs.pools.WoodlandRealmNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventData; -import net.sevenstars.middleearth.resources.datas.biome_events.BiomeNpcSpawningData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; import java.util.List; @@ -13,26 +12,26 @@ public class WoodlandRealmBiomeEventPool { public final static BiomeEventData HALL; static { - DEFAULT = new BiomeEventData(List.of( - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.HUNTER).withWeight(7), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.RANGER).withWeight(5), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.LANCER).withWeight(3).withMount(EntitiesME.GREAT_HORN), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.WARRIOR).withWeight(2), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.WARDEN_OF_THE_GLADE) + DEFAULT = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_HUNTER).withWeight(7).withSameNpcType(1, 256), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_RANGER).withWeight(5).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_LANCER).withWeight(3).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_WARRIOR).withWeight(2).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_WARDEN_OF_THE_GLADE).withSameNpcType(0, 512) )); - SCOUTS = new BiomeEventData(List.of( - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.RANGER).withWeight(4), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.SENTINEL).withWeight(3), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.NIGHTSHADE).withWeight(1).withNightRequired() + SCOUTS = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_RANGER).withWeight(4).withSameNpcType(3, 256), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_SENTINEL).withWeight(3).withSameNpcType(0, 256), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_NIGHTSHADE).withSameNpcType(0, 512).requireNight().lightShouldBeBetween(0,7) )); - HALL = new BiomeEventData(List.of( - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.ARTISAN).withWeight(10), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.HUNTER).withWeight(6), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.RANGER).withWeight(4), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.WARRIOR).withWeight(2), - new BiomeNpcSpawningData(WoodlandRealmNpcDataPool.WARDEN_OF_THE_GLADE) + HALL = new BiomeEventData(false, List.of( + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_ARTISAN).withWeight(10).withSameNpcType(5, 256).withoutSkyRequirement().structureManagerRadiusAvoidance(0).lightShouldBeAtLeast(8), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_HUNTER).withWeight(6).withSameNpcType(3, 256).withoutSkyRequirement().structureManagerRadiusAvoidance(0).lightShouldBeAtLeast(8), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_RANGER).withWeight(4).withSameNpcType(2, 256).withoutSkyRequirement().structureManagerRadiusAvoidance(0).lightShouldBeAtLeast(8), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_WARRIOR).withWeight(2).withSameNpcType(2, 256).withoutSkyRequirement().structureManagerRadiusAvoidance(0).lightShouldBeAtLeast(8), + new WildSpawnEventData(NpcRegistry.WOODLAND_REALM_WARDEN_OF_THE_GLADE).withSameNpcType(0, 512).withoutSkyRequirement().structureManagerRadiusAvoidance(0).lightShouldBeAtLeast(8) )); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/BrigandFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/BrigandFactionPool.java index e9d5ff63b5..403f9b60c4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/BrigandFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/BrigandFactionPool.java @@ -9,7 +9,7 @@ import net.sevenstars.middleearth.resources.datas.factions.Faction; import net.sevenstars.middleearth.resources.datas.factions.data.BannerData; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.middleearth.registries.content.npcs.pools.BrigandNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.BrigandNpcTypePool; import net.sevenstars.middleearth.resources.datas.factions.data.InitialDiplomacy; import java.util.HashMap; @@ -22,23 +22,23 @@ public class BrigandFactionPool { BRIGAND = new Faction(FactionRegistry.BRIGAND, false, DispositionType.NEUTRAL, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - BrigandNpcDataPool.THUG + BrigandNpcTypePool.THUG )); put(NpcRank.MILITIA, List.of( - BrigandNpcDataPool.THUG, - BrigandNpcDataPool.THIEF + BrigandNpcTypePool.THUG, + BrigandNpcTypePool.THIEF )); put(NpcRank.SOLDIER, List.of( - BrigandNpcDataPool.MERCENARY + BrigandNpcTypePool.MERCENARY )); put(NpcRank.KNIGHT, List.of( - BrigandNpcDataPool.CHIEFTAIN + BrigandNpcTypePool.CHIEFTAIN )); put(NpcRank.VETERAN, List.of( - BrigandNpcDataPool.CHIEFTAIN + BrigandNpcTypePool.CHIEFTAIN )); put(NpcRank.LEADER, List.of( - BrigandNpcDataPool.CHIEFTAIN + BrigandNpcTypePool.CHIEFTAIN )); }}, new BannerData(DyeColor.BLACK, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/DaleFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/DaleFactionPool.java index 9830d0fdb7..48cd65207d 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/DaleFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/DaleFactionPool.java @@ -14,8 +14,7 @@ import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.middleearth.registries.content.npcs.pools.DalishNpcDataPool; -import net.sevenstars.api.utils.IdentifierUtil; +import net.sevenstars.middleearth.registries.content.npctypes.pools.DalishNpcTypePool; import org.joml.Vector2d; import java.util.HashMap; @@ -29,24 +28,24 @@ public class DaleFactionPool { DALE = new Faction(FactionRegistry.DALE, true, DispositionType.GOOD, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - DalishNpcDataPool.PEASANT + DalishNpcTypePool.PEASANT )); put(NpcRank.MILITIA, List.of( - DalishNpcDataPool.MILITIA + DalishNpcTypePool.MILITIA )); put(NpcRank.SOLDIER, List.of( - DalishNpcDataPool.SOLDIER, - DalishNpcDataPool.ARCHER + DalishNpcTypePool.SOLDIER, + DalishNpcTypePool.ARCHER )); put(NpcRank.KNIGHT, List.of( - DalishNpcDataPool.KNIGHT, - DalishNpcDataPool.ELITE_ARCHER + DalishNpcTypePool.KNIGHT, + DalishNpcTypePool.ELITE_ARCHER )); put(NpcRank.VETERAN, List.of( - DalishNpcDataPool.VETERAN + DalishNpcTypePool.VETERAN )); put(NpcRank.LEADER, List.of( - DalishNpcDataPool.SERGEANT + DalishNpcTypePool.SERGEANT )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/GoblinTownFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/GoblinTownFactionPool.java index d1850ff267..234288e257 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/GoblinTownFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/GoblinTownFactionPool.java @@ -4,8 +4,7 @@ import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.item.utils.BannerPatternsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.GoblinTownNpcDataPool; -import net.sevenstars.middleearth.registries.content.npcs.pools.MoriaNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.GoblinTownNpcTypePool; import net.sevenstars.middleearth.resources.datas.common.AffinityLevel; import net.sevenstars.middleearth.resources.datas.common.DispositionType; import net.sevenstars.middleearth.resources.datas.common.FactionType; @@ -27,22 +26,22 @@ public class GoblinTownFactionPool { GOBLIN_TOWN = new Faction(FactionRegistry.GOBLIN_TOWN, true, DispositionType.EVIL, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - GoblinTownNpcDataPool.GOBLIN + GoblinTownNpcTypePool.GOBLIN )); put(NpcRank.MILITIA, List.of( - GoblinTownNpcDataPool.SCOUT + GoblinTownNpcTypePool.SCOUT )); put(NpcRank.SOLDIER, List.of( - GoblinTownNpcDataPool.WARRIOR + GoblinTownNpcTypePool.WARRIOR )); put(NpcRank.KNIGHT, List.of( - GoblinTownNpcDataPool.RIDER + GoblinTownNpcTypePool.RIDER )); put(NpcRank.VETERAN, List.of( - GoblinTownNpcDataPool.VETERAN + GoblinTownNpcTypePool.VETERAN )); put(NpcRank.LEADER, List.of( - GoblinTownNpcDataPool.VETERAN + GoblinTownNpcTypePool.VETERAN )); }}, new BannerData(DyeColor.BLACK, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/GondorFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/GondorFactionPool.java index 93a7bdcf26..0725b9a12e 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/GondorFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/GondorFactionPool.java @@ -5,7 +5,7 @@ import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.item.utils.BannerPatternsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.GondorianNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.GondorianNpcTypePool; import net.sevenstars.middleearth.resources.datas.common.AffinityLevel; import net.sevenstars.middleearth.resources.datas.common.DispositionType; import net.sevenstars.middleearth.resources.datas.common.FactionType; @@ -15,7 +15,6 @@ import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.api.utils.IdentifierUtil; import org.joml.Vector2d; import java.util.HashMap; @@ -29,25 +28,25 @@ public class GondorFactionPool { GONDOR = new Faction(FactionRegistry.GONDOR, true, DispositionType.GOOD, FactionType.FACTION, null, null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - GondorianNpcDataPool.PEASANT + GondorianNpcTypePool.PEASANT )); put(NpcRank.MILITIA, List.of( - GondorianNpcDataPool.MILITIA + GondorianNpcTypePool.MILITIA )); put(NpcRank.SOLDIER, List.of( - GondorianNpcDataPool.SOLDIER + GondorianNpcTypePool.SOLDIER )); put(NpcRank.KNIGHT, List.of( - GondorianNpcDataPool.KNIGHT + GondorianNpcTypePool.KNIGHT )); put(NpcRank.VETERAN, List.of( - GondorianNpcDataPool.VETERAN, - GondorianNpcDataPool.KING_GUARD, - GondorianNpcDataPool.CITADEL_GUARD, - GondorianNpcDataPool.FOUNTAIN_GUARD + GondorianNpcTypePool.VETERAN, + GondorianNpcTypePool.KING_GUARD, + GondorianNpcTypePool.CITADEL_GUARD, + GondorianNpcTypePool.FOUNTAIN_GUARD )); put(NpcRank.LEADER, List.of( - GondorianNpcDataPool.LEADER + GondorianNpcTypePool.LEADER )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/HobgoblinTribesFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/HobgoblinTribesFactionPool.java index 027f70cb97..afcc513656 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/HobgoblinTribesFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/HobgoblinTribesFactionPool.java @@ -5,7 +5,7 @@ import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.item.utils.BannerPatternsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.GundabadNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.GundabadNpcTypePool; import net.sevenstars.middleearth.resources.datas.common.AffinityLevel; import net.sevenstars.middleearth.resources.datas.common.DispositionType; import net.sevenstars.middleearth.resources.datas.common.FactionType; @@ -32,22 +32,22 @@ public class HobgoblinTribesFactionPool { GUNDABAD = new Faction(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, true, DispositionType.EVIL, FactionType.SUBFACTION, HOBGOBLIN_TRIBES.getId(),null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - GundabadNpcDataPool.GOBLIN + GundabadNpcTypePool.GOBLIN )); put(NpcRank.MILITIA, List.of( - GundabadNpcDataPool.MILITIA + GundabadNpcTypePool.MILITIA )); put(NpcRank.SOLDIER, List.of( - GundabadNpcDataPool.SCOUT + GundabadNpcTypePool.SCOUT )); put(NpcRank.KNIGHT, List.of( - GundabadNpcDataPool.WARRIOR + GundabadNpcTypePool.WARRIOR )); put(NpcRank.VETERAN, List.of( - GundabadNpcDataPool.VETERAN + GundabadNpcTypePool.VETERAN )); put(NpcRank.LEADER, List.of( - GundabadNpcDataPool.LEADER + GundabadNpcTypePool.LEADER )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/IsengardFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/IsengardFactionPool.java index 5c94c06497..a9fe605e95 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/IsengardFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/IsengardFactionPool.java @@ -2,7 +2,6 @@ import net.minecraft.block.entity.BannerPatterns; import net.minecraft.util.DyeColor; -import net.minecraft.util.Identifier; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.item.utils.BannerPatternsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; @@ -15,7 +14,7 @@ import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.middleearth.registries.content.npcs.pools.IsengardNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.IsengardNpcTypePool; import org.joml.Vector2d; import java.util.HashMap; @@ -29,24 +28,24 @@ public class IsengardFactionPool { ISENGARD = new Faction(FactionRegistry.ISENGARD, true, DispositionType.EVIL, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - IsengardNpcDataPool.SNAGA + IsengardNpcTypePool.SNAGA )); put(NpcRank.MILITIA, List.of( - IsengardNpcDataPool.WARRIOR + IsengardNpcTypePool.WARRIOR )); put(NpcRank.SOLDIER, List.of( - IsengardNpcDataPool.URUK_HAI_SOLDIER, - IsengardNpcDataPool.URUK_HAI_SCOUT + IsengardNpcTypePool.URUK_HAI_SOLDIER, + IsengardNpcTypePool.URUK_HAI_SCOUT )); put(NpcRank.KNIGHT, List.of( - IsengardNpcDataPool.URUK_HAI_BERSERKER, - IsengardNpcDataPool.ORTHANC_GUARD + IsengardNpcTypePool.URUK_HAI_BERSERKER, + IsengardNpcTypePool.ORTHANC_GUARD )); put(NpcRank.VETERAN, List.of( - IsengardNpcDataPool.URUK_HAI_VETERAN + IsengardNpcTypePool.URUK_HAI_VETERAN )); put(NpcRank.LEADER, List.of( - IsengardNpcDataPool.URUK_HAI_LEADER + IsengardNpcTypePool.URUK_HAI_LEADER )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/LongbeardsFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/LongbeardsFactionPool.java index f7dea660b0..04af96aa42 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/LongbeardsFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/LongbeardsFactionPool.java @@ -14,7 +14,7 @@ import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.middleearth.registries.content.npcs.pools.EreborNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.EreborNpcTypePool; import org.joml.Vector2d; import java.util.HashMap; @@ -32,25 +32,25 @@ public class LongbeardsFactionPool { EREBOR = new Faction(FactionRegistry.LONGBEARDS_EREBOR, true, DispositionType.GOOD, FactionType.SUBFACTION, LONGBEARDS.getId(),null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - EreborNpcDataPool.PEASANT, - EreborNpcDataPool.MINER + EreborNpcTypePool.PEASANT, + EreborNpcTypePool.MINER )); put(NpcRank.MILITIA, List.of( - EreborNpcDataPool.MILITIA + EreborNpcTypePool.MILITIA )); put(NpcRank.SOLDIER, List.of( - EreborNpcDataPool.SOLDIER, - EreborNpcDataPool.ARCHER + EreborNpcTypePool.SOLDIER, + EreborNpcTypePool.ARCHER )); put(NpcRank.KNIGHT, List.of( - EreborNpcDataPool.ELITE + EreborNpcTypePool.ELITE )); put(NpcRank.VETERAN, List.of( - EreborNpcDataPool.VETERAN, - EreborNpcDataPool.GATEWARDEN + EreborNpcTypePool.VETERAN, + EreborNpcTypePool.GATEWARDEN )); put(NpcRank.LEADER, List.of( - EreborNpcDataPool.LEADER + EreborNpcTypePool.LEADER )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/LothlorienFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/LothlorienFactionPool.java index 8bc7a90b16..c5207f2461 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/LothlorienFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/LothlorienFactionPool.java @@ -14,8 +14,7 @@ import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.middleearth.registries.content.npcs.pools.LorienNpcDataPool; -import net.sevenstars.api.utils.IdentifierUtil; +import net.sevenstars.middleearth.registries.content.npctypes.pools.LorienNpcTypePool; import org.joml.Vector2d; import java.util.HashMap; @@ -28,22 +27,22 @@ public class LothlorienFactionPool { LOTHLORIEN = new Faction(FactionRegistry.LOTHLORIEN, true, DispositionType.GOOD, FactionType.FACTION, null, null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - LorienNpcDataPool.SENTINEL + LorienNpcTypePool.SENTINEL )); put(NpcRank.MILITIA, List.of( - LorienNpcDataPool.RANGER + LorienNpcTypePool.RANGER )); put(NpcRank.SOLDIER, List.of( - LorienNpcDataPool.WARRIOR + LorienNpcTypePool.WARRIOR )); put(NpcRank.KNIGHT, List.of( - LorienNpcDataPool.KNIGHT + LorienNpcTypePool.KNIGHT )); put(NpcRank.VETERAN, List.of( - LorienNpcDataPool.GUARD + LorienNpcTypePool.GUARD )); put(NpcRank.LEADER, List.of( - LorienNpcDataPool.LORD + LorienNpcTypePool.LORD )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/MordorFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/MordorFactionPool.java index 8af3dd6f28..61cc215bd1 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/MordorFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/MordorFactionPool.java @@ -2,7 +2,6 @@ import net.minecraft.block.entity.BannerPatterns; import net.minecraft.util.DyeColor; -import net.minecraft.util.Identifier; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.item.utils.BannerPatternsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; @@ -15,7 +14,7 @@ import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.middleearth.registries.content.npcs.pools.MordorNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.MordorNpcTypePool; import org.joml.Vector2d; import java.util.HashMap; @@ -28,24 +27,24 @@ public class MordorFactionPool { MORDOR = new Faction(FactionRegistry.MORDOR, true, DispositionType.EVIL, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - MordorNpcDataPool.SNAGA + MordorNpcTypePool.SNAGA )); put(NpcRank.MILITIA, List.of( - MordorNpcDataPool.MILITIA + MordorNpcTypePool.MILITIA )); put(NpcRank.SOLDIER, List.of( - MordorNpcDataPool.WARRIOR + MordorNpcTypePool.WARRIOR )); put(NpcRank.KNIGHT, List.of( - MordorNpcDataPool.WARRIOR, - MordorNpcDataPool.VETERAN + MordorNpcTypePool.WARRIOR, + MordorNpcTypePool.VETERAN )); put(NpcRank.VETERAN, List.of( - MordorNpcDataPool.VETERAN + MordorNpcTypePool.VETERAN )); put(NpcRank.LEADER, List.of( - MordorNpcDataPool.CAPTAIN, - MordorNpcDataPool.BLACK_NUMENOREAN + MordorNpcTypePool.CAPTAIN, + MordorNpcTypePool.BLACK_NUMENOREAN )); }}, new BannerData(DyeColor.BLACK, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/MoriaFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/MoriaFactionPool.java index 9ea2ca6159..f3eefc03ce 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/MoriaFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/MoriaFactionPool.java @@ -4,7 +4,7 @@ import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.item.utils.BannerPatternsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.MoriaNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.MoriaNpcTypePool; import net.sevenstars.middleearth.resources.datas.common.AffinityLevel; import net.sevenstars.middleearth.resources.datas.common.DispositionType; import net.sevenstars.middleearth.resources.datas.common.FactionType; @@ -26,23 +26,23 @@ public class MoriaFactionPool { MORIA = new Faction(FactionRegistry.MORIA, true, DispositionType.EVIL, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - MoriaNpcDataPool.GOBLIN + MoriaNpcTypePool.GOBLIN )); put(NpcRank.MILITIA, List.of( - MoriaNpcDataPool.MILITIA, - MoriaNpcDataPool.SCOUT + MoriaNpcTypePool.MILITIA, + MoriaNpcTypePool.SCOUT )); put(NpcRank.SOLDIER, List.of( - MoriaNpcDataPool.WARRIOR + MoriaNpcTypePool.WARRIOR )); put(NpcRank.KNIGHT, List.of( - MoriaNpcDataPool.RIDER + MoriaNpcTypePool.RIDER )); put(NpcRank.VETERAN, List.of( - MoriaNpcDataPool.VETERAN + MoriaNpcTypePool.VETERAN )); put(NpcRank.LEADER, List.of( - MoriaNpcDataPool.CHIEF + MoriaNpcTypePool.CHIEF )); }}, new BannerData(DyeColor.BLACK, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/RohanFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/RohanFactionPool.java index 64d6b60cf5..08bb8ee6f3 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/RohanFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/RohanFactionPool.java @@ -14,8 +14,7 @@ import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.middleearth.registries.content.npcs.pools.RohirricNpcDataPool; -import net.sevenstars.api.utils.IdentifierUtil; +import net.sevenstars.middleearth.registries.content.npctypes.pools.RohirricNpcTypePool; import org.joml.Vector2d; import java.util.HashMap; @@ -29,24 +28,24 @@ public class RohanFactionPool { ROHAN = new Faction(FactionRegistry.ROHAN, true, DispositionType.GOOD, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - RohirricNpcDataPool.MILITIA + RohirricNpcTypePool.MILITIA )); put(NpcRank.MILITIA, List.of( - RohirricNpcDataPool.MILITIA + RohirricNpcTypePool.MILITIA )); put(NpcRank.SOLDIER, List.of( - RohirricNpcDataPool.SOLDIER + RohirricNpcTypePool.SOLDIER )); put(NpcRank.KNIGHT, List.of( - RohirricNpcDataPool.KNIGHT + RohirricNpcTypePool.KNIGHT )); put(NpcRank.VETERAN, List.of( - RohirricNpcDataPool.KNIGHT, - RohirricNpcDataPool.ROYAL_GUARD + RohirricNpcTypePool.KNIGHT, + RohirricNpcTypePool.ROYAL_GUARD )); put(NpcRank.LEADER, List.of( - RohirricNpcDataPool.HORSE_LORD, - RohirricNpcDataPool.EORLING_MARSHAL + RohirricNpcTypePool.HORSE_LORD, + RohirricNpcTypePool.EORLING_MARSHAL )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/ShireFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/ShireFactionPool.java index 0618a19032..d6b5685659 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/ShireFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/ShireFactionPool.java @@ -2,7 +2,6 @@ import net.minecraft.block.entity.BannerPatterns; import net.minecraft.util.DyeColor; -import net.minecraft.util.Identifier; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.item.utils.BannerPatternsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; @@ -15,7 +14,7 @@ import net.sevenstars.middleearth.resources.datas.factions.data.SpawnData; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; import net.sevenstars.middleearth.resources.datas.common.NpcRank; -import net.sevenstars.middleearth.registries.content.npcs.pools.ShireNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.ShireNpcTypePool; import org.joml.Vector2d; import java.util.HashMap; @@ -28,22 +27,22 @@ public class ShireFactionPool { SHIRE = new Faction(FactionRegistry.SHIRE, true, DispositionType.GOOD, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - ShireNpcDataPool.PEASANT + ShireNpcTypePool.PEASANT )); put(NpcRank.MILITIA, List.of( - ShireNpcDataPool.MILITIA + ShireNpcTypePool.MILITIA )); put(NpcRank.SOLDIER, List.of( - ShireNpcDataPool.SHIRRIFF + ShireNpcTypePool.SHIRRIFF )); put(NpcRank.KNIGHT, List.of( - ShireNpcDataPool.SHIRRIFF + ShireNpcTypePool.SHIRRIFF )); put(NpcRank.VETERAN, List.of( - ShireNpcDataPool.SHIRRIFF + ShireNpcTypePool.SHIRRIFF )); put(NpcRank.LEADER, List.of( - ShireNpcDataPool.SHIRRIFF + ShireNpcTypePool.SHIRRIFF )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/WildGoblinsFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/WildGoblinsFactionPool.java index 6ada182bf6..6a11cadf04 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/WildGoblinsFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/WildGoblinsFactionPool.java @@ -3,7 +3,7 @@ import net.minecraft.block.entity.BannerPatterns; import net.minecraft.util.DyeColor; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.WildGoblinNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.WildGoblinNpcTypePool; import net.sevenstars.middleearth.resources.datas.common.AffinityLevel; import net.sevenstars.middleearth.resources.datas.common.DispositionType; import net.sevenstars.middleearth.resources.datas.common.FactionType; @@ -22,25 +22,25 @@ public class WildGoblinsFactionPool { WILD_GOBLIN = new Faction(FactionRegistry.WILD_GOBLINS, false, DispositionType.NEUTRAL, FactionType.FACTION, null,null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - WildGoblinNpcDataPool.GATHERER + WildGoblinNpcTypePool.GATHERER )); put(NpcRank.MILITIA, List.of( - WildGoblinNpcDataPool.GATHERER + WildGoblinNpcTypePool.GATHERER )); put(NpcRank.SOLDIER, List.of( - WildGoblinNpcDataPool.GATHERER, - WildGoblinNpcDataPool.WARRIOR, - WildGoblinNpcDataPool.SCOUT, - WildGoblinNpcDataPool.RIDER + WildGoblinNpcTypePool.GATHERER, + WildGoblinNpcTypePool.WARRIOR, + WildGoblinNpcTypePool.SCOUT, + WildGoblinNpcTypePool.RIDER )); put(NpcRank.KNIGHT, List.of( - WildGoblinNpcDataPool.WARRIOR + WildGoblinNpcTypePool.WARRIOR )); put(NpcRank.VETERAN, List.of( - WildGoblinNpcDataPool.BRUTE + WildGoblinNpcTypePool.BRUTE )); put(NpcRank.LEADER, List.of( - WildGoblinNpcDataPool.BRUTE + WildGoblinNpcTypePool.BRUTE )); }}, new BannerData(DyeColor.BLACK, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/WoodlandRealmFactionPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/WoodlandRealmFactionPool.java index b9fbf27436..adfe5f558d 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/WoodlandRealmFactionPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/factions/pools/WoodlandRealmFactionPool.java @@ -5,7 +5,7 @@ import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.item.utils.BannerPatternsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.WoodlandRealmNpcDataPool; +import net.sevenstars.middleearth.registries.content.npctypes.pools.WoodlandRealmNpcTypePool; import net.sevenstars.middleearth.resources.datas.common.AffinityLevel; import net.sevenstars.middleearth.resources.datas.common.DispositionType; import net.sevenstars.middleearth.resources.datas.common.FactionType; @@ -27,22 +27,22 @@ public class WoodlandRealmFactionPool { WOODLAND_REALM = new Faction(FactionRegistry.WOODLAND_REALM, true, DispositionType.GOOD, FactionType.FACTION, null, null, new HashMap<>(){{ put(NpcRank.CIVILIAN, List.of( - WoodlandRealmNpcDataPool.RANGER + WoodlandRealmNpcTypePool.RANGER )); put(NpcRank.MILITIA, List.of( - WoodlandRealmNpcDataPool.RANGER + WoodlandRealmNpcTypePool.RANGER )); put(NpcRank.SOLDIER, List.of( - WoodlandRealmNpcDataPool.WARRIOR + WoodlandRealmNpcTypePool.WARRIOR )); put(NpcRank.KNIGHT, List.of( - WoodlandRealmNpcDataPool.RANGER + WoodlandRealmNpcTypePool.RANGER )); put(NpcRank.VETERAN, List.of( - WoodlandRealmNpcDataPool.RANGER + WoodlandRealmNpcTypePool.RANGER )); put(NpcRank.LEADER, List.of( - WoodlandRealmNpcDataPool.COMMANDER + WoodlandRealmNpcTypePool.COMMANDER )); }}, new BannerData(DyeColor.WHITE, List.of( diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/NpcRegistry.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/NpcRegistry.java deleted file mode 100644 index 9dfa0f3266..0000000000 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/NpcRegistry.java +++ /dev/null @@ -1,207 +0,0 @@ -package net.sevenstars.middleearth.registries.content.npcs; - -import net.minecraft.entity.attribute.EntityAttributes; -import net.minecraft.registry.Registerable; -import net.minecraft.registry.Registry; -import net.minecraft.registry.RegistryEntryLookup; -import net.minecraft.registry.RegistryKey; -import net.minecraft.util.Identifier; -import net.sevenstars.middleearth.MiddleEarth; -import net.sevenstars.middleearth.datageneration.content.TranslationEntries; -import net.sevenstars.middleearth.registries.DynamicRegistriesME; -import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.*; -import net.sevenstars.middleearth.resources.datas.attributes.AttributePool; -import net.sevenstars.middleearth.resources.datas.attributes.AttributePoolElement; -import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.common.EntityCategories; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -public class NpcRegistry { - private static final RegistryKey> NPC_KEY = DynamicRegistriesME.NPC; - - public static final HashMap COMMON_NPC_ATTRIBUTES = new HashMap<>(){{ - put(EntityCategories.SHARED, new AttributePool().addElement( - AttributePoolElement.create(EntityAttributes.MOVEMENT_SPEED, 0.35, 0.45) - )); - }}; - - public static ArrayList> allNpcDatas; - - // [BRIGANDS] - public final static RegistryKey BRIGAND_THUG = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.BRIGAND, "thug")); - public final static RegistryKey BRIGAND_THIEF = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.BRIGAND, "thief")); - public final static RegistryKey BRIGAND_MERCENARY = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.BRIGAND, "mercenary")); - public final static RegistryKey BRIGAND_CHIEFTAIN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.BRIGAND, "chieftain")); - - // [WILD GOBLINS] - public final static RegistryKey WILD_GOBLIN_GATHERER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WILD_GOBLINS, "gatherer")); - public final static RegistryKey WILD_GOBLIN_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WILD_GOBLINS, "warrior")); - public final static RegistryKey WILD_GOBLIN_SCOUT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WILD_GOBLINS, "scout")); - public final static RegistryKey WILD_GOBLIN_RIDER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WILD_GOBLINS, "rider")); - public final static RegistryKey WILD_GOBLIN_BRUTE = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WILD_GOBLINS, "brute")); - - // [DALE] - public final static RegistryKey DALE_PEASANT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.DALE, "peasant")); - public final static RegistryKey DALE_MILITIA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.DALE, "militia")); - public final static RegistryKey DALE_SOLDIER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.DALE, "soldier")); - public final static RegistryKey DALE_ARCHER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.DALE, "archer")); - public final static RegistryKey DALE_KNIGHT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.DALE, "knight")); - public final static RegistryKey DALE_ELITE_ARCHER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.DALE, "elite_archer")); - public final static RegistryKey DALE_VETERAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.DALE, "veteran")); - public final static RegistryKey DALE_SERGEANT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.DALE, "sergeant")); - - // [GONDOR] - public final static RegistryKey GONDOR_PEASANT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "peasant")); - public final static RegistryKey GONDOR_MILITIA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "militia")); - public final static RegistryKey GONDOR_SOLDIER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "soldier")); - public final static RegistryKey GONDOR_KNIGHT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "knight")); - public final static RegistryKey GONDOR_VETERAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "veteran")); - public final static RegistryKey GONDOR_FOUNTAIN_GUARD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "fountain_guard")); - public final static RegistryKey GONDOR_CITADEL_GUARD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "citadel_guard")); - public final static RegistryKey GONDOR_KING_GUARD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "king_guard")); - public final static RegistryKey GONDOR_LEADER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GONDOR, "leader")); - - // [ROHAN] - public final static RegistryKey ROHAN_PEASANT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ROHAN, "peasant")); - public final static RegistryKey ROHAN_MILITIA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ROHAN, "militia")); - public final static RegistryKey ROHAN_SOLDIER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ROHAN, "soldier")); - public final static RegistryKey ROHAN_KNIGHT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ROHAN, "knight")); - public final static RegistryKey ROHAN_ROYAL_GUARD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ROHAN, "royal_guard")); - public final static RegistryKey ROHAN_EORLING_MARSHAL = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ROHAN, "eorling_marshal")); - public final static RegistryKey ROHAN_HORSE_LORD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ROHAN, "horse_lord")); - - // [SHIRE] - public final static RegistryKey SHIRE_PEASANT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.SHIRE, "peasant")); - public final static RegistryKey SHIRE_MILITIA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.SHIRE, "militia")); - public final static RegistryKey SHIRE_SHIRRIFF = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.SHIRE, "shirriff")); - - // [LONGBEARDS] - // [EREBOR] - public final static RegistryKey EREBOR_PEASANT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "peasant")); - public final static RegistryKey EREBOR_MINER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "miner")); - public final static RegistryKey EREBOR_MILITIA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "militia")); - public final static RegistryKey EREBOR_SOLDIER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "soldier")); - public final static RegistryKey EREBOR_ARCHER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "archer")); - public final static RegistryKey EREBOR_ELITE = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "elite")); - public final static RegistryKey EREBOR_VETERAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "veteran")); - public final static RegistryKey EREBOR_GATEWARDEN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "gatewarden")); - public final static RegistryKey EREBOR_LEADER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "leader")); - - // [LOTHLORIEN] - public final static RegistryKey LOTHLORIEN_CIVILIAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "civilian")); - public final static RegistryKey LOTHLORIEN_SENTINEL = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "sentinel")); - public final static RegistryKey LOTHLORIEN_RANGER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "ranger")); - public final static RegistryKey LOTHLORIEN_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "warrior")); - public final static RegistryKey LOTHLORIEN_KNIGHT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "knight")); - public final static RegistryKey LOTHLORIEN_GUARD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "guard")); - public final static RegistryKey LOTHLORIEN_EGLADIL_SENTINEL = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "egladil_sentinel")); - public final static RegistryKey LOTHLORIEN_EGLADIL_COMMANDER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "egladil_commander")); - public final static RegistryKey LOTHLORIEN_LORD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.LOTHLORIEN, "lord")); - - // [WOODLAND_REALMS] - public final static RegistryKey WOODLAND_REALM_ARTISAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "artisan")); - public final static RegistryKey WOODLAND_REALM_HUNTER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "hunter")); - public final static RegistryKey WOODLAND_REALM_SENTINEL = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "sentinel")); - public final static RegistryKey WOODLAND_REALM_RANGER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "ranger")); - public final static RegistryKey WOODLAND_REALM_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "warrior")); - public final static RegistryKey WOODLAND_REALM_LANCER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "lancer")); - public final static RegistryKey WOODLAND_REALM_NIGHTSHADE = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "nightshade")); - public final static RegistryKey WOODLAND_REALM_ELVEN_KINGS_GUARD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "elven_kings_guard")); - public final static RegistryKey WOODLAND_REALM_COMMANDER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "commander")); - public final static RegistryKey WOODLAND_REALM_WARDEN_OF_THE_GLADE = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.WOODLAND_REALM, "warden_of_the_glade")); - - // [MORDOR] - public final static RegistryKey MORDOR_BLACK_NUMENOREAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "black_numenorean")); - public final static RegistryKey MORDOR_SNAGA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "snaga")); - public final static RegistryKey MORDOR_SCOUT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "scout")); - public final static RegistryKey MORDOR_MILITIA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "militia")); - public final static RegistryKey MORDOR_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "warrior")); - public final static RegistryKey MORDOR_VETERAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "veteran")); - public final static RegistryKey MORDOR_CAPTAIN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "captain")); - - public final static RegistryKey DOL_GULDUR_SCOUT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "dol_guldur_scout")); - public final static RegistryKey DOL_GULDUR_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORDOR, "dol_guldur_warrior")); - - // [HOBGOBLINS TRIBES] - // [GUNDABAD] - public final static RegistryKey GUNDABAD_GOBLIN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "goblin")); - public final static RegistryKey GUNDABAD_MILITIA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "militia")); - public final static RegistryKey GUNDABAD_SCOUT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "scout")); - public final static RegistryKey GUNDABAD_RIDER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "rider")); - public final static RegistryKey GUNDABAD_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "warrior")); - public final static RegistryKey GUNDABAD_VETERAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "veteran")); - public final static RegistryKey GUNDABAD_LEADER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "leader")); - // [MORIA] - public final static RegistryKey MORIA_GOBLIN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORIA, "goblin")); - public final static RegistryKey MORIA_MILITIA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORIA, "militia")); - public final static RegistryKey MORIA_SCOUT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORIA, "scout")); - public final static RegistryKey MORIA_RIDER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORIA, "rider")); - public final static RegistryKey MORIA_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORIA, "warrior")); - public final static RegistryKey MORIA_VETERAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORIA, "veteran")); - public final static RegistryKey MORIA_CHIEF = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.MORIA, "chief")); - - // [GOBLIN TOWN] - public final static RegistryKey GOBLIN_TOWN_GOBLIN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GOBLIN_TOWN, "goblin")); - public final static RegistryKey GOBLIN_TOWN_SCOUT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GOBLIN_TOWN, "scout")); - public final static RegistryKey GOBLIN_TOWN_RIDER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GOBLIN_TOWN, "rider")); - public final static RegistryKey GOBLIN_TOWN_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GOBLIN_TOWN, "warrior")); - public final static RegistryKey GOBLIN_TOWN_VETERAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.GOBLIN_TOWN, "veteran")); - - // [ISENGARD] - public final static RegistryKey ISENGARD_ORC_SNAGA = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ISENGARD, "snaga")); - public final static RegistryKey ISENGARD_ORC_WARRIOR = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ISENGARD, "warrior")); - public final static RegistryKey ISENGARD_URUK_HAI_SOLDIER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ISENGARD, "soldier")); - public final static RegistryKey ISENGARD_URUK_HAI_SCOUT = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ISENGARD, "scout")); - public final static RegistryKey ISENGARD_URUK_HAI_VETERAN = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ISENGARD, "veteran")); - public final static RegistryKey ISENGARD_URUK_HAI_BERSERKER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ISENGARD, "berserker")); - public final static RegistryKey ISENGARD_URUK_HAI_LEADER = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ISENGARD, "leader")); - public final static RegistryKey ISENGARD_ORTHANC_GUARD = DynamicRegistriesME.of(NPC_KEY, createID(FactionRegistry.ISENGARD, "orthanc_guard")); - - - - public static void bootstrap(Registerable context) { - RegistryEntryLookup registryEntryLookup = context.getRegistryLookup(NPC_KEY); - - allNpcDatas = new ArrayList<>(); - - registerAll(context, registryEntryLookup, BrigandNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, WildGoblinNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, DalishNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, GondorianNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, RohirricNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, ShireNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, EreborNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, LorienNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, WoodlandRealmNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, MordorNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, GoblinTownNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, MoriaNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, GundabadNpcDataPool.fetchAll()); - registerAll(context, registryEntryLookup, IsengardNpcDataPool.fetchAll()); - } - - private static void registerAll(Registerable context, RegistryEntryLookup registryEntryLookup, List npcDatas) { - for(RegisterableNpcData registerable : npcDatas){ - register(context, registryEntryLookup, registerable.npcDataRegistryKey, registerable.content); - allNpcDatas.add(registerable.npcDataRegistryKey); - } - } - - private static void register(Registerable context, RegistryEntryLookup registryEntryLookup, RegistryKey registryKey, NpcData element){ - DynamicRegistriesME.register(context, registryEntryLookup, registryKey, element); - // [LANG datagen] - TranslationEntries.npcDataEntries.add(registryKey.getValue().getPath()); - TranslationEntries.spawnEggEntries.add(element.getId()); - } - - private static Identifier createID(RegistryKey faction, String name){ - return MiddleEarth.of(faction.getValue().getPath(), name); - } - - public record RegisterableNpcData (RegistryKey npcDataRegistryKey, NpcData content){ } -} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/CombatArchetypePool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/CombatArchetypePool.java similarity index 93% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/CombatArchetypePool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/CombatArchetypePool.java index 41dc61c17c..4d20110172 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/CombatArchetypePool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/CombatArchetypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs; +package net.sevenstars.middleearth.registries.content.npctypes; import net.sevenstars.middleearth.resources.datas.combatarchetypes.CombatArchetypeData; import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/NpcLoot.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/NpcLoot.java new file mode 100644 index 0000000000..04ba1fd1a3 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/NpcLoot.java @@ -0,0 +1,12 @@ +package net.sevenstars.middleearth.registries.content.npctypes; + +import net.sevenstars.middleearth.resources.datas.npc_types.data.LootData; + +public class NpcLoot { + public static LootData FROM_1_TO_4 = new LootData(1, 3); + public static LootData FROM_3_TO_7 = new LootData(3, 4); + public static LootData FROM_6_TO_10 = new LootData(6, 4); + public static LootData FROM_10_TO_16 = new LootData(10, 6); + public static LootData FROM_13_TO_20 = new LootData(13, 7); + public static LootData FROM_15_TO_25 = new LootData(15, 10); +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/NpcRegistry.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/NpcRegistry.java new file mode 100644 index 0000000000..a80b3e9357 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/NpcRegistry.java @@ -0,0 +1,207 @@ +package net.sevenstars.middleearth.registries.content.npctypes; + +import net.minecraft.entity.attribute.EntityAttributes; +import net.minecraft.registry.Registerable; +import net.minecraft.registry.Registry; +import net.minecraft.registry.RegistryEntryLookup; +import net.minecraft.registry.RegistryKey; +import net.minecraft.util.Identifier; +import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.datageneration.content.TranslationEntries; +import net.sevenstars.middleearth.registries.DynamicRegistriesME; +import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.pools.*; +import net.sevenstars.middleearth.resources.datas.attributes.AttributePool; +import net.sevenstars.middleearth.resources.datas.attributes.AttributePoolElement; +import net.sevenstars.middleearth.resources.datas.common.EntityCategories; +import net.sevenstars.middleearth.resources.datas.factions.Faction; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +public class NpcRegistry { + private static final RegistryKey> NPC_TYPE_KEY = DynamicRegistriesME.NPC_TYPE; + + public static final HashMap COMMON_NPC_ATTRIBUTES = new HashMap<>(){{ + put(EntityCategories.SHARED, new AttributePool().addElement( + AttributePoolElement.create(EntityAttributes.MOVEMENT_SPEED, 0.25, 0.35) + )); + }}; + + public static ArrayList> allNpcTypes; + + // [BRIGANDS] + public final static RegistryKey BRIGAND_THUG = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.BRIGAND, "thug")); + public final static RegistryKey BRIGAND_THIEF = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.BRIGAND, "thief")); + public final static RegistryKey BRIGAND_MERCENARY = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.BRIGAND, "mercenary")); + public final static RegistryKey BRIGAND_CHIEFTAIN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.BRIGAND, "chieftain")); + + // [WILD GOBLINS] + public final static RegistryKey WILD_GOBLIN_GATHERER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WILD_GOBLINS, "gatherer")); + public final static RegistryKey WILD_GOBLIN_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WILD_GOBLINS, "warrior")); + public final static RegistryKey WILD_GOBLIN_SCOUT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WILD_GOBLINS, "scout")); + public final static RegistryKey WILD_GOBLIN_RIDER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WILD_GOBLINS, "rider")); + public final static RegistryKey WILD_GOBLIN_BRUTE = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WILD_GOBLINS, "brute")); + + // [DALE] + public final static RegistryKey DALE_PEASANT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.DALE, "peasant")); + public final static RegistryKey DALE_MILITIA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.DALE, "militia")); + public final static RegistryKey DALE_SOLDIER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.DALE, "soldier")); + public final static RegistryKey DALE_ARCHER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.DALE, "archer")); + public final static RegistryKey DALE_KNIGHT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.DALE, "knight")); + public final static RegistryKey DALE_ELITE_ARCHER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.DALE, "elite_archer")); + public final static RegistryKey DALE_VETERAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.DALE, "veteran")); + public final static RegistryKey DALE_SERGEANT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.DALE, "sergeant")); + + // [GONDOR] + public final static RegistryKey GONDOR_PEASANT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "peasant")); + public final static RegistryKey GONDOR_MILITIA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "militia")); + public final static RegistryKey GONDOR_SOLDIER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "soldier")); + public final static RegistryKey GONDOR_KNIGHT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "knight")); + public final static RegistryKey GONDOR_VETERAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "veteran")); + public final static RegistryKey GONDOR_FOUNTAIN_GUARD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "fountain_guard")); + public final static RegistryKey GONDOR_CITADEL_GUARD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "citadel_guard")); + public final static RegistryKey GONDOR_KING_GUARD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "king_guard")); + public final static RegistryKey GONDOR_LEADER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GONDOR, "leader")); + + // [ROHAN] + public final static RegistryKey ROHAN_PEASANT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ROHAN, "peasant")); + public final static RegistryKey ROHAN_MILITIA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ROHAN, "militia")); + public final static RegistryKey ROHAN_SOLDIER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ROHAN, "soldier")); + public final static RegistryKey ROHAN_KNIGHT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ROHAN, "knight")); + public final static RegistryKey ROHAN_ROYAL_GUARD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ROHAN, "royal_guard")); + public final static RegistryKey ROHAN_EORLING_MARSHAL = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ROHAN, "eorling_marshal")); + public final static RegistryKey ROHAN_HORSE_LORD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ROHAN, "horse_lord")); + + // [SHIRE] + public final static RegistryKey SHIRE_PEASANT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.SHIRE, "peasant")); + public final static RegistryKey SHIRE_MILITIA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.SHIRE, "militia")); + public final static RegistryKey SHIRE_SHIRRIFF = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.SHIRE, "shirriff")); + + // [LONGBEARDS] + // [EREBOR] + public final static RegistryKey EREBOR_PEASANT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "peasant")); + public final static RegistryKey EREBOR_MINER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "miner")); + public final static RegistryKey EREBOR_MILITIA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "militia")); + public final static RegistryKey EREBOR_SOLDIER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "soldier")); + public final static RegistryKey EREBOR_ARCHER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "archer")); + public final static RegistryKey EREBOR_ELITE = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "elite")); + public final static RegistryKey EREBOR_VETERAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "veteran")); + public final static RegistryKey EREBOR_GATEWARDEN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "gatewarden")); + public final static RegistryKey EREBOR_LEADER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LONGBEARDS_EREBOR, "leader")); + + // [LOTHLORIEN] + public final static RegistryKey LOTHLORIEN_CIVILIAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "civilian")); + public final static RegistryKey LOTHLORIEN_SENTINEL = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "sentinel")); + public final static RegistryKey LOTHLORIEN_RANGER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "ranger")); + public final static RegistryKey LOTHLORIEN_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "warrior")); + public final static RegistryKey LOTHLORIEN_KNIGHT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "knight")); + public final static RegistryKey LOTHLORIEN_GUARD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "guard")); + public final static RegistryKey LOTHLORIEN_EGLADIL_SENTINEL = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "egladil_sentinel")); + public final static RegistryKey LOTHLORIEN_EGLADIL_COMMANDER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "egladil_commander")); + public final static RegistryKey LOTHLORIEN_LORD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.LOTHLORIEN, "lord")); + + // [WOODLAND_REALMS] + public final static RegistryKey WOODLAND_REALM_ARTISAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "artisan")); + public final static RegistryKey WOODLAND_REALM_HUNTER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "hunter")); + public final static RegistryKey WOODLAND_REALM_SENTINEL = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "sentinel")); + public final static RegistryKey WOODLAND_REALM_RANGER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "ranger")); + public final static RegistryKey WOODLAND_REALM_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "warrior")); + public final static RegistryKey WOODLAND_REALM_LANCER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "lancer")); + public final static RegistryKey WOODLAND_REALM_NIGHTSHADE = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "nightshade")); + public final static RegistryKey WOODLAND_REALM_ELVEN_KINGS_GUARD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "elven_kings_guard")); + public final static RegistryKey WOODLAND_REALM_COMMANDER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "commander")); + public final static RegistryKey WOODLAND_REALM_WARDEN_OF_THE_GLADE = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.WOODLAND_REALM, "warden_of_the_glade")); + + // [MORDOR] + public final static RegistryKey MORDOR_BLACK_NUMENOREAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "black_numenorean")); + public final static RegistryKey MORDOR_SNAGA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "snaga")); + public final static RegistryKey MORDOR_SCOUT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "scout")); + public final static RegistryKey MORDOR_MILITIA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "militia")); + public final static RegistryKey MORDOR_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "warrior")); + public final static RegistryKey MORDOR_VETERAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "veteran")); + public final static RegistryKey MORDOR_CAPTAIN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "captain")); + + public final static RegistryKey DOL_GULDUR_SCOUT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "dol_guldur_scout")); + public final static RegistryKey DOL_GULDUR_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORDOR, "dol_guldur_warrior")); + + // [HOBGOBLINS TRIBES] + // [GUNDABAD] + public final static RegistryKey GUNDABAD_GOBLIN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "goblin")); + public final static RegistryKey GUNDABAD_MILITIA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "militia")); + public final static RegistryKey GUNDABAD_SCOUT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "scout")); + public final static RegistryKey GUNDABAD_RIDER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "rider")); + public final static RegistryKey GUNDABAD_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "warrior")); + public final static RegistryKey GUNDABAD_VETERAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "veteran")); + public final static RegistryKey GUNDABAD_LEADER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, "leader")); + // [MORIA] + public final static RegistryKey MORIA_GOBLIN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORIA, "goblin")); + public final static RegistryKey MORIA_MILITIA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORIA, "militia")); + public final static RegistryKey MORIA_SCOUT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORIA, "scout")); + public final static RegistryKey MORIA_RIDER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORIA, "rider")); + public final static RegistryKey MORIA_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORIA, "warrior")); + public final static RegistryKey MORIA_VETERAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORIA, "veteran")); + public final static RegistryKey MORIA_CHIEF = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.MORIA, "chief")); + + // [GOBLIN TOWN] + public final static RegistryKey GOBLIN_TOWN_GOBLIN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GOBLIN_TOWN, "goblin")); + public final static RegistryKey GOBLIN_TOWN_SCOUT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GOBLIN_TOWN, "scout")); + public final static RegistryKey GOBLIN_TOWN_RIDER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GOBLIN_TOWN, "rider")); + public final static RegistryKey GOBLIN_TOWN_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GOBLIN_TOWN, "warrior")); + public final static RegistryKey GOBLIN_TOWN_VETERAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.GOBLIN_TOWN, "veteran")); + + // [ISENGARD] + public final static RegistryKey ISENGARD_ORC_SNAGA = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ISENGARD, "snaga")); + public final static RegistryKey ISENGARD_ORC_WARRIOR = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ISENGARD, "warrior")); + public final static RegistryKey ISENGARD_URUK_HAI_SOLDIER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ISENGARD, "soldier")); + public final static RegistryKey ISENGARD_URUK_HAI_SCOUT = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ISENGARD, "scout")); + public final static RegistryKey ISENGARD_URUK_HAI_VETERAN = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ISENGARD, "veteran")); + public final static RegistryKey ISENGARD_URUK_HAI_BERSERKER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ISENGARD, "berserker")); + public final static RegistryKey ISENGARD_URUK_HAI_LEADER = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ISENGARD, "leader")); + public final static RegistryKey ISENGARD_ORTHANC_GUARD = DynamicRegistriesME.of(NPC_TYPE_KEY, createID(FactionRegistry.ISENGARD, "orthanc_guard")); + + + + public static void bootstrap(Registerable context) { + RegistryEntryLookup registryEntryLookup = context.getRegistryLookup(NPC_TYPE_KEY); + + allNpcTypes = new ArrayList<>(); + + registerAll(context, registryEntryLookup, BrigandNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, WildGoblinNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, DalishNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, GondorianNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, RohirricNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, ShireNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, EreborNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, LorienNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, WoodlandRealmNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, MordorNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, GoblinTownNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, MoriaNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, GundabadNpcTypePool.fetchAll()); + registerAll(context, registryEntryLookup, IsengardNpcTypePool.fetchAll()); + } + + private static void registerAll(Registerable context, RegistryEntryLookup registryEntryLookup, List npcDatas) { + for(RegisterableNpcData registerable : npcDatas){ + register(context, registryEntryLookup, registerable.npcDataRegistryKey, registerable.content); + allNpcTypes.add(registerable.npcDataRegistryKey); + } + } + + private static void register(Registerable context, RegistryEntryLookup registryEntryLookup, RegistryKey registryKey, NpcType element){ + DynamicRegistriesME.register(context, registryEntryLookup, registryKey, element); + // [LANG datagen] + TranslationEntries.npcTypeEntries.add(registryKey.getValue().getPath()); + TranslationEntries.spawnEggEntries.add(element.getId()); + } + + private static Identifier createID(RegistryKey faction, String name){ + return MiddleEarth.of(faction.getValue().getPath(), name); + } + + public record RegisterableNpcData (RegistryKey npcDataRegistryKey, NpcType content){ } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/BrigandNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/BrigandNpcTypePool.java similarity index 94% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/BrigandNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/BrigandNpcTypePool.java index 777754b999..64430d85d6 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/BrigandNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/BrigandNpcTypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; @@ -7,23 +7,21 @@ import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.item.utils.armor.helmetAttachments.HelmetAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.CombatArchetypeData; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; import java.util.List; -public class BrigandNpcDataPool { +public class BrigandNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.BRIGAND; private final static int DEFAULT = 0x43403a; @@ -33,10 +31,10 @@ public class BrigandNpcDataPool { private final static int DESATURATED_GREEN = 0x515546; private final static int DESATURATED_RED = 0x554c46; - public final static NpcData THUG; - public final static NpcData THIEF; - public final static NpcData MERCENARY; - public final static NpcData CHIEFTAIN; + public final static NpcType THUG; + public final static NpcType THIEF; + public final static NpcType MERCENARY; + public final static NpcType CHIEFTAIN; public static List fetchAll() { @@ -50,7 +48,7 @@ public static List fetchAll() { private static final List allColors = List.of(DEFAULT, DARK_BROWN, LIGHT_BROWN, DESATURATED_BROWN, DESATURATED_GREEN, DESATURATED_RED); static { - THUG = new NpcData(NpcRegistry.BRIGAND_THUG.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.BRIGAND_THUG, List.of( + THUG = new NpcType(NpcRegistry.BRIGAND_THUG.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.BRIGAND_THUG, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create().withWeight(4)) @@ -95,9 +93,9 @@ public static List fetchAll() { .add(WeightedItemData.create(Items.STONE_AXE)) .add(WeightedItemData.create(WeaponItemsME.IRON_DAGGER)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - THIEF = new NpcData(NpcRegistry.BRIGAND_THIEF.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.BRIGAND_THUG, List.of( + THIEF = new NpcType(NpcRegistry.BRIGAND_THIEF.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.BRIGAND_THUG, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create().withWeight(4)) @@ -125,9 +123,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.IRON_DAGGER)) .add(WeightedItemData.create(WeaponItemsME.BRONZE_DAGGER)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - MERCENARY = new NpcData(NpcRegistry.BRIGAND_MERCENARY.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.BRIGAND_MERCENARY, List.of( + MERCENARY = new NpcType(NpcRegistry.BRIGAND_MERCENARY.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.BRIGAND_MERCENARY, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.RUSTED_ORCISH_MAIL_COIF)) @@ -177,9 +175,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.MORDOR_BRACED_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_WOODEN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - CHIEFTAIN = new NpcData(NpcRegistry.BRIGAND_CHIEFTAIN.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.BRIGAND_CHIEF, List.of( + CHIEFTAIN = new NpcType(NpcRegistry.BRIGAND_CHIEFTAIN.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.BRIGAND_CHIEF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EREBOR_LEATHER_HELMET).withColor(DEFAULT).withWeight(3)) @@ -244,6 +242,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.MORDOR_BRACED_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_WOODEN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/DalishNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/DalishNpcTypePool.java similarity index 91% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/DalishNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/DalishNpcTypePool.java index 7636d3bc58..2b1c5cb8b3 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/DalishNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/DalishNpcTypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; @@ -8,32 +8,32 @@ import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; import net.sevenstars.middleearth.item.utils.armor.helmetAttachments.HelmetAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; import java.util.List; -public class DalishNpcDataPool { +public class DalishNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.DALE; - public final static NpcData PEASANT; + public final static NpcType PEASANT; - public final static NpcData MILITIA; - public final static NpcData SOLDIER; - public final static NpcData ARCHER; - public final static NpcData KNIGHT; - public final static NpcData ELITE_ARCHER; - public final static NpcData VETERAN; - public final static NpcData SERGEANT; + public final static NpcType MILITIA; + public final static NpcType SOLDIER; + public final static NpcType ARCHER; + public final static NpcType KNIGHT; + public final static NpcType ELITE_ARCHER; + public final static NpcType VETERAN; + public final static NpcType SERGEANT; public static List fetchAll() { return List.of( @@ -49,7 +49,7 @@ public static List fetchAll() { } static { - PEASANT = new NpcData(NpcRegistry.DALE_PEASANT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( + PEASANT = new NpcType(NpcRegistry.DALE_PEASANT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.STRAW_HAT).withWeight(1)) @@ -80,9 +80,9 @@ public static List fetchAll() { .add(WeightedItemData.create(ToolItemsME.BRONZE_AXE)) .add(WeightedItemData.create().withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MILITIA = new NpcData(NpcRegistry.DALE_MILITIA.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( + MILITIA = new NpcType(NpcRegistry.DALE_MILITIA.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.DALISH_HELMET)) @@ -104,9 +104,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROUND_SHIELD)) .add(WeightedItemData.create(Items.SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - SOLDIER = new NpcData(NpcRegistry.DALE_SOLDIER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( + SOLDIER = new NpcType(NpcRegistry.DALE_SOLDIER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.KETTLE_HAT)) @@ -135,9 +135,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.DALISH_BLUE_OVAL_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.DALISH_BLUE_BRACED_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - ARCHER = new NpcData(NpcRegistry.DALE_ARCHER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( + ARCHER = new NpcType(NpcRegistry.DALE_ARCHER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.DALISH_HELMET)) @@ -163,9 +163,9 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - KNIGHT = new NpcData(NpcRegistry.DALE_KNIGHT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( + KNIGHT = new NpcType(NpcRegistry.DALE_KNIGHT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.KETTLE_HAT_WITH_CLOSED_COIF)) @@ -197,9 +197,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.DALISH_BARDING_OVAL_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.DALISH_BARDING_BRACED_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - ELITE_ARCHER = new NpcData(NpcRegistry.DALE_ELITE_ARCHER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( + ELITE_ARCHER = new NpcType(NpcRegistry.DALE_ELITE_ARCHER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.DALISH_HELMET_BROWN_FUR)) @@ -220,9 +220,9 @@ public static List fetchAll() { .add(EquipmentSlot.MAINHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.DALISH_NOBLE_LONGBOW)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - VETERAN = new NpcData(NpcRegistry.DALE_VETERAN.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_LORD, List.of( + VETERAN = new NpcType(NpcRegistry.DALE_VETERAN.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_LORD, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.BARDING_SOLDIER_HELMET)) @@ -253,9 +253,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.DALISH_BARDING_OVAL_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.DALISH_BARDING_HEAVY_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - SERGEANT = new NpcData(NpcRegistry.DALE_SERGEANT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_LORD, List.of( + SERGEANT = new NpcType(NpcRegistry.DALE_SERGEANT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.DALE_LORD, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.BARDING_SOLDIER_HELMET)) @@ -282,6 +282,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.DALISH_ROYAL_ROUND_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.DALISH_BARDING_HEAVY_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/EreborNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/EreborNpcTypePool.java similarity index 93% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/EreborNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/EreborNpcTypePool.java index ed8368acfa..779d665ce4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/EreborNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/EreborNpcTypePool.java @@ -1,28 +1,27 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; import net.minecraft.registry.RegistryKey; -import net.sevenstars.middleearth.block.registration.ModDecorativeBlocks; import net.sevenstars.middleearth.item.EquipmentItemsME; import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; import java.util.List; -public class EreborNpcDataPool { +public class EreborNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.LONGBEARDS_EREBOR; private final static int LIGHT_BLUE = 0x4b6274; @@ -30,15 +29,15 @@ public class EreborNpcDataPool { private final static int DARK_RED = 0x56302d; private final static int DARK_BROWN = 0x3b291e; - public final static NpcData PEASANT; - public final static NpcData MINER; - public final static NpcData MILITIA; - public final static NpcData SOLDIER; - public final static NpcData ARCHER; - public final static NpcData ELITE; - public final static NpcData VETERAN; - public final static NpcData GATEWARDEN; - public final static NpcData LEADER; + public final static NpcType PEASANT; + public final static NpcType MINER; + public final static NpcType MILITIA; + public final static NpcType SOLDIER; + public final static NpcType ARCHER; + public final static NpcType ELITE; + public final static NpcType VETERAN; + public final static NpcType GATEWARDEN; + public final static NpcType LEADER; public static List fetchAll() { return List.of( @@ -55,7 +54,7 @@ public static List fetchAll() { } static { - PEASANT = new NpcData(NpcRegistry.EREBOR_PEASANT.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF, List.of( + PEASANT = new NpcType(NpcRegistry.EREBOR_PEASANT.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GAMBESON_CAP).withColor(DARK_RED).withWeight(1)) @@ -75,9 +74,9 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MINER = new NpcData(NpcRegistry.EREBOR_MINER.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF, List.of( + MINER = new NpcType(NpcRegistry.EREBOR_MINER.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GAMBESON_CAP).withColor(DARK_RED)) @@ -107,9 +106,9 @@ public static List fetchAll() { .add(WeightedItemData.create(Items.TORCH)) .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MILITIA = new NpcData(NpcRegistry.EREBOR_MILITIA.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF, List.of( + MILITIA = new NpcType(NpcRegistry.EREBOR_MILITIA.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.LONGBEARD_SEGMENTED_HELMET)) @@ -136,9 +135,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.HEATER_SHIELD)) .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - SOLDIER = new NpcData(NpcRegistry.EREBOR_SOLDIER.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( + SOLDIER = new NpcType(NpcRegistry.EREBOR_SOLDIER.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EREBOR_HELMET).withWeight(3)) @@ -177,9 +176,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROUND_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.HEATER_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - ARCHER = new NpcData(NpcRegistry.EREBOR_ARCHER.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( + ARCHER = new NpcType(NpcRegistry.EREBOR_ARCHER.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EREBOR_HELMET).withWeight(3)) @@ -212,9 +211,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.EREBOR_BOW).withWeight(3)) .add(WeightedItemData.create(Items.BOW)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - ELITE = new NpcData(NpcRegistry.EREBOR_ELITE.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( + ELITE = new NpcType(NpcRegistry.EREBOR_ELITE.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EREBOR_GUARD_HELMET).withWeight(8)) @@ -252,9 +251,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.EREBOR_CROSS_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(5)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - VETERAN = new NpcData(NpcRegistry.EREBOR_VETERAN.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( + VETERAN = new NpcType(NpcRegistry.EREBOR_VETERAN.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EREBOR_PLATE_HELMET)) @@ -283,9 +282,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.EREBOR_REINFORCED_TOWER_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.EREBOR_REINFORCED_SHIELD).withWeight(5)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - GATEWARDEN = new NpcData(NpcRegistry.EREBOR_GATEWARDEN.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( + GATEWARDEN = new NpcType(NpcRegistry.EREBOR_GATEWARDEN.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_DWARF_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EREBOR_GATEWARDEN_HELMET)) @@ -312,10 +311,10 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.EREBOR_REINFORCED_TOWER_SHIELD).withWeight(3)) .add(WeightedItemData.create(WeaponItemsME.EREBOR_BUCKLER_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - LEADER = new NpcData(NpcRegistry.EREBOR_LEADER.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_MIGHTY_DWARF, List.of( + LEADER = new NpcType(NpcRegistry.EREBOR_LEADER.getValue(), RaceRegistry.DWARF, FACTION, TexturePresetsRegistry.LONGBEARDS_EREBOR_MIGHTY_DWARF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EREBOR_CAPTAIN_HELMET)) @@ -342,6 +341,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.EREBOR_ORNAMENTED_TOWER_SHIELD).withWeight(3)) .add(WeightedItemData.create(WeaponItemsME.EREBOR_BUCKLER_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GoblinTownNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GoblinTownNpcTypePool.java similarity index 93% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GoblinTownNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GoblinTownNpcTypePool.java index 94bf15d596..9c67efc37b 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GoblinTownNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GoblinTownNpcTypePool.java @@ -1,27 +1,26 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; import net.minecraft.registry.RegistryKey; -import net.sevenstars.middleearth.block.registration.ModDecorativeBlocks; +import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.item.EquipmentItemsME; import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; -import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; +import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.*; import java.util.List; -public class GoblinTownNpcDataPool { +public class GoblinTownNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.GOBLIN_TOWN; private static List allColors; @@ -29,11 +28,11 @@ public class GoblinTownNpcDataPool { private static final int DARK_BROWN = 0x4a3c34; private static final int BROWN_GOBLIN = 7628899; - public final static NpcData GOBLIN; - public final static NpcData SCOUT; - public final static NpcData WARRIOR; - public final static NpcData RIDER; - public final static NpcData VETERAN; + public final static NpcType GOBLIN; + public final static NpcType SCOUT; + public final static NpcType WARRIOR; + public final static NpcType RIDER; + public final static NpcType VETERAN; public static List fetchAll() { return List.of( @@ -51,7 +50,7 @@ public static List fetchAll() { DARK_BROWN ); - GOBLIN = new NpcData(NpcRegistry.GOBLIN_TOWN_GOBLIN.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_GOBLIN, List.of( + GOBLIN = new NpcType(NpcRegistry.GOBLIN_TOWN_GOBLIN.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) @@ -90,9 +89,9 @@ public static List fetchAll() { .add(WeightedItemData.create(Items.AIR).withWeight(4)) .add(WeightedItemData.create(WeaponItemsME.GOBLIN_TOWN_BONE_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - SCOUT = new NpcData(NpcRegistry.GOBLIN_TOWN_SCOUT.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_GOBLIN, List.of( + SCOUT = new NpcType(NpcRegistry.GOBLIN_TOWN_SCOUT.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(2)) @@ -127,9 +126,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GOBLIN_CROSSBOW).withWeight(3)) .add(WeightedItemData.create(WeaponItemsME.ORCISH_BOW).withWeight(1)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - WARRIOR = new NpcData(NpcRegistry.GOBLIN_TOWN_WARRIOR.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_WARRIOR, List.of( + WARRIOR = new NpcType(NpcRegistry.GOBLIN_TOWN_WARRIOR.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_WARRIOR, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(2)) @@ -184,9 +183,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GOBLIN_TOWN_LEATHER_WOODEN_SHIELD)) .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - RIDER = new NpcData(NpcRegistry.GOBLIN_TOWN_RIDER.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_WARRIOR, List.of( + RIDER = new NpcType(NpcRegistry.GOBLIN_TOWN_RIDER.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_WARRIOR, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GOBLIN_TOWN_SKULL_CAP)) @@ -232,9 +231,10 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GOBLIN_TOWN_LEATHER_WOODEN_SHIELD)) .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT, new MountData(EntitiesME.WARG).withArmor(EquipmentItemsME.WARG_REINFORCED_LEATHER_ARMOR), NpcLoot.FROM_10_TO_16); + - VETERAN = new NpcData(NpcRegistry.GOBLIN_TOWN_VETERAN.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_BRUTE, List.of( + VETERAN = new NpcType(NpcRegistry.GOBLIN_TOWN_VETERAN.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GOBLIN_TOWN_BRUTE, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GOBLIN_TOWN_SKULKER_GUARD_HELMET)) @@ -264,6 +264,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GOBLIN_TOWN_HEAVY_SHIELD).withWeight(4)) .add(WeightedItemData.create(WeaponItemsME.GOBLIN_TOWN_BONE_WOODEN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GondorianNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GondorianNpcTypePool.java similarity index 92% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GondorianNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GondorianNpcTypePool.java index c8e3a4603f..34e612626c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GondorianNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GondorianNpcTypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; @@ -7,21 +7,21 @@ import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; import java.util.List; -public class GondorianNpcDataPool { +public class GondorianNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.GONDOR; private final static int LIGHT_BLUE = 0x2b3965; @@ -35,15 +35,15 @@ public class GondorianNpcDataPool { private final static int LIGHT_GREEN = 0x435353; private final static int DARK_GREEN = 0x262f2f; - public final static NpcData PEASANT; - public final static NpcData MILITIA; - public final static NpcData SOLDIER; - public final static NpcData KNIGHT; - public final static NpcData VETERAN; - public final static NpcData FOUNTAIN_GUARD; - public final static NpcData CITADEL_GUARD; - public final static NpcData KING_GUARD; - public final static NpcData LEADER; + public final static NpcType PEASANT; + public final static NpcType MILITIA; + public final static NpcType SOLDIER; + public final static NpcType KNIGHT; + public final static NpcType VETERAN; + public final static NpcType FOUNTAIN_GUARD; + public final static NpcType CITADEL_GUARD; + public final static NpcType KING_GUARD; + public final static NpcType LEADER; public static List fetchAll() { return List.of( @@ -60,7 +60,7 @@ public static List fetchAll() { } static { - PEASANT = new NpcData(NpcRegistry.GONDOR_PEASANT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_PEASANT, List.of( + PEASANT = new NpcType(NpcRegistry.GONDOR_PEASANT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.STRAW_HAT)) @@ -75,9 +75,9 @@ public static List fetchAll() { .add(WeightedItemData.create(ToolItemsME.SMITHING_HAMMER)) .add(WeightedItemData.create().withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MILITIA = new NpcData(NpcRegistry.GONDOR_MILITIA.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_PEASANT, List.of( + MILITIA = new NpcType(NpcRegistry.GONDOR_MILITIA.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.LEATHER_SKULLCAP)) @@ -164,9 +164,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROUND_SHIELD)) .add(WeightedItemData.create().withWeight(5)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - SOLDIER = new NpcData(NpcRegistry.GONDOR_SOLDIER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( + SOLDIER = new NpcType(NpcRegistry.GONDOR_SOLDIER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GONDORIAN_CABASSET_HELMET)) @@ -193,9 +193,9 @@ public static List fetchAll() { .add(WeightedItemData.create()) .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - KNIGHT = new NpcData(NpcRegistry.GONDOR_KNIGHT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( + KNIGHT = new NpcType(NpcRegistry.GONDOR_KNIGHT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_PLATE_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create() @@ -228,9 +228,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_TOWER_SHIELD)) .add(WeightedItemData.create().withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - VETERAN = new NpcData(NpcRegistry.GONDOR_VETERAN.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( + VETERAN = new NpcType(NpcRegistry.GONDOR_VETERAN.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GONDORIAN_PLATE_HELMET).withWeight(10)) @@ -247,9 +247,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_HERO_SHIELD)) .add(WeightedItemData.create().withWeight(2)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - CITADEL_GUARD = new NpcData(NpcRegistry.GONDOR_CITADEL_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( + CITADEL_GUARD = new NpcType(NpcRegistry.GONDOR_CITADEL_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_CITADEL_GUARD_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_CITADEL_GUARD_CHESTPLATE))) @@ -262,18 +262,18 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_KNIGHT_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - FOUNTAIN_GUARD = new NpcData(NpcRegistry.GONDOR_FOUNTAIN_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( + FOUNTAIN_GUARD = new NpcType(NpcRegistry.GONDOR_FOUNTAIN_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_CHESTPLATE))) .add(EquipmentSlot.LEGS, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_LEGGINGS))) .add(EquipmentSlot.FEET, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_FOUNTAIN_GUARD_BOOTS))) .add(EquipmentSlot.MAINHAND, GearSlotPool.create(WeightedItemData.create(WeaponItemsME.GONDORIAN_FOUNTAIN_GUARD_SPEAR))) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - KING_GUARD = new NpcData(NpcRegistry.GONDOR_KING_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( + KING_GUARD = new NpcType(NpcRegistry.GONDOR_KING_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_KINGS_GUARD_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_KINGS_GUARD_CHESTKPLATE))) @@ -287,9 +287,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_KINGS_GUARD_TOWER_SHIELD).withWeight(8)) .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_TOWER_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - LEADER = new NpcData(NpcRegistry.GONDOR_LEADER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_LORD, List.of( + LEADER = new NpcType(NpcRegistry.GONDOR_LEADER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.GONDOR_LORD, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.GONDORIAN_CAPTAIN_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create() @@ -307,6 +307,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_HERO_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_ORNAMENTED_KNIGHT_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } \ No newline at end of file diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GundabadNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GundabadNpcTypePool.java similarity index 94% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GundabadNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GundabadNpcTypePool.java index 686de4b552..5635362aab 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/GundabadNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/GundabadNpcTypePool.java @@ -1,39 +1,39 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; import net.minecraft.registry.RegistryKey; +import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.item.EquipmentItemsME; import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.*; import java.util.List; -public class GundabadNpcDataPool { +public class GundabadNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD; private static List allColors; private static final int DARK_PURPLE = 0x3c3135; private static final int DARK_BROWN = 0x4a3c34; - public final static NpcData GOBLIN; - public final static NpcData MILITIA; - public final static NpcData SCOUT; - public final static NpcData RIDER; - public final static NpcData WARRIOR; - public final static NpcData VETERAN; - public final static NpcData LEADER; + public final static NpcType GOBLIN; + public final static NpcType MILITIA; + public final static NpcType SCOUT; + public final static NpcType RIDER; + public final static NpcType WARRIOR; + public final static NpcType VETERAN; + public final static NpcType LEADER; public static List fetchAll() { return List.of( @@ -53,7 +53,7 @@ public static List fetchAll() { DARK_BROWN ); - GOBLIN = new NpcData(NpcRegistry.GUNDABAD_GOBLIN.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GUNDABAD_GOBLIN, List.of( + GOBLIN = new NpcType(NpcRegistry.GUNDABAD_GOBLIN.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GUNDABAD_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -93,9 +93,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_WOODEN_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MILITIA = new NpcData(NpcRegistry.GUNDABAD_MILITIA.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GUNDABAD_GOBLIN, List.of( + MILITIA = new NpcType(NpcRegistry.GUNDABAD_MILITIA.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GUNDABAD_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -143,9 +143,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_GREAT_EYE_PAINTED_WOODEN_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(2)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - RIDER = new NpcData(NpcRegistry.GUNDABAD_RIDER.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GUNDABAD_GOBLIN, List.of( + RIDER = new NpcType(NpcRegistry.GUNDABAD_RIDER.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GUNDABAD_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -188,9 +188,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_WOODEN_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, new MountData(EntitiesME.WARG).withArmor(EquipmentItemsME.WARG_GUNDABAD_PLATE_ARMOR), NpcLoot.FROM_10_TO_16); - SCOUT = new NpcData(NpcRegistry.GUNDABAD_SCOUT.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GUNDABAD_GOBLIN, List.of( + SCOUT = new NpcType(NpcRegistry.GUNDABAD_SCOUT.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.GUNDABAD_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(8)) @@ -226,9 +226,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_BOW).withWeight(2)) .add(WeightedItemData.create(WeaponItemsME.ORCISH_BOW)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - WARRIOR = new NpcData(NpcRegistry.GUNDABAD_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.GUNDABAD_HOBGOBLIN, List.of( + WARRIOR = new NpcType(NpcRegistry.GUNDABAD_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.GUNDABAD_HOBGOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GUNDABAD_SOLDIER_HELMET).withWeight(4)) @@ -274,9 +274,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_GREAT_EYE_PAINTED_WOODEN_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(2)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - VETERAN = new NpcData(NpcRegistry.GUNDABAD_VETERAN.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.GUNDABAD_HOBGOBLIN, List.of( + VETERAN = new NpcType(NpcRegistry.GUNDABAD_VETERAN.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.GUNDABAD_HOBGOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GUNDABAD_HOBGOBLIN_PLATE_LONG_HORN_HELMET).withColors(allColors).withWeight(4)) @@ -322,9 +322,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_HEAVY_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_REINFORCED_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - LEADER = new NpcData(NpcRegistry.GUNDABAD_LEADER.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.GUNDABAD_HOBGOBLIN, List.of( + LEADER = new NpcType(NpcRegistry.GUNDABAD_LEADER.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.GUNDABAD_HOBGOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GUNDABAD_HOBGOBLIN_PLATE_LARGE_CREST_HELMET)) @@ -349,6 +349,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_REINFORCED_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(2)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/IsengardNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/IsengardNpcTypePool.java similarity index 92% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/IsengardNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/IsengardNpcTypePool.java index aa5648afdf..a0ad6b53d0 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/IsengardNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/IsengardNpcTypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; @@ -8,37 +8,37 @@ import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; import java.util.List; -public class IsengardNpcDataPool { +public class IsengardNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.ISENGARD; private static List allColors; private static final int DARK = 0x302b28; private static final int DARK_BROWN = 0x655147; - public final static NpcData SNAGA; - public final static NpcData WARRIOR; + public final static NpcType SNAGA; + public final static NpcType WARRIOR; - public final static NpcData URUK_HAI_SOLDIER; - public final static NpcData URUK_HAI_SCOUT; - public final static NpcData URUK_HAI_VETERAN; - public final static NpcData URUK_HAI_BERSERKER; - public final static NpcData URUK_HAI_LEADER; + public final static NpcType URUK_HAI_SOLDIER; + public final static NpcType URUK_HAI_SCOUT; + public final static NpcType URUK_HAI_VETERAN; + public final static NpcType URUK_HAI_BERSERKER; + public final static NpcType URUK_HAI_LEADER; - public final static NpcData ORTHANC_GUARD; + public final static NpcType ORTHANC_GUARD; public static List fetchAll() { @@ -57,7 +57,7 @@ public static List fetchAll() { static { allColors = List.of(DARK, DARK_BROWN); - ORTHANC_GUARD = new NpcData(NpcRegistry.ISENGARD_ORTHANC_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ISENGARD_HUMAN, List.of( + ORTHANC_GUARD = new NpcType(NpcRegistry.ISENGARD_ORTHANC_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ISENGARD_HUMAN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.ORTHANC_GUARD_HELMET).withWeight(4)) @@ -73,9 +73,9 @@ public static List fetchAll() { .add(EquipmentSlot.MAINHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.URUK_HAI_SPEAR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - SNAGA = new NpcData(NpcRegistry.ISENGARD_ORC_SNAGA.getValue(), RaceRegistry.SNAGA, FACTION, TexturePresetsRegistry.ISENGARD_ORC, List.of( + SNAGA = new NpcType(NpcRegistry.ISENGARD_ORC_SNAGA.getValue(), RaceRegistry.SNAGA, FACTION, TexturePresetsRegistry.ISENGARD_ORC, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(4)) @@ -117,10 +117,10 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.MORDOR_WOODEN_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - WARRIOR = new NpcData(NpcRegistry.ISENGARD_ORC_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.ISENGARD_ORC, List.of( + WARRIOR = new NpcType(NpcRegistry.ISENGARD_ORC_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.ISENGARD_ORC, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.URUK_HAI_LEATHER_SCOUT_CAP).withColors(allColors).withWeight(4)) @@ -163,9 +163,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROUND_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - URUK_HAI_SOLDIER = new NpcData(NpcRegistry.ISENGARD_URUK_HAI_SOLDIER.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( + URUK_HAI_SOLDIER = new NpcType(NpcRegistry.ISENGARD_URUK_HAI_SOLDIER.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.URUK_HAI_PLATE_HELMET).withWeight(5)) @@ -203,9 +203,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.URUK_HAI_WHITE_PALMPRINT_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - URUK_HAI_SCOUT = new NpcData(NpcRegistry.ISENGARD_URUK_HAI_SCOUT.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( + URUK_HAI_SCOUT = new NpcType(NpcRegistry.ISENGARD_URUK_HAI_SCOUT.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.URUK_HAI_LEATHER_SCOUT_CAP).withColors(allColors).withWeight(4)) @@ -230,9 +230,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.URUK_HAI_FALCHION)) .add(WeightedItemData.create(WeaponItemsME.URUK_HAI_SPEAR).withWeight(2)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - URUK_HAI_VETERAN = new NpcData(NpcRegistry.ISENGARD_URUK_HAI_VETERAN.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( + URUK_HAI_VETERAN = new NpcType(NpcRegistry.ISENGARD_URUK_HAI_VETERAN.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.URUK_HAI_PAINTED_PLATE_HELMET).withWeight(5)) @@ -261,10 +261,10 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.URUK_HAI_WHITE_HAND_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.URUK_HAI_WHITE_PALMPRINT_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - URUK_HAI_BERSERKER = new NpcData(NpcRegistry.ISENGARD_URUK_HAI_BERSERKER.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( + URUK_HAI_BERSERKER = new NpcType(NpcRegistry.ISENGARD_URUK_HAI_BERSERKER.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.URUK_HAI_PAINTED_BERSERKER_HELMET)) @@ -284,9 +284,9 @@ public static List fetchAll() { .add(WeightedItemData.create(DecorativeItemsME.TORCH_OF_ORTHANC)) .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - URUK_HAI_LEADER = new NpcData(NpcRegistry.ISENGARD_URUK_HAI_LEADER.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( + URUK_HAI_LEADER = new NpcType(NpcRegistry.ISENGARD_URUK_HAI_LEADER.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.ISENGARD_URUK_HAI, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.URUK_HAI_PAINTED_COMMANDER_HELMET)) @@ -305,6 +305,6 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.URUK_HAI_HEATER_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/LorienNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/LorienNpcTypePool.java similarity index 90% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/LorienNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/LorienNpcTypePool.java index 355aca7b14..b946b957ef 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/LorienNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/LorienNpcTypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; @@ -6,32 +6,32 @@ import net.sevenstars.middleearth.item.*; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; import net.sevenstars.middleearth.item.utils.armor.helmetAttachments.HelmetAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; import java.util.List; -public class LorienNpcDataPool { +public class LorienNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.LOTHLORIEN; - public final static NpcData CIVILIAN; - public final static NpcData SENTINEL; - public final static NpcData RANGER; - public final static NpcData WARRIOR; - public final static NpcData KNIGHT; - public final static NpcData EGLADIL_SENTINEL ; - public final static NpcData EGLADIL_COMMANDER; - public final static NpcData GUARD; - public final static NpcData LORD; + public final static NpcType CIVILIAN; + public final static NpcType SENTINEL; + public final static NpcType RANGER; + public final static NpcType WARRIOR; + public final static NpcType KNIGHT; + public final static NpcType EGLADIL_SENTINEL ; + public final static NpcType EGLADIL_COMMANDER; + public final static NpcType GUARD; + public final static NpcType LORD; public static List fetchAll() { return List.of( @@ -48,7 +48,7 @@ public static List fetchAll() { } static { - CIVILIAN = new NpcData(NpcRegistry.LOTHLORIEN_CIVILIAN.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( + CIVILIAN = new NpcType(NpcRegistry.LOTHLORIEN_CIVILIAN.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create()) @@ -66,9 +66,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.BRONZE_DAGGER)) .add(WeightedItemData.create(DecorativeItemsME.WATERING_CAN)) .add(WeightedItemData.create().withWeight(3))) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - SENTINEL = new NpcData(NpcRegistry.LOTHLORIEN_SENTINEL.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( + SENTINEL = new NpcType(NpcRegistry.LOTHLORIEN_SENTINEL.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.LORIEN_DIADEM)) @@ -82,9 +82,9 @@ public static List fetchAll() { .add(EquipmentSlot.FEET, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.ELVEN_BOOTS))) .add(EquipmentSlot.MAINHAND, GearSlotPool.create(WeightedItemData.create(WeaponItemsME.LORIEN_SWORD))) .add(EquipmentSlot.OFFHAND, GearSlotPool.create(WeightedItemData.create(WeaponItemsME.LORIEN_SHIELD))) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - RANGER = new NpcData(NpcRegistry.LOTHLORIEN_RANGER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( + RANGER = new NpcType(NpcRegistry.LOTHLORIEN_RANGER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.LORIEN_MARCHWARDEN_HOOD)) @@ -105,9 +105,9 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - WARRIOR = new NpcData(NpcRegistry.LOTHLORIEN_WARRIOR.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( + WARRIOR = new NpcType(NpcRegistry.LOTHLORIEN_WARRIOR.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.LORIEN_LEATHER_HELMET)) @@ -132,9 +132,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.LORIEN_LAURELS_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.LORIEN_MALLORN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - KNIGHT = new NpcData(NpcRegistry.LOTHLORIEN_KNIGHT.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( + KNIGHT = new NpcType(NpcRegistry.LOTHLORIEN_KNIGHT.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.LORIEN_SOLDIER_HELMET)) @@ -157,9 +157,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.LORIEN_LAURELS_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.LORIEN_MALLORN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - GUARD = new NpcData(NpcRegistry.LOTHLORIEN_GUARD.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( + GUARD = new NpcType(NpcRegistry.LOTHLORIEN_GUARD.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GALADHRIM_HELMET).withWeight(3)) @@ -185,9 +185,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.LORIEN_LAURELS_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.LORIEN_MALLORN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - EGLADIL_SENTINEL = new NpcData(NpcRegistry.LOTHLORIEN_EGLADIL_SENTINEL.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( + EGLADIL_SENTINEL = new NpcType(NpcRegistry.LOTHLORIEN_EGLADIL_SENTINEL.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EGLADIL_SENTINEL_HELMET)) @@ -208,9 +208,9 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.GALADHRIM_LORD_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - EGLADIL_COMMANDER = new NpcData(NpcRegistry.LOTHLORIEN_EGLADIL_COMMANDER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_LORD, List.of( + EGLADIL_COMMANDER = new NpcType(NpcRegistry.LOTHLORIEN_EGLADIL_COMMANDER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_LORD, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.EGLADIL_COMMANDER_HELMET)) @@ -228,9 +228,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.LORIEN_NOBLE_SWORD)) .add(WeightedItemData.create(WeaponItemsME.LORIEN_NOBLE_LONGBOW)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - LORD = new NpcData(NpcRegistry.LOTHLORIEN_LORD.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_LORD, List.of( + LORD = new NpcType(NpcRegistry.LOTHLORIEN_LORD.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.LOTHLORIEN_LORD, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.GALADHRIM_LORD_HELMET)) @@ -251,6 +251,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GALADHRIM_LORD_SHIELD).withWeight(3)) .add(WeightedItemData.create(WeaponItemsME.GALADHRIM_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/MordorNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/MordorNpcTypePool.java similarity index 95% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/MordorNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/MordorNpcTypePool.java index 5ef3051fd7..9f4d4bb213 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/MordorNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/MordorNpcTypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; @@ -8,21 +8,21 @@ import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; import net.sevenstars.middleearth.item.utils.armor.helmetAttachments.HelmetAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; import java.util.List; -public class MordorNpcDataPool { +public class MordorNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.MORDOR; private static final int DARK_RED = 0x4f251d; @@ -31,15 +31,15 @@ public class MordorNpcDataPool { private static List allColors; - public final static NpcData BLACK_NUMENOREAN; - public final static NpcData SNAGA; - public final static NpcData SCOUT; - public final static NpcData MILITIA; - public final static NpcData WARRIOR; - public final static NpcData VETERAN; - public final static NpcData CAPTAIN; - public final static NpcData DOL_GULDUR_SCOUT; - public final static NpcData DOL_GULDUR_WARRIOR; + public final static NpcType BLACK_NUMENOREAN; + public final static NpcType SNAGA; + public final static NpcType SCOUT; + public final static NpcType MILITIA; + public final static NpcType WARRIOR; + public final static NpcType VETERAN; + public final static NpcType CAPTAIN; + public final static NpcType DOL_GULDUR_SCOUT; + public final static NpcType DOL_GULDUR_WARRIOR; public static List fetchAll() { return List.of( @@ -58,7 +58,7 @@ public static List fetchAll() { static { allColors = List.of(DARK_RED, DARK_BROWN, DARK); - BLACK_NUMENOREAN = new NpcData(NpcRegistry.MORDOR_BLACK_NUMENOREAN.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.MORDOR_BLACK_NUMENOREAN, List.of( + BLACK_NUMENOREAN = new NpcType(NpcRegistry.MORDOR_BLACK_NUMENOREAN.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.MORDOR_BLACK_NUMENOREAN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.MORDOR_BLACK_NUMENOREAN_PLATE_HELMET).withWeight(4)) @@ -79,9 +79,9 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.BLACK_NUMENOREAN_TOWER_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - SNAGA = new NpcData(NpcRegistry.MORDOR_SNAGA.getValue(), RaceRegistry.SNAGA, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( + SNAGA = new NpcType(NpcRegistry.MORDOR_SNAGA.getValue(), RaceRegistry.SNAGA, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(4)) @@ -124,9 +124,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.MORDOR_WOODEN_SHIELD).withWeight(2)) .add(WeightedItemData.create(WeaponItemsME.MORDOR_PAINTED_WOODEN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MILITIA = new NpcData(NpcRegistry.MORDOR_MILITIA.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( + MILITIA = new NpcType(NpcRegistry.MORDOR_MILITIA.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -179,9 +179,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.MORDOR_BLACK_ROUND_SHIELD).withWeight(2)) .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - SCOUT = new NpcData(NpcRegistry.MORDOR_SCOUT.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( + SCOUT = new NpcType(NpcRegistry.MORDOR_SCOUT.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -230,9 +230,9 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - WARRIOR = new NpcData(NpcRegistry.MORDOR_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( + WARRIOR = new NpcType(NpcRegistry.MORDOR_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -298,9 +298,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GONDORIAN_CONVERTED_SHIELD)) .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - VETERAN = new NpcData(NpcRegistry.MORDOR_VETERAN.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.MORDOR_BLACK_URUK, List.of( + VETERAN = new NpcType(NpcRegistry.MORDOR_VETERAN.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.MORDOR_BLACK_URUK, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.BLACK_URUK_PLATE_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.BLACK_URUK_PLATE_CHESTPLATE))) @@ -318,9 +318,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.MORDOR_HEAVY_SHIELD).withWeight(2)) .add(WeightedItemData.create(WeaponItemsME.MORDOR_BLACK_ROUND_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - CAPTAIN = new NpcData(NpcRegistry.MORDOR_CAPTAIN.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.MORDOR_BLACK_URUK, List.of( + CAPTAIN = new NpcType(NpcRegistry.MORDOR_CAPTAIN.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.MORDOR_BLACK_URUK, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.BLACK_URUK_COMMANDER_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create() @@ -340,9 +340,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.MORDOR_HEAVY_SHIELD).withWeight(2)) .add(WeightedItemData.create(WeaponItemsME.MORDOR_BLACK_ROUND_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - DOL_GULDUR_SCOUT = new NpcData(NpcRegistry.DOL_GULDUR_SCOUT.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( + DOL_GULDUR_SCOUT = new NpcType(NpcRegistry.DOL_GULDUR_SCOUT.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -417,9 +417,9 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - DOL_GULDUR_WARRIOR = new NpcData(NpcRegistry.DOL_GULDUR_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( + DOL_GULDUR_WARRIOR = new NpcType(NpcRegistry.DOL_GULDUR_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORDOR_ORC, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.DOL_GULDUR_MARAUDER_HELMET)) @@ -470,6 +470,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.DOL_GULDUR_SHIELD)) .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/MoriaNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/MoriaNpcTypePool.java similarity index 93% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/MoriaNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/MoriaNpcTypePool.java index 326a6c0b9a..42fb2aa43e 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/MoriaNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/MoriaNpcTypePool.java @@ -1,39 +1,42 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; import net.minecraft.registry.RegistryKey; import net.sevenstars.middleearth.block.registration.ModDecorativeBlocks; +import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.item.EquipmentItemsME; import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; -import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; +import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.data.MountData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; import java.util.List; -public class MoriaNpcDataPool { +public class MoriaNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.MORIA; private static List allColors; private static final int DARK_RED = 0x2e2624; private static final int DARK_BROWN = 0x4a3c34; - public final static NpcData GOBLIN; - public final static NpcData MILITIA; - public final static NpcData SCOUT; - public final static NpcData WARRIOR; - public final static NpcData RIDER; - public final static NpcData VETERAN; - public final static NpcData CHIEF; + public final static NpcType GOBLIN; + public final static NpcType MILITIA; + public final static NpcType SCOUT; + public final static NpcType WARRIOR; + public final static NpcType RIDER; + public final static NpcType VETERAN; + public final static NpcType CHIEF; public static List fetchAll() { return List.of( @@ -53,7 +56,7 @@ public static List fetchAll() { DARK_BROWN ); - GOBLIN = new NpcData(NpcRegistry.MORIA_GOBLIN.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( + GOBLIN = new NpcType(NpcRegistry.MORIA_GOBLIN.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(4)) @@ -92,10 +95,10 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MILITIA = new NpcData(NpcRegistry.MORIA_MILITIA.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( + MILITIA = new NpcType(NpcRegistry.MORIA_MILITIA.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(8)) @@ -140,9 +143,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.RUINED_DWARVEN_REINFORCED_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - SCOUT = new NpcData(NpcRegistry.MORIA_SCOUT.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( + SCOUT = new NpcType(NpcRegistry.MORIA_SCOUT.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(8)) @@ -174,9 +177,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.GOBLIN_CROSSBOW).withWeight(4)) .add(WeightedItemData.create(WeaponItemsME.ORCISH_BOW).withWeight(1)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - WARRIOR = new NpcData(NpcRegistry.MORIA_WARRIOR.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( + WARRIOR = new NpcType(NpcRegistry.MORIA_WARRIOR.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(5)) @@ -221,9 +224,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.RUINED_DWARVEN_REINFORCED_SHIELD)) .add(WeightedItemData.create(Items.AIR).withWeight(2)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - RIDER = new NpcData(NpcRegistry.MORIA_RIDER.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( + RIDER = new NpcType(NpcRegistry.MORIA_RIDER.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) @@ -255,9 +258,9 @@ public static List fetchAll() { .add(WeightedItemData.create(ModDecorativeBlocks.CRUDE_BROAD_CHAIN.asItem())) .add(WeightedItemData.create(Items.AIR).withWeight(2)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, new MountData(EntitiesME.WARG), NpcLoot.FROM_10_TO_16); - VETERAN = new NpcData(NpcRegistry.MORIA_VETERAN.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( + VETERAN = new NpcType(NpcRegistry.MORIA_VETERAN.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.MORIA_GOBLIN_BITER_HELMET)) @@ -306,9 +309,9 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.MORIA_GOBLINS_HEAVY_SHIELD)) ).withWeight(4) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - CHIEF = new NpcData(NpcRegistry.MORIA_CHIEF.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( + CHIEF = new NpcType(NpcRegistry.MORIA_CHIEF.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.MORIA_GOBLIN, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.MORIA_GOBLIN_CAPTAIN_HELMET)) @@ -332,6 +335,6 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.MORIA_GOBLINS_HEAVY_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/RohirricNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/RohirricNpcTypePool.java similarity index 92% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/RohirricNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/RohirricNpcTypePool.java index ec902e028e..bb77d63745 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/RohirricNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/RohirricNpcTypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; @@ -7,21 +7,21 @@ import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; import java.util.List; -public class RohirricNpcDataPool { +public class RohirricNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.ROHAN; private final static int LIGHT_GREEN = 0x516c42; @@ -33,13 +33,13 @@ public class RohirricNpcDataPool { private final static int LIGHT_BROWN = 0x69594d; private final static int DARK_BROWN = 0x44382f; - public final static NpcData PEASANT; - public final static NpcData MILITIA; - public final static NpcData SOLDIER; - public final static NpcData KNIGHT; - public final static NpcData ROYAL_GUARD; - public final static NpcData EORLING_MARSHAL; - public final static NpcData HORSE_LORD; + public final static NpcType PEASANT; + public final static NpcType MILITIA; + public final static NpcType SOLDIER; + public final static NpcType KNIGHT; + public final static NpcType ROYAL_GUARD; + public final static NpcType EORLING_MARSHAL; + public final static NpcType HORSE_LORD; public static List fetchAll() { @@ -56,7 +56,7 @@ public static List fetchAll() { static { - PEASANT = new NpcData(NpcRegistry.ROHAN_PEASANT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_PEASANT, List.of( + PEASANT = new NpcType(NpcRegistry.ROHAN_PEASANT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.STRAW_HAT)) @@ -70,9 +70,9 @@ public static List fetchAll() { .add(WeightedItemData.create(ToolItemsME.SMITHING_HAMMER)) .add(WeightedItemData.create().withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MILITIA = new NpcData(NpcRegistry.ROHAN_MILITIA.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_PEASANT, List.of( + MILITIA = new NpcType(NpcRegistry.ROHAN_MILITIA.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.ROHIRRIC_LEATHER_HELMET).withWeight(6)) @@ -113,9 +113,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROUND_SHIELD)) .add(WeightedItemData.create().withWeight(5)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - SOLDIER = new NpcData(NpcRegistry.ROHAN_SOLDIER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_SOLDIER, List.of( + SOLDIER = new NpcType(NpcRegistry.ROHAN_SOLDIER.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.ROHIRRIC_MILITIA_HELMET).withWeight(6)) @@ -163,9 +163,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROHIRRIC_TWIN_HORSES_SHIELD)) .add(WeightedItemData.create().withWeight(10)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - KNIGHT = new NpcData(NpcRegistry.ROHAN_KNIGHT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_SOLDIER, List.of( + KNIGHT = new NpcType(NpcRegistry.ROHAN_KNIGHT.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.ROHIRRIC_SOLDIER_HELMET).withWeight(6)) @@ -205,9 +205,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROHIRRIC_PLAINSMAN_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.ROHIRRIC_TWIN_HORSES_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - ROYAL_GUARD = new NpcData(NpcRegistry.ROHAN_ROYAL_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_SOLDIER, List.of( + ROYAL_GUARD = new NpcType(NpcRegistry.ROHAN_ROYAL_GUARD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_SOLDIER, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.ROHIRRIC_ROYAL_GUARD_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create() @@ -221,9 +221,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROHIRRIC_NOBLE_SWORD)) ) .add(EquipmentSlot.OFFHAND, GearSlotPool.create(WeightedItemData.create(WeaponItemsME.ROHIRRIC_ROYAL_GUARD_SHIELD))) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - EORLING_MARSHAL = new NpcData(NpcRegistry.ROHAN_EORLING_MARSHAL.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_LORD, List.of( + EORLING_MARSHAL = new NpcType(NpcRegistry.ROHAN_EORLING_MARSHAL.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_LORD, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.EORLING_MARSHAL_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.EORLING_MARSHAL_CHESTPLATE))) @@ -237,9 +237,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROHIRRIC_EORLING_SHIELD)) .add(WeightedItemData.create().withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - HORSE_LORD = new NpcData(NpcRegistry.ROHAN_HORSE_LORD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_LORD, List.of( + HORSE_LORD = new NpcType(NpcRegistry.ROHAN_HORSE_LORD.getValue(), RaceRegistry.HUMAN, FACTION, TexturePresetsRegistry.ROHAN_LORD, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.HORSE_LORD_HELMET))) .add(EquipmentSlot.CHEST, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.HORSE_LORD_CHESTPLATE))) @@ -252,6 +252,6 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ROHIRRIC_ORNAMENTED_SHIELD)) .add(WeightedItemData.create().withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/ShireNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/ShireNpcTypePool.java similarity index 82% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/ShireNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/ShireNpcTypePool.java index 596c2f0ab4..30b7efdfe0 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/ShireNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/ShireNpcTypePool.java @@ -1,5 +1,6 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; +import net.minecraft.entity.EntityType; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.Items; import net.minecraft.registry.RegistryKey; @@ -7,21 +8,22 @@ import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; -import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; +import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.data.MountData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; import java.util.List; -public class ShireNpcDataPool { +public class ShireNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.SHIRE; private final static int DARK_BEIGE = 0xa89371; @@ -29,9 +31,9 @@ public class ShireNpcDataPool { private final static int BROWN = 0x59341e; private final static int DARK = 0x342c27; - public final static NpcData PEASANT; - public final static NpcData MILITIA; - public final static NpcData SHIRRIFF; + public final static NpcType PEASANT; + public final static NpcType MILITIA; + public final static NpcType SHIRRIFF; public static List fetchAll() { return List.of( @@ -42,16 +44,16 @@ public static List fetchAll() { } static { - PEASANT = new NpcData(NpcRegistry.SHIRE_PEASANT.getValue(), RaceRegistry.HOBBIT, FACTION, TexturePresetsRegistry.SHIRE_PEASANT, List.of( + PEASANT = new NpcType(NpcRegistry.SHIRE_PEASANT.getValue(), RaceRegistry.HOBBIT, FACTION, TexturePresetsRegistry.SHIRE_PEASANT, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.STRAW_HAT).withWeight(2)) .add(WeightedItemData.create(EquipmentItemsME.WOVEN_HAT).withWeight(2)) .add(WeightedItemData.create().withWeight(10)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - MILITIA = new NpcData(NpcRegistry.SHIRE_MILITIA.getValue(), RaceRegistry.HOBBIT, FACTION, TexturePresetsRegistry.SHIRE_MILITIA, List.of( + MILITIA = new NpcType(NpcRegistry.SHIRE_MILITIA.getValue(), RaceRegistry.HOBBIT, FACTION, TexturePresetsRegistry.SHIRE_MILITIA, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.STRAW_HAT).withWeight(2)) @@ -76,9 +78,9 @@ public static List fetchAll() { .add(WeightedItemData.create(Items.AIR).withWeight(3)) .add(WeightedItemData.create(WeaponItemsME.ROUND_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - SHIRRIFF = new NpcData(NpcRegistry.SHIRE_SHIRRIFF.getValue(), RaceRegistry.HOBBIT, FACTION, TexturePresetsRegistry.SHIRE_SHIRRIFF, List.of( + SHIRRIFF = new NpcType(NpcRegistry.SHIRE_SHIRRIFF.getValue(), RaceRegistry.HOBBIT, FACTION, TexturePresetsRegistry.SHIRE_SHIRRIFF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create(WeightedItemData.create(EquipmentItemsME.SHIRRIFF_HAT))) .add(EquipmentSlot.CHEST, GearSlotPool.create() @@ -95,6 +97,6 @@ public static List fetchAll() { .add(WeightedItemData.create(ToolItemsME.BRIMMINGBEND_PIPE)) .add(WeightedItemData.create(Items.BOOK)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/WildGoblinNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/WildGoblinNpcTypePool.java similarity index 87% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/WildGoblinNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/WildGoblinNpcTypePool.java index c9e42b3388..2e433329af 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/WildGoblinNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/WildGoblinNpcTypePool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.attribute.EntityAttributes; @@ -6,39 +6,38 @@ import net.minecraft.registry.RegistryKey; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.block.registration.ModDecorativeBlocks; +import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.entity.EntityAttributesME; import net.sevenstars.middleearth.item.EquipmentItemsME; import net.sevenstars.middleearth.item.ToolItemsME; import net.sevenstars.middleearth.item.WeaponItemsME; import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; -import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; +import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; import net.sevenstars.middleearth.resources.datas.attributes.AttributePool; import net.sevenstars.middleearth.resources.datas.attributes.AttributePoolElement; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.common.EntityCategories; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.*; import java.util.HashMap; import java.util.List; -public class WildGoblinNpcDataPool { +public class WildGoblinNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.WILD_GOBLINS; private static final int DARK_BROWN_GOBLIN = 0x4a3c34; - public final static NpcData GATHERER; - public final static NpcData WARRIOR; - public final static NpcData SCOUT; - public final static NpcData RIDER; - public final static NpcData BRUTE; + public final static NpcType GATHERER; + public final static NpcType WARRIOR; + public final static NpcType SCOUT; + public final static NpcType RIDER; + public final static NpcType BRUTE; public static List fetchAll() { return List.of( @@ -50,8 +49,15 @@ public static List fetchAll() { ); } + public static final HashMap TANKY_ATTRIBUTES = new HashMap<>(){{ + put(EntityCategories.SHARED, new AttributePool().addElements(List.of( + AttributePoolElement.create(EntityAttributes.MOVEMENT_SPEED, 0.35, 0.45), + AttributePoolElement.create(EntityAttributes.ARMOR, 5, 10) + ))); + }}; + static { - GATHERER = new NpcData(NpcRegistry.WILD_GOBLIN_GATHERER.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.WILD_GOBLIN_WEAK, List.of( + GATHERER = new NpcType(NpcRegistry.WILD_GOBLIN_GATHERER.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.WILD_GOBLIN_WEAK, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -83,9 +89,9 @@ public static List fetchAll() { .add(WeightedItemData.create(ToolItemsME.CRUDE_HOE)) .add(WeightedItemData.create(ToolItemsME.CRUDE_SHOVEL)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - SCOUT = new NpcData(NpcRegistry.WILD_GOBLIN_SCOUT.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.WILD_GOBLIN_WEAK, List.of( + SCOUT = new NpcType(NpcRegistry.WILD_GOBLIN_SCOUT.getValue(), RaceRegistry.GOBLIN, FACTION, TexturePresetsRegistry.WILD_GOBLIN_WEAK, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -116,9 +122,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ORCISH_BOW).withWeight(4)) .add(WeightedItemData.create(WeaponItemsME.GUNDABAD_BOW)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT, NpcLoot.FROM_3_TO_7); - RIDER = new NpcData(NpcRegistry.WILD_GOBLIN_RIDER.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.WILD_GOBLIN_WARRIOR, List.of( + RIDER = new NpcType(NpcRegistry.WILD_GOBLIN_RIDER.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.WILD_GOBLIN_WARRIOR, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.DOL_GULDUR_JAILER_COLLAR)) @@ -147,9 +153,18 @@ public static List fetchAll() { .add(WeightedItemData.create(Items.BONE).withWeight(3)) .add(WeightedItemData.create().withWeight(2)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), new HashMap<>(){{ + put(EntityCategories.SHARED, new AttributePool().addElements(List.of( + AttributePoolElement.create(EntityAttributes.MOVEMENT_SPEED, 0.25, 0.30), + AttributePoolElement.create(EntityAttributes.MAX_HEALTH, 22), + AttributePoolElement.create(EntityAttributes.ARMOR, 5, 10) + ))); + }}, CombatArchetypePool.DEFAULT, new MountData(EntitiesME.CAVE_TROLL).withPassengerSlots( + new MountPassengerSlotData(new MountPassengerData(NpcRegistry.WILD_GOBLIN_SCOUT).withDiscardChance(0.25)), + new MountPassengerSlotData(new MountPassengerData(NpcRegistry.WILD_GOBLIN_SCOUT).withDiscardChance(0.25)) + ), NpcLoot.FROM_10_TO_16); - WARRIOR = new NpcData(NpcRegistry.WILD_GOBLIN_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.WILD_GOBLIN_WARRIOR, List.of( + WARRIOR = new NpcType(NpcRegistry.WILD_GOBLIN_WARRIOR.getValue(), RaceRegistry.ORC, FACTION, TexturePresetsRegistry.WILD_GOBLIN_WARRIOR, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -192,9 +207,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.ORC_KNIFE)) .add(WeightedItemData.create(Items.AIR).withWeight(3)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - BRUTE = new NpcData(NpcRegistry.WILD_GOBLIN_BRUTE.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.WILD_GOBLIN_BRUTE, List.of( + BRUTE = new NpcType(NpcRegistry.WILD_GOBLIN_BRUTE.getValue(), RaceRegistry.URUK, FACTION, TexturePresetsRegistry.WILD_GOBLIN_BRUTE, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR).withWeight(3)) @@ -223,6 +238,6 @@ public static List fetchAll() { AttributePoolElement.create(EntityAttributes.ATTACK_DAMAGE, 2).withModifier(MiddleEarth.of("brute_attack_damage_buff"), 1.35) ) )); - }} , CombatArchetypePool.DEFAULT); + }}, CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/WoodlandRealmNpcDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/WoodlandRealmNpcTypePool.java similarity index 87% rename from middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/WoodlandRealmNpcDataPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/WoodlandRealmNpcTypePool.java index deae5aa0e0..8418f115e2 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npcs/pools/WoodlandRealmNpcDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/npctypes/pools/WoodlandRealmNpcTypePool.java @@ -1,8 +1,13 @@ -package net.sevenstars.middleearth.registries.content.npcs.pools; +package net.sevenstars.middleearth.registries.content.npctypes.pools; import net.minecraft.entity.EquipmentSlot; +import net.minecraft.entity.attribute.EntityAttributeModifier; +import net.minecraft.entity.attribute.EntityAttributes; import net.minecraft.item.Items; import net.minecraft.registry.RegistryKey; +import net.minecraft.util.Identifier; +import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.item.DecorativeItemsME; import net.sevenstars.middleearth.item.EquipmentItemsME; import net.sevenstars.middleearth.item.ToolItemsME; @@ -10,31 +15,39 @@ import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; import net.sevenstars.middleearth.item.utils.armor.helmetAttachments.HelmetAttachmentsME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.CombatArchetypePool; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; +import net.sevenstars.middleearth.registries.content.npctypes.CombatArchetypePool; +import net.sevenstars.middleearth.registries.content.npctypes.NpcLoot; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.registries.content.races.RaceRegistry; import net.sevenstars.middleearth.registries.content.texturepresets.TexturePresetsRegistry; +import net.sevenstars.middleearth.resources.datas.attributes.AttributePool; +import net.sevenstars.middleearth.resources.datas.attributes.AttributePoolElement; +import net.sevenstars.middleearth.resources.datas.common.EntityCategories; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.data.GearSlotPool; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedItemData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.data.GearSlotPool; +import net.sevenstars.middleearth.resources.datas.npc_types.data.MountData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedItemData; +import java.util.HashMap; import java.util.List; -public class WoodlandRealmNpcDataPool { +public class WoodlandRealmNpcTypePool { private final static RegistryKey FACTION = FactionRegistry.WOODLAND_REALM; - public final static NpcData ARTISAN; // Citizen / Artisans - public final static NpcData HUNTER; // Very lightly armored, focusing entities (spiders and deer (cooldown) rather than orcs) - public final static NpcData SENTINEL; // Very light armor, but stealth (stay far from the enemies or unknown, 30-40 blocks) - public final static NpcData RANGER; // Medium armor - ranged - public final static NpcData WARRIOR; // Medium armor - public final static NpcData LANCER; // Medium armor - have spears and do charges - riding great horns - public final static NpcData NIGHTSHADE; // Nightshade armor - Hybrid - public final static NpcData ELVEN_KINGS_GUARD; // Heavily armored - spears and shields - public final static NpcData COMMANDER; // Heavily armored, can ride a great horn (depend on context) - public final static NpcData WARDEN_OF_THE_GLADE; // Heavily armored, elite, melee + public static final Identifier TOTAL_DAMAGE_MODIFIER = MiddleEarth.of("total_damage"); + + public final static NpcType ARTISAN; // Citizen / Artisans + public final static NpcType HUNTER; // Very lightly armored, focusing entities (spiders and deer (cooldown) rather than orcs) + public final static NpcType SENTINEL; // Very light armor, but stealth (stay far from the enemies or unknown, 30-40 blocks) + public final static NpcType RANGER; // Medium armor - ranged + public final static NpcType WARRIOR; // Medium armor + public final static NpcType LANCER; // Medium armor - have spears and do charges - riding great horns + public final static NpcType NIGHTSHADE; // Nightshade armor - Hybrid + public final static NpcType ELVEN_KINGS_GUARD; // Heavily armored - spears and shields + public final static NpcType COMMANDER; // Heavily armored, can ride a great horn (depend on context) + public final static NpcType WARDEN_OF_THE_GLADE; // Heavily armored, elite, melee public static List fetchAll() { return List.of( @@ -52,7 +65,7 @@ public static List fetchAll() { } static { - ARTISAN = new NpcData(NpcRegistry.WOODLAND_REALM_ARTISAN.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( + ARTISAN = new NpcType(NpcRegistry.WOODLAND_REALM_ARTISAN.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.CHEST, GearSlotPool.create() .add(WeightedItemData.create()) @@ -70,9 +83,9 @@ public static List fetchAll() { .add(WeightedItemData.create(ToolItemsME.NOBLE_SMITHING_HAMMER)) .add(WeightedItemData.create(DecorativeItemsME.WATERING_CAN)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT, NpcLoot.FROM_1_TO_4); - HUNTER = new NpcData(NpcRegistry.WOODLAND_REALM_HUNTER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( + HUNTER = new NpcType(NpcRegistry.WOODLAND_REALM_HUNTER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.CHEST, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.WOODLAND_REALM_LEATHER_ARMING_COAT) @@ -89,9 +102,9 @@ public static List fetchAll() { .add(WeightedItemData.create(Items.AIR).withWeight(5)) .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_NOBLE_DAGGER)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.WOODLAND_REALMS_RANGER); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.WOODLAND_REALMS_RANGER, NpcLoot.FROM_3_TO_7); - SENTINEL = new NpcData(NpcRegistry.WOODLAND_REALM_SENTINEL.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_SENTINEL, List.of( + SENTINEL = new NpcType(NpcRegistry.WOODLAND_REALM_SENTINEL.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_SENTINEL, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.HOOD).withColor(0x20351a)) @@ -138,9 +151,9 @@ public static List fetchAll() { .add(WeightedItemData.create(Items.AIR).withWeight(5)) .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_NOBLE_DAGGER)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.WOODLAND_REALMS_RANGER); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.WOODLAND_REALMS_RANGER, NpcLoot.FROM_3_TO_7); - RANGER = new NpcData(NpcRegistry.WOODLAND_REALM_RANGER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( + RANGER = new NpcType(NpcRegistry.WOODLAND_REALM_RANGER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( WeightedGearData.create().withWeight(3) .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) @@ -197,9 +210,9 @@ public static List fetchAll() { .add(EquipmentSlot.MAINHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_LONGBOW)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.WOODLAND_REALMS_RANGER); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.WOODLAND_REALMS_RANGER, NpcLoot.FROM_3_TO_7); - WARRIOR = new NpcData(NpcRegistry.WOODLAND_REALM_WARRIOR.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( + WARRIOR = new NpcType(NpcRegistry.WOODLAND_REALM_WARRIOR.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) @@ -224,9 +237,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_HEAVY_BLUE_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_HEAVY_GREEN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT, NpcLoot.FROM_6_TO_10); - LANCER = new NpcData(NpcRegistry.WOODLAND_REALM_LANCER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( + LANCER = new NpcType(NpcRegistry.WOODLAND_REALM_LANCER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) @@ -251,9 +264,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_HEAVY_BLUE_SHIELD)) .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_HEAVY_GREEN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES , CombatArchetypePool.DEFAULT, new MountData(EntitiesME.GREAT_HORN).withArmor(EquipmentItemsME.GREAT_HORN_PLATE_ARMOR.getDefaultStack()), NpcLoot.FROM_6_TO_10); - NIGHTSHADE = new NpcData(NpcRegistry.WOODLAND_REALM_NIGHTSHADE.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_NIGHTSHADE, List.of( + NIGHTSHADE = new NpcType(NpcRegistry.WOODLAND_REALM_NIGHTSHADE.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_NIGHTSHADE, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(Items.AIR)) @@ -290,9 +303,9 @@ public static List fetchAll() { .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_NOBLE_DAGGER)) .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_NIGHTSHADE_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - ELVEN_KINGS_GUARD = new NpcData(NpcRegistry.WOODLAND_REALM_ELVEN_KINGS_GUARD.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( + ELVEN_KINGS_GUARD = new NpcType(NpcRegistry.WOODLAND_REALM_ELVEN_KINGS_GUARD.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_ELF, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create(EquipmentItemsME.WOODLAND_REALM_ROYAL_GUARD_HELMET)) @@ -308,9 +321,9 @@ public static List fetchAll() { .add(EquipmentSlot.MAINHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_SPEAR)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT, NpcLoot.FROM_10_TO_16); - COMMANDER = new NpcData(NpcRegistry.WOODLAND_REALM_COMMANDER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_COMMANDER, List.of( + COMMANDER = new NpcType(NpcRegistry.WOODLAND_REALM_COMMANDER.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_COMMANDER, List.of( WeightedGearData.create().withWeight(2) .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create()) @@ -367,9 +380,9 @@ public static List fetchAll() { .add(EquipmentSlot.MAINHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_NOBLE_LONGBOW)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT, NpcLoot.FROM_13_TO_20); - WARDEN_OF_THE_GLADE = new NpcData(NpcRegistry.WOODLAND_REALM_WARDEN_OF_THE_GLADE.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_WARDEN_OF_THE_GLADE, List.of( + WARDEN_OF_THE_GLADE = new NpcType(NpcRegistry.WOODLAND_REALM_WARDEN_OF_THE_GLADE.getValue(), RaceRegistry.ELF, FACTION, TexturePresetsRegistry.WOODLAND_REALM_WARDEN_OF_THE_GLADE, List.of( WeightedGearData.create() .add(EquipmentSlot.HEAD, GearSlotPool.create() .add(WeightedItemData.create()) @@ -390,6 +403,14 @@ public static List fetchAll() { .add(EquipmentSlot.OFFHAND, GearSlotPool.create() .add(WeightedItemData.create(WeaponItemsME.WOODLAND_REALM_HEAVY_ORNAMENTED_GREEN_SHIELD)) ) - ), NpcRegistry.COMMON_NPC_ATTRIBUTES, CombatArchetypePool.DEFAULT); + ), new HashMap<>(){{ + put(EntityCategories.SHARED, new AttributePool().addElements(List.of( + AttributePoolElement.create(EntityAttributes.MOVEMENT_SPEED, 0.25, 0.30), + AttributePoolElement.create(EntityAttributes.MAX_HEALTH, 28), + AttributePoolElement.create(EntityAttributes.ARMOR, 10, 20), + AttributePoolElement.create(EntityAttributes.ATTACK_DAMAGE, 1, 2) + .withModifier(TOTAL_DAMAGE_MODIFIER, 1.5, EntityAttributeModifier.Operation.ADD_MULTIPLIED_TOTAL) // Does 1.5x damage, with 1 -> 2 base damage (strong) + ))); + }}, CombatArchetypePool.DEFAULT, NpcLoot.FROM_15_TO_25); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/structuremanagerdatas/StructureManagerDataPools.java b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/structuremanagerdatas/StructureManagerDataPools.java index 143ab35976..157611ab3c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/structuremanagerdatas/StructureManagerDataPools.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/registries/content/structuremanagerdatas/StructureManagerDataPools.java @@ -5,8 +5,7 @@ import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.registries.content.factions.FactionRegistry; -import net.sevenstars.middleearth.registries.content.npcs.NpcRegistry; -import net.sevenstars.middleearth.registries.content.npcs.pools.*; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.SpawnNestNodeData; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.StructureManagerData; import net.sevenstars.middleearth.resources.datas.structure_manager_datas.StructureSpawnNestPool; @@ -40,101 +39,101 @@ private static Identifier createIdentifier(String path) { static { BRIGAND_DUNGEON_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "brigand_dungeon_pool"), List.of( new SpawnNestNodeData(createIdentifier("brigand_dungeon_nests.cook"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.THUG.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THUG).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("brigand_dungeon_nests.bandit"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.THIEF.getId()).SetRangeAmount(1,2), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.THUG.getId()).SetRangeAmount(1,2), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.MERCENARY.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THIEF).SetRangeAmount(1,2), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THUG).SetRangeAmount(1,2), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_MERCENARY).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("brigand_dungeon_nests.prisoner"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, RohirricNpcDataPool.PEASANT.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES, GundabadNpcDataPool.GOBLIN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.ROHAN_PEASANT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES, NpcRegistry.GUNDABAD_GOBLIN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("brigand_dungeon_nests.mercenary"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.MERCENARY.getId()).SetRangeAmount(1,2) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_MERCENARY).SetRangeAmount(1,2) )), new SpawnNestNodeData(createIdentifier("brigand_dungeon_nests.chief"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.CHIEFTAIN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_CHIEFTAIN).SetFixAmount(1) )) )); DALE_VILLAGE_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "dale_village_pool"), List.of( new SpawnNestNodeData(createIdentifier("dale_village_nests.civilian"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.PEASANT.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.MILITIA.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_PEASANT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_MILITIA).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_village_nests.baker"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_village_nests.lumber"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_village_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_PEASANT).SetFixAmount(1) )) )); DALE_KEEP_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "dale_keep_pool"), List.of( new SpawnNestNodeData(createIdentifier("dale_keep_nests.captain"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.VETERAN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.SERGEANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_VETERAN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_SERGEANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_keep_nests.stables_master"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_keep_nests.stable"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntityType.HORSE, 4).SetFixAmount(1), new StructureSpawnNestPool(EntityType.DONKEY, 1).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_keep_nests.small_prisoner_cell"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.THIEF.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.THUG.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.CHIEFTAIN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_THIEF).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_THUG).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_CHIEFTAIN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_keep_nests.large_prisoner_cell"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.THIEF.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.THUG.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, BrigandNpcDataPool.CHIEFTAIN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_THIEF).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_THUG).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.DALE, NpcRegistry.BRIGAND_CHIEFTAIN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_keep_nests.soldier"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 4).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.SOLDIER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.ARCHER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.MILITIA.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 4).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_SOLDIER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_ARCHER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_MILITIA).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("dale_keep_nests.elite"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 4).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.KNIGHT.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.VETERAN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, DalishNpcDataPool.SOLDIER.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 4).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_KNIGHT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_VETERAN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.DALE, NpcRegistry.DALE_SOLDIER).SetFixAmount(1) )) )); EREBOR_GENERIC_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "erebor_generic_pool"), List.of( new SpawnNestNodeData(createIdentifier("erebor_generic_nests.captain"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.LEADER.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_LEADER).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("erebor_generic_nests.guard"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.VETERAN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.GATEWARDEN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.ELITE.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_VETERAN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_GATEWARDEN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_ELITE).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("erebor_generic_nests.barrack"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.SOLDIER.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.ARCHER.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.MILITIA.getId()).SetRangeAmount(1,3) + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_SOLDIER).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_ARCHER).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_MILITIA).SetRangeAmount(1,3) )), new SpawnNestNodeData(createIdentifier("erebor_generic_nests.worker"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.MINER.getId()).SetRangeAmount(1,2), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.PEASANT.getId()).SetRangeAmount(1,2) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_MINER).SetRangeAmount(1,2), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_PEASANT).SetRangeAmount(1,2) )), new SpawnNestNodeData(createIdentifier("erebor_generic_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, EreborNpcDataPool.MINER.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LONGBEARDS_EREBOR, NpcRegistry.EREBOR_MINER).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("erebor_generic_nests.prisoner"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.SNAGA.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THIEF.getValue()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_MERCENARY.getValue()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THUG.getValue()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_SNAGA).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THIEF).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_MERCENARY).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THUG).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("erebor_generic_nests.stable"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntitiesME.BROADHOOF_GOAT, 5).SetFixAmount(1), @@ -145,16 +144,16 @@ private static Identifier createIdentifier(String path) { GONDOR_VILLAGE_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "gondor_village_pool"), List.of( new SpawnNestNodeData(createIdentifier("gondor_village_nests.peasant"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT.getValue()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gondor_village_nests.lumber"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT.getValue()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gondor_village_nests.potter"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT.getValue()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gondor_village_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT.getValue()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gondor_village_nests.barn"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntityType.COW, 1).SetRangeAmount(2,3), @@ -166,23 +165,23 @@ private static Identifier createIdentifier(String path) { GONDOR_LORD_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "gondor_lord_pool"), List.of( new SpawnNestNodeData(createIdentifier("gondor_lord_nests.lord"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.LEADER.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_LEADER).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gondor_lord_nests.guard"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.VETERAN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.KNIGHT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_VETERAN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_KNIGHT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gondor_lord_nests.barracks"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.VETERAN.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.SOLDIER.getId()).SetRangeAmount(1,2), - new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.GONDOR, GondorianNpcDataPool.MILITIA.getId()).SetRangeAmount(1,3) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_VETERAN).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_SOLDIER).SetRangeAmount(1,2), + new StructureSpawnNestPool(EntitiesME.NPC, 5).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_MILITIA).SetRangeAmount(1,3) )), new SpawnNestNodeData(createIdentifier("gondor_lord_nests.workers"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT.getValue()).SetRangeAmount(2,3) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.GONDOR, NpcRegistry.GONDOR_PEASANT).SetRangeAmount(2,3) )), new SpawnNestNodeData(createIdentifier("gondor_lord_nests.prisoner"), RESPAWN_TICKS, 0, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.THIEF.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.THUG.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THIEF).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THUG).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gondor_lord_nests.stable"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntityType.HORSE, 5).SetFixAmount(1), @@ -193,213 +192,213 @@ private static Identifier createIdentifier(String path) { GUNDABAD_CAMP_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "gundabad_camp_pool"), List.of( new SpawnNestNodeData(createIdentifier("gundabad_camp_nests.orc"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.GOBLIN.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.MILITIA.getId()).SetRangeAmount(1,2) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_GOBLIN).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_MILITIA).SetRangeAmount(1,2) )), new SpawnNestNodeData(createIdentifier("gundabad_camp_nests.warg"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntitiesME.WARG, 1).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gundabad_camp_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.GOBLIN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_GOBLIN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("gundabad_camp_nests.soldier"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.WARRIOR.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.SCOUT.getId()).SetRangeAmount(1,3) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_WARRIOR).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_SCOUT).SetRangeAmount(1,3) )), new SpawnNestNodeData(createIdentifier("gundabad_camp_nests.elite"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.VETERAN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_VETERAN).SetFixAmount(1) )) )); ISENGARD_CAMP_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "isengard_camp_pool"), List.of( new SpawnNestNodeData(createIdentifier("isengard_camp_nests.orc"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.SNAGA.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.WARRIOR.getId()).SetRangeAmount(1,2) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_ORC_SNAGA).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_ORC_WARRIOR).SetRangeAmount(1,2) )), new SpawnNestNodeData(createIdentifier("isengard_camp_nests.warg"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntitiesME.WARG, 1).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("isengard_camp_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.SNAGA.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_ORC_SNAGA).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("isengard_camp_nests.soldier"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.WARRIOR.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.URUK_HAI_SCOUT.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.URUK_HAI_SOLDIER.getId()).SetRangeAmount(1,2) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_ORC_WARRIOR).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_URUK_HAI_SCOUT).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_URUK_HAI_SOLDIER).SetRangeAmount(1,2) )), new SpawnNestNodeData(createIdentifier("isengard_camp_nests.elite"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.URUK_HAI_BERSERKER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.URUK_HAI_VETERAN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_URUK_HAI_BERSERKER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_URUK_HAI_VETERAN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("isengard_camp_nests.orthanc_guard"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, IsengardNpcDataPool.ORTHANC_GUARD.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ISENGARD, NpcRegistry.ISENGARD_ORTHANC_GUARD).SetFixAmount(1) )) )); LOTHLORIEN_HAMLET_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "lothlorien_hamlet_pool"), List.of( new SpawnNestNodeData(createIdentifier("lothlorien_hamlet_nests.civilian"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, LorienNpcDataPool.RANGER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LOTHLORIEN, LorienNpcDataPool.SENTINEL.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, NpcRegistry.LOTHLORIEN_RANGER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.LOTHLORIEN, NpcRegistry.LOTHLORIEN_SENTINEL).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("lothlorien_hamlet_nests.innkeeper"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, LorienNpcDataPool.RANGER.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, NpcRegistry.LOTHLORIEN_RANGER).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("lothlorien_hamlet_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, LorienNpcDataPool.WARRIOR.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.LOTHLORIEN, NpcRegistry.LOTHLORIEN_WARRIOR).SetFixAmount(1) )) )); MORDOR_CAMP_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "mordor_camp_pool"), List.of( new SpawnNestNodeData(createIdentifier("mordor_camp_nests.orc"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.SNAGA.getId()).SetRangeAmount(1,2), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.SCOUT.getId()).SetRangeAmount(1,2), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.MILITIA.getId()).SetRangeAmount(1,2) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_SNAGA).SetRangeAmount(1,2), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_SCOUT).SetRangeAmount(1,2), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_MILITIA).SetRangeAmount(1,2) )), new SpawnNestNodeData(createIdentifier("mordor_camp_nests.warg"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntitiesME.WARG, 1).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("mordor_camp_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.SNAGA.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_SNAGA).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("mordor_camp_nests.warrior"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.WARRIOR.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_WARRIOR).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("mordor_camp_nests.chieftain"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.WARRIOR.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_WARRIOR).SetFixAmount(1) )) )); MORIA_HALL_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "moria_hall_pool"), List.of( new SpawnNestNodeData(createIdentifier("moria_hall_nests.orc"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.GOBLIN.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.MILITIA.getId()).SetRangeAmount(1,2) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_GOBLIN).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_MILITIA).SetRangeAmount(1,2) )), new SpawnNestNodeData(createIdentifier("mordor_camp_nests.cave_troll"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntitiesME.CAVE_TROLL, 1).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("moria_hall_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.GOBLIN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_GOBLIN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("moria_hall_nests.soldier"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.WARRIOR.getId()).SetRangeAmount(1,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.SCOUT.getId()).SetRangeAmount(1,3) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_WARRIOR).SetRangeAmount(1,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_SCOUT).SetRangeAmount(1,3) )), new SpawnNestNodeData(createIdentifier("moria_hall_nests.elite"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, GundabadNpcDataPool.VETERAN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.HOBGOBLIN_TRIBES_GUNDABAD, NpcRegistry.GUNDABAD_VETERAN).SetFixAmount(1) )) )); ROHAN_VILLAGE_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "rohan_village_pool"), List.of( new SpawnNestNodeData(createIdentifier("rohan_village_nests.civilian"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.PEASANT.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.MILITIA.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_PEASANT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_MILITIA).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("rohan_village_nests.farmer"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("rohan_village_nests.beekeeper"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("rohan_village_nests.bees"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntityType.BEE, 1).SetRangeAmount(2,3) )), new SpawnNestNodeData(createIdentifier("rohan_village_nests.stables_master"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, DalishNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("rohan_village_nests.stable"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntityType.HORSE, 6).SetFixAmount(1), new StructureSpawnNestPool(EntityType.DONKEY, 1).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("rohan_village_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_PEASANT).SetFixAmount(1) )) )); ROHAN_MILITARY_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "rohan_military_pool"), List.of( new SpawnNestNodeData(createIdentifier("rohan_military_nests.soldier"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.SOLDIER.getId()).SetRangeAmount(2,3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.KNIGHT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_SOLDIER).SetRangeAmount(2,3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_KNIGHT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("rohan_military_nests.guard"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.ROYAL_GUARD.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_ROYAL_GUARD).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("rohan_military_nests.marshal"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, RohirricNpcDataPool.EORLING_MARSHAL.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.ROHAN, NpcRegistry.ROHAN_EORLING_MARSHAL).SetFixAmount(1) )) )); SHIRE_VILLAGE_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "shire_village_pool"), List.of( new SpawnNestNodeData(createIdentifier("shire_village_nests.poor_civilian"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("shire_village_nests.civilian"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("shire_village_nests.rich_civilian"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("shire_village_nests.baker"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("shire_village_nests.beekeeper"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("shire_village_nests.bees"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntityType.BEE, 1).SetRangeAmount(2,3) )), new SpawnNestNodeData(createIdentifier("shire_village_nests.innkeeper"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("shire_village_nests.smith"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.PEASANT.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_PEASANT).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("shire_village_nests.shirriff"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.SHIRRIFF.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, ShireNpcDataPool.MILITIA.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_SHIRRIFF).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.SHIRE, NpcRegistry.SHIRE_MILITIA).SetFixAmount(1) )) )); WOODLAND_REALM_HAMLET_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "woodland_realm_hamlet_pool"), List.of( new SpawnNestNodeData(createIdentifier("woodland_realm_hamlet_nests.civilian"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.RANGER.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.ARTISAN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_RANGER).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_ARTISAN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("woodland_realm_hamlet_nests.innkeeper"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.ARTISAN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_ARTISAN).SetFixAmount(1) )) )); WOODLAND_REALM_HALL_NESTS = new StructureManagerData(Identifier.of(MiddleEarth.MOD_ID, "woodland_realm_hall_pool"), List.of( new SpawnNestNodeData(createIdentifier("woodland_realm_hall_nests.lord"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.COMMANDER.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_COMMANDER).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("woodland_realm_hall_nests.civilian"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.ARTISAN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_ARTISAN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("woodland_realm_hall_nests.stables_master"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.ARTISAN.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_ARTISAN).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("woodland_realm_hall_nests.stable"), RESPAWN_TICKS, List.of( new StructureSpawnNestPool(EntitiesME.GREAT_HORN, 1).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("woodland_realm_hall_nests.prisoner_cell"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.SNAGA.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.SCOUT.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, MordorNpcDataPool.MILITIA.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.THIEF.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.THUG.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, BrigandNpcDataPool.MERCENARY.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_SNAGA).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_SCOUT).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.MORDOR, NpcRegistry.MORDOR_MILITIA).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THIEF).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_THUG).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.BRIGAND, NpcRegistry.BRIGAND_MERCENARY).SetFixAmount(1) )), new SpawnNestNodeData(createIdentifier("woodland_realm_hall_nests.soldier"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.WARRIOR.getId()).SetRangeAmount(2, 3), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.RANGER.getId()).SetRangeAmount(2, 3), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.HUNTER.getId()).SetRangeAmount(2, 3), - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.LANCER.getId()).SetRangeAmount(1, 2) + new StructureSpawnNestPool(EntitiesME.NPC, 3).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_WARRIOR).SetRangeAmount(2, 3), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_RANGER).SetRangeAmount(2, 3), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_HUNTER).SetRangeAmount(2, 3), + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_LANCER).SetRangeAmount(1, 2) )), new SpawnNestNodeData(createIdentifier("woodland_realm_hall_nests.elite"), RESPAWN_TICKS, List.of( - new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.WARRIOR.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.ELVEN_KINGS_GUARD.getId()).SetFixAmount(1), - new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, WoodlandRealmNpcDataPool.WARDEN_OF_THE_GLADE.getId()).SetFixAmount(1) + new StructureSpawnNestPool(EntitiesME.NPC, 1).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_WARRIOR).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_ELVEN_KINGS_GUARD).SetFixAmount(1), + new StructureSpawnNestPool(EntitiesME.NPC, 2).SetNpcData(FactionRegistry.WOODLAND_REALM, NpcRegistry.WOODLAND_REALM_WARDEN_OF_THE_GLADE).SetFixAmount(1) )) )); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeEventData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeEventData.java index 853cb4351b..41f8009f8c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeEventData.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeEventData.java @@ -2,38 +2,64 @@ import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.minecraft.component.DataComponentTypes; -import net.minecraft.component.type.DyedColorComponent; import net.minecraft.entity.EntityType; import net.minecraft.item.ItemStack; import net.minecraft.registry.DynamicRegistryManager; +import net.minecraft.registry.Registries; import net.minecraft.registry.Registry; -import net.minecraft.registry.RegistryKeys; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.random.Random; import net.minecraft.world.World; +import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.entity.EntitiesME; import net.sevenstars.middleearth.entity.npcs.NpcEntity; import net.sevenstars.middleearth.registries.DynamicRegistriesME; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; +import net.sevenstars.middleearth.resources.datas.biome_events.data.SpawnEventDataUtil; +import net.sevenstars.middleearth.resources.datas.biome_events.data.WildSpawnEventData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; import java.util.ArrayList; import java.util.List; public class BiomeEventData { + public static class Fields { + public static final String SPAWN_DEFAULT_WHEN_UNMET = "SpawnDefaultWhenUnmet"; + public static final String WILD_SPAWNS = "WildSpawns"; + } + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( - Codec.BOOL.fieldOf("spawn_default_when_unmet").forGetter(BiomeEventData::getSpawnDefaultWhenUnmet), - Codec.list(BiomeNpcSpawningData.CODEC).fieldOf("wild_npcs").forGetter(BiomeEventData::getWildNpcs) + Codec.BOOL.fieldOf(Fields.SPAWN_DEFAULT_WHEN_UNMET).forGetter(BiomeEventData::getSpawnDefaultWhenUnmet), + Codec.list(WildSpawnEventData.CODEC).fieldOf(Fields.WILD_SPAWNS).forGetter(BiomeEventData::getWildSpawnEventDatas) ).apply(instance, BiomeEventData::new)); private Boolean shouldSpawnDefaultWhenUnmet; - private List wildNpcs; + private List wildSpawnEventDatas; + - public BiomeEventData(boolean shouldSpawnDefaultWhenUnmet, List wildNpcs){ + public BiomeEventData(boolean shouldSpawnDefaultWhenUnmet, List wildNpcs){ this(wildNpcs); this.shouldSpawnDefaultWhenUnmet = shouldSpawnDefaultWhenUnmet; } - public BiomeEventData(List wildNpcs){ - this.wildNpcs = wildNpcs; + public BiomeEventData withMoreWildSpawns(List wildNpcs){ + + List newWildSpawns = new ArrayList<>(); + if(wildSpawnEventDatas != null) + newWildSpawns.addAll(wildSpawnEventDatas); + newWildSpawns.addAll(wildNpcs); + this.wildSpawnEventDatas = newWildSpawns; + return this; + } + + + + private List getWildSpawnEventDatas() { + return this.wildSpawnEventDatas; + } + + public BiomeEventData(List wildNpcs){ + this.wildSpawnEventDatas = wildNpcs; this.shouldSpawnDefaultWhenUnmet = false; } @@ -41,43 +67,56 @@ public Boolean getSpawnDefaultWhenUnmet(){ return shouldSpawnDefaultWhenUnmet; } - public List getWildNpcs(){ - return wildNpcs; - } - public ContextualizedBiomeData findNpcData(World world, NpcEntity entity) { - List weightedData = new ArrayList(); + List weightedData = new ArrayList<>(); DynamicRegistryManager manager = world.getRegistryManager(); - for(BiomeNpcSpawningData data : getWildNpcs()){ - int weightAmount = data.getWeight(); - if(data.conditionsAreMet(world, entity.getBlockPos())) + for(WildSpawnEventData data : getWildSpawnEventDatas()){ + if(SpawnEventDataUtil.isConsideredForSpawning(data, Registries.ENTITY_TYPE.getId(EntitiesME.NPC), world, entity.getBlockPos())) + { + int weightAmount = data.getWeight(1); for(int i = 0; i < weightAmount; i ++){ weightedData.add(data); } + } } if(weightedData.isEmpty()) return null; - BiomeNpcSpawningData spawningData = weightedData.get(Random.create().nextInt(weightedData.size())); - Registry npcDataRegistry = manager.getOrThrow(DynamicRegistriesME.NPC); - NpcData foundNpcData = npcDataRegistry.get(spawningData.getNpcDataIdentifier()); - - EntityType entityType = null; - ItemStack mountArmorItemStack = null; - if( spawningData.getMount().isPresent()){ - entityType = manager.getOrThrow(RegistryKeys.ENTITY_TYPE).get(spawningData.getMount().get()); - if(spawningData.getMountArmor().isPresent()){ - mountArmorItemStack = new ItemStack(manager.getOrThrow(RegistryKeys.ITEM).get(spawningData.getMountArmor().get())); - if(spawningData.getMountArmorColor().isPresent()){ - mountArmorItemStack.set(DataComponentTypes.DYED_COLOR, new DyedColorComponent(spawningData.getMountArmorColor().get())); + WildSpawnEventData spawningData = weightedData.get(Random.create().nextInt(weightedData.size())); + Registry npcDataRegistry = manager.getOrThrow(DynamicRegistriesME.NPC_TYPE); + Identifier npcId = spawningData.getNpcType(null); + NpcType foundNpcType = (npcId != null) ? npcDataRegistry.get(npcId) : null; + + return new ContextualizedBiomeData(foundNpcType); + } + + public boolean canSpawn(EntityType type, World world, BlockPos pos, Random random) { + List weightedData = new ArrayList<>(); + boolean containEntityType = false; + for(WildSpawnEventData data : getWildSpawnEventDatas()){ + Identifier entityId = Registries.ENTITY_TYPE.getId(type); + if(!containEntityType && MiddleEarth.compareId(data.getEntityType(), entityId)) + containEntityType = true; + if(SpawnEventDataUtil.isConsideredForSpawning(data, entityId, world, pos)) + { + int weightAmount = data.getWeight(1); + for(int i = 0; i < weightAmount; i ++){ + weightedData.add(data); } } } - return new ContextualizedBiomeData(foundNpcData, entityType, mountArmorItemStack); + if(!containEntityType) + return true; + if(weightedData.isEmpty()) + return false; + + WildSpawnEventData spawningData = weightedData.get(Random.create().nextInt(weightedData.size())); + return !spawningData.isDiscarded(random); } - public record ContextualizedBiomeData(NpcData npcData, EntityType hasMount, ItemStack mountArmor){ + + public record ContextualizedBiomeData(NpcType npcType){ } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeEventDataLookup.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeEventDataLookup.java index 0089ad499d..015729bab8 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeEventDataLookup.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeEventDataLookup.java @@ -1,14 +1,18 @@ package net.sevenstars.middleearth.resources.datas.biome_events; +import net.minecraft.entity.EntityType; import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.util.Identifier; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.random.Random; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; -import net.minecraft.world.gen.structure.Structure; +import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.npcs.NpcEntity; import net.sevenstars.middleearth.registries.DynamicRegistriesME; import net.sevenstars.middleearth.registries.content.biomevents.BiomeEventRegistry; + public class BiomeEventDataLookup { public static BiomeEventData.ContextualizedBiomeData findNpcDataForBiome(World world, RegistryEntry biome, NpcEntity entity) { Identifier biomeEventId = Identifier.of(biome.getIdAsString()); @@ -46,4 +50,12 @@ public static BiomeEventData.ContextualizedBiomeData findNpcDataForStructure(Wor } return null; } + + public static boolean canEntitySpawn(World world, RegistryEntry biome, BlockPos pos, EntityType type, Random random) { + RegistryEntry.Reference dataRef = world.getRegistryManager().getOrThrow(DynamicRegistriesME.BIOME_EVENT).getEntry(MiddleEarth.fetchId(biome.getIdAsString())).orElse(null); + if(dataRef == null) + return true; + BiomeEventData data = dataRef.value(); + return data.canSpawn(type, world, pos, random); + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeNpcSpawningData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeNpcSpawningData.java deleted file mode 100644 index 3982898c2d..0000000000 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/BiomeNpcSpawningData.java +++ /dev/null @@ -1,209 +0,0 @@ -package net.sevenstars.middleearth.resources.datas.biome_events; - -import com.mojang.serialization.Codec; -import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.minecraft.entity.EntityType; -import net.minecraft.item.Item; -import net.minecraft.registry.Registries; -import net.minecraft.util.Identifier; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; - -import java.util.Optional; - -public class BiomeNpcSpawningData { - public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( - Identifier.CODEC.fieldOf("npc_data_id").forGetter(BiomeNpcSpawningData::getNpcDataIdentifier), - Codec.INT.optionalFieldOf("weight").forGetter(BiomeNpcSpawningData::getOptionalWeight), - Codec.INT.optionalFieldOf("light_level_max").forGetter(BiomeNpcSpawningData::getLightLevelMax), - Codec.INT.optionalFieldOf("light_level_min").forGetter(BiomeNpcSpawningData::getLightLevelMin), - Codec.INT.optionalFieldOf("world_height_max").forGetter(BiomeNpcSpawningData::getWorldHeightMax), - Codec.INT.optionalFieldOf("world_height_min").forGetter(BiomeNpcSpawningData::getWorldHeightMin), - Codec.BOOL.optionalFieldOf("require_sky_access").forGetter(BiomeNpcSpawningData::getRequireSkyAccess), - Codec.BOOL.optionalFieldOf("require_underground").forGetter(BiomeNpcSpawningData::getRequireUndeground), - Codec.BOOL.optionalFieldOf("require_night").forGetter(BiomeNpcSpawningData::getRequireUndeground), - Identifier.CODEC.optionalFieldOf("mount_id").forGetter(BiomeNpcSpawningData::getMount), - Identifier.CODEC.optionalFieldOf("mount_armor_id").forGetter(BiomeNpcSpawningData::getMountArmor), - Codec.INT.optionalFieldOf("mount_armor_color").forGetter(BiomeNpcSpawningData::getMountArmorColor) - ).apply(instance, BiomeNpcSpawningData::new)); - - private Identifier npcDataIdentifier; - private Optional weight; - private Optional lightLevelMax; - private Optional lightLevelMin; - private Optional worldHeightMax; - private Optional worldHeightMin; - private Optional requireSkyAccess; - private Optional requireUndeground; - private Optional requireNight; - private Optional mount; - private Optional mountArmorId; - private Optional mountArmorColor; - - private BiomeNpcSpawningData(Identifier npcDataIdentifier, Optional weight, - Optional lightLevelMax, Optional lightLevelMin, - Optional worldHeightMax, Optional worldHeightMin, - Optional requireSkyAccess, Optional requireUndeground, Optional requireNight, - Optional mount, Optional mountArmorId, Optional mountArmorColor){ - this.npcDataIdentifier = npcDataIdentifier; - this.weight = weight; - this.lightLevelMax = lightLevelMax; - this.lightLevelMin = lightLevelMin; - this.worldHeightMax = worldHeightMax; - this.worldHeightMin = worldHeightMin; - this.requireSkyAccess = requireSkyAccess; - this.requireUndeground = requireUndeground; - this.requireNight = requireNight; - this.mount = mount; - this.mountArmorId = mountArmorId; - this.mountArmorColor = mountArmorColor; - } - - public BiomeNpcSpawningData(NpcData npcData){ - this.npcDataIdentifier = npcData.getId(); - this.weight = Optional.empty(); - this.lightLevelMax = Optional.empty(); - this.lightLevelMin = Optional.empty(); - this.worldHeightMax = Optional.empty(); - this.worldHeightMin = Optional.empty(); - this.requireSkyAccess = Optional.empty(); - this.requireUndeground = Optional.empty(); - this.requireNight = Optional.empty(); - this.mount = Optional.empty(); - this.mountArmorId = Optional.empty(); - this.mountArmorColor = Optional.empty(); - } - - public BiomeNpcSpawningData withWeight(int weight){ - this.weight = Optional.of(weight); - return this; - } - - public BiomeNpcSpawningData withLightLevelMax(int max){ - this.lightLevelMax = Optional.of(max); - return this; - } - - public BiomeNpcSpawningData withLightLevelMin(int min){ - this.lightLevelMin = Optional.of(min); - return this; - } - - public BiomeNpcSpawningData withWorldHeightMax(int max){ - this.worldHeightMax = Optional.of(max); - return this; - } - - public BiomeNpcSpawningData withWorldHeightMin(int min){ - this.worldHeightMin = Optional.of(min); - return this; - } - - public BiomeNpcSpawningData withSkylightRequired(){ - this.requireSkyAccess = Optional.of(true); - return this; - } - - public BiomeNpcSpawningData withUndegroundRequired(){ - this.requireUndeground = Optional.of(true); - return this; - } - public BiomeNpcSpawningData withNightRequired(){ - this.requireNight = Optional.of(true); - return this; - } - - public BiomeNpcSpawningData withMount(EntityType mount){ - this.mount = Optional.of(EntityType.getId(mount)); - return this; - } - - public BiomeNpcSpawningData withMount(EntityType mount, Item armorItem){ - withMount(mount); - this.mountArmorId = Optional.of(Registries.ITEM.getId(armorItem)); - return this; - } - public BiomeNpcSpawningData withMount(EntityType mount, Item armorItem, int color){ - withMount(mount, armorItem); - this.mountArmorColor = Optional.of(color); - return this; - } - - private Optional getOptionalWeight(){ - return weight; - } - - public int getWeight(){ - return weight.isPresent() ? weight.get() : 1; - } - - private Optional getLightLevelMax(){ - return lightLevelMax; - } - - private Optional getLightLevelMin(){ - return lightLevelMin; - } - - private Optional getWorldHeightMax(){ - return worldHeightMax; - } - - private Optional getWorldHeightMin(){ - return worldHeightMin; - } - - public Identifier getNpcDataIdentifier(){ - return npcDataIdentifier; - } - - private Optional getRequireSkyAccess(){ - return requireSkyAccess; - } - - private Optional getRequireUndeground(){ - return requireUndeground; - } - - private Optional getRequireNight(){ - return requireNight; - } - - public boolean conditionsAreMet(World world, BlockPos pos){ - if(requireSkyAccess.isPresent() && requireSkyAccess.get() && !world.isSkyVisible(pos)) - return false; - - if(requireUndeground.isPresent() && requireUndeground.get() && world.isSkyVisible(pos)) - return false; - - int lightLevel = world.getLightLevel(pos); - - if(requireNight.isPresent() && world.isDay() && requireNight.get()) - return false; - - if(lightLevelMax.isPresent() && lightLevel > lightLevelMax.get()) - return false; - - if(lightLevelMin.isPresent() && lightLevel < lightLevelMin.get()) - return false; - - if(worldHeightMax.isPresent() && pos.getY() > worldHeightMax.get()) - return false; - - if(worldHeightMin.isPresent() && pos.getY() < worldHeightMin.get()) - return false; - - return true; - } - - public Optional getMount(){ - return mount; - } - public Optional getMountArmor(){ - return mountArmorId; - } - public Optional getMountArmorColor(){ - return mountArmorColor; - } -} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/EntityLimitationData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/EntityLimitationData.java new file mode 100644 index 0000000000..54c26649b1 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/EntityLimitationData.java @@ -0,0 +1,71 @@ +package net.sevenstars.middleearth.resources.datas.biome_events.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; + +import java.util.Optional; + +public class EntityLimitationData { + public static class Fields { + public static final String SAME_ENTITY_LIMIT_DISTANCE = "maximum_distance"; + public static final String SAME_ENTITY_LIMIT_AMOUNT = "maximum_amount"; + public static final String SAME_ENTITY_SURFACE_ONLY = "check_surface_only"; + } + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Codec.INT.optionalFieldOf(Fields.SAME_ENTITY_LIMIT_DISTANCE).forGetter(EntityLimitationData::getEntityLimitDistance), + Codec.INT.optionalFieldOf(Fields.SAME_ENTITY_LIMIT_AMOUNT).forGetter(EntityLimitationData::getEntityLimitAmount), + Codec.BOOL.optionalFieldOf(Fields.SAME_ENTITY_SURFACE_ONLY).forGetter(EntityLimitationData::getEntitySurfaceOnly) + ).apply(instance, EntityLimitationData::new)); + + private Integer sameEntityLimitDistance = null; + private Integer sameEntityLimitAmount = null; + private Boolean sameEntitySurfaceOnly = null; + + private EntityLimitationData( + Optional sameEntityLimitDistance, + Optional sameEntityLimitAmount, + Optional sameEntitySurfaceOnly) { + this.sameEntityLimitDistance = sameEntityLimitDistance.orElse(null); + this.sameEntityLimitAmount = sameEntityLimitAmount.orElse(null); + this.sameEntitySurfaceOnly = sameEntitySurfaceOnly.orElse(null); + } + + public EntityLimitationData() + { + this.sameEntityLimitDistance = null; + this.sameEntityLimitAmount = null; + this.sameEntitySurfaceOnly = null; + } + + public Optional getEntityLimitDistance() { + return Optional.ofNullable(sameEntityLimitDistance); + } + public EntityLimitationData withEntityLimitDistance(int newSameEntityLimitDistance) { + this.sameEntityLimitDistance = newSameEntityLimitDistance; + return this; + } + public Optional getEntityLimitAmount() { + return Optional.ofNullable(sameEntityLimitAmount); + } + public EntityLimitationData withEntityLimitAmount(int newSameEntityLimitAmount) { + this.sameEntityLimitAmount = newSameEntityLimitAmount; + return this; + } + public EntityLimitationData withEntity(int maxAmount, int distance) { + this.sameEntityLimitDistance = distance; + this.sameEntityLimitAmount = maxAmount; + return this; + } + public Optional getEntitySurfaceOnly() { + return Optional.ofNullable(sameEntitySurfaceOnly); + } + public EntityLimitationData withEntitySurfaceOnly() { + this.sameEntitySurfaceOnly = true; + return this; + } + public EntityLimitationData withoutEntitySurfaceOnly() { + this.sameEntitySurfaceOnly = false; + return this; + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/SpawnEventDataUtil.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/SpawnEventDataUtil.java new file mode 100644 index 0000000000..e83a13bdbf --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/SpawnEventDataUtil.java @@ -0,0 +1,171 @@ +package net.sevenstars.middleearth.resources.datas.biome_events.data; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.registry.Registries; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Box; +import net.minecraft.util.math.Vec3i; +import net.minecraft.world.Heightmap; +import net.minecraft.world.World; +import net.sevenstars.middleearth.MiddleEarth; +import net.sevenstars.middleearth.block.special.structureManager.features.StructureManagerService; +import net.sevenstars.middleearth.entity.EntitiesME; +import net.sevenstars.middleearth.entity.npcs.NpcEntity; + +public class SpawnEventDataUtil { + // # Comparators + static boolean compareId(NpcEntity entity, Identifier npcTypeToCompare) { + if(entity == null) + return false; + Identifier entityId = entity.getNpcTypeIdentifier(); + if(entityId == null || npcTypeToCompare == null) + return false; + return MiddleEarth.compareId(entityId, npcTypeToCompare); + } + + static boolean compareEntitiesByType(LivingEntity entity, Identifier entityType) { + if(entity == null) + return false; + return MiddleEarth.compareId(Registries.ENTITY_TYPE.getId(entity.getType()), entityType); + } + + // Conditions + static boolean meetEntityThresholdRequirements(WildSpawnEventData data, World world, BlockPos pos) { + EntityType targetEntityType = Registries.ENTITY_TYPE.get(data.getEntityType()); + int sameEntityDistance = data.getSameEntityLimitDistance().orElse(256); + int sameEntityAmount = data.getSameEntityLimitAmount().orElse(10); + boolean sameEntitySurfaceOnly = data.getSameEntitySurfaceOnly().orElse(false); + + Box searchBox = Box.of(pos.toCenterPos(), sameEntityDistance, sameEntityDistance, sameEntityDistance); + + boolean hasNpcTypeLimit = targetEntityType == EntitiesME.NPC && data.getNpcType(null) != null; + int sameNpcTypeAmount = data.getSameNpcTypeLimitAmount().orElse(5); + int sameNpcTypeDistance = data.getSameNpcTypeLimitDistance().orElse(128); + boolean sameNpcTypeSurfaceOnly = data.getSameNpcTypeSurfaceOnly().orElse(false); + Box npcSearchBox = hasNpcTypeLimit ? Box.of(pos.toCenterPos(), sameNpcTypeDistance, sameNpcTypeDistance, sameNpcTypeDistance) : null; + + int[] counts = new int[2]; // [0] = entity count, [1] = npc type count + world.getOtherEntities(null, searchBox, entity -> { + // Same entity type limit + boolean isSurface = isSurface(world, entity.getBlockPos()); + if (entity.getType() == targetEntityType) { + if(sameEntitySurfaceOnly && !isSurface) + return false; + counts[0]++; + if (counts[0] >= sameEntityAmount) + return true; + } + // Same NPC type limit + if (hasNpcTypeLimit && entity instanceof NpcEntity npc && npcSearchBox.contains(entity.getPos()) && SpawnEventDataUtil.compareId(npc, data.getNpcType(null))) { + if(sameNpcTypeSurfaceOnly && !isSurface) + return false; + + counts[1]++; + return counts[1] >= sameNpcTypeAmount; + } + return false; + }); + // Entity amount exceeded + if (counts[0] >= sameEntityAmount) + return false; + // Same NPC type amount exceeded + return !hasNpcTypeLimit || counts[1] < sameNpcTypeAmount; + } + + static boolean meetsStructureManagerClearance(WildSpawnEventData data, World world, BlockPos pos) { + int structureManagerDistance = data.getStructureManagerRadiusAvoidance().orElse(64); + return !StructureManagerService.isClose(world, pos, structureManagerDistance); + } + + static boolean meetLightLevelRequirement(WildSpawnEventData data, World world, BlockPos pos) { + int currentLightLevel = world.getLightLevel(pos); + int minimumLight = data.getLightLevelMinimum().orElse(0); + if(currentLightLevel < minimumLight) + return false; + int maximumLight = data.getLightLevelMaximum().orElse(Integer.MAX_VALUE); + return currentLightLevel < maximumLight; + } + + static boolean meetWorldHeightRequirement(WildSpawnEventData data, BlockPos pos) { + int currentY = pos.getY(); + if(currentY < data.getShouldSpawnAbove().orElse(Integer.MIN_VALUE)) + return false; + return currentY < data.getShouldSpawnBelow().orElse(Integer.MAX_VALUE); + } + + static boolean meetEnvironmentRequirements(WildSpawnEventData data, World world, BlockPos pos) { + boolean requireSky = data.getSkyRequirement().orElse(false); + boolean requireUnderground = data.getUndergroundRequirement().orElse(false); + + boolean isSurface = isSurface(world, pos); + boolean isUnderground = isUnderground(world, pos); + + if (requireSky && !isSurface) { + return false; + } + + if (requireUnderground && !isUnderground) { + return false; + } + + return true; + } + + public static boolean isSurface(World world, BlockPos pos) { + int surfaceY = world.getTopY( + Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, + pos.getX(), + pos.getZ() + ); + return pos.getY() >= surfaceY - 1 && pos.getY() <= surfaceY + 2; + } + public static boolean isUnderground(World world, BlockPos pos) { + int surfaceY = world.getTopY( + Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, + pos.getX(), + pos.getZ() + ); + return pos.getY() < surfaceY - 2; + } + + static boolean meetNightTimeRequirement(WildSpawnEventData data, World world) { + boolean requireNight = data.getNightRequirement().orElse(false); + return !requireNight || world.isNight(); + } + + private static boolean meetMinimumSpaceRequirement(WildSpawnEventData data, World world, BlockPos blockPos) { + Vec3i size = data.getMinimumSpaceCubeSize().orElse(null); + if(size == null) + return true; + BlockPos max = blockPos.add(size.getX() - 1, size.getY() - 1, size.getZ() - 1); + for (BlockPos pos : BlockPos.iterate(blockPos, max)) { + if (!world.getBlockState(pos).isSolidBlock(world, pos)) { + return false; + } + } + return true; + } + + public static boolean isConsideredForSpawning(WildSpawnEventData data, Identifier id, World world, BlockPos blockPos) { + if(!data.getEntityType().equals(id)) + return false; + if(!meetLightLevelRequirement(data, world, blockPos)) + return false; + if(!meetWorldHeightRequirement(data, blockPos)) + return false; + if(!meetMinimumSpaceRequirement(data, world, blockPos)) + return false; + if(!meetEnvironmentRequirements(data, world, blockPos)) + return false; + if(!meetNightTimeRequirement(data, world)) + return false; + if(!meetEntityThresholdRequirements(data, world, blockPos)) + return false; + if(!meetsStructureManagerClearance(data, world, blockPos)) + return false; + return true; + } + +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/WildSpawnEventData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/WildSpawnEventData.java new file mode 100644 index 0000000000..0587fff15b --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/biome_events/data/WildSpawnEventData.java @@ -0,0 +1,410 @@ +package net.sevenstars.middleearth.resources.datas.biome_events.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.entity.EntityType; +import net.minecraft.registry.Registries; +import net.minecraft.registry.RegistryKey; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.Vec3i; +import net.minecraft.util.math.random.Random; +import net.sevenstars.middleearth.entity.EntitiesME; +import net.sevenstars.middleearth.registries.content.npctypes.NpcRegistry; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; + +import java.util.Optional; + +public class WildSpawnEventData { + private final static WildSpawnEventData EXAMPLE = new WildSpawnEventData(NpcRegistry.BRIGAND_THUG) + .withWeight(2) + // Can have at most 10 other npcs around 32 blocks + .withSameEntity(10, 32) + // Can have at most 1 npcs of the same type around 64 blocks + .withSameNpcType(1, 64) + // Cannot spawn if there's a structure manager block in a radius of 64 blocks + .structureManagerRadiusAvoidance(64) + // Set limits of light levels for spawns + .lightShouldBeBetween(0, 8) + // Set world height thresholds + .shouldSpawnBetween(0, -54) + // Set environmental conditions + .requireSky() + .requireNight() + .requireUnderground() + // Discard chance 0.0 - 1.0 + .withDiscardChance(0.25); + + public static class Fields { + public static final String ENTITY_TYPE = "entity_type"; + public static final String NPC_TYPE = "npc_type"; + public static final String WEIGHT = "weight"; + + public static final String SAME_ENTITY_LIMITATION = "same_entity_limitation"; + public static final String SAME_NPC_TYPE_LIMITATION = "same_npc_type_limitation"; + public static final String STRUCTURE_MANAGER_AVOIDANCE_DISTANCE = "structure_manager_avoidance_distance"; + + public static final String LIGHT_LEVEL_MAXIMUM = "light_level_maximum"; + public static final String LIGHT_LEVEL_MINIMUM = "light_level_minimum"; + public static final String WORLD_HEIGHT_MAXIMUM = "should_spawn_below"; + public static final String WORLD_HEIGHT_MINIMUM = "should_spawn_above"; + + public static final String MINIMUM_SPACE_CUBE_SIZE = "minimum_space_cube_size"; + + public static final String REQUIRE_SKY = "require_sky"; + public static final String REQUIRE_UNDERGROUND = "require_underground"; + public static final String REQUIRE_NIGHT = "require_night"; + + public static final String DISCARD_CHANCE = "discard_chance"; + } + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Identifier.CODEC.fieldOf(Fields.ENTITY_TYPE).forGetter(WildSpawnEventData::getEntityType), + Identifier.CODEC.optionalFieldOf(Fields.NPC_TYPE).forGetter(WildSpawnEventData::getOptionalNpcType), + Codec.INT.optionalFieldOf(Fields.WEIGHT).forGetter(WildSpawnEventData::getOptionalWeight), + + EntityLimitationData.CODEC.optionalFieldOf(Fields.SAME_ENTITY_LIMITATION).forGetter(WildSpawnEventData::getSameEntityLimitation), + EntityLimitationData.CODEC.optionalFieldOf(Fields.SAME_NPC_TYPE_LIMITATION).forGetter(WildSpawnEventData::getSameNpcTypeLimitation), + Codec.INT.optionalFieldOf(Fields.STRUCTURE_MANAGER_AVOIDANCE_DISTANCE).forGetter(WildSpawnEventData::getStructureManagerRadiusAvoidance), + + Codec.INT.optionalFieldOf(Fields.WORLD_HEIGHT_MAXIMUM).forGetter(WildSpawnEventData::getShouldSpawnBelow), + Codec.INT.optionalFieldOf(Fields.WORLD_HEIGHT_MINIMUM).forGetter(WildSpawnEventData::getShouldSpawnAbove), + + Codec.INT.optionalFieldOf(Fields.LIGHT_LEVEL_MAXIMUM).forGetter(WildSpawnEventData::getLightLevelMaximum), + Codec.INT.optionalFieldOf(Fields.LIGHT_LEVEL_MINIMUM).forGetter(WildSpawnEventData::getLightLevelMinimum), + + Vec3i.CODEC.optionalFieldOf(Fields.MINIMUM_SPACE_CUBE_SIZE).forGetter(WildSpawnEventData::getMinimumSpaceCubeSize), + + Codec.BOOL.optionalFieldOf(Fields.REQUIRE_SKY).forGetter(WildSpawnEventData::getSkyRequirement), + Codec.BOOL.optionalFieldOf(Fields.REQUIRE_UNDERGROUND).forGetter(WildSpawnEventData::getUndergroundRequirement), + Codec.BOOL.optionalFieldOf(Fields.REQUIRE_NIGHT).forGetter(WildSpawnEventData::getNightRequirement), + + Codec.DOUBLE.optionalFieldOf(Fields.DISCARD_CHANCE).forGetter(WildSpawnEventData::getDiscardChances) + + ).apply(instance, WildSpawnEventData::new)); + + private final Identifier entityType; + private Identifier npcType = null; + private Integer weight = null; + private EntityLimitationData sameEntityLimitation = null; + private EntityLimitationData sameNpcTypeLimitation = null; + private Integer structureManagerRadiusAvoidance = null; + private Integer shouldSpawnBelow = null; + private Integer shouldSpawnAbove = null; + private Integer lightLevelMaximum = null; + private Integer lightLevelMinimum = null; + private Vec3i minimumSpaceCubeSize = null; + private Boolean requireSky = null; + private Boolean requireUnderground = null; + private Boolean requireNight = null; + private Double discardChance = null; + + private WildSpawnEventData( + Identifier entityType, + Optional npcType, + Optional weight, + Optional sameEntityLimitation, + Optional sameNpcTypeLimitation, + Optional structureManagerRadiusAvoidance, + Optional shouldSpawnBelow, + Optional shouldSpawnAbove, + Optional lightLevelMaximum, + Optional lightLevelMinimum, + Optional minimumSpaceCubeSize, + Optional requireSky, + Optional requireUnderground, + Optional requireNight, + Optional discardChance) { + this.entityType = entityType; + this.npcType = npcType.orElse(null); + this.weight = weight.orElse(null); + this.sameEntityLimitation = sameEntityLimitation.orElse(null); + this.sameNpcTypeLimitation = sameNpcTypeLimitation.orElse(null); + this.structureManagerRadiusAvoidance = structureManagerRadiusAvoidance.orElse(null); + this.shouldSpawnBelow = shouldSpawnBelow.orElse(null); + this.shouldSpawnAbove = shouldSpawnAbove.orElse(null); + this.lightLevelMaximum = lightLevelMaximum.orElse(null); + this.lightLevelMinimum = lightLevelMinimum.orElse(null); + this.minimumSpaceCubeSize = minimumSpaceCubeSize.orElse(null); + this.requireSky = requireSky.orElse(null); + this.requireUnderground = requireUnderground.orElse(null); + this.requireNight = requireNight.orElse(null); + this.discardChance = discardChance.orElse(null); + } + + public WildSpawnEventData(EntityType entityType){ + this.entityType = Registries.ENTITY_TYPE.getId(entityType); + } + + public WildSpawnEventData(RegistryKey npcType){ + this.entityType = Registries.ENTITY_TYPE.getId(EntitiesME.NPC); + this.npcType = npcType.getValue(); + this.sameEntityLimitation = new EntityLimitationData(); + this.sameEntityLimitation.withEntitySurfaceOnly(); + this.requireSky = true; + } + + public Identifier getEntityType() { + return entityType; + } + + public Identifier getNpcType(Identifier defaultNpcType) { + return npcType == null ? defaultNpcType : npcType; + } + + private Optional getOptionalNpcType() { + return npcType == null ? Optional.empty() : Optional.of(npcType); + + } + + public Integer getWeight(int defaultValue) { + return weight == null ? defaultValue : weight; + } + + private Optional getOptionalWeight() { + return weight == null || weight == 1 ? Optional.empty() : Optional.of(weight); + } + + public WildSpawnEventData withWeight(int newWeight) { + this.weight = newWeight; + return this; + } + + public Optional getSameEntityLimitation() { + return Optional.ofNullable(this.sameEntityLimitation); + } + public Optional getSameNpcTypeLimitation() { + return Optional.ofNullable(this.sameNpcTypeLimitation); + } + + // #Region [Same Entity] + public Optional getSameEntityLimitDistance() { + EntityLimitationData data = getSameEntityLimitation().orElse(null); + if(data == null) return Optional.empty(); + return data.getEntityLimitDistance(); + } + public WildSpawnEventData withSameEntityLimitDistance(int newDistance) { + EntityLimitationData data = getSameEntityLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withEntityLimitDistance(newDistance); + this.sameEntityLimitation = data; + return this; + } + public Optional getSameEntityLimitAmount() { + EntityLimitationData data = getSameEntityLimitation().orElse(null); + if(data == null) return Optional.empty(); + return data.getEntityLimitAmount(); + } + public WildSpawnEventData withSameEntityLimitAmount(int newLimitAmount) { + EntityLimitationData data = getSameEntityLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withEntityLimitAmount(newLimitAmount); + this.sameEntityLimitation = data; + return this; + } + public WildSpawnEventData withSameEntity(int maxAmount, int distance) { + EntityLimitationData data = getSameEntityLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withEntityLimitAmount(maxAmount); + data.withEntityLimitDistance(distance); + this.sameEntityLimitation = data; + return this; + } + public Optional getSameEntitySurfaceOnly() { + EntityLimitationData data = getSameEntityLimitation().orElse(null); + if(data == null) return Optional.empty(); + return data.getEntitySurfaceOnly(); + } + + public WildSpawnEventData withEntitySurfaceOnly() { + EntityLimitationData data = getSameEntityLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withEntitySurfaceOnly(); + this.sameEntityLimitation = data; + return this; + } + public WildSpawnEventData withoutEntitySurfaceOnly() { + EntityLimitationData data = getSameEntityLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withoutEntitySurfaceOnly(); + this.sameEntityLimitation = data; + return this; + } + // #endregion + + // #Region [Same NPC] + public Optional getSameNpcTypeLimitDistance() { + EntityLimitationData data = getSameNpcTypeLimitation().orElse(null); + if(data == null) return Optional.empty(); + return data.getEntityLimitDistance(); + } + public WildSpawnEventData withSameNpcTypeLimitDistance(int newDistance) { + EntityLimitationData data = getSameNpcTypeLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withEntityLimitDistance(newDistance); + this.sameNpcTypeLimitation = data; + return this; + } + public Optional getSameNpcTypeLimitAmount() { + EntityLimitationData data = getSameNpcTypeLimitation().orElse(null); + if(data == null) return Optional.empty(); + return data.getEntityLimitAmount(); + } + public WildSpawnEventData withSameNpcTypeLimitAmount(int newLimitAmount) { + EntityLimitationData data = getSameNpcTypeLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withEntityLimitAmount(newLimitAmount); + this.sameNpcTypeLimitation = data; + return this; + } + public WildSpawnEventData withSameNpcType(int maxAmount, int distance) { + EntityLimitationData data = getSameNpcTypeLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withEntityLimitAmount(maxAmount); + data.withEntityLimitDistance(distance); + this.sameNpcTypeLimitation = data; + return this; + } + public Optional getSameNpcTypeSurfaceOnly() { + EntityLimitationData data = getSameNpcTypeLimitation().orElse(null); + if(data == null) return Optional.empty(); + return data.getEntitySurfaceOnly(); + } + public WildSpawnEventData withNpcTypeSurfaceOnly() { + EntityLimitationData data = getSameNpcTypeLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withEntitySurfaceOnly(); + this.sameNpcTypeLimitation = data; + return this; + } + public WildSpawnEventData withoutNpcTypeSurfaceOnly() { + EntityLimitationData data = getSameNpcTypeLimitation().orElse(null); + if(data == null) data = new EntityLimitationData(); + data.withoutEntitySurfaceOnly(); + this.sameNpcTypeLimitation = data; + return this; + } + // #endregion + + + public Optional getStructureManagerRadiusAvoidance() { + return Optional.ofNullable(structureManagerRadiusAvoidance); + } + public WildSpawnEventData structureManagerRadiusAvoidance(int newDistance){ + this.structureManagerRadiusAvoidance = newDistance; + return this; + } + public Optional getLightLevelMaximum() { + return Optional.ofNullable(lightLevelMaximum); + } + public WildSpawnEventData lightShouldBeAtMost(int lightLevel){ + if(lightLevel <= 0){ + this.lightLevelMaximum = null; + return this; + } + this.lightLevelMaximum = lightLevel; + return this; + } + public Optional getLightLevelMinimum() { + return Optional.ofNullable(lightLevelMinimum); + } + public WildSpawnEventData lightShouldBeAtLeast(int lightLevel){ + if(lightLevel <= 0){ + this.lightLevelMinimum = null; + return this; + } + this.lightLevelMinimum = lightLevel; + return this; + } + public WildSpawnEventData lightShouldBeBetween(int minimumLevel, int maximumLevel){ + if(minimumLevel <= 0 || maximumLevel > 15) + this.lightLevelMinimum = null; + else + this.lightLevelMinimum = minimumLevel; + + if(maximumLevel <= 0 || maximumLevel > 15) + this.lightLevelMaximum = null; + else + this.lightLevelMaximum = maximumLevel; + return this; + } + public Optional getShouldSpawnBelow() { + return Optional.ofNullable(shouldSpawnBelow); + } + public WildSpawnEventData shouldSpawnBelow(int worldY){ + this.shouldSpawnAbove = null; + this.shouldSpawnBelow = worldY; + return this; + } + public Optional getShouldSpawnAbove() { + return Optional.ofNullable(shouldSpawnAbove); + } + public WildSpawnEventData shouldSpawnAbove(int worldY){ + this.shouldSpawnBelow = null; + this.shouldSpawnAbove = worldY; + return this; + } + public WildSpawnEventData shouldSpawnBetween(int belowY, int aboveY){ + this.shouldSpawnBelow = belowY; + this.shouldSpawnAbove = aboveY; + return this; + } + public Optional getSkyRequirement() { + return Optional.ofNullable(requireSky); + } + + public WildSpawnEventData withMinimumSpaceCubeSize(Vec3i minimumBoxSize){ + this.minimumSpaceCubeSize = minimumBoxSize; + return this; + } + + public Optional getMinimumSpaceCubeSize() { + return Optional.ofNullable(minimumSpaceCubeSize); + } + + public WildSpawnEventData withoutSkyRequirement() { + this.requireSky = null; + return this; + } + public WildSpawnEventData requireSky(){ + this.requireSky = true; + return this; + } + public Optional getUndergroundRequirement() { + return Optional.ofNullable(requireUnderground); + } + public WildSpawnEventData withoutUndergroundRequirement() { + this.requireUnderground = null; + return this; + } + public WildSpawnEventData requireUnderground(){ + this.requireUnderground = true; + return this; + } + public Optional getNightRequirement() { + return Optional.ofNullable(requireNight); + } + public WildSpawnEventData withoutNightRequirement() { + this.requireNight = null; + return this; + } + public WildSpawnEventData requireNight(){ + this.requireNight = true; + return this; + } + + public WildSpawnEventData withDiscardChance(double chance){ + this.discardChance = chance; + return this; + } + + private Optional getDiscardChances() { + return Optional.ofNullable(discardChance); + } + + public boolean isDiscarded(Random random) { + if(discardChance == null) + return false; + double obtained = random.nextDouble(); + return obtained <= discardChance; + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/Faction.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/Faction.java index fce38bd8f6..c728d53dd4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/Faction.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/Faction.java @@ -33,9 +33,9 @@ import net.sevenstars.middleearth.resources.datas.factions.data.BannerData; import net.sevenstars.middleearth.resources.datas.factions.data.InitialDiplomacy; import net.sevenstars.middleearth.resources.datas.factions.data.SpawnDataHandler; -import net.sevenstars.middleearth.resources.datas.npcs.NpcData; -import net.sevenstars.middleearth.resources.datas.npcs.NpcDataLookup; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcTypeLookup; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; import net.sevenstars.middleearth.resources.datas.races.Race; import net.sevenstars.middleearth.resources.datas.races.RaceLookup; @@ -140,7 +140,7 @@ public Faction(String id, Integer factionSelectionOrderIndex, Boolean joinable, } public Faction(RegistryKey faction, Boolean joinable, DispositionType dispositionType, FactionType factionType, Identifier parentFactionId, - List subFactions, HashMap> npcDatas, BannerData bannerData, SpawnDataHandler spawnDataHandler, + List subFactions, HashMap> npcDatas, BannerData bannerData, SpawnDataHandler spawnDataHandler, List joinCommand, List leaveCommand, List initialDiplomacies) { @@ -173,7 +173,7 @@ public Faction(RegistryKey faction, Boolean joinable, DispositionType d this.npcDatasByRank = new HashMap<>(); for(NpcRank rank : npcDatas.keySet()){ List listOfIdentifiers = new ArrayList<>(); - for(NpcData data : npcDatas.get(rank)){ + for(NpcType data : npcDatas.get(rank)){ listOfIdentifiers.add(data.getId()); } this.npcDatasByRank.put(rank, listOfIdentifiers); @@ -312,14 +312,14 @@ public String toString() { return id.toString(); } - public NpcData getRandomGear(World world, NpcRank npcRank, Race race) { + public NpcType getRandomGear(World world, NpcRank npcRank, Race race) { if(!this.npcDatasByRank.containsKey(npcRank)) return null; - List npcDataList = NpcDataLookup.getAllNpcDatasFromRace(world, getNpcPoolFromRank(npcRank), race.getId()); - if(npcDataList.isEmpty()) + List npcTypeList = NpcTypeLookup.getAllNpcTypesFromRace(world, getNpcPoolFromRank(npcRank), race.getId()); + if(npcTypeList.isEmpty()) return null; Random random = new Random(); - return npcDataList.get(random.nextInt(0, npcDataList.size())); + return npcTypeList.get(random.nextInt(0, npcTypeList.size())); } public WeightedGearData getPreviewGear(World world, Race selectedRace){ @@ -333,12 +333,12 @@ public WeightedGearData getPreviewGear(World world, Race selectedRace){ identifiersToUse.addAll(getNpcPoolFromRank(NpcRank.VETERAN)); identifiersToUse.addAll(getNpcPoolFromRank(NpcRank.LEADER)); - List npcDataList = NpcDataLookup.getAllNpcDatasFromRace(world, identifiersToUse, selectedRace.getId()); - if(npcDataList.isEmpty()) + List npcTypeList = NpcTypeLookup.getAllNpcTypesFromRace(world, identifiersToUse, selectedRace.getId()); + if(npcTypeList.isEmpty()) return WeightedGearData.Create(); Random random = new Random(); - NpcData foundNpcData = npcDataList.get(random.nextInt(0, npcDataList.size())); - return foundNpcData.getGear(); + NpcType foundNpcType = npcTypeList.get(random.nextInt(0, npcTypeList.size())); + return foundNpcType.getGear(); } private List getNpcPoolFromRank(NpcRank npcRank) { @@ -355,8 +355,9 @@ public List getBannerPatternsWithColors(World return bannerData.getBannerPatternsWithColors(world); } - public ItemStack getBannerItem(World world){ - return bannerData.getBannerItem(world, Text.translatable("block.%s.faction_banner".formatted(MiddleEarth.MOD_ID), getFullName()).formatted(Formatting.GOLD)); + public ItemStack getBannerItem(RegistryWrapper.WrapperLookup wrapper){ + if(bannerData == null) return ItemStack.EMPTY; + return bannerData.getBannerItem(wrapper, Text.translatable("block.%s.faction_banner".formatted(MiddleEarth.MOD_ID), getFullName()).formatted(Formatting.GOLD)); } public List getSubFactions(){ @@ -419,8 +420,8 @@ public List getRaces(World world) { List allRaceIds = new ArrayList<>(); for(NpcRank rank : this.npcDatasByRank.keySet()){ - List datas = NpcDataLookup.getAllNpcDatas(world, this.npcDatasByRank.get(rank)); - for(NpcData data : datas){ + List datas = NpcTypeLookup.getAllNpcTypes(world, this.npcDatasByRank.get(rank)); + for(NpcType data : datas){ if(data != null) allRaceIds.add(data.getRace()); } @@ -492,7 +493,7 @@ public Identifier getRandomNpcDataIdentifier() { public boolean isHostileToward(Identifier playerFaction) { for(InitialDiplomacy diplomacy : initialDiplomacies){ - if(diplomacy.isHostileToward(playerFaction)){ + if(playerFaction == null || diplomacy.isHostileToward(playerFaction)){ return true; } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/FactionLookup.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/FactionLookup.java index 17b2a9ea98..f2061624ee 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/FactionLookup.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/FactionLookup.java @@ -17,6 +17,8 @@ public static List getAllFactions(World world) { return world.getRegistryManager().getOrThrow(DynamicRegistriesME.FACTION).stream().toList(); } public static Faction getFactionById(World world, Identifier id) throws FactionIdentifierException { + if(id == null) + return null; Faction faction = world.getRegistryManager().getOrThrow(DynamicRegistriesME.FACTION).get(id); if(faction == null) throw new FactionIdentifierException(); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/data/BannerData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/data/BannerData.java index 2b5933b253..d613940f69 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/data/BannerData.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/factions/data/BannerData.java @@ -13,6 +13,7 @@ import net.minecraft.registry.RegistryEntryLookup; import net.minecraft.registry.RegistryKey; import net.minecraft.registry.RegistryKeys; +import net.minecraft.registry.RegistryWrapper; import net.minecraft.registry.entry.RegistryEntry; import net.minecraft.text.Text; import net.minecraft.util.DyeColor; @@ -144,14 +145,21 @@ public BannerPatternsComponent getBannerPatternComponents(RegistryEntryLookup bannerPattern = registry.getEntry(bannerPatternWithColor.id).get(); - BannerPatternsComponent.Layer layer = new BannerPatternsComponent.Layer(bannerPattern, bannerPatternWithColor.color); - builder.add(layer); + RegistryWrapper.Impl registry = wrapperLookup.getOrThrow(RegistryKeys.BANNER_PATTERN); + for (BannerPatternWithColor bannerPatternWithColor : bannerPatternWithColors) { + RegistryKey key = RegistryKey.of( + RegistryKeys.BANNER_PATTERN, + bannerPatternWithColor.id + ); + + RegistryEntry pattern = registry.getOrThrow(key); + + builder.add(new BannerPatternsComponent.Layer( + pattern, + bannerPatternWithColor.color + )); } return formatBanner(new ItemStack(Items.WHITE_BANNER), builder.build(), text); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcType.java similarity index 67% rename from middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcData.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcType.java index 3e472eedc4..1f1e99f286 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcData.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcType.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.resources.datas.npcs; +package net.sevenstars.middleearth.resources.datas.npc_types; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; @@ -14,13 +14,14 @@ import net.sevenstars.middleearth.resources.datas.combatarchetypes.CombatArchetypeData; import net.sevenstars.middleearth.resources.datas.combatarchetypes.MeleeCombatArchetypeData; import net.sevenstars.middleearth.resources.datas.combatarchetypes.RangedCombatArchetypeData; -import net.sevenstars.middleearth.resources.datas.combatarchetypes.data.CombatArchetype; import net.sevenstars.middleearth.resources.datas.combatarchetypes.runtime.CombatArchetypeRuntimeData; import net.sevenstars.middleearth.resources.datas.combatarchetypes.runtime.MeleeCombatArchetypeRuntimeData; import net.sevenstars.middleearth.resources.datas.combatarchetypes.runtime.RangedCombatArchetypeRuntimeData; import net.sevenstars.middleearth.resources.datas.combatarchetypes.utils.CombatArchetypeDataUtil; import net.sevenstars.middleearth.resources.datas.factions.Faction; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.LootData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.MountData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; import net.sevenstars.middleearth.resources.datas.texture_presets.TexturePresetDataPool; import net.sevenstars.middleearth.resources.datas.races.Race; import net.sevenstars.middleearth.resources.datas.races.RaceLookup; @@ -29,17 +30,20 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; - -public class NpcData { - public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( - Identifier.CODEC.fieldOf("id").forGetter(NpcData::getId), - Identifier.CODEC.fieldOf("race").forGetter(NpcData::getRace), - Identifier.CODEC.fieldOf("faction").forGetter(NpcData::getFactionIdentifier), - Identifier.CODEC.fieldOf("base_npc_texture").forGetter(NpcData::getNpcTextureDataValue), - NbtCompound.CODEC.fieldOf("gear").forGetter(NpcData::getGearDataValues), - NbtCompound.CODEC.fieldOf("npc_attributes").forGetter(NpcData::getNpcAttributePool), - NbtCompound.CODEC.fieldOf("combat_archetype").forGetter(NpcData::getCombatArchetypeData) - ).apply(instance, NpcData::new)); +import java.util.Optional; + +public class NpcType { + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Identifier.CODEC.fieldOf("id").forGetter(NpcType::getId), + Identifier.CODEC.fieldOf("race").forGetter(NpcType::getRace), + Identifier.CODEC.fieldOf("faction").forGetter(NpcType::getFactionIdentifier), + Identifier.CODEC.fieldOf("base_npc_texture").forGetter(NpcType::getNpcTextureDataValue), + NbtCompound.CODEC.fieldOf("gear").forGetter(NpcType::getGearDataValues), + NbtCompound.CODEC.fieldOf("npc_attributes").forGetter(NpcType::getNpcAttributePool), + NbtCompound.CODEC.fieldOf("combat_archetype").forGetter(NpcType::getCombatArchetypeData), + MountData.CODEC.optionalFieldOf("mount").forGetter(NpcType::getOptionalMountData), + LootData.CODEC.optionalFieldOf("loot").forGetter(NpcType::getOptionalLootData) + ).apply(instance, NpcType::new)); private final Identifier id; private final Identifier raceId; @@ -48,8 +52,10 @@ public class NpcData { private final CombatArchetypeData combatArchetypeData; private final WeightedPool gearDatas; private final HashMap npcAttributePools; + private final MountData mountData; + private final LootData lootData; - public NpcData(Identifier id, Identifier raceId, Identifier factionId, Identifier npcTextureKey, NbtCompound gearDatas, NbtCompound npcAttributes, NbtCompound combatArchetypeData) { + public NpcType(Identifier id, Identifier raceId, Identifier factionId, Identifier npcTextureKey, NbtCompound gearDatas, NbtCompound npcAttributes, NbtCompound combatArchetypeData, Optional mount, Optional lootData) { this.id = id; this.raceId = raceId; this.factionId = factionId; @@ -71,9 +77,14 @@ public NpcData(Identifier id, Identifier raceId, Identifier factionId, Identifie } this.combatArchetypeData = CombatArchetypeDataUtil.create(combatArchetypeData); + this.mountData = mount.orElse(null); + this.lootData = lootData.orElse(null); + } + public NpcType(Identifier id, RegistryKey race, RegistryKey faction, RegistryKey npcTextureKey, List weightedGearData, HashMap npcAttributePools, CombatArchetypeData combatArchetypeData, LootData lootData) { + this(id, race, faction, npcTextureKey, weightedGearData, npcAttributePools, combatArchetypeData, null, lootData); } - public NpcData(Identifier id, RegistryKey race, RegistryKey faction, RegistryKey npcTextureKey, List weightedGearData, HashMap npcAttributePools, CombatArchetypeData combatArchetypeData) { + public NpcType(Identifier id, RegistryKey race, RegistryKey faction, RegistryKey npcTextureKey, List weightedGearData, HashMap npcAttributePools, CombatArchetypeData combatArchetypeData, MountData mount, LootData lootData) { this.id = id; this.raceId = race.getValue(); this.factionId = faction.getValue(); @@ -81,6 +92,8 @@ public NpcData(Identifier id, RegistryKey race, RegistryKey facti this.gearDatas = new WeightedPool<>(weightedGearData); this.npcAttributePools = npcAttributePools; this.combatArchetypeData = combatArchetypeData; + this.mountData = mount; + this.lootData = lootData; } public Identifier getId() { @@ -98,6 +111,17 @@ private NbtCompound getCombatArchetypeData() { return combatArchetypeData.getNbt(); } + private Optional getOptionalMountData() { + return Optional.ofNullable(mountData); + } + private Optional getOptionalLootData() { + return Optional.ofNullable(lootData); + } + public LootData getLootData() { + return lootData; + } + + private NbtCompound getGearDataValues() { NbtCompound nbt = new NbtCompound(); NbtList gears = new NbtList(); @@ -141,11 +165,11 @@ public void applyAttributes(NpcEntity npcEntity) { Race race = RaceLookup.getRace(npcEntity.getWorld(), raceId); if(race != null) race.applyNpcAttributes(npcEntity); - //EntityCategories category = npcEntity.getNpcCategory(); - //if(npcAttributePools.containsKey(EntityCategories.SHARED)) - // npcAttributePools.get(EntityCategories.SHARED).apply(npcEntity); - //if(npcAttributePools.containsKey(category)) - // npcAttributePools.get(category).apply(npcEntity); + EntityCategories category = npcEntity.getNpcCategory(); + if(npcAttributePools.containsKey(EntityCategories.SHARED)) + npcAttributePools.get(EntityCategories.SHARED).apply(npcEntity); + if(npcAttributePools.containsKey(category)) + npcAttributePools.get(category).apply(npcEntity); npcEntity.heal(npcEntity.getMaxHealth() - npcEntity.getHealth()); } @@ -163,4 +187,17 @@ public CombatArchetypeRuntimeData getCombatArchetypeRuntime() { case BEAST_RIDER -> null; }; } + + public boolean hasCategory(World world, EntityCategories category) { + TexturePresetDataPool pool = getNpcTextureData(world); + return pool.hasCategory(category); + } + + public boolean hasMount() { + return this.mountData != null; + } + + public MountData getMountData() { + return this.mountData; + } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcTypeLookup.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcTypeLookup.java new file mode 100644 index 0000000000..6bae2aeceb --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcTypeLookup.java @@ -0,0 +1,33 @@ +package net.sevenstars.middleearth.resources.datas.npc_types; + +import net.minecraft.registry.Registry; +import net.minecraft.util.Identifier; +import net.minecraft.world.World; +import net.sevenstars.middleearth.registries.DynamicRegistriesME; + +import java.util.ArrayList; +import java.util.List; + +public class NpcTypeLookup { + public static List getAllNpcTypes(World world, List ids) { + Registry registry = world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC_TYPE); + List list = new ArrayList<>(); + for(Identifier id : ids){ + list.add(registry.get(id)); + } + return list; + } + + public static List getAllNpcTypesFromRace(World world, List ids, Identifier race){ + List unsortedList = getAllNpcTypes(world, ids); + List list = new ArrayList<>(); + for(NpcType npcType : unsortedList){ + if(npcType.getRace().equals(race)) + list.add(npcType); + } + return list; + } + public static NpcType getNpcType(World world, Identifier id) { + return world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC_TYPE).get(id); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcUtil.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcUtil.java similarity index 91% rename from middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcUtil.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcUtil.java index b331b8d229..817fcd638f 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcUtil.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/NpcUtil.java @@ -1,7 +1,7 @@ -package net.sevenstars.middleearth.resources.datas.npcs; +package net.sevenstars.middleearth.resources.datas.npc_types; import net.sevenstars.middleearth.item.items.weapons.ReachWeaponItem; -import net.sevenstars.middleearth.resources.datas.npcs.data.WeightedGearData; +import net.sevenstars.middleearth.resources.datas.npc_types.data.WeightedGearData; import net.minecraft.entity.EquipmentSlot; import net.minecraft.entity.LivingEntity; import net.minecraft.item.ItemStack; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/GearItemData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/GearItemData.java similarity index 99% rename from middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/GearItemData.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/GearItemData.java index ffcf3eeafa..340ef18de2 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/GearItemData.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/GearItemData.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.resources.datas.npcs.data; +package net.sevenstars.middleearth.resources.datas.npc_types.data; import net.minecraft.component.DataComponentTypes; import net.minecraft.component.type.DyedColorComponent; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/GearSlotPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/GearSlotPool.java similarity index 97% rename from middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/GearSlotPool.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/GearSlotPool.java index 63977a2e4b..450b28b4b8 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/GearSlotPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/GearSlotPool.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.resources.datas.npcs.data; +package net.sevenstars.middleearth.resources.datas.npc_types.data; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NbtCompound; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/LootData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/LootData.java new file mode 100644 index 0000000000..e9ae4cbeee --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/LootData.java @@ -0,0 +1,50 @@ +package net.sevenstars.middleearth.resources.datas.npc_types.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.server.world.ServerWorld; + +import java.util.Optional; + +public class LootData { + public static class Fields { + public static final String BASE_EXPERIENCE = "base"; + public static final String RANDOM_ADDITION = "random_addition"; + } + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Codec.INT.fieldOf(Fields.BASE_EXPERIENCE).forGetter(LootData::getBaseExperience), + Codec.INT.optionalFieldOf(Fields.RANDOM_ADDITION).forGetter(LootData::getRandomAddition) + ).apply(instance, LootData::new)); + + private Integer baseExperience; + private Integer randomAddition; + + private LootData(int base, Optional randomAddition) { + this.baseExperience = base; + this.randomAddition = randomAddition.orElse(null); + } + public LootData(int base, int randomAddition) { + this.baseExperience = base; + this.randomAddition = randomAddition; + } + public LootData(int base) { + this.baseExperience = base; + this.randomAddition = null; + } + + private Integer getBaseExperience() { + return baseExperience; + } + private Optional getRandomAddition() { + return Optional.ofNullable(randomAddition); + } + + public int getExperience(ServerWorld world) { + int random = getRandomAddition().orElse(0); + if(random == 0) { + return baseExperience; + } + return baseExperience + world.getRandom().nextInt(random); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountData.java new file mode 100644 index 0000000000..b423ba95e7 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountData.java @@ -0,0 +1,156 @@ +package net.sevenstars.middleearth.resources.datas.npc_types.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.component.DataComponentTypes; +import net.minecraft.component.type.DyedColorComponent; +import net.minecraft.entity.*; +import net.minecraft.entity.mob.MobEntity; +import net.minecraft.entity.passive.AbstractHorseEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.registry.Registries; +import net.minecraft.registry.RegistryKey; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.Identifier; +import net.sevenstars.middleearth.entity.EntitiesME; +import net.sevenstars.middleearth.entity.beasts.AbstractBeastEntity; +import net.sevenstars.middleearth.entity.npcs.NpcEntity; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Optional; + +public class MountData { + public static class Fields { + public static final String ENTITY_TYPE = "entity_type"; + public static final String NPC_TYPE = "npc_type"; + public static final String ARMOR = "armor_id"; + public static final String PASSENGER_SLOTS = "passenger_slots"; + } + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Identifier.CODEC.fieldOf(Fields.ENTITY_TYPE).forGetter(MountData::getEntityType), + Identifier.CODEC.optionalFieldOf(Fields.NPC_TYPE).forGetter(MountData::getOptionalNpcType), + ItemStack.CODEC.optionalFieldOf(Fields.ARMOR).forGetter(MountData::getOptionalArmor), + MountPassengerSlotData.CODEC.listOf().fieldOf(Fields.PASSENGER_SLOTS).forGetter(MountData::getPassengerSlots) + ).apply(instance, MountData::new)); + + + private Identifier entityType; + private Identifier npcType; + private ItemStack armor; + private List passengerSlots; + + private MountData( + Identifier entityType, + Optional npcType, + Optional armor, + List passengerSlots + ) { + this.entityType = entityType; + this.npcType = npcType.orElse(null); + this.armor = armor.orElse(null); + this.passengerSlots = passengerSlots; + } + + public MountData(EntityType entity) { + this.entityType = Registries.ENTITY_TYPE.getId(entity); + this.armor = null; + } + + public MountData(RegistryKey npcType){ + this.entityType = Registries.ENTITY_TYPE.getId(EntitiesME.NPC); + this.npcType = npcType.getValue(); + } + + public MountData withArmor(ItemStack armorItem){ + this.armor = armorItem; + return this; + } + + public MountData withArmor(Item armorItem){ + this.armor = armorItem.getDefaultStack(); + return this; + } + + public MountData withColor(DyedColorComponent color){ + if(this.armor == null) + return this; + this.armor.set(DataComponentTypes.DYED_COLOR, color); + return this; + } + + private Identifier getEntityType() { + return entityType; + } + private Optional getOptionalNpcType() { + return Optional.ofNullable(npcType); + } + private Optional getOptionalArmor() { + return Optional.ofNullable(armor); + } + + + private List getPassengerSlots() { + if(passengerSlots == null) + return new ArrayList<>(); + return passengerSlots; + } + + public MountData withPassengerSlots(MountPassengerSlotData... passengerSlots) { + this.passengerSlots = Arrays.asList(passengerSlots); + return this; + } + + public void createEntity(ServerWorld world, LivingEntity owner) { + if(this.entityType == null || owner.hasVehicle() || owner.hasPassengers()) + return; + EntityType type = Registries.ENTITY_TYPE.get(this.entityType); + var notLiving = type.create(world, SpawnReason.JOCKEY); + if(notLiving == null) + return; + if(notLiving instanceof LivingEntity entity){ + entity.setPosition(owner.getPos()); + entity.equipStack(EquipmentSlot.SADDLE, Items.SADDLE.asItem().getDefaultStack()); + if(armor != null) + entity.equipStack(EquipmentSlot.BODY, this.armor); + + if (entity instanceof MobEntity mob) { + mob.initialize( + world, + world.getLocalDifficulty(owner.getBlockPos()), + SpawnReason.EVENT, + null + ); + } + if(entity instanceof AbstractHorseEntity horse){ + horse.setTame(true); + horse.setOwner(owner); + if(horse instanceof AbstractBeastEntity beast){ + beast.tameBeast(owner); + } + + } + + owner.startRiding(entity, true); + world.spawnEntity(entity); + + if(entity instanceof NpcEntity npc && npcType != null){ + npc.prepareNpcIdentifier(npcType); + npc.prepare(); + } + + // Set other passengers + passengerSlots.forEach(slot -> { + LivingEntity passengerEntity = slot.createRandom(world, owner); + if(passengerEntity != null) + passengerEntity.startRiding(entity, true); + }); + + } + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountPassengerData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountPassengerData.java new file mode 100644 index 0000000000..8ac9d2bad5 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountPassengerData.java @@ -0,0 +1,130 @@ +package net.sevenstars.middleearth.resources.datas.npc_types.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.SpawnReason; +import net.minecraft.entity.mob.MobEntity; +import net.minecraft.registry.Registries; +import net.minecraft.registry.RegistryKey; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.Identifier; +import net.sevenstars.middleearth.entity.EntitiesME; +import net.sevenstars.middleearth.entity.npcs.NpcEntity; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; + +import java.util.List; +import java.util.Optional; +import java.util.Random; + +public class MountPassengerData { + public static class Fields { + public static final String ENTITY_TYPE = "entity_type"; + public static final String NPC_TYPE = "npc_type"; + public static final String WEIGHT = "weight"; + public static final String DISCARD_CHANCE = "discard_chance"; + } + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + Identifier.CODEC.fieldOf(MountPassengerData.Fields.ENTITY_TYPE).forGetter(MountPassengerData::getEntityType), + Identifier.CODEC.optionalFieldOf(MountPassengerData.Fields.NPC_TYPE).forGetter(MountPassengerData::getOptionalNpcType), + Codec.INT.optionalFieldOf(MountPassengerData.Fields.WEIGHT).forGetter(MountPassengerData::getOptionalWeight), + Codec.DOUBLE.optionalFieldOf(MountPassengerData.Fields.DISCARD_CHANCE).forGetter(MountPassengerData::getDiscardChances) + ).apply(instance, MountPassengerData::new)); + + private final Identifier entityType; + private Identifier npcType = null; + private Integer weight = null; + private Double discardChance = null; + + private List passengerSlots; + + private MountPassengerData( + Identifier entityType, + Optional npcType, + Optional weight, + Optional discardChance) { + this.entityType = entityType; + this.npcType = npcType.orElse(null); + this.weight = weight.orElse(null); + this.discardChance = discardChance.orElse(null); + } + + public MountPassengerData(EntityType entityType){ + this.entityType = Registries.ENTITY_TYPE.getId(entityType); + } + + public MountPassengerData(RegistryKey npcType){ + this.entityType = Registries.ENTITY_TYPE.getId(EntitiesME.NPC); + this.npcType = npcType.getValue(); + } + + public Identifier getEntityType() { + return entityType; + } + + public Identifier getNpcType(Identifier defaultNpcType) { + return npcType == null ? defaultNpcType : npcType; + } + + private Optional getOptionalNpcType() { + return npcType == null ? Optional.empty() : Optional.of(npcType); + + } + + public Integer getWeight(int defaultValue) { + return weight == null ? defaultValue : weight; + } + + private Optional getOptionalWeight() { + return weight == null || weight == 1 ? Optional.empty() : Optional.of(weight); + } + + public MountPassengerData withWeight(int newWeight) { + this.weight = newWeight; + return this; + } + + public MountPassengerData withDiscardChance(double chance){ + this.discardChance = chance; + return this; + } + + private Optional getDiscardChances() { + return Optional.ofNullable(discardChance); + } + + public boolean isDiscarded(Random random) { + if(discardChance == null) + return false; + double obtained = random.nextDouble(); + return obtained <= discardChance; + } + + public LivingEntity createEntity(ServerWorld serverWorld, LivingEntity owner) { + EntityType type = Registries.ENTITY_TYPE.get(this.entityType); + var notLiving = type.create(serverWorld, SpawnReason.NATURAL); + if(notLiving == null) + return null; + if(notLiving instanceof LivingEntity entity){ + serverWorld.spawnEntity(entity); + entity.setPosition(owner.getPos()); + if(entity instanceof NpcEntity npc){ + npc.prepareNpcIdentifier(npcType); + npc.prepare(); + } + if (entity instanceof MobEntity mob) { + mob.initialize( + serverWorld, + serverWorld.getLocalDifficulty(owner.getBlockPos()), + SpawnReason.EVENT, + null + ); + } + + return entity; + } + return null; + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountPassengerSlotData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountPassengerSlotData.java new file mode 100644 index 0000000000..0fc10304b9 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/MountPassengerSlotData.java @@ -0,0 +1,54 @@ +package net.sevenstars.middleearth.resources.datas.npc_types.data; + +import com.mojang.serialization.Codec; +import com.mojang.serialization.codecs.RecordCodecBuilder; +import net.minecraft.entity.LivingEntity; +import net.minecraft.server.world.ServerWorld; + +import java.util.ArrayList; +import java.util.List; +import java.util.Random; + +public class MountPassengerSlotData { + public static class Fields { + public static final String PASSENGERS = "passengers"; + } + + public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( + MountPassengerData.CODEC.listOf().fieldOf(MountPassengerSlotData.Fields.PASSENGERS).forGetter(MountPassengerSlotData::getPassengers) + ).apply(instance, MountPassengerSlotData::new)); + + private final List passengers; + + private MountPassengerSlotData(List mountPassengerData) { + this.passengers = mountPassengerData; + } + + public MountPassengerSlotData( + MountPassengerData... passengerDatas + ) { + this.passengers = List.of(passengerDatas); + } + + private List getPassengers() { + return passengers; + } + + public LivingEntity createRandom(ServerWorld serverWorld, LivingEntity owner) { + List weightedPassengers = new ArrayList<>(); + for (MountPassengerData weightedPassenger : passengers) { + for(int i = 0; i < weightedPassenger.getWeight(1); i++){ + weightedPassengers.add(weightedPassenger); + } + } + + if(weightedPassengers.isEmpty()) + return null; + Random random = new Random(); + + MountPassengerData data = weightedPassengers.get(random.nextInt(weightedPassengers.size())); + if(data.isDiscarded(random)) + return null; + return data.createEntity(serverWorld, owner); + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/WeightedGearData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/WeightedGearData.java similarity index 97% rename from middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/WeightedGearData.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/WeightedGearData.java index f7d6c00cb6..60c709a647 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/WeightedGearData.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/WeightedGearData.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.resources.datas.npcs.data; +package net.sevenstars.middleearth.resources.datas.npc_types.data; import net.minecraft.entity.EquipmentSlot; import net.minecraft.item.ItemStack; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/WeightedItemData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/WeightedItemData.java similarity index 97% rename from middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/WeightedItemData.java rename to middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/WeightedItemData.java index c0821de1c3..64eeec148e 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/data/WeightedItemData.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npc_types/data/WeightedItemData.java @@ -1,4 +1,4 @@ -package net.sevenstars.middleearth.resources.datas.npcs.data; +package net.sevenstars.middleearth.resources.datas.npc_types.data; import net.minecraft.item.Item; import net.minecraft.item.Items; @@ -9,7 +9,6 @@ import net.sevenstars.middleearth.item.utils.armor.backAttachments.BackAttachmentsME; import net.sevenstars.middleearth.item.utils.armor.helmetAttachments.HelmetAttachmentsME; -import java.awt.*; import java.util.List; public class WeightedItemData extends WeightedItem { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcDataLookup.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcDataLookup.java deleted file mode 100644 index 3c800c2d71..0000000000 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/npcs/NpcDataLookup.java +++ /dev/null @@ -1,33 +0,0 @@ -package net.sevenstars.middleearth.resources.datas.npcs; - -import net.minecraft.registry.Registry; -import net.minecraft.util.Identifier; -import net.minecraft.world.World; -import net.sevenstars.middleearth.registries.DynamicRegistriesME; - -import java.util.ArrayList; -import java.util.List; - -public class NpcDataLookup { - public static List getAllNpcDatas(World world, List ids) { - Registry registry = world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC); - List list = new ArrayList<>(); - for(Identifier id : ids){ - list.add(registry.get(id)); - } - return list; - } - - public static List getAllNpcDatasFromRace(World world, List ids, Identifier race){ - List unsortedList = getAllNpcDatas(world, ids); - List list = new ArrayList<>(); - for(NpcData npcData : unsortedList){ - if(npcData.getRace().equals(race)) - list.add(npcData); - } - return list; - } - public static NpcData getNpcData(World world, Identifier id) { - return world.getRegistryManager().getOrThrow(DynamicRegistriesME.NPC).get(id); - } -} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/races/Race.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/races/Race.java index f11ff13cd2..9081e688fe 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/races/Race.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/races/Race.java @@ -2,23 +2,15 @@ import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.minecraft.client.font.TextRenderer; -import net.minecraft.client.gui.DrawContext; -import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.nbt.NbtCompound; -import net.minecraft.registry.RegistryKeys; -import net.minecraft.registry.tag.TagKey; import net.minecraft.text.MutableText; import net.minecraft.text.Text; -import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.entity.npcs.NpcEntity; -import net.sevenstars.middleearth.resources.datas.attributes.AttributeModifierElement; import net.sevenstars.middleearth.resources.datas.common.RaceType; import net.sevenstars.middleearth.resources.datas.attributes.AttributePool; -import net.sevenstars.middleearth.resources.datas.attributes.AttributePoolElement; import net.sevenstars.middleearth.resources.datas.common.EntityCategories; import java.util.*; @@ -150,6 +142,8 @@ public void applyNpcAttributes(NpcEntity npcEntity) { AttributePool.reverse(npcEntity); baseAttributePool.apply(npcEntity); categoryBasedAttributePool.get(EntityCategories.SHARED).apply(npcEntity); - categoryBasedAttributePool.get(npcEntity.getNpcCategory()).apply(npcEntity); + EntityCategories category = npcEntity.getNpcCategory(); + if(category != null) + categoryBasedAttributePool.get(category).apply(npcEntity); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/structure_manager_datas/StructureSpawnNestPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/structure_manager_datas/StructureSpawnNestPool.java index d3aede8f99..1bf72c0ddc 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/structure_manager_datas/StructureSpawnNestPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/structure_manager_datas/StructureSpawnNestPool.java @@ -7,6 +7,7 @@ import net.minecraft.util.Identifier; import net.sevenstars.middleearth.registries.DynamicRegistriesME; import net.sevenstars.middleearth.resources.datas.factions.Faction; +import net.sevenstars.middleearth.resources.datas.npc_types.NpcType; import java.util.Optional; import java.util.Random; @@ -56,9 +57,9 @@ public StructureSpawnNestPool(EntityType entityType, int weight){ this.maxAmount = Optional.empty(); } - public StructureSpawnNestPool SetNpcData(RegistryKey factionKey, Identifier npcIdentifier){ + public StructureSpawnNestPool SetNpcData(RegistryKey factionKey, RegistryKey npc){ this.factionKey = Optional.of(factionKey); - this.npcIdentifier = Optional.of(npcIdentifier); + this.npcIdentifier = Optional.of(npc.getValue()); return this; } public StructureSpawnNestPool SetFixAmount(int amount){ diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/texture_presets/TexturePresetDataPool.java b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/texture_presets/TexturePresetDataPool.java index a4e71a0669..9eb8be3d21 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/texture_presets/TexturePresetDataPool.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/resources/datas/texture_presets/TexturePresetDataPool.java @@ -107,6 +107,10 @@ else if(containsFemale) return EntityCategories.MALE; } + public boolean hasCategory(EntityCategories category) { + return this.presetsByCategory.containsKey(category); + } + public record Identity(EntityCategories category, WeightedTexturePresetHolder preset){ public static Identity create(TexturePresetDataPool data, EntityCategories entityCategories){ if(!data.presetsByCategory.containsKey(entityCategories)) diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/utils/ItemTagsME.java b/middle-earth/src/main/java/net/sevenstars/middleearth/utils/ItemTagsME.java index 73c0b15046..8149e0a50c 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/utils/ItemTagsME.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/utils/ItemTagsME.java @@ -42,6 +42,8 @@ public class ItemTagsME { public static TagKey ELK_FOOD = TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("elk_food")); public static TagKey MUSHROOMS = TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("mushrooms")); + public static TagKey BONES = TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("bones")); + public static TagKey DIRT = TagKey.of(RegistryKeys.ITEM, Identifier.of("dirt")); public static TagKey HORSE_ARMORS = TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("horse_armor")); public static TagKey WARG_ARMORS = TagKey.of(RegistryKeys.ITEM, MiddleEarth.of("warg_armor")); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/utils/SpawnUtil.java b/middle-earth/src/main/java/net/sevenstars/middleearth/utils/SpawnUtil.java new file mode 100644 index 0000000000..1b78302963 --- /dev/null +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/utils/SpawnUtil.java @@ -0,0 +1,29 @@ +package net.sevenstars.middleearth.utils; + +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnReason; +import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.registry.tag.BlockTags; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.random.Random; +import net.minecraft.world.ServerWorldAccess; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.sevenstars.middleearth.resources.datas.biome_events.BiomeEventDataLookup; + +public class SpawnUtil { + public static boolean canCreatureSpawn(EntityType type, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason, BlockPos blockPos, Random random) { + if (spawnReason == SpawnReason.NATURAL && serverWorldAccess instanceof World world) { + RegistryEntry biome = world.getBiome(blockPos); + return BiomeEventDataLookup.canEntitySpawn(world, biome, blockPos, type, random); + } + return true; + } + + public static boolean canSpawn(BlockPos blockPos, ServerWorldAccess serverWorldAccess, SpawnReason spawnReason) { + BlockPos below = blockPos.down(); + boolean isOnSolidGround = serverWorldAccess.getBlockState(below).isSolidBlock(serverWorldAccess, below); + boolean isNotOnTopOfLogs = !serverWorldAccess.getBlockState(below).isIn(BlockTags.LOGS); + return isOnSolidGround && isNotOnTopOfLogs; + } +} diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/MEBiomeDataConfigs.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/MEBiomeDataConfigs.java index 22b8d71efe..ce7613e230 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/MEBiomeDataConfigs.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/MEBiomeDataConfigs.java @@ -355,9 +355,24 @@ public class MEBiomeDataConfigs { .addLayerData(0.03f, StoneBlockSets.GALONN_SET.baseBlocks.base()) .addLayerData(0.53f, StoneBlockSets.LIMESTONE_SET.baseBlocks.base()); + public static BlocksLayeringData limeStoneTravertineLayers = new BlocksLayeringData() + .addLayerData(0.35f, StoneBlockSets.SLATE_SET.baseBlocks.base()) + .addLayerData(0.1f, Blocks.STONE) + .addLayerData(0.2f, StoneBlockSets.GALONN_SET.baseBlocks.base()) + .addLayerData(0.25f, StoneBlockSets.LIMESTONE_SET.baseBlocks.base()) + .addLayerData(0.1f, StoneBlockSets.TRAVERTINE_SET.baseBlocks.base()); + public static BlocksLayeringData sandstoneLayers = new BlocksLayeringData() .addLayerData(0.1f, Blocks.SANDSTONE) - .addLayerData(0.9f, Blocks.STONE); + .addLayerData(0.85f, Blocks.STONE) + .addLayerData(0.05f, Blocks.SANDSTONE); + + public static BlocksLayeringData sandstoneTravertineLayers = new BlocksLayeringData() + .addLayerData(0.1f, StoneBlockSets.SLATE_SET.baseBlocks.base()) + .addLayerData(0.55f, Blocks.STONE) + .addLayerData(0.1f, StoneBlockSets.LIMESTONE_SET.baseBlocks.base()) + .addLayerData(0.18f, StoneBlockSets.TRAVERTINE_SET.baseBlocks.base()) + .addLayerData(0.07f, Blocks.SANDSTONE); public static BlocksLayeringData gondorLayers = new BlocksLayeringData() .addLayerData(0.55f, Blocks.CALCITE) diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/caves/ModCaveBiomeFeatures.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/caves/ModCaveBiomeFeatures.java index 0c14458d92..2ca56e9b6d 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/caves/ModCaveBiomeFeatures.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/caves/ModCaveBiomeFeatures.java @@ -40,30 +40,23 @@ public static void addSnails(SpawnSettings.Builder spawnSettings) { spawnSettings.spawn(SpawnGroup.CREATURE, 5, new SpawnSettings.SpawnEntry(EntitiesWT.SNAIL, 1, 3)); } - public static void addParseWildGoblins(SpawnSettings.Builder spawnSettings) { - spawnSettings.spawn(SpawnGroup.MONSTER, 2, new SpawnSettings.SpawnEntry(EntitiesME.NPC, 1, 3)) - .spawnCost(EntitiesME.NPC, 0.7, 0.3); + // Monsters + public static void addSparseNpc(SpawnSettings.Builder spawnSettings) { + spawnSettings.spawn(SpawnGroup.MONSTER, 4, new SpawnSettings.SpawnEntry(EntitiesME.NPC, 1, 1)); + //.spawnCost(EntitiesME.NPC, 0.7, 0.5); } - - public static void addGroupWildGoblins(SpawnSettings.Builder spawnSettings) { - spawnSettings.spawn(SpawnGroup.MONSTER, 2, new SpawnSettings.SpawnEntry(EntitiesME.NPC, 3, 5)) - .spawnCost(EntitiesME.NPC, 1.7, 0.1); + public static void addCaveTroll(SpawnSettings.Builder spawnSettings) { + spawnSettings.spawn(SpawnGroup.MONSTER, 5, new SpawnSettings.SpawnEntry(EntitiesME.CAVE_TROLL, 1, 2)); + //.spawnCost(EntitiesME.CAVE_TROLL, 20, 0.1); } - public static void addSpiders(SpawnSettings.Builder spawnSettings) { - spawnSettings.spawn(SpawnGroup.MONSTER, 2, new SpawnSettings.SpawnEntry(EntitiesME.SHELOBITE_SCUTTLER, 1, 2)) - .spawnCost(EntitiesME.SHELOBITE_SCUTTLER, 1.4, 0.1); - } - - public static void addCaveTroll(SpawnSettings.Builder spawnSettings) { - spawnSettings.spawn(SpawnGroup.MONSTER, 1, new SpawnSettings.SpawnEntry(EntitiesME.CAVE_TROLL, 1, 1)) - .spawnCost(EntitiesME.CAVE_TROLL, 10, 0.1); + spawnSettings.spawn(SpawnGroup.MONSTER, 3, new SpawnSettings.SpawnEntry(EntitiesME.SHELOBITE_SCUTTLER, 1, 5)); + spawnSettings.spawn(SpawnGroup.MONSTER, 5, new SpawnSettings.SpawnEntry(EntitiesME.SPAWN_OF_SHELOB, 1, 1)); } public static void addSpiderLarvas(SpawnSettings.Builder spawnSettings) { spawnSettings.spawn(SpawnGroup.MONSTER, 2, new SpawnSettings.SpawnEntry(EntitiesME.SHELOBITE_LARVA, 2, 4)) .spawnCost(EntitiesME.SHELOBITE_LARVA, 0.7, 0.3); } - public static void addSnowTrolls(SpawnSettings.Builder spawnSettings) { spawnSettings.spawn(SpawnGroup.MONSTER, 4, new SpawnSettings.SpawnEntry(EntitiesME.SNOW_TROLL, 1, 2)); } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/caves/ModCaveBiomes.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/caves/ModCaveBiomes.java index de9cd791b9..0ae2d389f4 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/caves/ModCaveBiomes.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/caves/ModCaveBiomes.java @@ -1,5 +1,7 @@ package net.sevenstars.middleearth.world.biomes.caves; +import net.minecraft.entity.EntityType; +import net.minecraft.entity.SpawnGroup; import net.sevenstars.middleearth.world.biomes.BiomeColorsDTO; import net.sevenstars.middleearth.world.biomes.MEBiomeKeys; import net.sevenstars.middleearth.world.biomes.surface.BiomeData; @@ -140,7 +142,7 @@ public static Biome createBasicCave(Registerable context, BiomeColorsDTO addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createMountainCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -153,7 +155,7 @@ public static Biome createMountainCave(Registerable context, BiomeColorsD addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, true); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createLushCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -179,7 +181,7 @@ public static Biome createLushCave(Registerable context, BiomeColorsDTO b generationSettings.feature(GenerationStep.Feature.VEGETAL_DECORATION, CavesPlacedFeatures.SPORE_BLOSSOM); generationSettings.feature(GenerationStep.Feature.VEGETAL_DECORATION, CavesPlacedFeatures.CLASSIC_VINES_CAVE); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createDripstoneCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -192,7 +194,7 @@ public static Biome createDripstoneCave(Registerable context, BiomeColors undergroundOres.add(MiscPlacedFeatures.DISK_GRAVEL); addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createDolomiteCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -207,7 +209,7 @@ public static Biome createDolomiteCave(Registerable context, BiomeColorsD undergroundOres.add(MiscPlacedFeatures.DISK_GRAVEL); addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createGalonnCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -222,7 +224,7 @@ public static Biome createGalonnCave(Registerable context, BiomeColorsDTO undergroundOres.add(MiscPlacedFeatures.DISK_GRAVEL); addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createGildedCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -236,7 +238,7 @@ public static Biome createGildedCave(Registerable context, BiomeColorsDTO addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createIzherAbanCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -252,7 +254,7 @@ public static Biome createIzherAbanCave(Registerable context, BiomeColors undergroundOres.add(MiscPlacedFeatures.DISK_GRAVEL); addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createLimestoneCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -267,7 +269,7 @@ public static Biome createLimestoneCave(Registerable context, BiomeColors undergroundOres.add(MiscPlacedFeatures.DISK_GRAVEL); addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createMudCaves(Registerable context, BiomeColorsDTO biomeColors) { @@ -282,7 +284,7 @@ public static Biome createMudCaves(Registerable context, BiomeColorsDTO b undergroundOres.add(CavesPlacedFeatures.POOL_MUD); undergroundOres.add(MiscPlacedFeatures.DISK_GRAVEL); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createFungusCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -319,7 +321,7 @@ public static Biome createFungusCave(Registerable context, BiomeColorsDTO //generationSettings.feature(GenerationStep.Feature.VEGETAL_DECORATION, CavesPlacedFeatures.TREE_YELLOW_AMANITA); generationSettings.feature(GenerationStep.Feature.VEGETAL_DECORATION, CavesPlacedFeatures.GLOWWORM_WEBBING); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, true); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createMithrilCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -329,7 +331,7 @@ public static Biome createMithrilCave(Registerable context, BiomeColorsDT addBasicFeatures(generationSettings, true); undergroundOres.add(CavesPlacedFeatures.ORE_MITHRIL); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, true); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createBasaltCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -343,7 +345,7 @@ public static Biome createBasaltCave(Registerable context, BiomeColorsDTO undergroundOres.add(CavesPlacedFeatures.ORE_ASHEN_DIRT); undergroundOres.add(MiscPlacedFeatures.DISK_GRAVEL); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, true); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createMagmaCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -355,7 +357,7 @@ public static Biome createMagmaCave(Registerable context, BiomeColorsDTO undergroundOres.add(CavesPlacedFeatures.ORE_MAGMA_ABUNDANT); undergroundOres.add(CavesPlacedFeatures.ORE_ASHEN_DIRT); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true, true, true); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, true); } public static Biome createDryCave(Registerable context, BiomeColorsDTO biomeColors) { @@ -370,7 +372,7 @@ public static Biome createDryCave(Registerable context, BiomeColorsDTO bi undergroundOres.add(CavesPlacedFeatures.PILLAR_SMOOTH_SANDSTONE); addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, false, true, false); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, false); } public static Biome createIceCaves(Registerable context, BiomeColorsDTO biomeColors) { @@ -387,7 +389,7 @@ public static Biome createIceCaves(Registerable context, BiomeColorsDTO b undergroundOres.add(CavesPlacedFeatures.STICKY_SNOW); addBasicFeatures(generationSettings, true); - return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, false, true, true); + return createBiome(biomeColors, spawnSettings, generationSettings, 0.5f, false); } private static void addBasicFeatures(GenerationSettings.LookupBackedBuilder generationSettings, boolean vanillaRocks) { @@ -442,17 +444,12 @@ private static void addBasicFeatures(GenerationSettings.LookupBackedBuilder gene DefaultBiomeFeatures.addFrozenTopLayer(generationSettings); } - public static Biome createBiome(BiomeColorsDTO biomeColors, SpawnSettings.Builder spawnSettings, GenerationSettings.LookupBackedBuilder generationSettings, float temperature, boolean precipitation, boolean haveMonsters, boolean haveDeepMonsters) { + public static Biome createBiome(BiomeColorsDTO biomeColors, SpawnSettings.Builder spawnSettings, GenerationSettings.LookupBackedBuilder generationSettings, float temperature, boolean precipitation) { ModCaveBiomeFeatures.addBats(spawnSettings); - if(haveMonsters) { - if(haveDeepMonsters){ - ModCaveBiomeFeatures.addGroupWildGoblins(spawnSettings); - ModCaveBiomeFeatures.addCaveTroll(spawnSettings); - ModCaveBiomeFeatures.addSpiders(spawnSettings); - } else { - ModCaveBiomeFeatures.addParseWildGoblins(spawnSettings); - } - } + + ModCaveBiomeFeatures.addSparseNpc(spawnSettings); + ModCaveBiomeFeatures.addCaveTroll(spawnSettings); + ModCaveBiomeFeatures.addSpiders(spawnSettings); undergroundOres = undergroundOres.stream().sorted(Comparator.comparing(a -> a.getValue().toString())).toList(); for (RegistryKey feature: undergroundOres) { diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/surface/MapBiomeData.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/surface/MapBiomeData.java index 85156fb453..913b5dee2a 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/surface/MapBiomeData.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/surface/MapBiomeData.java @@ -107,7 +107,7 @@ public static void loadBiomes() { addBiome(new BiomeData(MEBiomeKeys.CELEBDIL_PEAKS, MEBiomeDataConfigs.celebdilPeaks, MEBiomeDataConfigs.mistyMountainsLayers, new BiomeColorsDTO(hillySky, defaultFog, defaultWater, defaultWaterFog, 7777673, 7316862), CaveType.MISTIES)); // CORSAIR COASTS - addBiome(new BiomeData(MEBiomeKeys.CORSAIR_COASTS, MEBiomeDataConfigs.corsairCoasts, MEBiomeDataConfigs.sandstoneLayers, + addBiome(new BiomeData(MEBiomeKeys.CORSAIR_COASTS, MEBiomeDataConfigs.corsairCoasts, MEBiomeDataConfigs.sandstoneTravertineLayers, new BiomeColorsDTO(nearHaradSky, defaultFog, 5212644, 333363, 12107900, 10860366), CaveType.HARAD)); // DAGORLAD addBiome(new BiomeData(MEBiomeKeys.DAGORLAD, MEBiomeDataConfigs.mordorGrass, MEBiomeDataConfigs.stoneLayers, @@ -236,13 +236,13 @@ public static void loadBiomes() { addBiome(new BiomeData(MEBiomeKeys.GUNDABAD_WOODS, MEBiomeDataConfigs.coarseLoam, MEBiomeDataConfigs.stoneLayers, new BiomeColorsDTO(11315633, 10855857, 7768221, 5597568, 8036220, 7511410))); // HARAD - addBiome(new BiomeData(MEBiomeKeys.HARAD, MEBiomeDataConfigs.nearHarad, MEBiomeDataConfigs.sandstoneLayers, + addBiome(new BiomeData(MEBiomeKeys.HARAD, MEBiomeDataConfigs.nearHarad, MEBiomeDataConfigs.sandstoneTravertineLayers, new BiomeColorsDTO(nearHaradSky, nearHaradSkyFog, 5407446, 1120828, 12301405, 13356379), CaveType.HARAD)); addBiome(new BiomeData(MEBiomeKeys.HARAD_DESERT, MEBiomeDataConfigs.harad, MEBiomeDataConfigs.sandstoneLayers, new BiomeColorsDTO(nearHaradSky, nearHaradSkyFog, 5407446, 1120828, 13419633, 9615182), CaveType.HARAD)); - addBiome(new BiomeData(MEBiomeKeys.HARAD_WOODS, MEBiomeDataConfigs.nearHarad, MEBiomeDataConfigs.sandstoneLayers, + addBiome(new BiomeData(MEBiomeKeys.HARAD_WOODS, MEBiomeDataConfigs.nearHarad, MEBiomeDataConfigs.sandstoneTravertineLayers, new BiomeColorsDTO(nearHaradSky, nearHaradSkyFog, 5407446, 1120828, 11515226, 12240727), CaveType.HARAD)); - addBiome(new BiomeData(MEBiomeKeys.HARONDOR, MEBiomeDataConfigs.nearHarad, MEBiomeDataConfigs.sandstoneLayers, + addBiome(new BiomeData(MEBiomeKeys.HARONDOR, MEBiomeDataConfigs.nearHarad, MEBiomeDataConfigs.sandstoneTravertineLayers, new BiomeColorsDTO(nearHaradSky, nearHaradSkyFog, 5406149, 1120828, 12305028, 10860366), CaveType.HARAD)); // HIGH MOOR addBiome(new BiomeData(MEBiomeKeys.HIGH_MOOR, MEBiomeDataConfigs.chalkPlains, MEBiomeDataConfigs.chalkLayers, @@ -575,9 +575,9 @@ public static void loadBiomes() { addBiome(new BiomeData(MEBiomeKeys.UDUN, MEBiomeDataConfigs.mordor, MEBiomeDataConfigs.ashenStoneLayers, new BiomeColorsDTO(4273461, 2826529, 6450777, 1513734, 3549478, 2695966), CaveType.ASHEN)); // UMBAR - addBiome(new BiomeData(MEBiomeKeys.UMBAR, MEBiomeDataConfigs.grassPlains, MEBiomeDataConfigs.stoneLayers, + addBiome(new BiomeData(MEBiomeKeys.UMBAR, MEBiomeDataConfigs.grassPlains, MEBiomeDataConfigs.sandstoneTravertineLayers, new BiomeColorsDTO(7254527, 12638463, 5212644, 333363, 11059059, 9284946), CaveType.HARAD)); - addBiome(new BiomeData(MEBiomeKeys.UMBAR_WOODS, MEBiomeDataConfigs.grassPlains, MEBiomeDataConfigs.stoneLayers, + addBiome(new BiomeData(MEBiomeKeys.UMBAR_WOODS, MEBiomeDataConfigs.grassPlains, MEBiomeDataConfigs.sandstoneTravertineLayers, new BiomeColorsDTO(7317996, 12308721, 5212644, 333363, 9876841, 8955470), CaveType.HARAD)); // WEBBED WOODS addBiome(new BiomeData(MEBiomeKeys.WEBBED_WOODS, MEBiomeDataConfigs.grassPlains, MEBiomeDataConfigs.stoneLayers, @@ -593,13 +593,13 @@ public static void loadBiomes() { addBiome(new BiomeData(MEBiomeKeys.WHITE_MOUNTAINS_PEAKS, MEBiomeDataConfigs.whitePeaks, MEBiomeDataConfigs.whiteMountainsLayers, new BiomeColorsDTO(hillySky, 12638463, defaultWater, defaultWaterFog, 7185769, 6857066), CaveType.MOUNTAINS)); // WOODLANDS - addBiome(new BiomeData(MEBiomeKeys.WOODLAND_REALM, MEBiomeDataConfigs.loamPlains, MEBiomeDataConfigs.limeStoneLayers, + addBiome(new BiomeData(MEBiomeKeys.WOODLAND_REALM, MEBiomeDataConfigs.loamPlains, MEBiomeDataConfigs.limeStoneTravertineLayers, new BiomeColorsDTO(8497918, 10666932, 4492967, 471355, 3960119, 3370029), CaveType.ELVEN)); - addBiome(new BiomeData(MEBiomeKeys.WOODLAND_FOOTHILLS, MEBiomeDataConfigs.limeStoneHills, MEBiomeDataConfigs.limeStoneLayers, + addBiome(new BiomeData(MEBiomeKeys.WOODLAND_FOOTHILLS, MEBiomeDataConfigs.limeStoneHills, MEBiomeDataConfigs.limeStoneTravertineLayers, new BiomeColorsDTO(9614583, 12242629, 4492967, 471355, 4420926, 3567152), CaveType.ELVEN)); - addBiome(new BiomeData(MEBiomeKeys.WOODLAND_GLADE, MEBiomeDataConfigs.loamPlains, MEBiomeDataConfigs.limeStoneLayers, + addBiome(new BiomeData(MEBiomeKeys.WOODLAND_GLADE, MEBiomeDataConfigs.loamPlains, MEBiomeDataConfigs.limeStoneTravertineLayers, new BiomeColorsDTO(8826622, 12242629, 4492967, 471355, 5408076, 4950339), CaveType.ELVEN)); - addBiome(new BiomeData(MEBiomeKeys.AUTUMN_WOODLAND, MEBiomeDataConfigs.loamPlains, MEBiomeDataConfigs.limeStoneLayers, + addBiome(new BiomeData(MEBiomeKeys.AUTUMN_WOODLAND, MEBiomeDataConfigs.loamPlains, MEBiomeDataConfigs.limeStoneTravertineLayers, new BiomeColorsDTO(8826622, 8293248, 4492967, 471355, 6981960, 6261059), CaveType.ELVEN)); addBiome(new BiomeData(MEBiomeKeys.WOODLAND_HILLS, MEBiomeDataConfigs.limeStoneHills, MEBiomeDataConfigs.limeStoneLayers, new BiomeColorsDTO(9614583, 12242629, 4492967, 471355, 4748611, 4093495), CaveType.ELVEN)); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/surface/ModBiomes.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/surface/ModBiomes.java index 7df00cf11c..0ce5aae320 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/surface/ModBiomes.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/biomes/surface/ModBiomes.java @@ -2404,6 +2404,8 @@ public static void createMistyMountainsBiome(Registerable context, Regist vegetation.add(VegetationPlacedFeatures.BROWN_MUSHROOM_NORMAL); vegetation.add(VegetationPlacedFeatures.RED_MUSHROOM_NORMAL); vegetation.add(VegetationPlacedFeatures.PATCH_BERRY_RARE); + ModSpawnSettingsBuilder.addRareWarg(spawnSettings); + ModSpawnSettingsBuilder.addMountainsMobs(spawnSettings); ModBiomeFeatures.addBracken(vegetation); ModBiomeFeatures.addCampion(vegetation); ModBiomeFeatures.addWildGrass(vegetation); @@ -2438,7 +2440,6 @@ public static void createMordorBiome(Registerable context, RegistryKey context, RegistryKey GenerationSettings.LookupBackedBuilder generationSettings = new GenerationSettings.LookupBackedBuilder(context.getRegistryLookup(RegistryKeys.PLACED_FEATURE), context.getRegistryLookup(RegistryKeys.CONFIGURED_CARVER)); ModSpawnSettingsBuilder.addRareWarg(spawnSettings); - ModSpawnSettingsBuilder.addRareCaveTroll(spawnSettings); ModSpawnSettingsBuilder.addWolves(spawnSettings); ModSpawnSettingsBuilder.addUncommonBats(spawnSettings); @@ -3958,6 +3958,7 @@ public static void createWoodlandRealmBiome(Registerable context, Registr ModBiomeFeatures.addOrangeMapleTree(vegetation); ModBiomeFeatures.addVeryRareMegaMirkwoodTrees(vegetation); } else if(step == 1) { // Glade + ModSpawnSettingsBuilder.addFarmAnimals(spawnSettings); vegetation.add(VegetationPlacedFeatures.TREES_PLAINS); vegetation.add(VegetationPlacedFeatures.FLOWER_DEFAULT); ModBiomeFeatures.addRedHeather(vegetation); @@ -3966,6 +3967,7 @@ public static void createWoodlandRealmBiome(Registerable context, Registr ModBiomeFeatures.addTuftGrass(vegetation); ModBiomeFeatures.addMixedWildWheatPatch(vegetation); } else if(step == 2) { + ModSpawnSettingsBuilder.addRabbits(spawnSettings); ModBiomeFeatures.addFireflyBushes(vegetation); ModBiomeFeatures.addRedFlowers(vegetation); ModBiomeFeatures.addRedHeather(vegetation); diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/chunkgen/MiddleEarthChunkGenerator.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/chunkgen/MiddleEarthChunkGenerator.java index 16dbf5828d..b4190b7c90 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/chunkgen/MiddleEarthChunkGenerator.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/chunkgen/MiddleEarthChunkGenerator.java @@ -32,6 +32,7 @@ import net.minecraft.world.gen.densityfunction.DensityFunction; import net.minecraft.world.gen.noise.NoiseConfig; import net.minecraft.world.gen.structure.Structure; +import net.sevenstars.middleearth.MiddleEarth; import net.sevenstars.middleearth.block.registration.ModBlocks; import net.sevenstars.middleearth.block.registration.StoneBlockSets; import net.sevenstars.middleearth.config.ModServerConfigs; diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/features/columns/ClusterFeature.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/features/columns/ClusterFeature.java index df575ead78..e06a8d923a 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/features/columns/ClusterFeature.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/features/columns/ClusterFeature.java @@ -1,6 +1,9 @@ package net.sevenstars.middleearth.world.features.columns; import com.mojang.serialization.Codec; +import net.minecraft.block.Block; +import net.minecraft.block.PointedDripstoneBlock; +import net.minecraft.world.gen.feature.DripstoneClusterFeatureConfig; import net.sevenstars.middleearth.block.special.pointedBlocks.PointedDolomiteBlock; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -93,10 +96,10 @@ private void generate(StructureWorldAccess world, Random random, BlockPos pos, i } boolean bl3 = random.nextDouble() < dripstoneChance; - int m; + int stalagmiteHeight; if (optionalInt3.isPresent() && bl3 && !this.isLava(world, pos.withY(optionalInt3.getAsInt()))) { - m = config.dripstoneBlockLayerThickness.get(random); - this.placeDripstoneBlocks(world, pos.withY(optionalInt3.getAsInt()), m, Direction.DOWN, config.blockState); + stalagmiteHeight = config.dripstoneBlockLayerThickness.get(random); + this.placeDripstoneBlocks(world, pos.withY(optionalInt3.getAsInt()), stalagmiteHeight, Direction.DOWN, config.blockState); if (optionalInt.isPresent()) { j = Math.max(0, l + MathHelper.nextBetween(random, -config.maxStalagmiteStalactiteHeightDiff, config.maxStalagmiteStalactiteHeightDiff)); } else { @@ -106,7 +109,7 @@ private void generate(StructureWorldAccess world, Random random, BlockPos pos, i j = 0; } - int t; + int stalactiteHeight; if (optionalInt.isPresent() && optionalInt3.isPresent() && optionalInt.getAsInt() - l <= optionalInt3.getAsInt() + j) { int n = optionalInt3.getAsInt(); int o = optionalInt.getAsInt(); @@ -114,22 +117,21 @@ private void generate(StructureWorldAccess world, Random random, BlockPos pos, i int q = Math.min(n + j, o - 1); int r = MathHelper.nextBetween(random, p, q + 1); int s = r - 1; - m = o - r; - t = s - n; + stalagmiteHeight = o - r; + stalactiteHeight = s - n; } else { - m = l; - t = j; + stalagmiteHeight = l; + stalactiteHeight = j; } - boolean bl4 = random.nextBoolean() && m > 0 && t > 0 && caveSurface.getOptionalHeight().isPresent() && m + t == caveSurface.getOptionalHeight().getAsInt(); + boolean bl4 = random.nextBoolean() && stalagmiteHeight > 0 && stalactiteHeight > 0 && caveSurface.getOptionalHeight().isPresent() && stalagmiteHeight + stalactiteHeight == caveSurface.getOptionalHeight().getAsInt(); if (optionalInt.isPresent()) { - generatePointedBlock(world, pos.withY(optionalInt.getAsInt() - 1), Direction.DOWN, m, bl4, config.pointedBlockState); + generatePointedBlock(world, pos.withY(optionalInt.getAsInt() - 1), Direction.DOWN, stalagmiteHeight, bl4, config.pointedBlockState); } if (optionalInt3.isPresent()) { - generatePointedBlock(world, pos.withY(optionalInt3.getAsInt() + 1), Direction.UP, t, bl4, config.pointedBlockState); + generatePointedBlock(world, pos.withY(optionalInt3.getAsInt() + 1), Direction.UP, stalactiteHeight, bl4, config.pointedBlockState); } - } } } @@ -144,15 +146,15 @@ public static boolean generateBlock(WorldAccess world, BlockPos pos, BlockState } } - public static void generatePointedBlock(WorldAccess world, BlockPos pos, Direction direction, int height, boolean merge, BlockState blockState) { + protected static void generatePointedBlock(WorldAccess world, BlockPos pos, Direction direction, int height, boolean merge, BlockState blockState) { if (canReplace(world.getBlockState(pos.offset(direction.getOpposite())))) { BlockPos.Mutable mutable = pos.mutableCopy(); - getDripstoneThickness(direction, height, merge, (state) -> { + getDripstoneThickness(direction, height, merge, state -> { if (state.isOf(blockState.getBlock())) { - state = state.with(PointedDolomiteBlock.WATERLOGGED, world.isWater(mutable)); + state = state.with(PointedDripstoneBlock.WATERLOGGED, world.isWater(mutable)); } - world.setBlockState(mutable, state, 2); + world.setBlockState(mutable, state, Block.NOTIFY_LISTENERS); mutable.move(direction); }, blockState); } @@ -161,20 +163,16 @@ public static void generatePointedBlock(WorldAccess world, BlockPos pos, Directi public static void getDripstoneThickness(Direction direction, int height, boolean merge, Consumer callback, BlockState blockState) { if (height >= 3) { callback.accept(getState(direction, Thickness.BASE, blockState)); - for(int i = 0; i < height - 3; ++i) { callback.accept(getState(direction, Thickness.MIDDLE, blockState)); } } - if (height >= 2) { callback.accept(getState(direction, Thickness.FRUSTUM, blockState)); } - if (height >= 1) { callback.accept(getState(direction, merge ? Thickness.TIP_MERGE : Thickness.TIP, blockState)); } - } public static boolean canGenerate(BlockState state) { @@ -206,8 +204,8 @@ private int getHeight(Random random, int localX, int localZ, float density, int return 0; } else { int i = Math.abs(localX) + Math.abs(localZ); - float f = (float)MathHelper.clampedMap((double)i, 0.0, (double)config.maxDistanceFromCenterAffectingHeightBias, (double)height / 2.0, 0.0); - return (int)clampedGaussian(random, 0.0F, (float)height, f, (float)config.heightDeviation); + float f = (float)MathHelper.clampedMap((double)i, 0.0, (double)config.maxDistanceFromCenterAffectingHeightBias, height / 2.0, 0.0); + return (int)clampedGaussian(random, 0.0F, height, f, config.heightDeviation); } } diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/features/underground/CavesPlacedFeatures.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/features/underground/CavesPlacedFeatures.java index dbe9dd3958..879a87c554 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/features/underground/CavesPlacedFeatures.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/features/underground/CavesPlacedFeatures.java @@ -22,7 +22,7 @@ import java.util.List; public class CavesPlacedFeatures { - public static final int MAX_MITHRIL_HEIGHT = -55; + public static final int MAX_MITHRIL_HEIGHT = -54; // region GEODES public static final RegistryKey AMETHYST_GEODE = registerKey("amethyst_geode"); @@ -378,7 +378,7 @@ public static void bootstrap(Registerable featureRegisterable) { PlacedFeatures.register(featureRegisterable, ORE_RUBY, rubyOre, modifiersWithCount(2, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-61), YOffset.fixed(MiddleEarthChunkGenerator.MEDGON_LEVEL)))); PlacedFeatures.register(featureRegisterable, ORE_SAPPHIRE, sapphireOre, modifiersWithCount(2, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-49), YOffset.fixed(-11)))); PlacedFeatures.register(featureRegisterable, ORE_ADAMANT, adamantOre, modifiersWithCount(2, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-61), YOffset.fixed(-42)))); - PlacedFeatures.register(featureRegisterable, ORE_MITHRIL, mithrilOre, modifiersWithRarity(1, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-61), YOffset.fixed(MAX_MITHRIL_HEIGHT)))); + PlacedFeatures.register(featureRegisterable, ORE_MITHRIL, mithrilOre, modifiersWithRarity(1, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-62), YOffset.fixed(MAX_MITHRIL_HEIGHT)))); // region MUSHROOMS PlacedFeatures.register(featureRegisterable, TREE_BROWN_BOLETTE, brownBoletteTree, List.of(RarityFilterPlacementModifier.of(1), SquarePlacementModifier.of(), diff --git a/middle-earth/src/main/java/net/sevenstars/middleearth/world/spawners/ModSpawnSettingsBuilder.java b/middle-earth/src/main/java/net/sevenstars/middleearth/world/spawners/ModSpawnSettingsBuilder.java index 0cb50199dc..dbdfa02233 100644 --- a/middle-earth/src/main/java/net/sevenstars/middleearth/world/spawners/ModSpawnSettingsBuilder.java +++ b/middle-earth/src/main/java/net/sevenstars/middleearth/world/spawners/ModSpawnSettingsBuilder.java @@ -36,10 +36,10 @@ public static void addUncommonWarg(SpawnSettings.Builder builder){ } public static void addRareStoneTroll(SpawnSettings.Builder builder){ - builder.spawn(SpawnGroup.CREATURE,3, new SpawnSettings.SpawnEntry(EntitiesME.STONE_TROLL, 1, 2)); + builder.spawn(SpawnGroup.MONSTER,3, new SpawnSettings.SpawnEntry(EntitiesME.STONE_TROLL, 1, 2)); } public static void addRareCaveTroll(SpawnSettings.Builder builder){ - builder.spawn(SpawnGroup.CREATURE,3, new SpawnSettings.SpawnEntry(EntitiesME.CAVE_TROLL, 1, 1)); + builder.spawn(SpawnGroup.MONSTER,3, new SpawnSettings.SpawnEntry(EntitiesME.CAVE_TROLL, 1, 1)); } public static void addMirkwoodSpider(SpawnSettings.Builder builder){ builder.spawn(SpawnGroup.CREATURE, 9, new SpawnSettings.SpawnEntry(EntitiesME.SHELOBITE_SCUTTLER, 2, 4)); @@ -134,8 +134,7 @@ public static void addDeer(SpawnSettings.Builder builder) { } public static void addNpcs(SpawnSettings.Builder spawnSettings) { - spawnSettings.spawn(SpawnGroup.MONSTER, 2, new SpawnSettings.SpawnEntry(EntitiesME.NPC, 1, 2)) - .spawnCost(EntitiesME.NPC, 0.7, 0.3); + spawnSettings.spawn(SpawnGroup.MONSTER, 3, new SpawnSettings.SpawnEntry(EntitiesME.NPC, 1, 1)); } public static void addGreatHorn(SpawnSettings.Builder builder) { diff --git a/middle-earth/src/main/resources/assets/middle-earth/blockstates/lead_lantern_wall.json b/middle-earth/src/main/resources/assets/middle-earth/blockstates/lead_lantern_wall.json index d7763ae763..a00a4913ca 100644 --- a/middle-earth/src/main/resources/assets/middle-earth/blockstates/lead_lantern_wall.json +++ b/middle-earth/src/main/resources/assets/middle-earth/blockstates/lead_lantern_wall.json @@ -34,13 +34,13 @@ "model": "middle-earth:block/lead_lantern" }, "facing=up,lit=true": { - "model": "middle-earth:block/lead_lantern_hanging" + "model": "middle-earth:block/lead_lantern" }, "facing=down,lit=false": { "model": "middle-earth:block/lead_lantern_unlit" }, "facing=up,lit=false": { - "model": "middle-earth:block/lead_lantern_hanging_unlit" + "model": "middle-earth:block/lead_lantern_unlit" } } } \ No newline at end of file diff --git a/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_leather_armor.json b/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_leather_armor.json index f6f35b2b53..750c05dee6 100644 --- a/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_leather_armor.json +++ b/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_leather_armor.json @@ -2,9 +2,6 @@ "layers": { "horse_body": [ { - "dyeable": { - "color_when_undyed": 4865076 - }, "texture": "middle-earth:beast_armor/warg_leather_armor" } ] diff --git a/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_mordor_mail_armor.json b/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_mordor_mail_armor.json index 1204a66ef7..7c7b76b1bc 100644 --- a/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_mordor_mail_armor.json +++ b/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_mordor_mail_armor.json @@ -2,13 +2,7 @@ "layers": { "horse_body": [ { - "dyeable": { - "color_when_undyed": 4865076 - }, "texture": "middle-earth:beast_armor/warg_mordor_mail_armor" - }, - { - "texture": "middle-earth:beast_armor/warg_mordor_mail_armor_overlay" } ] } diff --git a/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_reinforced_leather_armor.json b/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_reinforced_leather_armor.json index b7cababdaa..d974a4979b 100644 --- a/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_reinforced_leather_armor.json +++ b/middle-earth/src/main/resources/assets/middle-earth/equipment/warg_reinforced_leather_armor.json @@ -2,13 +2,7 @@ "layers": { "horse_body": [ { - "dyeable": { - "color_when_undyed": 4865076 - }, "texture": "middle-earth:beast_armor/warg_reinforced_leather_armor" - }, - { - "texture": "middle-earth:beast_armor/warg_reinforced_leather_armor_overlay" } ] } diff --git a/middle-earth/src/main/resources/assets/middle-earth/lang/zh_cn.json b/middle-earth/src/main/resources/assets/middle-earth/lang/zh_cn.json index a479ec7d52..d27d2ba42e 100644 --- a/middle-earth/src/main/resources/assets/middle-earth/lang/zh_cn.json +++ b/middle-earth/src/main/resources/assets/middle-earth/lang/zh_cn.json @@ -50,23 +50,23 @@ "advancements.smithing.khazad_steel.title": "矮人专精", "advancements.smithing.khazad_steel.description": "制作出闻名遐迩的卡扎德钢锭", "advancements.smithing.dwarven_treated_anvil.title": "山中厅堂的颂歌", - "advancements.smithing.dwarven_treated_anvil.description": "制作出矮人精制铁砧,以锻造矮人的装备", + "advancements.smithing.dwarven_treated_anvil.description": "制作出矮人铁砧,以锻造矮人的装备", "advancements.smithing.edhel_steel.title": "首生巧作", "advancements.smithing.edhel_steel.description": "制作出赏心悦目的埃蒂尔钢锭", "advancements.smithing.elven_treated_anvil.title": "费艾诺开创的诗篇", - "advancements.smithing.elven_treated_anvil.description": "制作出精灵精制铁砧,以锻造精灵的装备", + "advancements.smithing.elven_treated_anvil.description": "制作出精灵铁砧,以锻造精灵的装备", "advancements.smithing.steel.title": "人类锻技", "advancements.smithing.steel.description": "制作出中洲人类广泛使用的钢锭", "advancements.smithing.sturdy_storage.title": "坚硬宝箱", "advancements.smithing.sturdy_storage.description": "制作出加固箱子", - "advancements.smithing.tin_cauldron.title": "淬火加钢", - "advancements.smithing.tin_cauldron.description": "制作出坩埚,为你的锻造部件降温", + "advancements.smithing.tin_cauldron.title": "淬火冷却", + "advancements.smithing.tin_cauldron.description": "制作出炼药锅,为你的锻造部件降温", "advancements.smithing.treated_anvil.title": "钢与火的交响乐", - "advancements.smithing.treated_anvil.description": "制作出普通精制铁砧,以锻造大部分通用装备", + "advancements.smithing.treated_anvil.description": "制作出普通铁砧,以锻造大部分通用装备", "advancements.smithing.burzum_steel.title": "奸诈金工", "advancements.smithing.burzum_steel.description": "制作出强而有力的布祖姆钢锭", "advancements.smithing.orcish_treated_anvil.title": "魔影的短暂触及", - "advancements.smithing.orcish_treated_anvil.description": "制作出奥克精制铁砧,以锻造奥克的装备", + "advancements.smithing.orcish_treated_anvil.description": "制作出奥克铁砧,以锻造奥克的装备", "advancements.smithing.orcish_sconce.title": "无情炬火", "advancements.smithing.orcish_sconce.description": "制作出奥克火炬", "advancements.smithing.crystal_lamp.title": "卡扎督姆之光", @@ -75,6 +75,27 @@ "advancements.smithing.dwarven_lantern.description": "制作出矮人灯笼", "advancements.smithing.elven_lantern.title": "费艾诺之光", "advancements.smithing.elven_lantern.description": "像昆迪那般照亮前路", + "advancements.smithing.chisel.title": "凿刻工具", + "advancements.smithing.chisel.description": "制作出铭刻用的凿子", + "advancements.smithing.inscription_table.title": "卓越匠艺", + "advancements.smithing.inscription_table.description": "像昔日的铁匠那样铭刻、改进你的装备", + "advancements.smithing.smithing_hammer.title": "锤砧交响", + "advancements.smithing.smithing_hammer.description": "制作出锻造锤", + + "advancements.middle_earth.brigand_dungeon.title": "开门查水表!", + "advancements.middle_earth.brigand_dungeon.description": "突袭地牢中的匪盗!", + + "advancements.middle_earth.enter_dol_guldur.title": "妖术山丘", + "advancements.middle_earth.enter_dol_guldur.description": "进入多古尔都", + + "advancements.middle_earth.enter_woodland_realm.title": "精灵国王的宫殿", + "advancements.middle_earth.enter_woodland_realm.description": "进入黑森林王国", + + "advancements.middle_earth.kill_spawn_of_shelob.title": "蜘蛛?", + "advancements.middle_earth.kill_spawn_of_shelob.description": "杀死希洛布的子嗣!", + + "advancements.middle_earth.spider_burrows.title": "黏腻巢穴", + "advancements.middle_earth.spider_burrows.description": "进入蜘蛛网道", "__COMMENT__": "提示 - alert", "alert.middle-earth.hood_down": "摘下兜帽。", @@ -435,7 +456,7 @@ "block.middle-earth.orcish_forge": "奥克锻造炉", "block.middle-earth.bellows": "风箱", "item.middle-earth.bellows": "风箱", - "block.middle-earth.treated_anvil": "矮人精制铁砧", + "block.middle-earth.treated_anvil": "普通精制铁砧", "item.middle-earth.treated_anvil": "普通精制铁砧", "block.middle-earth.dwarven_treated_anvil": "矮人精制铁砧", "item.middle-earth.dwarven_treated_anvil": "矮人精制铁砧", @@ -508,7 +529,7 @@ "item.middle-earth.large_beech_fence_gate": "大型山毛榉木栅栏门", "block.middle-earth.larch_hobbit_door": "落叶松木霍比特门", - "item.middle-earth.larch_hobbit_door": "落叶松霍比特门", + "item.middle-earth.larch_hobbit_door": "落叶松木霍比特门", "block.middle-earth.spruce_hobbit_door": "云杉木霍比特门", "item.middle-earth.spruce_hobbit_door": "云杉木霍比特门", @@ -1138,7 +1159,7 @@ "block.middle-earth.black_pine_wood_fence": "黑松木原木栅栏", "item.middle-earth.black_pine_wood_fence": "黑松木原木栅栏", "block.middle-earth.black_pine_wood_slab": "黑松木原木台阶", - "item.middle-earth.black_pine_wood_slab": "黑松木原木原木台阶", + "item.middle-earth.black_pine_wood_slab": "黑松木原木台阶", "block.middle-earth.black_pine_wood_stairs": "黑松木原木楼梯", "item.middle-earth.black_pine_wood_stairs": "黑松木原木楼梯", "block.middle-earth.black_pine_wood_vertical_slab": "黑松木原木竖台阶", @@ -1603,7 +1624,7 @@ "item.middle-earth.stripped_deadwood_wood_wall": "去皮死亡原木墙", "block.middle-earth.dead_heather": "枯死帚石楠", - "item.middle-earth.dead_heather": "死帚石楠", + "item.middle-earth.dead_heather": "枯死帚石楠", "block.middle-earth.dead_heather_bush": "枯死帚石楠灌木", "item.middle-earth.dead_heather_bush": "枯死帚石楠灌木", "block.middle-earth.dead_rushes": "枯死灯心草", @@ -1665,7 +1686,7 @@ "item.middle-earth.fir_trapdoor": "冷杉木活板门", "block.middle-earth.fir_vertical_slab": "冷杉木竖台阶", "item.middle-earth.fir_vertical_slab": "冷杉木竖台阶", - "block.middle-earth.fir_wood": "冷杉原木", + "block.middle-earth.fir_wood": "冷杉木", "item.middle-earth.fir_wood": "冷杉木", "block.middle-earth.fir_wood_fence": "冷杉原木栅栏", "item.middle-earth.fir_wood_fence": "冷杉原木栅栏", @@ -2657,7 +2678,7 @@ "block.middle-earth.mirkwood_vertical_slab": "阴郁木竖台阶", "item.middle-earth.mirkwood_vertical_slab": "阴郁木竖台阶", "block.middle-earth.mirkwood_vines": "阴郁藤蔓", - "item.middle-earth.mirkwood_vines": "阴郁木藤蔓", + "item.middle-earth.mirkwood_vines": "阴郁藤蔓", "block.middle-earth.mirkwood_wood": "阴郁木", "item.middle-earth.mirkwood_wood": "阴郁木", "block.middle-earth.mirkwood_wood_fence": "阴郁原木栅栏", @@ -8329,8 +8350,6 @@ "item.middle-earth.smooth_nurgon_vertical_slab": "平滑深渊岩竖台阶", "block.middle-earth.smooth_nurgon_wall": "平滑深渊岩墙", "item.middle-earth.smooth_nurgon_wall": "平滑深渊岩墙", - "block.middle-earth.nurgon_adamant_ore": "深渊岩精金矿石", - "item.middle-earth.nurgon_adamant_ore": "深渊岩精金矿石", "block.middle-earth.nurgon_emerald_ore": "深渊岩绿宝石矿石", "item.middle-earth.nurgon_emerald_ore": "深渊岩绿宝石矿石", "block.middle-earth.nurgon_ruby_ore": "深渊岩红宝石矿石", @@ -10041,15 +10060,15 @@ "block.middle-earth.waxed_reed_thatch_wall": "涂蜡的芦苇茅草墙", "item.middle-earth.waxed_reed_thatch_wall": "涂蜡的芦苇茅草墙", "block.middle-earth.waxed_weathered_reed_thatch": "涂蜡的锈蚀芦苇茅草", - "item.middle-earth.waxed_weathered_reed_thatch": "涂蜡的锈蚀的芦苇茅草", + "item.middle-earth.waxed_weathered_reed_thatch": "涂蜡的锈蚀芦苇茅草", "block.middle-earth.waxed_weathered_reed_thatch_slab": "涂蜡的锈蚀芦苇茅草台阶", - "item.middle-earth.waxed_weathered_reed_thatch_slab": "涂蜡的锈蚀的芦苇茅草台阶", + "item.middle-earth.waxed_weathered_reed_thatch_slab": "涂蜡的锈蚀芦苇茅草台阶", "block.middle-earth.waxed_weathered_reed_thatch_stairs": "涂蜡的锈蚀芦苇茅草楼梯", - "item.middle-earth.waxed_weathered_reed_thatch_stairs": "涂蜡的锈蚀的芦苇茅草楼梯", + "item.middle-earth.waxed_weathered_reed_thatch_stairs": "涂蜡的锈蚀芦苇茅草楼梯", "block.middle-earth.waxed_weathered_reed_thatch_vertical_slab": "涂蜡的锈蚀芦苇茅草竖台阶", - "item.middle-earth.waxed_weathered_reed_thatch_vertical_slab": "涂蜡的锈蚀的芦苇茅草竖台阶", + "item.middle-earth.waxed_weathered_reed_thatch_vertical_slab": "涂蜡的锈蚀芦苇茅草竖台阶", "block.middle-earth.waxed_weathered_reed_thatch_wall": "涂蜡的锈蚀芦苇茅草墙", - "item.middle-earth.waxed_weathered_reed_thatch_wall": "涂蜡的锈蚀的芦苇茅草墙", + "item.middle-earth.waxed_weathered_reed_thatch_wall": "涂蜡的锈蚀芦苇茅草墙", "block.middle-earth.weathered_reed_thatch": "锈蚀的芦苇茅草", "item.middle-earth.weathered_reed_thatch": "锈蚀的芦苇茅草", "block.middle-earth.weathered_reed_thatch_slab": "锈蚀的芦苇茅草台阶", @@ -12116,7 +12135,6 @@ "item.middle-earth.waste_pile": "废料堆", "block.middle-earth.waste_pile_layer": "单层废料堆", "item.middle-earth.waste_pile_layer": "单层废料堆", - "block.middle-earth.watering_can": "浇水壶", "item.middle-earth.watering_can": "浇水壶", "block.middle-earth.webbing": "蜘蛛网织带", "item.middle-earth.webbing": "蜘蛛网织带", @@ -13074,11 +13092,14 @@ "description.middle-earth.mordor.description_0": "此处魔多暗影充斥,环绕着末日山的是一片充满灰烬与尘埃的不毛之地。黑色军团等待着巴拉督尔塔中的黑暗魔君指令挥师开拔,那兹古尔也在四处搜寻至尊戒,为即将到来的大战做准备。", "description.middle-earth.longbeards.erebor.description_0": "“孤山”埃瑞博是都林一族的矮人王国,由梭林·橡木盾从斯毛格的魔掌中所解放。现今一片繁荣昌盛,由山下之王铁足戴因所统治。埃瑞博与相邻河谷邦的同盟坚不可摧。", "description.middle-earth.longbeards.description_0": "长须一族是不死者都林的后裔,矮人中的王族。他们精于对岩石与金属加工改造,其疆域囊括埃瑞博和卡扎督姆。矮人永不背叛亲族与传统。", + "description.middle-earth.moria.description_0": "卡扎督姆,长须氏族矮人的住所,连接着迷雾山脉的东西两侧。然而矮人们挖得太深。如今此处已成废墟,过往古老厅堂已成半兽人、食人妖与无名恐惧的巢穴。此处也因此得名墨瑞亚,“黑裂隙”。", "description.middle-earth.dale.description_0": "河谷邦邻近埃瑞博,自斯毛格的毁灭后重建,如今往来熙熙攘攘,由巴德一族所统治。河谷邦的人类精于射术,也擅长贸易,他们同埃瑞博的矮人往来密切。", "description.middle-earth.lothlorien.description_0": "“黄金森林”洛丝罗瑞恩是一座美丽非凡的精灵王国,由加拉德瑞尔和凯勒博恩携手统治。此处安宁优雅,坐落于金色瑁珑树之间,有强力精灵魔法保护,也是精灵在中洲为数不多的居所之一。", "description.middle-earth.rohan.description_0": "洛汗也称里德马克,位于刚铎王国的北面,由埃奥尔一族所统治,这座人类王国中的人民精于驭马。尽管洛汗曾是刚铎的强力盟友,现今却面临内忧外患。", "description.middle-earth.isengard.description_0": "此处曾是努门诺尔人的要塞。第三纪元,黑塔欧尔桑克的钥匙传到了白袍巫师萨茹曼手中。受黑暗力量蛊惑,他开始编织阴谋诡计,对艾森加德周遭的自由人民谋划袭击。", - "description.middle-earth.misty_mountains_goblins.description_0": "迷雾山脉半兽人是一群藉山脉中错综复杂的坑洞隐藏的好战奥克。它们曾经流落四方,现今重新于此汇聚,侵掠过路的旅者,并同索隆的爪牙结盟。", + "description.middle-earth.hobgoblin_tribes.gundabad.description_0": "迷雾山脉半兽人是一群藉山脉中错综复杂的坑洞隐藏的好战奥克。它们曾经流落四方,现今重新于此汇聚,侵掠过路的旅者,并同索隆的爪牙结盟。", + "description.middle-earth.goblin_town.description_0": "半兽人镇,迷雾山脉的北方奥克在此定居。半兽人们在此开凿出纷繁复杂的洞穴、隧道网络,出口遍布迷雾山脉,其中一个便是前门厅。这些爪牙经常离开巢穴,侵袭掠夺安都因地区。", + "description.middle-earth.woodland_realm.description_0": "埃林嘉兰,也称大绿林。曾经是一处生机勃勃的森林,许多生物在此定居。黑森林王国的西尔凡精灵曾统治此处。现今在邪恶巫术的腐化下,大绿林被扭曲为了黑森林,数不尽的蜘蛛与奥克潜藏在此树下阴影中。", "description.middle-earth.shire.description_0": "夏尔位于中洲西北部,是一片宁静的世外桃源,霍比特人在此定居。此处居民安居乐业,并不寻求刺激冒险。因而这里与世隔绝,邪恶混乱远离此处。", "__COMMENT__": "倾向 - disposition", @@ -13092,7 +13113,6 @@ "effect.middle-earth.restrained": "束缚", "__COMMENT__": "生物实体 - entity", - "entity.middle-earth.barrow_wight": "古冢尸妖", "entity.middle-earth.broadhoof_goat": "宽蹄山羊", "entity.middle-earth.cave_troll": "洞穴食人妖", "entity.middle-earth.great_horn": "大角鹿", @@ -13145,24 +13165,22 @@ "faction.middle-earth.woodland_realm": "黑森林王国", "faction.middle-earth.longbeards": "长须矮人", "faction.middle-earth.longbeards.erebor": "埃瑞博", + "faction.middle-earth.moria": "墨瑞亚", "faction.middle-earth.dale": "河谷邦", "faction.middle-earth.gondor": "刚铎", "faction.middle-earth.rohan": "洛汗", "faction.middle-earth.shire": "夏尔", - "faction.middle-earth.dale_keep_nests": "河谷邦要塞据点", - "faction.middle-earth.erebor_generic_nests": "埃瑞博常规据点", - "faction.middle-earth.gondor_generic_nests": "刚铎常规据点", - "faction.middle-earth.wild_goblins": "荒原半兽人", "faction.middle-earth.hobgoblin_tribes": "大半兽人部族", "faction.middle-earth.hobgoblin_tribes.gundabad": "贡达巴德", - "faction.middle-earth.misty_mountains_goblins": "迷雾山脉半兽人", + "faction.middle-earth.goblin_town": "半兽人镇", "faction.middle-earth.isengard": "艾森加德", "faction.middle-earth.mordor": "魔多", "__COMMENT__": "物品 - item", "__TODO__": "整理", + "item.middle-earth.player_book": "玩家之书", "item.middle-earth.brigand_key": "匪盗钥匙", "item.middle-earth.brigand_trial_spawner": "匪盗试炼刷怪笼", "item.middle-earth.brigand_vault": "匪盗宝库", @@ -13188,6 +13206,7 @@ "item.middle-earth.pipeweed_banner_pattern.desc": "来自夏尔的上品", "item.middle-earth.snail_banner_pattern.desc": "黏滑小精灵", "item.middle-earth.spider_banner_pattern.desc": "黑森林的蜘蛛", + "item.middle-earth.goblin_crossbow": "半兽人弩", "item.middle-earth.oak_leaf_banner_pattern": "橡树树叶旗帜图案", @@ -13263,7 +13282,6 @@ "item.middle-earth.vegetable_soup": "蔬菜汤", "item.middle-earth.sack_of_horsefeed": "袋装马饲料", "item.middle-earth.sack": "布袋", - "screen.middle-earth.sack": "布袋", "__COMMENT__": "其他方块物品", "item.middle-earth.citrine_shard": "黄水晶碎片", @@ -14039,7 +14057,7 @@ "item.middle-earth.rusted_orcish_reinforced_strip_leather_skirt": "生锈的奥克加固条带皮革甲裙", "item.middle-earth.goblin_town_axe": "半兽人镇斧", - "item.middle-earth.goblin_town_belly_plate": "半兽人镇护胃板材", + "item.middle-earth.goblin_town_belly_plate": "半兽人镇遮腹板材", "item.middle-earth.goblin_town_bone_mandible_cap": "半兽人镇骨制颌饰帽", "item.middle-earth.goblin_town_bone_scale_coat": "半兽人镇骨制鳞片罩衣", "item.middle-earth.goblin_town_bone_shield": "半兽人镇骨制盾牌", @@ -14089,7 +14107,7 @@ "item.middle-earth.moria_goblin_screecher_helmet": "墨瑞亚半兽人尖嚎者头盔", "item.middle-earth.moria_goblin_screecher_leggings": "墨瑞亚半兽人尖嚎者护腿", "item.middle-earth.moria_goblin_shank": "墨瑞亚半兽人短刃", - "item.middle-earth.moria_goblin_snaga_belly_plate": "墨瑞亚半兽人斯那嘎护胃板材", + "item.middle-earth.moria_goblin_snaga_belly_plate": "墨瑞亚半兽人斯那嘎遮腹板材", "item.middle-earth.moria_goblin_snaga_cuirass": "墨瑞亚半兽人斯那嘎护胸", "item.middle-earth.moria_goblin_snaga_helmet": "墨瑞亚半兽人斯那嘎头盔", "item.middle-earth.moria_goblin_snaga_nasal_helmet": "墨瑞亚半兽人斯那嘎护鼻头盔", @@ -14104,7 +14122,6 @@ "item.middle-earth.gundabad_bone_pauldron": "贡达巴德骨制护肩", "item.middle-earth.gundabad_bow": "贡达巴德弓", "item.middle-earth.gundabad_captain_helmet": "贡达巴德队长头盔", - "item.middle-earth.gundabad_crossbow": "贡达巴德弩", "item.middle-earth.gundabad_elite_battleaxe": "贡达巴德精锐战斧", "item.middle-earth.gundabad_elite_cleaver": "贡达巴德精锐屠刀", "item.middle-earth.gundabad_elite_dagger": "贡达巴德精锐匕首", @@ -14335,7 +14352,6 @@ "__COMMENT__": "刷怪蛋物品", "item.middle-earth.stone_troll_spawn_egg": "岩石食人妖刷怪蛋", - "item.middle-earth.barrow_wight_spawn_egg": "古冢尸妖刷怪蛋", "item.middle-earth.brigand.chieftain_spawn_egg": "匪盗头目刷怪蛋", "item.middle-earth.brigand.mercenary_spawn_egg": "匪盗佣兵刷怪蛋", "item.middle-earth.brigand.thief_spawn_egg": "匪盗窃贼刷怪蛋", @@ -14364,9 +14380,14 @@ "item.middle-earth.hobgoblin_tribes.gundabad.militia_spawn_egg": "贡达巴德大半兽人部族民兵刷怪蛋", "item.middle-earth.hobgoblin_tribes.gundabad.rider_spawn_egg": "贡达巴德大半兽人部族骑手刷怪蛋", "item.middle-earth.hobgoblin_tribes.gundabad.scout_spawn_egg": "贡达巴德大半兽人部族斥候刷怪蛋", - "item.middle-earth.hobgoblin_tribes.gundabad.snaga_spawn_egg": "贡达巴德大半兽人部族斯那嘎刷怪蛋", + "item.middle-earth.hobgoblin_tribes.gundabad.goblin_spawn_egg": "贡达巴德大半兽人部族半兽人刷怪蛋", "item.middle-earth.hobgoblin_tribes.gundabad.veteran_spawn_egg": "贡达巴德大半兽人部族精兵刷怪蛋", "item.middle-earth.hobgoblin_tribes.gundabad.warrior_spawn_egg": "贡达巴德大半兽人部族战士刷怪蛋", + "item.middle-earth.goblin_town.goblin_spawn_egg": "半兽人镇半兽人刷怪蛋", + "item.middle-earth.goblin_town.rider_spawn_egg": "半兽人镇骑手刷怪蛋", + "item.middle-earth.goblin_town.scout_spawn_egg": "半兽人镇斥候刷怪蛋", + "item.middle-earth.goblin_town.veteran_spawn_egg": "半兽人镇精兵刷怪蛋", + "item.middle-earth.goblin_town.warrior_spawn_egg": "半兽人镇战士刷怪蛋", "item.middle-earth.isengard.berserker_spawn_egg": "艾森加德狂战士刷怪蛋", "item.middle-earth.isengard.leader_spawn_egg": "艾森加德统领刷怪蛋", "item.middle-earth.isengard.orthanc_guard_spawn_egg": "艾森加德欧尔桑克守卫刷怪蛋", @@ -14384,22 +14405,31 @@ "item.middle-earth.longbeards.erebor.peasant_spawn_egg": "长须矮人埃瑞博佃农刷怪蛋", "item.middle-earth.longbeards.erebor.soldier_spawn_egg": "长须矮人埃瑞博士兵刷怪蛋", "item.middle-earth.longbeards.erebor.veteran_spawn_egg": "长须矮人埃瑞博精兵刷怪蛋", + "item.middle-earth.moria.rider_spawn_egg": "墨瑞亚骑手刷怪蛋", + "item.middle-earth.moria.scout_spawn_egg": "墨瑞亚斥候刷怪蛋", + "item.middle-earth.moria.veteran_spawn_egg": "墨瑞亚精兵刷怪蛋", + "item.middle-earth.moria.warrior_spawn_egg": "墨瑞亚战士刷怪蛋", + "item.middle-earth.moria.chief_spawn_egg": "墨瑞亚头目刷怪蛋", + "item.middle-earth.moria.goblin_spawn_egg": "墨瑞亚半兽人刷怪蛋", + "item.middle-earth.moria.militia_spawn_egg": "墨瑞亚民兵刷怪蛋", "item.middle-earth.lothlorien.guard_spawn_egg": "洛丝罗瑞恩守卫刷怪蛋", "item.middle-earth.lothlorien.knight_spawn_egg": "洛丝罗瑞恩骑士刷怪蛋", "item.middle-earth.lothlorien.lord_spawn_egg": "洛丝罗瑞恩领主刷怪蛋", "item.middle-earth.lothlorien.ranger_spawn_egg": "洛丝罗瑞恩游侠刷怪蛋", "item.middle-earth.lothlorien.sentinel_spawn_egg": "洛丝罗瑞恩哨卫刷怪蛋", "item.middle-earth.lothlorien.warrior_spawn_egg": "洛丝罗瑞恩战士刷怪蛋", + "item.middle-earth.lothlorien.civilian_spawn_egg": "洛丝罗瑞恩平民刷怪蛋", "item.middle-earth.lothlorien.egladil_commander_spawn_egg": "洛丝罗瑞恩埃格拉迪尔指挥官刷怪蛋", "item.middle-earth.lothlorien.egladil_sentinel_spawn_egg": "洛丝罗瑞恩埃格拉迪尔哨卫刷怪蛋", "item.middle-earth.mordor.black_numenorean_spawn_egg": "魔多黑努门诺尔人刷怪蛋", + "item.middle-earth.mordor.dol_guldur_scout_spawn_egg": "魔多多古尔都斥候刷怪蛋", + "item.middle-earth.mordor.dol_guldur_warrior_spawn_egg": "魔多多古尔都战士刷怪蛋", "item.middle-earth.woodland_realm.artisan_spawn_egg": "黑森林王国工匠刷怪蛋", "item.middle-earth.woodland_realm.commander_spawn_egg": "黑森林王国指挥官刷怪蛋", "item.middle-earth.woodland_realm.elven_kings_guard_spawn_egg": "黑森林王国国王守卫刷怪蛋", "item.middle-earth.woodland_realm.hunter_spawn_egg": "黑森林王国猎手刷怪蛋", "item.middle-earth.woodland_realm.lancer_spawn_egg": "黑森林王国长枪手刷怪蛋", "item.middle-earth.woodland_realm.nightshade_spawn_egg": "黑森林王国夜翳战士刷怪蛋", - "item.middle-earth.woodland_realm.nightshade_sentinel_spawn_egg": "黑森林王国夜翳哨卫刷怪蛋", "item.middle-earth.woodland_realm.ranger_spawn_egg": "黑森林王国游侠刷怪蛋", "item.middle-earth.woodland_realm.sentinel_spawn_egg": "黑森林王国哨卫刷怪蛋", "item.middle-earth.woodland_realm.warden_of_the_glade_spawn_egg": "黑森林王国林地守卫刷怪蛋", @@ -14455,7 +14485,7 @@ "__COMMENT__": "有特殊提示的物品", "item.middle-earth.arkenstone": "阿肯宝钻", - "tooltip.middle-earth.arkenstone_lore_0": "孤山之下的珍贵宝石,", + "tooltip.middle-earth.arkenstone_lore_0": "孤山之下的珍贵宝石", "tooltip.middle-earth.arkenstone_lore_1": "最为光彩夺目。", "item.middle-earth.dagamarth": "达伽马斯", "tooltip.middle-earth.dagamarth_lore_0": "一把闻名利刃,由纳维与凯勒布林博", @@ -14541,108 +14571,122 @@ "key.middle-earth.map_fullscreen_toggle": "切换地图全屏显示", "__COMMENT__": "npc数据 - npc_data", - "npc_data.middle-earth.mordor.orc_soldier": "魔多士兵", - "npc_data.middle-earth.mordor.orc_snaga": "魔多斯那嘎", - "npc_data.middle-earth.mordor.orc_scout": "魔多斥候", - "npc_data.middle-earth.mordor.orc_militia": "魔多民兵", - - "npc_data.middle-earth.brigand.chieftain": "匪盗头目", - "npc_data.middle-earth.brigand.mercenary": "匪盗佣兵", - "npc_data.middle-earth.brigand.thief": "匪盗窃贼", - "npc_data.middle-earth.brigand.thug": "匪盗暴徒", - - "npc_data.middle-earth.dale.archer": "河谷邦弓手", - "npc_data.middle-earth.dale.elite_archer": "河谷邦精锐弓手", - "npc_data.middle-earth.dale.knight": "河谷邦骑士", - "npc_data.middle-earth.dale.militia": "河谷邦民兵", - "npc_data.middle-earth.dale.peasant": "河谷邦佃农", - "npc_data.middle-earth.dale.sergeant": "河谷邦将领", - "npc_data.middle-earth.dale.soldier": "河谷邦士兵", - "npc_data.middle-earth.dale.veteran": "河谷邦精兵", - - "npc_data.middle-earth.gondor.citadel_guard": "刚铎王城禁卫军", - "npc_data.middle-earth.gondor.fountain_guard": "刚铎喷泉守卫", - "npc_data.middle-earth.gondor.king_guard": "刚铎王室守卫", - "npc_data.middle-earth.gondor.knight": "刚铎骑士", - "npc_data.middle-earth.gondor.leader": "刚铎统领", - "npc_data.middle-earth.gondor.militia": "刚铎民兵", - "npc_data.middle-earth.gondor.peasant": "刚铎佃农", - "npc_data.middle-earth.gondor.soldier": "刚铎士兵", - "npc_data.middle-earth.gondor.veteran": "刚铎精兵", - - "npc_data.middle-earth.hobgoblin_tribes.gundabad.leader": "贡达巴德统领", - "npc_data.middle-earth.hobgoblin_tribes.gundabad.militia": "贡达巴德民兵", - "npc_data.middle-earth.hobgoblin_tribes.gundabad.rider": "贡达巴德骑手", - "npc_data.middle-earth.hobgoblin_tribes.gundabad.scout": "贡达巴德斥候", - "npc_data.middle-earth.hobgoblin_tribes.gundabad.snaga": "贡达巴德斯那嘎", - "npc_data.middle-earth.hobgoblin_tribes.gundabad.veteran": "贡达巴德精兵", - "npc_data.middle-earth.hobgoblin_tribes.gundabad.warrior": "贡达巴德战士", - - "npc_data.middle-earth.isengard.berserker": "艾森加德狂战士", - "npc_data.middle-earth.isengard.leader": "艾森加德统领", - "npc_data.middle-earth.isengard.orthanc_guard": "艾森加德欧尔桑克守卫", - "npc_data.middle-earth.isengard.scout": "艾森加德斥候", - "npc_data.middle-earth.isengard.snaga": "艾森加德斯那嘎", - "npc_data.middle-earth.isengard.soldier": "艾森加德士兵", - "npc_data.middle-earth.isengard.veteran": "艾森加德精兵", - "npc_data.middle-earth.isengard.warrior": "艾森加德战士", - - "npc_data.middle-earth.longbeards.erebor.archer": "埃瑞博弓手", - "npc_data.middle-earth.longbeards.erebor.elite": "埃瑞博精锐", - "npc_data.middle-earth.longbeards.erebor.gatewarden": "埃瑞博守门人", - "npc_data.middle-earth.longbeards.erebor.leader": "埃瑞博统领", - "npc_data.middle-earth.longbeards.erebor.militia": "埃瑞博民兵", - "npc_data.middle-earth.longbeards.erebor.miner": "埃瑞博矿工", - "npc_data.middle-earth.longbeards.erebor.peasant": "埃瑞博佃农", - "npc_data.middle-earth.longbeards.erebor.soldier": "埃瑞博士兵", - "npc_data.middle-earth.longbeards.erebor.veteran": "埃瑞博精兵", - - "npc_data.middle-earth.lothlorien.guard": "洛丝罗瑞恩守卫", - "npc_data.middle-earth.lothlorien.knight": "洛丝罗瑞恩骑士", - "npc_data.middle-earth.lothlorien.lord": "洛丝罗瑞恩领主", - "npc_data.middle-earth.lothlorien.ranger": "洛丝罗瑞恩游侠", - "npc_data.middle-earth.lothlorien.sentinel": "洛丝罗瑞恩哨卫", - "npc_data.middle-earth.lothlorien.warrior": "洛丝罗瑞恩战士", - "npc_data.middle-earth.lothlorien.egladil_commander": "洛丝罗瑞恩埃格拉迪尔指挥官", - "npc_data.middle-earth.lothlorien.egladil_sentinel": "洛丝罗瑞恩埃格拉迪尔哨卫", - - "npc_data.middle-earth.woodland_realm.artisan": "黑森林王国工匠", - "npc_data.middle-earth.woodland_realm.commander": "黑森林王国指挥官", - "npc_data.middle-earth.woodland_realm.elven_kings_guard": "黑森林王国国王守卫", - "npc_data.middle-earth.woodland_realm.hunter": "黑森林王国猎手", - "npc_data.middle-earth.woodland_realm.lancer": "黑森林王国长枪手", - "npc_data.middle-earth.woodland_realm.nightshade": "黑森林王国夜翳战士", - "npc_data.middle-earth.woodland_realm.nightshade_sentinel": "黑森林王国夜翳哨卫", - "npc_data.middle-earth.woodland_realm.ranger": "黑森林王国游侠", - "npc_data.middle-earth.woodland_realm.sentinel": "黑森林王国哨卫", - "npc_data.middle-earth.woodland_realm.warden_of_the_glade": "黑森林王国林地守卫", - "npc_data.middle-earth.woodland_realm.warrior": "黑森林王国战士", - - "npc_data.middle-earth.mordor.black_numenorean": "魔多黑努门诺尔人", - "npc_data.middle-earth.mordor.captain": "魔多队长", - "npc_data.middle-earth.mordor.militia": "魔多民兵", - "npc_data.middle-earth.mordor.scout": "魔多斥候", - "npc_data.middle-earth.mordor.snaga": "魔多斯那嘎", - "npc_data.middle-earth.mordor.veteran": "魔多精兵", - "npc_data.middle-earth.mordor.warrior": "魔多战士", - - "npc_data.middle-earth.rohan.eorling_marshal": "洛汗埃奥尔元帅", - "npc_data.middle-earth.rohan.horse_lord": "洛汗驭马主", - "npc_data.middle-earth.rohan.knight": "洛汗骑士", - "npc_data.middle-earth.rohan.militia": "洛汗民兵", - "npc_data.middle-earth.rohan.peasant": "洛汗佃农", - "npc_data.middle-earth.rohan.royal_guard": "洛汗皇家守卫", - "npc_data.middle-earth.rohan.soldier": "洛汗士兵", - - "npc_data.middle-earth.shire.militia": "夏尔民兵", - "npc_data.middle-earth.shire.peasant": "夏尔佃农", - "npc_data.middle-earth.shire.shirriff": "夏尔霍比特夏警", - - "npc_data.middle-earth.wild_goblins.brute": "荒原半兽人蛮兵", - "npc_data.middle-earth.wild_goblins.gatherer": "荒原半兽人收集者", - "npc_data.middle-earth.wild_goblins.rider": "荒原半兽人骑手", - "npc_data.middle-earth.wild_goblins.scout": "荒原半兽人斥候", - "npc_data.middle-earth.wild_goblins.warrior": "荒原半兽人战士", + "npc_data.middle-earth.npc": "NPC", + + "npc_type.middle-earth.brigand.chieftain": "匪盗头目", + "npc_type.middle-earth.brigand.mercenary": "匪盗佣兵", + "npc_type.middle-earth.brigand.thief": "匪盗窃贼", + "npc_type.middle-earth.brigand.thug": "匪盗暴徒", + + "npc_type.middle-earth.dale.archer": "河谷邦弓手", + "npc_type.middle-earth.dale.elite_archer": "河谷邦精锐弓手", + "npc_type.middle-earth.dale.knight": "河谷邦骑士", + "npc_type.middle-earth.dale.militia": "河谷邦民兵", + "npc_type.middle-earth.dale.peasant": "河谷邦佃农", + "npc_type.middle-earth.dale.sergeant": "河谷邦将领", + "npc_type.middle-earth.dale.soldier": "河谷邦士兵", + "npc_type.middle-earth.dale.veteran": "河谷邦精兵", + + "npc_type.middle-earth.gondor.citadel_guard": "刚铎王城禁卫军", + "npc_type.middle-earth.gondor.fountain_guard": "刚铎喷泉守卫", + "npc_type.middle-earth.gondor.king_guard": "刚铎王室守卫", + "npc_type.middle-earth.gondor.knight": "刚铎骑士", + "npc_type.middle-earth.gondor.leader": "刚铎统领", + "npc_type.middle-earth.gondor.militia": "刚铎民兵", + "npc_type.middle-earth.gondor.peasant": "刚铎佃农", + "npc_type.middle-earth.gondor.soldier": "刚铎士兵", + "npc_type.middle-earth.gondor.veteran": "刚铎精兵", + + "npc_type.middle-earth.hobgoblin_tribes.gundabad.leader": "贡达巴德统领", + "npc_type.middle-earth.hobgoblin_tribes.gundabad.militia": "贡达巴德民兵", + "npc_type.middle-earth.hobgoblin_tribes.gundabad.rider": "贡达巴德骑手", + "npc_type.middle-earth.hobgoblin_tribes.gundabad.scout": "贡达巴德斥候", + "npc_type.middle-earth.hobgoblin_tribes.gundabad.veteran": "贡达巴德精兵", + "npc_type.middle-earth.hobgoblin_tribes.gundabad.warrior": "贡达巴德战士", + + "npc_type.middle-earth.isengard.berserker": "艾森加德狂战士", + "npc_type.middle-earth.isengard.leader": "艾森加德统领", + "npc_type.middle-earth.isengard.orthanc_guard": "艾森加德欧尔桑克守卫", + "npc_type.middle-earth.isengard.scout": "艾森加德斥候", + "npc_type.middle-earth.isengard.snaga": "艾森加德斯那嘎", + "npc_type.middle-earth.isengard.soldier": "艾森加德士兵", + "npc_type.middle-earth.isengard.veteran": "艾森加德精兵", + "npc_type.middle-earth.isengard.warrior": "艾森加德战士", + + "npc_type.middle-earth.longbeards.erebor.archer": "埃瑞博弓手", + "npc_type.middle-earth.longbeards.erebor.elite": "埃瑞博精锐", + "npc_type.middle-earth.longbeards.erebor.gatewarden": "埃瑞博守门人", + "npc_type.middle-earth.longbeards.erebor.leader": "埃瑞博统领", + "npc_type.middle-earth.longbeards.erebor.militia": "埃瑞博民兵", + "npc_type.middle-earth.longbeards.erebor.miner": "埃瑞博矿工", + "npc_type.middle-earth.longbeards.erebor.peasant": "埃瑞博佃农", + "npc_type.middle-earth.longbeards.erebor.soldier": "埃瑞博士兵", + "npc_type.middle-earth.longbeards.erebor.veteran": "埃瑞博精兵", + + "npc_type.middle-earth.moria.rider": "墨瑞亚骑手", + "npc_type.middle-earth.moria.scout": "墨瑞亚斥候", + "npc_type.middle-earth.moria.veteran": "墨瑞亚精兵", + "npc_type.middle-earth.moria.warrior": "墨瑞亚战士", + "npc_type.middle-earth.moria.chief": "墨瑞亚头目", + "npc_type.middle-earth.moria.goblin": "墨瑞亚半兽人", + "npc_type.middle-earth.moria.militia": "墨瑞亚民兵", + + "npc_type.middle-earth.lothlorien.guard": "洛丝罗瑞恩守卫", + "npc_type.middle-earth.lothlorien.knight": "洛丝罗瑞恩骑士", + "npc_type.middle-earth.lothlorien.lord": "洛丝罗瑞恩领主", + "npc_type.middle-earth.lothlorien.ranger": "洛丝罗瑞恩游侠", + "npc_type.middle-earth.lothlorien.sentinel": "洛丝罗瑞恩哨卫", + "npc_type.middle-earth.lothlorien.warrior": "洛丝罗瑞恩战士", + "npc_type.middle-earth.lothlorien.egladil_commander": "洛丝罗瑞恩埃格拉迪尔指挥官", + "npc_type.middle-earth.lothlorien.egladil_sentinel": "洛丝罗瑞恩埃格拉迪尔哨卫", + "npc_type.middle-earth.lothlorien.civilian": "洛丝罗瑞恩平民", + + "npc_type.middle-earth.woodland_realm.artisan": "黑森林王国工匠", + "npc_type.middle-earth.woodland_realm.commander": "黑森林王国指挥官", + "npc_type.middle-earth.woodland_realm.elven_kings_guard": "黑森林王国国王守卫", + "npc_type.middle-earth.woodland_realm.hunter": "黑森林王国猎手", + "npc_type.middle-earth.woodland_realm.lancer": "黑森林王国长枪手", + "npc_type.middle-earth.woodland_realm.nightshade": "黑森林王国夜翳战士", + "npc_type.middle-earth.woodland_realm.ranger": "黑森林王国游侠", + "npc_type.middle-earth.woodland_realm.sentinel": "黑森林王国哨卫", + "npc_type.middle-earth.woodland_realm.warden_of_the_glade": "黑森林王国林地守卫", + "npc_type.middle-earth.woodland_realm.warrior": "黑森林王国战士", + + "npc_type.middle-earth.mordor.black_numenorean": "魔多黑努门诺尔人", + "npc_type.middle-earth.mordor.captain": "魔多队长", + "npc_type.middle-earth.mordor.militia": "魔多民兵", + "npc_type.middle-earth.mordor.scout": "魔多斥候", + "npc_type.middle-earth.mordor.snaga": "魔多斯那嘎", + "npc_type.middle-earth.mordor.veteran": "魔多精兵", + "npc_type.middle-earth.mordor.warrior": "魔多战士", + "npc_type.middle-earth.mordor.dol_guldur_scout": "魔多多古尔都斥候", + "npc_type.middle-earth.mordor.dol_guldur_warrior": "魔多多古尔都战士", + + "npc_type.middle-earth.rohan.eorling_marshal": "洛汗埃奥尔元帅", + "npc_type.middle-earth.rohan.horse_lord": "洛汗驭马主", + "npc_type.middle-earth.rohan.knight": "洛汗骑士", + "npc_type.middle-earth.rohan.militia": "洛汗民兵", + "npc_type.middle-earth.rohan.peasant": "洛汗佃农", + "npc_type.middle-earth.rohan.royal_guard": "洛汗皇家守卫", + "npc_type.middle-earth.rohan.soldier": "洛汗士兵", + + "npc_type.middle-earth.shire.militia": "夏尔民兵", + "npc_type.middle-earth.shire.peasant": "夏尔佃农", + "npc_type.middle-earth.shire.shirriff": "夏尔霍比特夏警", + + "npc_type.middle-earth.wild_goblins.brute": "荒原半兽人蛮兵", + "npc_type.middle-earth.wild_goblins.gatherer": "荒原半兽人收集者", + "npc_type.middle-earth.wild_goblins.rider": "荒原半兽人骑手", + "npc_type.middle-earth.wild_goblins.scout": "荒原半兽人斥候", + "npc_type.middle-earth.wild_goblins.warrior": "荒原半兽人战士", + + "npc_type.middle-earth.goblin_town.goblin": "半兽人镇半兽人", + "npc_type.middle-earth.goblin_town.rider": "半兽人镇骑手", + "npc_type.middle-earth.goblin_town.scout": "半兽人镇斥候", + "npc_type.middle-earth.goblin_town.veteran": "半兽人镇精兵", + "npc_type.middle-earth.goblin_town.warrior": "半兽人镇战士", + + "npc_type.middle-earth.hobgoblin_tribes.gundabad.goblin": "贡达巴德半兽人", "painting.middle-earth.author.boenndal": "Boenndal", "painting.middle-earth.author.scosher": "Scosher", @@ -14664,6 +14708,16 @@ "__COMMENT__": "种族属性提示 - race_tooltip", "race_tooltip.middle-earth.attribute_header": "属性:", + "race_tooltip.middle-earth.no_attribute_change": "没有变化!", + + "attribute.name.powdered_snow_immunity": "可在细雪上行走", + "attribute.name.climbing_strength": "墙壁攀爬耐力", + "attribute.name.detection_range": "被怪物发现度", + "attribute.name.width_scale": "体型宽度", + + "attribute.modifiers.creative_mode_block_range": "创造模式方块交互距离", + "attribute.modifiers.creative_mode_entity_range": "创造模式实体交互距离", + "attribute.modifiers.total_damage": "总伤害乘数", "__COMMENT__": "种族 - race", "race.middle-earth.dwarf": "矮人", @@ -14672,6 +14726,8 @@ "race.middle-earth.human": "人类", "race.middle-earth.orc": "奥克", "race.middle-earth.uruk": "乌鲁克", + "race.middle-earth.goblin": "半兽人", + "race.middle-earth.snaga": "斯那嘎", "__COMMENT__": "界面屏幕 - screen", "screen.middle-earth.forge": "锻造炉", @@ -14687,6 +14743,7 @@ "screen.middle-earth.reinforced_chest": "加固箱子", "screen.middle-earth.wood_pile": "原木堆", "screen.middle-earth.shaping_anvil": "铁砧塑形", + "screen.middle-earth.sack": "布袋", "screen.middle-earth.artisan_table.weapons": "武器", "screen.middle-earth.artisan_table.sword": "剑", @@ -14727,6 +14784,97 @@ "screen.middle-earth.information.races.many": "种族", "screen.middle-earth.information.description": "简介", + "screen.middle-earth.playerbook.title": "中洲", + "screen.middle-earth.playerbook.description": "本模组的一切来自于著名的传说故事集系列。\n你可以在此探索全新的中洲维度,及其数不胜数的新方块、物品、生物、派系与建筑等!", + + "screen.middle-earth.playerbook.chapters": "章节", + "screen.middle-earth.playerbook.navigate_to": "跳转至", + + "screen.middle-earth.playerbook.chapter_getting_started": "开始游玩", + "screen.middle-earth.playerbook.getting_started_desc": "为了进入中洲,你需要制作一个水晶瓶。\n给制作好的水晶瓶中装满水,并与萤石粉、发光墨囊或发光浆果合成星光水晶瓶。", + "screen.middle-earth.playerbook.getting_started_desc_right": "使用星光水晶瓶,开始你的中洲之旅吧。", + + "screen.middle-earth.playerbook.chapter_enchanting": "附魔", + "screen.middle-earth.playerbook.enchanting_desc": "古老的伟大工匠们,以其精于磨炼器材而闻名于世,他们创作的宝剑或盔甲有市无价,流传千古。\n\n要附魔,你首先需要制作铭刻台,如下所示。", + "screen.middle-earth.playerbook.enchanting_desc_right": "", + + "screen.middle-earth.playerbook.inscription_table": "铭刻台", + "screen.middle-earth.playerbook.inscription_table_desc": "要使用铭刻台,你需要一把凿子、宝石,以及你需要铭刻的物品。不同的宝石有着不同的词条,不同的物品也只能铭刻对应的一些词条。", + "screen.middle-earth.playerbook.inscription_table_desc_right": "以下是耐久魔咒的铭刻示例:", + + "screen.middle-earth.playerbook.chapter_dungeons": "地牢", + "screen.middle-earth.playerbook.dungeons_desc": "在中洲的冒险中,你可能会遇到各种各样的地牢,其中有着大量的财宝。\n贸然进入之前请做好充分准备,如此财宝怎会少了看守者,而它们通常不怀好意……", + "screen.middle-earth.playerbook.dungeons_desc_right": "地牢中可以找到试炼刷怪笼,在这里击败来袭的敌人后可以获取试炼钥匙。\n试炼钥匙用于解锁宝库,而宝库通常深藏在地牢之中……", + + "screen.middle-earth.playerbook.brigands": "匪盗塔楼", + "screen.middle-earth.playerbook.dungeon_brigands_desc": "匪盗的地牢遍布安都因河谷。\n他们从邻近派系偷取财宝,藏匿于废弃的塔楼中。", + "screen.middle-earth.playerbook.dungeon_brigands_desc_right": "", + + "screen.middle-earth.playerbook.spider_burrows": "蜘蛛网道", + "screen.middle-earth.playerbook.dungeon_spider_burrows_desc": "希洛布的子嗣们在此不断繁衍,直至占据了大部分黑森林。\n在此腐化的林间穿行很容易断送性命,但你也有机会找到前人遗落在此的财宝,只看你能否活着带出去……", + "screen.middle-earth.playerbook.dungeon_spider_burrows_desc_right": "", + + "screen.middle-earth.playerbook.chapter_mining": "采矿", + "screen.middle-earth.playerbook.mining_desc": "像煤炭、锡和铜之类的基础资源,在地表附近随处可见,但真正有价值的矿物与宝石都藏在地底深处。\n\n中洲世界地表之下的岩层,由一层层的石头、深板岩、深渊岩与地心岩构成。", + "screen.middle-earth.playerbook.mining_desc_right": "", + + "screen.middle-earth.playerbook.tools": "工具", + "screen.middle-earth.playerbook.mining_tools_desc": "岩层中的资源越深,开采所需要的工具就越精良。\n\n深板岩层中的矿石至少需要石制工具开采,深渊岩层中的则至少需要青铜工具,而地心岩层中的则需要钢制工具。", + "screen.middle-earth.playerbook.mining_tools_desc_right": "请阅读关于锻造的章节,以了解如何获取更好的工具。", + + "screen.middle-earth.playerbook.cave_monsters": "洞穴中的怪物", + "screen.middle-earth.playerbook.mining_cave_monster_desc": "在底下挖掘总是危机四伏——矿工常谈,在中洲地下也从不缺少荒原半兽人四处游荡,它们于此狩猎粗心的落单者。更有传言说,在地底深处还有更加恶臭黑暗之物潜伏……切记,不可无所防备地前往中洲地下。", + "screen.middle-earth.playerbook.mining_cave_monster_desc_right": "深渊中藏着不少珍宝,但切记谨慎行事!", + + "screen.middle-earth.playerbook.chapter_mounts": "坐骑", + "screen.middle-earth.playerbook.mounts_desc": "中洲的路途通常遥远而蜿蜒,旅途中与坐骑为伴不失为一个好的选择。\n\n能成为坐骑的生物多种多样,各有优劣。", + "screen.middle-earth.playerbook.mounts_desc_right": "有些生物只有特定种族才能驯服。", + + "screen.middle-earth.playerbook.broadhoof_goat": "宽蹄山羊", + "screen.middle-earth.playerbook.mount_broadhoof_goat_desc": "作为矮人常用的坐骑,宽蹄山羊使其更方便攀登高山。\n你可以在有矮人定居的山脉中找到这种生物,但小心面对这些毛茸茸的爬山好手:一旦被激怒,宽蹄山羊会变得极具侵略性。它们会朝敌人猛冲过去,高高跃起,并用角顶撞他们。", + "screen.middle-earth.playerbook.mount_broadhoof_goat_desc_right": "只有矮人能驯服宽蹄山羊,喂食它们小麦即可。", + + "screen.middle-earth.playerbook.cave_troll": "洞穴食人妖", + "screen.middle-earth.playerbook.mount_cave_troll_desc": "洞穴食人妖是一类可怖的生物,常居住在洞穴深处。若洞穴食人妖饥饿难耐,它们会攻击一切生物;但如果你处于邪恶派系,那你可以尝试着趁它睡着时用锁链驯服。\n洞穴食人妖最多可以在背上承载三人,而你可以用骨头指挥它。", + "screen.middle-earth.playerbook.mount_cave_troll_desc_right": "洞穴食人妖会乱砸一通,也会冲刺一段距离。", + + "screen.middle-earth.playerbook.great_horn": "大角鹿", + "screen.middle-earth.playerbook.mount_great_horn_desc": "大角鹿栖息于安都因和北荒地的森林中。\n这种雄伟的生物会躲避除了精灵以外的一切陌生人。作为精灵,你可以用许多物品驯服它,如三叶草、甜浆果和蘑菇等。", + "screen.middle-earth.playerbook.mount_great_horn_desc_right": "大角鹿能够越过障碍,\n也能用角刺穿敌人。", + + "screen.middle-earth.playerbook.warg": "座狼", + "screen.middle-earth.playerbook.mount_warg_desc": "这种邪恶生物为战斗与捕猎而生。它们会攻击一切处于良善派系的生物,可以被奥克、斯那嘎、半兽人和乌鲁克骑乘。\n只需一些生肉,便能驯服这种邪恶的野兽。", + "screen.middle-earth.playerbook.mount_warg_desc_right": "座狼能越过障碍,也能把敌人从坐骑上拽下来。", + + "screen.middle-earth.playerbook.chapter_smithing": "锻造", + "screen.middle-earth.playerbook.smithing_desc": "要在如此危机四伏的荒野生存,一件精良的装备必不可少。\n\n锻造系统能让你获取更加致命的武器、更加繁复的的盔甲和更加高效的工具。", + "screen.middle-earth.playerbook.smithing_desc_right": "与工匠台不同,锻造炉更适合金属加工。\n\n你可以用熔炉、红砖和任何一类圆石制作锻造炉。\n你可以从繁茂洞穴中获取黏土,或将泥巴转化为黏土,以制作红砖。", + + "screen.middle-earth.playerbook.copper_alloys": "铜合金", + "screen.middle-earth.playerbook.smithing_copper_alloys_smithing_desc": "青铜和晦铜是两类简单合金,比起石头和铜,它们更硬也更耐用。\n\n铜合金会为你打开通往中洲地底更深层的大门,你现在可以在深渊岩层采矿了。\n要制作合金,你需要将锻造炉调整至冶金模式。", + "screen.middle-earth.playerbook.smithing_copper_alloys_smithing_desc_right": "", + + "screen.middle-earth.playerbook.casting": "浇铸", + "screen.middle-earth.playerbook.smithing_casting_desc": "所有的熔融金属都可以浇铸成金属粒、锭、板材棒和大型棒。不同的铸件需要的熔融金属量不同。\n\n锻造炉内部最多可暂存等量 16 锭的熔融金属。", + "screen.middle-earth.playerbook.smithing_casting_desc_right": "", + + "screen.middle-earth.playerbook.shaping_anvil": "塑型砧", + "screen.middle-earth.playerbook.smithing_shaping_anvil_desc": "塑型砧用于进一步处理锻造部件。\n石砧是最基础的一类塑型砧——你可以用三块原木摆放在底部,再用六块石头摆放在上方合成。", + "screen.middle-earth.playerbook.smithing_shaping_anvil_desc_right": "此外,你还需要一把锻造锤,以配合塑型砧加工所需的锻造部件。", + "screen.middle-earth.playerbook.smithing_shaping_anvil_1_desc": "作为一个初出茅庐的铁匠,你已经有了用到的工具。试试将一个充分加热的大型金属棒摆到石砧上。\n\n接下来,将它塑形为镐头。拿起你的锻造锤,有节奏地左击捶打放在石砧上的大型棒。", + "screen.middle-earth.playerbook.smithing_shaping_anvil_1_desc_right": "锻造部件仅能在充分加热后塑形,也自然会在塑形过程中慢慢降温。\n\n不过对于已经冷却的锻造部件,你可以在锻造炉中重新加热,这样并不会重置其塑形进度。", + + "screen.middle-earth.playerbook.quenching": "淬火", + "screen.middle-earth.playerbook.smithing_quenching_desc": "一旦大型金属棒顺利塑形成镐头,在进一步加工前必须先淬火冷却。你需要在装满水的炼药锅中一口气将其冷却。", + "screen.middle-earth.playerbook.smithing_quenching_desc_right": "对了,炼药锅和水桶都可以用锡锭合成,你可以在中洲地表附近的洞穴里找到这类金属矿石。", + + "screen.middle-earth.playerbook.artisan_table": "工匠台", + "screen.middle-earth.playerbook.smithing_artisan_table_desc": "工匠台是众多盔甲匠、铁匠与手工艺人最常用的工作站,也可以用于将塑形好的锻造部件组装成最终产物。", + "screen.middle-earth.playerbook.smithing_artisan_table_desc_right": "", + "screen.middle-earth.playerbook.smithing_artisan_table_1_desc": "用一个青铜镐头和两根木棍在工匠台中合成青铜镐,替换掉你老旧的石镐,加快在地下采集矿石的速度。\n\n对于那些简单的工具和装备,仍然可以在普通的工作台上合成。", + "screen.middle-earth.playerbook.smithing_artisan_table_1_desc_right": "不过,在工匠台上制作工具和装备会得到额外的耐久加成。", + + "__COMMENT__": "字幕 - sounds", "sounds.middle-earth.bellows_push": "风箱:吹气", "sounds.middle-earth.chisel_enchant": "凿子:附魔", @@ -14741,6 +14889,11 @@ "sounds.middle-earth.great_horn_hurt": "大角鹿:受伤", "sounds.middle-earth.great_horn_call": "大角鹿:嘶鸣", "sounds.middle-earth.great_horn_death": "大角鹿:死亡", + "sounds.middle-earth.cave_troll_death": "洞穴食人妖:死亡", + "sounds.middle-earth.cave_troll_hurt": "洞穴食人妖:受伤", + "sounds.middle-earth.cave_troll_idle": "洞穴食人妖:咕哝", + "sounds.middle-earth.cave_troll_roar": "洞穴食人妖:咆哮", + "sounds.middle-earth.cave_troll_step": "洞穴食人妖:行走", "__COMMENT__": "出生点 - spawn", "spawn.middle-earth.coordinates_base.dynamic": "[x,z] ", @@ -14763,10 +14916,13 @@ "spawn.middle-earth.gondor.pelargir": "佩拉基尔", "spawn.middle-earth.gondor.ringlo_vale": "凛格罗谷地", - "spawn.middle-earth.hobgoblin_tribes.gundabad.goblin_town": "半兽人镇", + "spawn.middle-earth.goblin_town.goblin_town": "半兽人镇", + + "spawn.middle-earth.hobgoblin_tribes.gundabad.mount_gram": "格拉姆山", "spawn.middle-earth.hobgoblin_tribes.gundabad.grey_mountains": "灰色山脉", "spawn.middle-earth.hobgoblin_tribes.gundabad.gundabad": "贡达巴德", - "spawn.middle-earth.hobgoblin_tribes.gundabad.moria": "墨瑞亚", + + "spawn.middle-earth.moria.goblin_camp": "半兽人营地", "spawn.middle-earth.isengard.orthanc": "欧尔桑克", @@ -14777,10 +14933,8 @@ "spawn.middle-earth.lothlorien.cerin_amroth": "凯林阿姆洛斯", "spawn.middle-earth.woodland_realm.elvenkings_halls": "精灵国王的宫殿", - "spawn.middle-earth.misty_mountains_goblins.goblin_town": "半兽人镇", - "spawn.middle-earth.misty_mountains_goblins.grey_mountains": "灰色山脉", - "spawn.middle-earth.misty_mountains_goblins.gundabad": "贡达巴德", - "spawn.middle-earth.misty_mountains_goblins.moria": "墨瑞亚", + "spawn.middle-earth.moria.east_gate": "东门", + "spawn.middle-earth.moria.west_gate": "西门", "spawn.middle-earth.mordor.black_gates": "黑门", "spawn.middle-earth.mordor.dol_guldur": "多古尔都", @@ -14998,17 +15152,11 @@ "tooltip.middle-earth.forge_output_mode1": "1 金属粒", "tooltip.middle-earth.forge_output_mode2": "1 金属锭", "tooltip.middle-earth.forge_output_mode3": "2 金属锭", - "tooltip.middle-earth.forge_output_mode4": "3 金属锭", "tooltip.middle-earth.forge_output_mode5": "3 金属锭", "tooltip.middle-earth.forge_output_mode_await": "选择一种铸件", "tooltip.middle-earth.anvil_hammer": "主手持锻造锤", "tooltip.middle-earth.anvil_hammer_2": "左键击打铁砧为金属塑形", - - "tooltip.middle-earth.forge_mode_alloying": "冶金模式", - "tooltip.middle-earth.forge_mode_heating": "加热模式", - "tooltip.middle-earth.forge_mode_heating_switch": "在锻造炉两侧有小通风孔处", - "tooltip.middle-earth.forge_mode_heating_switch_2": "放置风箱以进入冶金模式", "tooltip.middle-earth.forge_mode_switch_alloying": "点击以切换至加热模式", "tooltip.middle-earth.forge_mode_switch_heating": "点击以切换至冶金模式", "tooltip.middle-earth.ingots_number": "金属锭", diff --git a/middle-earth/src/main/resources/assets/middle-earth/sounds/music/menu/swept_away.ogg b/middle-earth/src/main/resources/assets/middle-earth/sounds/music/menu/swept_away.ogg new file mode 100644 index 0000000000..5f75a07480 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/sounds/music/menu/swept_away.ogg differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/character/eyes/warg_eye_emissive.png b/middle-earth/src/main/resources/assets/middle-earth/textures/character/eyes/warg_eye_emissive.png new file mode 100644 index 0000000000..f441159a0c Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/character/eyes/warg_eye_emissive.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_blue.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_blue.png new file mode 100644 index 0000000000..161df21c03 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_blue.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_emissive.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_emissive.png new file mode 100644 index 0000000000..bb624e41d2 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_emissive.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_orange.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_orange.png new file mode 100644 index 0000000000..7ca32e2ba2 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/eyes/warg_eyes_orange.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/feature/warg_eyes.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/feature/warg_eyes.png deleted file mode 100644 index 33bfe9271f..0000000000 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/feature/warg_eyes.png and /dev/null differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/feature/warg_saddle.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/feature/warg_saddle.png index 5495e86fd5..82d758c00d 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/feature/warg_saddle.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/feature/warg_saddle.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_black.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_black.png index 3fb4eb059c..a3e1a43949 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_black.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_black.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_brown.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_brown.png index 8f42d61d91..cc632e2d8e 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_brown.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_brown.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_gray.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_gray.png index 7c618bddc6..63819278a8 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_gray.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_gray.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_gray_face.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_gray_face.png deleted file mode 100644 index ee52345107..0000000000 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_gray_face.png and /dev/null differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_light_gray.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_light_gray.png index 55a0a81298..c6aa0e9e3e 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_light_gray.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_light_gray.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_mottled.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_mottled.png new file mode 100644 index 0000000000..3a4a60fdff Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_mottled.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_red_bald.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_red_bald.png deleted file mode 100644 index 77bcde3351..0000000000 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_red_bald.png and /dev/null differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_snow.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_snow.png new file mode 100644 index 0000000000..b03d189359 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_snow.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_tan.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_tan.png index 4baa8bb85d..abb20cb636 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_tan.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_tan.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_tan_gray.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_tan_gray.png deleted file mode 100644 index 743f402242..0000000000 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entities/warg/warg_tan_gray.png and /dev/null differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_gundabad_plate_armor.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_gundabad_plate_armor.png index 39d9a2ac69..dd9c1b3c94 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_gundabad_plate_armor.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_gundabad_plate_armor.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_isengard_plate_armor.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_isengard_plate_armor.png index 58725f5306..3654007912 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_isengard_plate_armor.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_isengard_plate_armor.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_leather_armor.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_leather_armor.png index e3221c3f36..158d9b1152 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_leather_armor.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_leather_armor.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_mordor_mail_armor.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_mordor_mail_armor.png index 422252ced7..c983252132 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_mordor_mail_armor.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_mordor_mail_armor.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_mordor_plate_armor.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_mordor_plate_armor.png index 966a9f31be..1ea557c9bc 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_mordor_plate_armor.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_mordor_plate_armor.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_reinforced_leather_armor.png b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_reinforced_leather_armor.png index 35e446b93d..e0c4ac6f46 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_reinforced_leather_armor.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/entity/equipment/horse_body/beast_armor/warg_reinforced_leather_armor.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/ceratopsian_nugget.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/ceratopsian_nugget.png new file mode 100644 index 0000000000..2b4f8126d3 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/ceratopsian_nugget.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/ceratopsian_nugget_hot.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/ceratopsian_nugget_hot.png new file mode 100644 index 0000000000..3e4de85610 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/ceratopsian_nugget_hot.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/crude_hammer.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/crude_hammer.png new file mode 100644 index 0000000000..012b85ef47 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/crude_hammer.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/crude_smithing_hammer.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/crude_smithing_hammer.png new file mode 100644 index 0000000000..012b85ef47 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/crude_smithing_hammer.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/pterosaur_nugget.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/pterosaur_nugget.png new file mode 100644 index 0000000000..0369d29522 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/pterosaur_nugget.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/pterosaur_nugget_hot.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/pterosaur_nugget_hot.png new file mode 100644 index 0000000000..bf0a2ee77b Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/pterosaur_nugget_hot.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/sauropod_nugget.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/sauropod_nugget.png new file mode 100644 index 0000000000..2c579a1651 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/sauropod_nugget.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/sauropod_nugget_hot.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/sauropod_nugget_hot.png new file mode 100644 index 0000000000..fb93007d32 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/sauropod_nugget_hot.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/therapod_nugget.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/therapod_nugget.png new file mode 100644 index 0000000000..71065fa999 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/therapod_nugget.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/therapod_nugget_hot.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/therapod_nugget_hot.png new file mode 100644 index 0000000000..59dcdf3970 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/therapod_nugget_hot.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/thyreophoran_nugget.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/thyreophoran_nugget.png new file mode 100644 index 0000000000..7ff28fe359 Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/thyreophoran_nugget.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/thyreophoran_nugget_hot.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/thyreophoran_nugget_hot.png new file mode 100644 index 0000000000..a17ee8762d Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/thyreophoran_nugget_hot.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/item/woodland_realm_dagger.png b/middle-earth/src/main/resources/assets/middle-earth/textures/item/woodland_realm_dagger.png new file mode 100644 index 0000000000..73e020195a Binary files /dev/null and b/middle-earth/src/main/resources/assets/middle-earth/textures/item/woodland_realm_dagger.png differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/map_data/1.0.0-1.21.8-beta-dev.zip b/middle-earth/src/main/resources/assets/middle-earth/textures/map_data/1.0.0-1.21.8-beta.zip similarity index 77% rename from middle-earth/src/main/resources/assets/middle-earth/textures/map_data/1.0.0-1.21.8-beta-dev.zip rename to middle-earth/src/main/resources/assets/middle-earth/textures/map_data/1.0.0-1.21.8-beta.zip index c68cb16fa3..c9e1a23e32 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/map_data/1.0.0-1.21.8-beta-dev.zip and b/middle-earth/src/main/resources/assets/middle-earth/textures/map_data/1.0.0-1.21.8-beta.zip differ diff --git a/middle-earth/src/main/resources/assets/middle-earth/textures/models/helmet_attachment/galadhrim_hood.png b/middle-earth/src/main/resources/assets/middle-earth/textures/models/helmet_attachment/galadhrim_hood.png index 6d5ae4333c..e753502d09 100644 Binary files a/middle-earth/src/main/resources/assets/middle-earth/textures/models/helmet_attachment/galadhrim_hood.png and b/middle-earth/src/main/resources/assets/middle-earth/textures/models/helmet_attachment/galadhrim_hood.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/sounds.json b/middle-earth/src/main/resources/assets/minecraft/sounds.json new file mode 100644 index 0000000000..dc71eec42c --- /dev/null +++ b/middle-earth/src/main/resources/assets/minecraft/sounds.json @@ -0,0 +1,11 @@ +{ + "music.menu": { + "replace": true, + "sounds": [ + { + "name": "middle-earth:music/menu/swept_away", + "stream": true + } + ] + } +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_0.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_0.png new file mode 100644 index 0000000000..c215233239 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_0.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_1.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_1.png new file mode 100644 index 0000000000..30b3bf6c10 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_1.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_2.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_2.png new file mode 100644 index 0000000000..5a4998e6e7 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_2.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_3.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_3.png new file mode 100644 index 0000000000..9cc5371e62 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_3.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_4.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_4.png new file mode 100644 index 0000000000..7704ac02d4 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_4.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_5.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_5.png new file mode 100644 index 0000000000..f37542c639 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background/panorama_5.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_0.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_0.png new file mode 100644 index 0000000000..76d135052b Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_0.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_1.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_1.png new file mode 100644 index 0000000000..0d573e5971 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_1.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_2.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_2.png new file mode 100644 index 0000000000..1b18a8f9fe Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_2.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_3.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_3.png new file mode 100644 index 0000000000..8dad1161b0 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_3.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_4.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_4.png new file mode 100644 index 0000000000..3e83140ed8 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_4.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_5.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_5.png new file mode 100644 index 0000000000..33fa3b6378 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/background_1.0.0b/panorama_5.png differ diff --git a/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/minecraft.png b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/minecraft.png new file mode 100644 index 0000000000..989c4fa0d2 Binary files /dev/null and b/middle-earth/src/main/resources/assets/minecraft/textures/gui/title/minecraft.png differ diff --git a/middle-earth/src/main/resources/data/middle-earth/advancement/middle_earth/kill_spawn_of_shelob.json b/middle-earth/src/main/resources/data/middle-earth/advancement/middle_earth/kill_spawn_of_shelob.json index 971c23c665..fbfb0855bb 100644 --- a/middle-earth/src/main/resources/data/middle-earth/advancement/middle_earth/kill_spawn_of_shelob.json +++ b/middle-earth/src/main/resources/data/middle-earth/advancement/middle_earth/kill_spawn_of_shelob.json @@ -21,7 +21,7 @@ "description": { "translate": "advancements.middle_earth.kill_spawn_of_shelob.description" }, - "frame": "task", + "frame": "goal", "hidden": false, "icon": { "count": 1, @@ -36,5 +36,8 @@ [ "kill_spawn_of_shelob" ] - ] + ], + "rewards": { + "experience": 100 + } } \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/advancement/middle_earth/mithril.json b/middle-earth/src/main/resources/data/middle-earth/advancement/middle_earth/mithril.json index 229149f500..28b5e0bf94 100644 --- a/middle-earth/src/main/resources/data/middle-earth/advancement/middle_earth/mithril.json +++ b/middle-earth/src/main/resources/data/middle-earth/advancement/middle_earth/mithril.json @@ -32,5 +32,8 @@ [ "raw_mithril" ] - ] + ], + "rewards": { + "experience": 500 + } } \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/advancement/smithing/hot_ones.json b/middle-earth/src/main/resources/data/middle-earth/advancement/smithing/hot_ones.json new file mode 100644 index 0000000000..0ff8f99f44 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/advancement/smithing/hot_ones.json @@ -0,0 +1,39 @@ +{ + "parent": "middle-earth:smithing/root", + "criteria": { + "hot_ones": { + "conditions": { + "items": [ + { + "items": "#middle-earth:chicken_nuggets" + } + ] + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "advancements.smithing.hot_ones.description" + }, + "frame": "challenge", + "hidden": true, + "icon": { + "count": 1, + "id": "middle-earth:therapod_nugget" + }, + "show_toast": true, + "title": { + "translate": "advancements.smithing.hot_ones.title" + } + }, + "requirements": [ + [ + "hot_ones" + ] + ], + "rewards": { + "experience": 50 + } +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/advancement/smithing/treated_anvil.json b/middle-earth/src/main/resources/data/middle-earth/advancement/smithing/treated_anvil.json index 6091e1a28e..392893a798 100644 --- a/middle-earth/src/main/resources/data/middle-earth/advancement/smithing/treated_anvil.json +++ b/middle-earth/src/main/resources/data/middle-earth/advancement/smithing/treated_anvil.json @@ -19,7 +19,7 @@ "description": { "translate": "advancements.smithing.treated_anvil.description" }, - "frame": "task", + "frame": "goal", "hidden": false, "icon": { "count": 1, @@ -34,5 +34,8 @@ [ "treated_anvil" ] - ] + ], + "rewards": { + "experience": 50 + } } \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/enchantment/stealthy_trail.json b/middle-earth/src/main/resources/data/middle-earth/enchantment/stealthy_trail.json index ddaedbc230..c56ceccf32 100644 --- a/middle-earth/src/main/resources/data/middle-earth/enchantment/stealthy_trail.json +++ b/middle-earth/src/main/resources/data/middle-earth/enchantment/stealthy_trail.json @@ -14,8 +14,8 @@ "per_level_above_first": 10 }, "slots": [ - "chest" + "legs" ], - "supported_items": "#middle-earth:enchantable/light_chest", + "supported_items": "#middle-earth:enchantable/light_leg", "weight": 1 } \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/enchantment/tree_feller.json b/middle-earth/src/main/resources/data/middle-earth/enchantment/tree_feller.json index f6d6e819c8..2fb5a5a2dd 100644 --- a/middle-earth/src/main/resources/data/middle-earth/enchantment/tree_feller.json +++ b/middle-earth/src/main/resources/data/middle-earth/enchantment/tree_feller.json @@ -16,6 +16,6 @@ "slots": [ "mainhand" ], - "supported_items": "#minecraft:enchantable/mining", + "supported_items": "#minecraft:axes", "weight": 10 } \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_leaves.json b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_leaves.json new file mode 100644 index 0000000000..7eaa5b5e12 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_leaves.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + } + ], + "name": "middle-earth:fallen_leaves" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/fern" +} diff --git a/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_mallorn_leaves.json b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_mallorn_leaves.json new file mode 100644 index 0000000000..2c8fde7115 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_mallorn_leaves.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + } + ], + "name": "middle-earth:fallen_mallorn_leaves" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/fern" +} diff --git a/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_mirkwood_leaves.json b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_mirkwood_leaves.json new file mode 100644 index 0000000000..df324e66ea --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/fallen_mirkwood_leaves.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + } + ], + "name": "middle-earth:fallen_mirkwood_leaves" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/fern" +} diff --git a/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/skull_candle.json b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/skull_candle.json index 018b5ff59f..39c41d4c52 100644 --- a/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/skull_candle.json +++ b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/skull_candle.json @@ -7,6 +7,20 @@ { "type": "minecraft:item", "functions": [ + { + "add": false, + "conditions": [ + { + "block": "middle-earth:skull_candle", + "condition": "minecraft:block_state_property", + "properties": { + "candles": "1" + } + } + ], + "count": 0.0, + "function": "minecraft:set_count" + }, { "add": false, "conditions": [ @@ -18,7 +32,7 @@ } } ], - "count": 2.0, + "count": 1.0, "function": "minecraft:set_count" }, { @@ -32,17 +46,26 @@ } } ], - "count": 3.0, + "count": 2.0, "function": "minecraft:set_count" }, { "function": "minecraft:explosion_decay" } ], - "name": "middle-earth:skull_candle" + "name": "minecraft:candle" } ], "rolls": 1.0 + }, + { + "rolls": 1.0, + "entries": [ + { + "type": "minecraft:item", + "name": "middle-earth:skull_candle" + } + ] } ], "random_sequence": "middle-earth:blocks/skull_candle" diff --git a/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/thorny_growth.json b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/thorny_growth.json new file mode 100644 index 0000000000..bfbedcae70 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/loot_table/blocks/thorny_growth.json @@ -0,0 +1,118 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "conditions": [ + { + "condition": "minecraft:match_tool", + "predicate": { + "items": "minecraft:shears" + } + } + ], + "functions": [ + { + "add": true, + "conditions": [ + { + "block": "middle-earth:thorny_growth", + "condition": "minecraft:block_state_property", + "properties": { + "down": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "middle-earth:thorny_growth", + "condition": "minecraft:block_state_property", + "properties": { + "up": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "middle-earth:thorny_growth", + "condition": "minecraft:block_state_property", + "properties": { + "north": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "middle-earth:thorny_growth", + "condition": "minecraft:block_state_property", + "properties": { + "south": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "middle-earth:thorny_growth", + "condition": "minecraft:block_state_property", + "properties": { + "west": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "middle-earth:thorny_growth", + "condition": "minecraft:block_state_property", + "properties": { + "east": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "count": -1.0, + "function": "minecraft:set_count" + }, + { + "function": "minecraft:explosion_decay" + } + ], + "name": "middle-earth:thorny_growth" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "minecraft:blocks/glow_lichen" +} diff --git a/middle-earth/src/main/resources/data/middle-earth/loot_table/gameplay/vaults/mirkwood_burrow_treasure_unique.json b/middle-earth/src/main/resources/data/middle-earth/loot_table/gameplay/vaults/mirkwood_burrow_treasure_unique.json index b226dd1cf8..b61ab841d9 100644 --- a/middle-earth/src/main/resources/data/middle-earth/loot_table/gameplay/vaults/mirkwood_burrow_treasure_unique.json +++ b/middle-earth/src/main/resources/data/middle-earth/loot_table/gameplay/vaults/mirkwood_burrow_treasure_unique.json @@ -802,6 +802,106 @@ "options": "#middle-earth:on_random_spider_loot" } ] + }, + { + "type": "minecraft:item", + "name": "middle-earth:black_castellan_helmet", + "weight": 5, + "functions": [ + { + "add": false, + "damage": { + "type": "minecraft:uniform", + "max": 0.9, + "min": 0.5 + }, + "function": "minecraft:set_damage" + }, + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "max": 15, + "min": 5 + }, + "options": "#middle-earth:on_random_spider_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "middle-earth:black_castellan_chestplate", + "weight": 5, + "functions": [ + { + "add": false, + "damage": { + "type": "minecraft:uniform", + "max": 0.9, + "min": 0.5 + }, + "function": "minecraft:set_damage" + }, + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "max": 15, + "min": 5 + }, + "options": "#middle-earth:on_random_spider_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "middle-earth:black_castellan_leggings", + "weight": 5, + "functions": [ + { + "add": false, + "damage": { + "type": "minecraft:uniform", + "max": 0.9, + "min": 0.5 + }, + "function": "minecraft:set_damage" + }, + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "max": 15, + "min": 5 + }, + "options": "#middle-earth:on_random_spider_loot" + } + ] + }, + { + "type": "minecraft:item", + "name": "middle-earth:black_castellan_boots", + "weight": 5, + "functions": [ + { + "add": false, + "damage": { + "type": "minecraft:uniform", + "max": 0.9, + "min": 0.5 + }, + "function": "minecraft:set_damage" + }, + { + "function": "minecraft:enchant_with_levels", + "levels": { + "type": "minecraft:uniform", + "max": 15, + "min": 5 + }, + "options": "#middle-earth:on_random_spider_loot" + } + ] }, { "type": "minecraft:item", diff --git a/middle-earth/src/main/resources/data/middle-earth/loot_table/structures/bandits/treasure.json b/middle-earth/src/main/resources/data/middle-earth/loot_table/structures/bandits/treasure.json index de1a18fa8e..8743c8ce13 100644 --- a/middle-earth/src/main/resources/data/middle-earth/loot_table/structures/bandits/treasure.json +++ b/middle-earth/src/main/resources/data/middle-earth/loot_table/structures/bandits/treasure.json @@ -196,7 +196,7 @@ "weight": 2 } ], - "rolls": 2 + "rolls": 1 }, { "bonus_rolls": 0.5, diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/crude_smithing_hammer.json b/middle-earth/src/main/resources/data/middle-earth/recipe/crude_smithing_hammer.json new file mode 100644 index 0000000000..46442ea1a0 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/crude_smithing_hammer.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "MSM", + " S " + ], + "key": { + "M": "middle-earth:crude_ingot", + "S": "minecraft:stick" + }, + "result": { + "id": "middle-earth:crude_smithing_hammer", + "count": 1 + } +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/dry_larch_leaves_from_campfire.json b/middle-earth/src/main/resources/data/middle-earth/recipe/dry_larch_leaves_from_campfire.json new file mode 100644 index 0000000000..706aad7a55 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/dry_larch_leaves_from_campfire.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:campfire_cooking", + "category": "food", + "cookingtime": 600, + "experience": 0.1, + "ingredient": "middle-earth:larch_leaves", + "result": { + "id": "middle-earth:dry_larch_leaves" + } +} diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/dry_larch_leaves_from_smoking.json b/middle-earth/src/main/resources/data/middle-earth/recipe/dry_larch_leaves_from_smoking.json new file mode 100644 index 0000000000..da558b36c9 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/dry_larch_leaves_from_smoking.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:smoking", + "category": "blocks", + "cookingtime": 100, + "experience": 0.1, + "ingredient": "middle-earth:larch_leaves", + "result": { + "id": "middle-earth:dry_larch_leaves" + } +} diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/dry_pine_leaves_from_campfire.json b/middle-earth/src/main/resources/data/middle-earth/recipe/dry_pine_leaves_from_campfire.json new file mode 100644 index 0000000000..64e3da4099 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/dry_pine_leaves_from_campfire.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:smoking", + "category": "blocks", + "cookingtime": 100, + "experience": 0.1, + "ingredient": "middle-earth:pine_leaves", + "result": { + "id": "middle-earth:dry_pine_leaves" + } +} diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/dry_pine_leaves_from_smoking.json b/middle-earth/src/main/resources/data/middle-earth/recipe/dry_pine_leaves_from_smoking.json new file mode 100644 index 0000000000..ad56c9ef17 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/dry_pine_leaves_from_smoking.json @@ -0,0 +1,10 @@ +{ + "type": "minecraft:campfire_cooking", + "category": "food", + "cookingtime": 600, + "experience": 0.1, + "ingredient": "middle-earth:pine_leaves", + "result": { + "id": "middle-earth:dry_pine_leaves" + } +} diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/lever_alt.json b/middle-earth/src/main/resources/data/middle-earth/recipe/lever_alt.json new file mode 100644 index 0000000000..a56d9566cd --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/lever_alt.json @@ -0,0 +1,15 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "S", + "C" + ], + "key": { + "S": "minecraft:stick", + "C": "#minecraft:stone_crafting_materials" + }, + "result": { + "id": "minecraft:lever", + "count": 1 + } +} diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/mithril_ingot_from_blasting_mithril_ore.json b/middle-earth/src/main/resources/data/middle-earth/recipe/mithril_ingot_from_blasting_mithril_ore.json index f3e1619b7a..ac10dff602 100644 --- a/middle-earth/src/main/resources/data/middle-earth/recipe/mithril_ingot_from_blasting_mithril_ore.json +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/mithril_ingot_from_blasting_mithril_ore.json @@ -4,6 +4,6 @@ "result": { "id": "middle-earth:mithril_ingot" }, - "experience": 2, + "experience": 5, "cookingtime": 300 } \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/mithril_ingot_from_blasting_raw_mithril.json b/middle-earth/src/main/resources/data/middle-earth/recipe/mithril_ingot_from_blasting_raw_mithril.json index f9d9999c79..863b31fb06 100644 --- a/middle-earth/src/main/resources/data/middle-earth/recipe/mithril_ingot_from_blasting_raw_mithril.json +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/mithril_ingot_from_blasting_raw_mithril.json @@ -4,6 +4,6 @@ "result": { "id": "middle-earth:mithril_ingot" }, - "experience": 2, + "experience": 5, "cookingtime": 400 } \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/reinforced_barrel.json b/middle-earth/src/main/resources/data/middle-earth/recipe/reinforced_barrel.json new file mode 100644 index 0000000000..54b5a73809 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/reinforced_barrel.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "R": "minecraft:resin_clump", + "S": "#minecraft:wooden_slabs", + "V": "#middle-earth:wooden_vertical_slabs" + }, + "pattern": [ + "V V", + "VRV", + "VSV" + ], + "result": { + "count": 1, + "id": "middle-earth:reinforced_barrel" + } +} diff --git a/middle-earth/src/main/resources/data/middle-earth/recipe/target_alt.json b/middle-earth/src/main/resources/data/middle-earth/recipe/target_alt.json new file mode 100644 index 0000000000..c4838017d5 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/recipe/target_alt.json @@ -0,0 +1,16 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + " R ", + "RHR", + " R " + ], + "key": { + "R": "middle-earth:red_agate_shard", + "H": "#middle-earth:thatchy" + }, + "result": { + "id": "minecraft:target", + "count": 1 + } +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor.nbt index 08f6579ed6..fc2d5e3480 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor_prison_library.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor_prison_library.nbt index b681f0f147..bb6e66bde2 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor_prison_library.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor_prison_library.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor_storage.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor_storage.nbt index 10ee117326..6667d41735 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor_storage.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/corridor_storage.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/cross_junction.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/cross_junction.nbt index 1633c14eca..172a6b613e 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/cross_junction.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/cross_junction.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_junction.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_junction.nbt index 0483ab2615..0a159aa38a 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_junction.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_junction.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_long_stairs.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_long_stairs.nbt index 7924daaf00..a6a596be05 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_long_stairs.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_long_stairs.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_prison.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_prison.nbt index 7ccefc14da..2f0743a1d8 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_prison.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_prison.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_ruins.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_ruins.nbt index 7df2b0967d..27bed19a8a 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_ruins.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_ruins.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_tjunction.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_tjunction.nbt index 8631d168f0..6d3aed4947 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_tjunction.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/double_floor_tjunction.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/entrance.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/entrance.nbt index cf1cfd913b..7721ab855d 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/entrance.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/bandits/stronghold/entrance.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_hive_pit.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_hive_pit.nbt index 28f13f49b2..d1c691cd71 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_hive_pit.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_hive_pit.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_looted_treasure_room.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_looted_treasure_room.nbt index 68ace16de9..035e01736a 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_looted_treasure_room.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_looted_treasure_room.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_treasure_room.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_treasure_room.nbt index e1dadc6ce2..5a223d56b7 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_treasure_room.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_treasure_room.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_trial_room.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_trial_room.nbt index 7e4a11d0a5..43135a9368 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_trial_room.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/mirkwood/spider/burrow_trial_room.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/dinner_house.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/dinner_house.nbt index 26f1094736..377ffca793 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/dinner_house.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/dinner_house.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house.nbt index 695d24a2fe..55a331f4ce 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_2.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_2.nbt index d735139688..588b31c5b7 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_2.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_2.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_4.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_4.nbt index a4a808012e..e7c172859a 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_4.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_4.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_6.nbt b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_6.nbt index c6acddf692..48baae024d 100644 Binary files a/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_6.nbt and b/middle-earth/src/main/resources/data/middle-earth/structure/wlr/hamlet/house_6.nbt differ diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/enchantment/exclusive_set/hewing.json b/middle-earth/src/main/resources/data/middle-earth/tags/enchantment/exclusive_set/hewing.json index f74aa42dde..4f1d83cf35 100644 --- a/middle-earth/src/main/resources/data/middle-earth/tags/enchantment/exclusive_set/hewing.json +++ b/middle-earth/src/main/resources/data/middle-earth/tags/enchantment/exclusive_set/hewing.json @@ -1,6 +1,5 @@ { "values": [ - "minecraft:fortune", - "minecraft:efficiency" + "minecraft:fortune" ] -} \ No newline at end of file +} diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/bone_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/bone_tool_materials.json new file mode 100644 index 0000000000..335118e3fa --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/bone_tool_materials.json @@ -0,0 +1,7 @@ +{ + "values": [ + "minecraft:bone", + "middle-earth:dirty_bone", + "middle-earth:fang" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/bronze_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/bronze_tool_materials.json new file mode 100644 index 0000000000..b4d1c7035b --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/bronze_tool_materials.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:bronze_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/burzum_steel_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/burzum_steel_tool_materials.json new file mode 100644 index 0000000000..28bd42b498 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/burzum_steel_tool_materials.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:burzum_steel_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/chicken_nuggets.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/chicken_nuggets.json new file mode 100644 index 0000000000..604cbfa58b --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/chicken_nuggets.json @@ -0,0 +1,9 @@ +{ + "values": [ + "middle-earth:pterosaur_nugget", + "middle-earth:therapod_nugget", + "middle-earth:ceratopsian_nugget", + "middle-earth:thyreophoran_nugget", + "middle-earth:sauropod_nugget" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/copper_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/copper_tool_materials.json new file mode 100644 index 0000000000..1cc1f065c5 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/copper_tool_materials.json @@ -0,0 +1,5 @@ +{ + "values": [ + "minecraft:copper_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/crude_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/crude_tool_materials.json new file mode 100644 index 0000000000..10ef8e6d9c --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/crude_tool_materials.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:crude_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/edhel_steel_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/edhel_steel_tool_materials.json new file mode 100644 index 0000000000..2e372a872d --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/edhel_steel_tool_materials.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:edhel_steel_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/khazad_steel_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/khazad_steel_tool_materials.json new file mode 100644 index 0000000000..643122c75c --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/khazad_steel_tool_materials.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:khazad_steel_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/mithril_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/mithril_tool_materials.json new file mode 100644 index 0000000000..037e8843d0 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/mithril_tool_materials.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:mithril_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_bone_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_bone_armor.json new file mode 100644 index 0000000000..335118e3fa --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_bone_armor.json @@ -0,0 +1,7 @@ +{ + "values": [ + "minecraft:bone", + "middle-earth:dirty_bone", + "middle-earth:fang" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_bronze_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_bronze_armor.json new file mode 100644 index 0000000000..b4d1c7035b --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_bronze_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:bronze_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_burzum_steel_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_burzum_steel_armor.json new file mode 100644 index 0000000000..28bd42b498 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_burzum_steel_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:burzum_steel_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_crude_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_crude_armor.json new file mode 100644 index 0000000000..10ef8e6d9c --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_crude_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:crude_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_edhel_steel_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_edhel_steel_armor.json new file mode 100644 index 0000000000..2e372a872d --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_edhel_steel_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:edhel_steel_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_khazad_steel_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_khazad_steel_armor.json new file mode 100644 index 0000000000..643122c75c --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_khazad_steel_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:khazad_steel_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_steel_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_steel_armor.json new file mode 100644 index 0000000000..e7c350ed86 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_steel_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:steel_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_straw_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_straw_armor.json new file mode 100644 index 0000000000..137b124517 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_straw_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:straw" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_wool_armor.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_wool_armor.json new file mode 100644 index 0000000000..bb52fac8a0 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/repairs_wool_armor.json @@ -0,0 +1,20 @@ +{ + "values": [ + "minecraft:white_wool", + "minecraft:orange_wool", + "minecraft:magenta_wool", + "minecraft:light_blue_wool", + "minecraft:yellow_wool", + "minecraft:lime_wool", + "minecraft:pink_wool", + "minecraft:gray_wool", + "minecraft:light_gray_wool", + "minecraft:cyan_wool", + "minecraft:purple_wool", + "minecraft:blue_wool", + "minecraft:brown_wool", + "minecraft:green_wool", + "minecraft:red_wool", + "minecraft:black_wool" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/item/steel_tool_materials.json b/middle-earth/src/main/resources/data/middle-earth/tags/item/steel_tool_materials.json new file mode 100644 index 0000000000..e7c350ed86 --- /dev/null +++ b/middle-earth/src/main/resources/data/middle-earth/tags/item/steel_tool_materials.json @@ -0,0 +1,5 @@ +{ + "values": [ + "middle-earth:steel_ingot" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/data/middle-earth/tags/worldgen/biome/has_structure/gondor_biomes.json b/middle-earth/src/main/resources/data/middle-earth/tags/worldgen/biome/has_structure/gondor_biomes.json index 81cbb32f0f..a5bfb9ab39 100644 --- a/middle-earth/src/main/resources/data/middle-earth/tags/worldgen/biome/has_structure/gondor_biomes.json +++ b/middle-earth/src/main/resources/data/middle-earth/tags/worldgen/biome/has_structure/gondor_biomes.json @@ -3,6 +3,7 @@ "values": [ "middle-earth:anorien", "middle-earth:lebennin", + "middle-earth:lossarnach", "middle-earth:pelennor_fields", "middle-earth:lamedon", "middle-earth:blackroot_vale", diff --git a/middle-earth/src/main/resources/data/minecraft/tags/item/dirt.json b/middle-earth/src/main/resources/data/minecraft/tags/item/dirt.json new file mode 100644 index 0000000000..1226d9088c --- /dev/null +++ b/middle-earth/src/main/resources/data/minecraft/tags/item/dirt.json @@ -0,0 +1,42 @@ +{ + "replace": false, + "values": [ + "middle-earth:cobbly_ashen_dirt", + "middle-earth:ashen_dirt", + "middle-earth:old_podzol", + "middle-earth:lorien_podzol", + "middle-earth:dry_dirt", + "middle-earth:dirty_roots", + "middle-earth:corrupted_moss_block", + "middle-earth:forest_moss_block", + "middle-earth:mire", + "middle-earth:waste_pile", + "middle-earth:chalksoil_grass_block", + "middle-earth:loam_grass_block", + "middle-earth:peat_grass_block", + "middle-earth:silt_grass_block", + "middle-earth:grassy_dirt", + "middle-earth:grassy_chalksoil", + "middle-earth:grassy_loam", + "middle-earth:grassy_peat", + "middle-earth:grassy_silt", + "middle-earth:chalksoil", + "middle-earth:loam", + "middle-earth:grassy_loam", + "middle-earth:coarse_loam", + "middle-earth:peat", + "middle-earth:grassy_peat", + "middle-earth:coarse_peat", + "middle-earth:silt", + "middle-earth:grassy_silt", + "middle-earth:coarse_silt", + "middle-earth:cobbly_dirt", + "middle-earth:foul_dirt", + "middle-earth:snowy_dirt", + "middle-earth:turf", + "middle-earth:turf_slab", + "middle-earth:turf_stairs", + "middle-earth:turf_vertical_slab", + "middle-earth:snowy_grass_block" + ] +} \ No newline at end of file diff --git a/middle-earth/src/main/resources/fabric.mod.json b/middle-earth/src/main/resources/fabric.mod.json index 22b2b36ef3..3ac565d695 100644 --- a/middle-earth/src/main/resources/fabric.mod.json +++ b/middle-earth/src/main/resources/fabric.mod.json @@ -6,7 +6,7 @@ "name": "Middle-earth", "description": "Join the legendary world of Tolkien's universe from The Lord of The Rings to the Hobbit and more!", "authors": [ - " Lead Dev: Jukoz, ObliviousCrab\n\nDevelopers: Jukoz, ObliviousCrab, Slooshyboi, TomSchlom\n\nArtists: Boenndal, Jooble, Sindavar, Angmarzku, Jukoz, Khuz, ObliviousCrab, R3tt0\n\nBuilders: Angmarzku, Arwaeneth, Boenndal, Slooshyboi, Jooble, Jukoz, ObliviousCrab" + " Lead Dev: Jukoz, ObliviousCrab\n\nDevelopers: Jukoz, ObliviousCrab, TomSchlom\n\nArtists: Boenndal, Jooble, Sindavar, Angmarzku, Scosher, ObliviousCrab, Jukoz, Osserc, Kolhosp, CoffeeViking, Nautilus\n\nBuilders: Angmarzku, Arwaeneth, Boenndal, Thud, Akkon, Jooble, CoffeeViking, Nautilus, Jukoz, ObliviousCrab, Louise" ], "contact": { "homepage": "https://modrinth.com/mod/middle-earth", @@ -46,8 +46,9 @@ "fabric-api": "*", "minecraft": "~1.21.8", "java": ">=21", - "sevenstars-api": "1.0.0-1.21.8-beta-dev", - "wild-things": "1.0.0-1.21.8-beta-dev" + "fabric-permissions-api-v0": "*", + "sevenstars-api": "1.0.1-1.21.8-beta", + "wild-things": "1.0.1-1.21.8-beta" }, "recommends": { "modmenu": "*" diff --git a/middle-earth/src/main/resources/middle-earth.mixins.json b/middle-earth/src/main/resources/middle-earth.mixins.json index 9c14b96557..11da4f85a5 100644 --- a/middle-earth/src/main/resources/middle-earth.mixins.json +++ b/middle-earth/src/main/resources/middle-earth.mixins.json @@ -17,6 +17,7 @@ "CropBlockMixin", "EntityDataSaverMixin", "EntitySpawnMixin", + "FilledMapItemMixin", "FishingBobberEntityMixin", "FoliagePlacerTypeInvoker", "GrassBlockMixin", @@ -31,6 +32,7 @@ "ServerWorldMixin", "ShearItemMixin", "ShovelItemMixin", + "SpawnHelperMixin", "ToolItemMixin", "TrunkPlacerTypeInvoker" ], diff --git a/of-beasts-and-wild-things/gradle.properties b/of-beasts-and-wild-things/gradle.properties index b5b27957ac..b695976d51 100644 --- a/of-beasts-and-wild-things/gradle.properties +++ b/of-beasts-and-wild-things/gradle.properties @@ -12,7 +12,7 @@ loom_version=1.11-SNAPSHOT fabric_version=0.129.0+1.21.8 # Mod Properties -mod_version=1.0.0-1.21.8-beta-dev +mod_version=1.0.1-1.21.8-beta maven_group=net.sevenstars.of_beasts_and_wild_things archives_base_name=Of Beasts and Wild Things diff --git a/of-beasts-and-wild-things/src/main/resources/assets/wild-things/icon.png b/of-beasts-and-wild-things/src/main/resources/assets/wild-things/icon.png index 665942a893..66934e79be 100644 Binary files a/of-beasts-and-wild-things/src/main/resources/assets/wild-things/icon.png and b/of-beasts-and-wild-things/src/main/resources/assets/wild-things/icon.png differ diff --git a/of-beasts-and-wild-things/src/main/resources/assets/wild-things/lang/zh_cn.json b/of-beasts-and-wild-things/src/main/resources/assets/wild-things/lang/zh_cn.json index f3594719db..a45c3251bd 100644 --- a/of-beasts-and-wild-things/src/main/resources/assets/wild-things/lang/zh_cn.json +++ b/of-beasts-and-wild-things/src/main/resources/assets/wild-things/lang/zh_cn.json @@ -1,10 +1,14 @@ { + "itemGroup.wild-things.wild_things": "荒灵野物", + "block.wild-things.bird_nest": "鸟巢", + "entity.wild-things.deer": "鹿", "entity.wild-things.pheasant": "野鸡", "entity.wild-things.snail": "蜗牛", "entity.wild-things.swan": "天鹅", "entity.wild-things.swan_egg": "天鹅蛋", + "item.wild-things.bird_nest": "鸟巢", "item.wild-things.cooked_poultry": "熟禽肉", "item.wild-things.cooked_swan": "熟天鹅肉", @@ -18,5 +22,12 @@ "item.wild-things.swan_egg": "天鹅蛋", "item.wild-things.swan_feather": "天鹅羽毛", "item.wild-things.swan_spawn_egg": "天鹅刷怪蛋", - "itemGroup.wild-things.wild_things": "荒灵野物" + + "sounds.wild-things.deer_death": "鹿:死亡", + "sounds.wild-things.deer_grunt": "鹿:咕哝", + "sounds.wild-things.deer_idle": "鹿:低鸣", + "sounds.wild-things.swan_death": "天鹅:死亡", + "sounds.wild-things.swan_hurt": "天鹅:受伤", + "sounds.wild-things.swan_idle": "天鹅:大叫", + "sounds.wild-things.swan_step": "天鹅:走路" } \ No newline at end of file diff --git a/of-beasts-and-wild-things/src/main/resources/fabric.mod.json b/of-beasts-and-wild-things/src/main/resources/fabric.mod.json index 25d34de314..a97a6cbd83 100644 --- a/of-beasts-and-wild-things/src/main/resources/fabric.mod.json +++ b/of-beasts-and-wild-things/src/main/resources/fabric.mod.json @@ -6,7 +6,7 @@ "name": "Of Beasts and Wild Things", "description": "Join the legendary world of Tolkien's universe from The Lord of The Rings to the Hobbit and more!", "authors": [ - " Lead Dev: Jukoz, ObliviousCrab\n\nDevelopers: Jukoz, ObliviousCrab, Slooshyboi, TomSchlom\n\nArtists: Boenndal, Jooble, Sindavar, Angmarzku, Jukoz, Khuz, ObliviousCrab, R3tt0\n\nBuilders: Angmarzku, Arwaeneth, Boenndal, Slooshyboi, Jooble, Jukoz, ObliviousCrab" + " Lead Dev: Jukoz, ObliviousCrab\n\nDevelopers: Jukoz, ObliviousCrab, TomSchlom\n\nArtists: Boenndal, Jooble, Sindavar, Angmarzku, Scosher, ObliviousCrab, Jukoz, Osserc, Kolhosp, CoffeeViking, Nautilus\n\nBuilders: Angmarzku, Arwaeneth, Boenndal, Thud, Akkon, Jooble, CoffeeViking, Nautilus, Jukoz, ObliviousCrab, Louise" ], "contact": { "homepage": "https://modrinth.com/mod/middle-earth", @@ -35,7 +35,7 @@ "fabric-api": "*", "minecraft": "~1.21.8", "java": ">=21", - "sevenstars-api": "1.0.0-1.21.8-beta-dev" + "sevenstars-api": "1.0.1-1.21.8-beta" }, "recommends": { "modmenu": "*" diff --git a/sevenstars-api/gradle.properties b/sevenstars-api/gradle.properties index 690155bcac..84bc46259a 100644 --- a/sevenstars-api/gradle.properties +++ b/sevenstars-api/gradle.properties @@ -12,7 +12,7 @@ loom_version=1.11-SNAPSHOT fabric_version=0.129.0+1.21.8 # Mod Properties -mod_version = 1.0.0-1.21.8-beta-dev +mod_version = 1.0.1-1.21.8-beta maven_group = net.sevenstars.api archives_base_name = SevenStarsAPI diff --git a/sevenstars-api/src/main/java/net/sevenstars/api/SevenStarsApi.java b/sevenstars-api/src/main/java/net/sevenstars/api/SevenStarsApi.java index c2b7aa198b..1fcbf9b1d2 100644 --- a/sevenstars-api/src/main/java/net/sevenstars/api/SevenStarsApi.java +++ b/sevenstars-api/src/main/java/net/sevenstars/api/SevenStarsApi.java @@ -9,7 +9,7 @@ public class SevenStarsApi implements ModInitializer { public static final String MOD_ID = "sevenstars-api"; - public static final String MOD_VERSION = "1.0.0-1.21.8-beta-dev"; + public static final String MOD_VERSION = "1.0.0-1.21.8-beta"; public static final boolean IS_DEBUG = true; public static final ModLogger LOGGER = new ModLogger(MOD_ID, IS_DEBUG); @Override diff --git a/sevenstars-api/src/main/resources/assets/sevenstars-api/icon.png b/sevenstars-api/src/main/resources/assets/sevenstars-api/icon.png index a35f5fdb8e..aca5acb77b 100644 Binary files a/sevenstars-api/src/main/resources/assets/sevenstars-api/icon.png and b/sevenstars-api/src/main/resources/assets/sevenstars-api/icon.png differ diff --git a/sevenstars-api/src/main/resources/fabric.mod.json b/sevenstars-api/src/main/resources/fabric.mod.json index 5d0b23aca1..02bf6e71d0 100644 --- a/sevenstars-api/src/main/resources/fabric.mod.json +++ b/sevenstars-api/src/main/resources/fabric.mod.json @@ -6,7 +6,7 @@ "name": "Seven Stars API", "description": "This is the Seven Stars API", "authors": [ - " Lead Dev: Jukoz, ObliviousCrab\n\nDevelopers: Jukoz, ObliviousCrab, Slooshyboi, TomSchlom\n\nArtists: Boenndal, Jooble, Sindavar, Angmarzku, Jukoz, Khuz, ObliviousCrab, R3tt0\n\nBuilders: Angmarzku, Arwaeneth, Boenndal, Slooshyboi, Jooble, Jukoz, ObliviousCrab" + " Lead Dev: Jukoz, ObliviousCrab\n\nDevelopers: Jukoz, ObliviousCrab, TomSchlom\n\nArtists: Boenndal, Jooble, Sindavar, Angmarzku, Scosher, ObliviousCrab, Jukoz, Osserc, Kolhosp, CoffeeViking, Nautilus\n\nBuilders: Angmarzku, Arwaeneth, Boenndal, Thud, Akkon, Jooble, CoffeeViking, Nautilus, Jukoz, ObliviousCrab, Louise" ], "contact": { "homepage": "https://modrinth.com/mod/middle-earth",