mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-23 20:28:35 +01:00
Compare commits
No commits in common. "0a27bad878e5edeeb5f66c4ddbd7da6eeb092ce8" and "2c8a6159880ad7f5226447e86fbc46befc4a319f" have entirely different histories.
0a27bad878
...
2c8a615988
9 changed files with 11 additions and 49 deletions
|
@ -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.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=MIT
|
mod_license=MIT
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=41.5
|
mod_version=41.4
|
||||||
mod_release_state=BETA
|
mod_release_state=BETA
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# 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.
|
# This should match the base package used for the mod sources.
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"values": [
|
|
||||||
"naturesaura:depth_chest",
|
|
||||||
"naturesaura:infused_iron_chest",
|
|
||||||
"naturesaura:sky_chest"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"values": [
|
|
||||||
"naturesaura:depth_shoes",
|
|
||||||
"naturesaura:infused_iron_shoes",
|
|
||||||
"naturesaura:sky_shoes"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"values": [
|
|
||||||
"naturesaura:depth_helmet",
|
|
||||||
"naturesaura:infused_iron_helmet",
|
|
||||||
"naturesaura:sky_helmet"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
"values": [
|
|
||||||
"naturesaura:depth_pants",
|
|
||||||
"naturesaura:infused_iron_pants",
|
|
||||||
"naturesaura:sky_pants"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -37,10 +37,10 @@ public class BlockEntityBlastFurnaceBooster extends BlockEntityImpl implements I
|
||||||
if (!(below instanceof BlastFurnaceBlockEntity tile))
|
if (!(below instanceof BlastFurnaceBlockEntity tile))
|
||||||
return;
|
return;
|
||||||
var input = new SingleRecipeInput(tile.getItem(0));
|
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)
|
if (recipe == null)
|
||||||
return;
|
return;
|
||||||
if (!this.isApplicable(recipe.value().getIngredients()))
|
if (!this.isApplicable(recipe.getIngredients()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var data = BlockEntityFurnaceHeater.getFurnaceData(tile);
|
var data = BlockEntityFurnaceHeater.getFurnaceData(tile);
|
||||||
|
@ -59,7 +59,7 @@ public class BlockEntityBlastFurnaceBooster extends BlockEntityImpl implements I
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (output.isEmpty()) {
|
if (output.isEmpty()) {
|
||||||
var result = recipe.value().getResultItem(this.level.registryAccess());
|
var result = recipe.getResultItem(this.level.registryAccess());
|
||||||
tile.setItem(2, result.copy());
|
tile.setItem(2, result.copy());
|
||||||
} else {
|
} else {
|
||||||
output.grow(1);
|
output.grow(1);
|
||||||
|
|
|
@ -51,16 +51,6 @@ public class ItemTagProvider extends ItemTagsProvider {
|
||||||
this.tag(ItemTags.SWORDS).add(i);
|
this.tag(ItemTags.SWORDS).add(i);
|
||||||
} else if (i instanceof ItemShovel) {
|
} else if (i instanceof ItemShovel) {
|
||||||
this.tag(ItemTags.SHOVELS).add(i);
|
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
|
// super is protected, but CuriosCompat needs this
|
||||||
return super.tag(tag);
|
return super.tag(tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,13 @@ public class ItemStructureFinder extends ItemImpl {
|
||||||
|
|
||||||
private final ResourceKey<Structure> structure;
|
private final ResourceKey<Structure> structure;
|
||||||
private final int color;
|
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);
|
super(baseName);
|
||||||
this.structure = structure;
|
this.structure = structure;
|
||||||
this.color = color;
|
this.color = color;
|
||||||
|
this.radius = radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -32,8 +34,7 @@ public class ItemStructureFinder extends ItemImpl {
|
||||||
var registry = levelIn.registryAccess().registryOrThrow(Registries.STRUCTURE);
|
var registry = levelIn.registryAccess().registryOrThrow(Registries.STRUCTURE);
|
||||||
var holderSet = registry.getHolder(this.structure).map(HolderSet::direct).orElse(null);
|
var holderSet = registry.getHolder(this.structure).map(HolderSet::direct).orElse(null);
|
||||||
if (holderSet != 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(), this.radius, false);
|
||||||
var pos = ((ServerLevel) levelIn).getChunkSource().getGenerator().findNearestMapStructure((ServerLevel) levelIn, holderSet, playerIn.blockPosition(), 100, false);
|
|
||||||
if (pos != null) {
|
if (pos != null) {
|
||||||
var entity = new EntityStructureFinder(ModEntities.STRUCTURE_FINDER, levelIn);
|
var entity = new EntityStructureFinder(ModEntities.STRUCTURE_FINDER, levelIn);
|
||||||
entity.setPos(playerIn.getX(), playerIn.getY(0.5D), playerIn.getZ());
|
entity.setPos(playerIn.getX(), playerIn.getY(0.5D), playerIn.getZ());
|
||||||
|
|
|
@ -219,9 +219,9 @@ public final class ModRegistry {
|
||||||
new ItemArmor("sky_chest", ModArmorMaterial.SKY, ArmorItem.Type.CHESTPLATE),
|
new ItemArmor("sky_chest", ModArmorMaterial.SKY, ArmorItem.Type.CHESTPLATE),
|
||||||
new ItemArmor("sky_pants", ModArmorMaterial.SKY, ArmorItem.Type.LEGGINGS),
|
new ItemArmor("sky_pants", ModArmorMaterial.SKY, ArmorItem.Type.LEGGINGS),
|
||||||
new ItemArmor("sky_shoes", ModArmorMaterial.SKY, ArmorItem.Type.BOOTS),
|
new ItemArmor("sky_shoes", ModArmorMaterial.SKY, ArmorItem.Type.BOOTS),
|
||||||
new ItemStructureFinder("fortress_finder", BuiltinStructures.FORTRESS, 0xba2800),
|
new ItemStructureFinder("fortress_finder", BuiltinStructures.FORTRESS, 0xba2800, 1024),
|
||||||
new ItemStructureFinder("end_city_finder", BuiltinStructures.END_CITY, 0xca5cd6),
|
new ItemStructureFinder("end_city_finder", BuiltinStructures.END_CITY, 0xca5cd6, 1024),
|
||||||
new ItemStructureFinder("outpost_finder", BuiltinStructures.PILLAGER_OUTPOST, 0xab9f98),
|
new ItemStructureFinder("outpost_finder", BuiltinStructures.PILLAGER_OUTPOST, 0xab9f98, 2048),
|
||||||
new ItemBreakPrevention(),
|
new ItemBreakPrevention(),
|
||||||
new ItemPetReviver(),
|
new ItemPetReviver(),
|
||||||
new ItemNetheriteFinder(),
|
new ItemNetheriteFinder(),
|
||||||
|
|
Loading…
Reference in a new issue