Compare commits

..

No commits in common. "0a27bad878e5edeeb5f66c4ddbd7da6eeb092ce8" and "2c8a6159880ad7f5226447e86fbc46befc4a319f" have entirely different histories.

9 changed files with 11 additions and 49 deletions

View file

@ -31,7 +31,7 @@ mod_name=NaturesAura
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT
# The mod version. See https://semver.org/
mod_version=41.5
mod_version=41.4
mod_release_state=BETA
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.

View file

@ -1,7 +0,0 @@
{
"values": [
"naturesaura:depth_chest",
"naturesaura:infused_iron_chest",
"naturesaura:sky_chest"
]
}

View file

@ -1,7 +0,0 @@
{
"values": [
"naturesaura:depth_shoes",
"naturesaura:infused_iron_shoes",
"naturesaura:sky_shoes"
]
}

View file

@ -1,7 +0,0 @@
{
"values": [
"naturesaura:depth_helmet",
"naturesaura:infused_iron_helmet",
"naturesaura:sky_helmet"
]
}

View file

@ -1,7 +0,0 @@
{
"values": [
"naturesaura:depth_pants",
"naturesaura:infused_iron_pants",
"naturesaura:sky_pants"
]
}

View file

@ -37,10 +37,10 @@ public class BlockEntityBlastFurnaceBooster extends BlockEntityImpl implements I
if (!(below instanceof BlastFurnaceBlockEntity tile))
return;
var input = new SingleRecipeInput(tile.getItem(0));
var recipe = this.level.getRecipeManager().getRecipeFor(BlockEntityFurnaceHeater.getRecipeType(tile), input, this.level).orElse(null);
Recipe<?> recipe = this.level.getRecipeManager().getRecipeFor(BlockEntityFurnaceHeater.getRecipeType(tile), input, this.level).orElse(null).value();
if (recipe == null)
return;
if (!this.isApplicable(recipe.value().getIngredients()))
if (!this.isApplicable(recipe.getIngredients()))
return;
var data = BlockEntityFurnaceHeater.getFurnaceData(tile);
@ -59,7 +59,7 @@ public class BlockEntityBlastFurnaceBooster extends BlockEntityImpl implements I
return;
if (output.isEmpty()) {
var result = recipe.value().getResultItem(this.level.registryAccess());
var result = recipe.getResultItem(this.level.registryAccess());
tile.setItem(2, result.copy());
} else {
output.grow(1);

View file

@ -51,16 +51,6 @@ public class ItemTagProvider extends ItemTagsProvider {
this.tag(ItemTags.SWORDS).add(i);
} else if (i instanceof ItemShovel) {
this.tag(ItemTags.SHOVELS).add(i);
} else if (i instanceof ItemArmor a) {
var tag = switch (a.getType()) {
case HELMET -> ItemTags.HEAD_ARMOR;
case CHESTPLATE -> ItemTags.CHEST_ARMOR;
case LEGGINGS -> ItemTags.LEG_ARMOR;
case BOOTS -> ItemTags.FOOT_ARMOR;
default -> null;
};
if (tag != null)
this.tag(tag).add(i);
}
});
@ -72,5 +62,4 @@ public class ItemTagProvider extends ItemTagsProvider {
// super is protected, but CuriosCompat needs this
return super.tag(tag);
}
}

View file

@ -18,11 +18,13 @@ public class ItemStructureFinder extends ItemImpl {
private final ResourceKey<Structure> structure;
private final int color;
private final int radius;
public ItemStructureFinder(String baseName, ResourceKey<Structure> structure, int color) {
public ItemStructureFinder(String baseName, ResourceKey<Structure> structure, int color, int radius) {
super(baseName);
this.structure = structure;
this.color = color;
this.radius = radius;
}
@Override
@ -32,8 +34,7 @@ public class ItemStructureFinder extends ItemImpl {
var registry = levelIn.registryAccess().registryOrThrow(Registries.STRUCTURE);
var holderSet = registry.getHolder(this.structure).map(HolderSet::direct).orElse(null);
if (holderSet != null) {
// apparently the radius isn't really the radius anymore and even the locate command uses 100, which still allows it to find structures further away
var pos = ((ServerLevel) levelIn).getChunkSource().getGenerator().findNearestMapStructure((ServerLevel) levelIn, holderSet, playerIn.blockPosition(), 100, false);
var pos = ((ServerLevel) levelIn).getChunkSource().getGenerator().findNearestMapStructure((ServerLevel) levelIn, holderSet, playerIn.blockPosition(), this.radius, false);
if (pos != null) {
var entity = new EntityStructureFinder(ModEntities.STRUCTURE_FINDER, levelIn);
entity.setPos(playerIn.getX(), playerIn.getY(0.5D), playerIn.getZ());

View file

@ -219,9 +219,9 @@ public final class ModRegistry {
new ItemArmor("sky_chest", ModArmorMaterial.SKY, ArmorItem.Type.CHESTPLATE),
new ItemArmor("sky_pants", ModArmorMaterial.SKY, ArmorItem.Type.LEGGINGS),
new ItemArmor("sky_shoes", ModArmorMaterial.SKY, ArmorItem.Type.BOOTS),
new ItemStructureFinder("fortress_finder", BuiltinStructures.FORTRESS, 0xba2800),
new ItemStructureFinder("end_city_finder", BuiltinStructures.END_CITY, 0xca5cd6),
new ItemStructureFinder("outpost_finder", BuiltinStructures.PILLAGER_OUTPOST, 0xab9f98),
new ItemStructureFinder("fortress_finder", BuiltinStructures.FORTRESS, 0xba2800, 1024),
new ItemStructureFinder("end_city_finder", BuiltinStructures.END_CITY, 0xca5cd6, 1024),
new ItemStructureFinder("outpost_finder", BuiltinStructures.PILLAGER_OUTPOST, 0xab9f98, 2048),
new ItemBreakPrevention(),
new ItemPetReviver(),
new ItemNetheriteFinder(),