Compare commits

..

No commits in common. "9314cb6ad6a7cbf653fc4906d281deee6cb4beed" and "f11069764d149c45614a3a3f68b603910ca968af" have entirely different histories.

13 changed files with 24 additions and 60 deletions

View file

@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
version = '37.4' version = '37.3'
group = 'de.ellpeck.naturesaura' // http://maven.apache.org/guides/mini/guide-naming-conventions.html group = 'de.ellpeck.naturesaura' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'NaturesAura' archivesBaseName = 'NaturesAura'

View file

@ -1,15 +0,0 @@
{
"values": [
"naturesaura:spring",
"naturesaura:aura_timer",
"naturesaura:animal_container",
"naturesaura:blast_furnace_booster",
"naturesaura:snow_creator",
"naturesaura:chorus_generator",
"naturesaura:nether_grass",
"naturesaura:gold_nether_brick",
"naturesaura:gold_brick",
"naturesaura:item_distributor",
"naturesaura:weather_changer"
]
}

View file

@ -10,7 +10,6 @@ import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.Recipe;
import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity; import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraftforge.common.Tags;
import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.capabilities.ForgeCapabilities;
import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.IItemHandlerModifiable;
@ -69,7 +68,7 @@ public class BlockEntityBlastFurnaceBooster extends BlockEntityImpl implements I
private boolean isApplicable(List<Ingredient> ingredients) { private boolean isApplicable(List<Ingredient> ingredients) {
for (var ing : ingredients) { for (var ing : ingredients) {
for (var stack : ing.getItems()) { for (var stack : ing.getItems()) {
if (stack.is(Tags.Items.ORES) || stack.is(Tags.Items.RAW_MATERIALS)) if (stack.getTags().anyMatch(t -> t.location().getPath().startsWith("ores/")))
return true; return true;
} }
} }

View file

@ -65,8 +65,8 @@ public class BlockEntityFurnaceHeater extends BlockEntityImpl implements ITickab
this.level.setBlockAndUpdate(tilePos, this.level.getBlockState(tilePos).setValue(AbstractFurnaceBlock.LIT, true)); this.level.setBlockAndUpdate(tilePos, this.level.getBlockState(tilePos).setValue(AbstractFurnaceBlock.LIT, true));
data.set(0, 200); data.set(0, 200);
// we leave some wiggle room for the furnace to do its own checks + the blast furnace booster //if set higher than 199, it'll never finish because the furnace does ++ and then ==
data.set(2, Math.min(data.get(3) - 2, data.get(2) + 5)); data.set(2, Math.min(data.get(3) - 1, data.get(2) + 5));
var spot = IAuraChunk.getHighestSpot(this.level, this.worldPosition, 20, this.worldPosition); var spot = IAuraChunk.getHighestSpot(this.level, this.worldPosition, 20, this.worldPosition);
var chunk = IAuraChunk.getAuraChunk(this.level, spot); var chunk = IAuraChunk.getAuraChunk(this.level, spot);

View file

@ -34,7 +34,7 @@ public class AltarCategory implements IRecipeCategory<AltarRecipe> {
@Override @Override
public Component getTitle() { public Component getTitle() {
return Component.translatable("container." + JEINaturesAuraPlugin.ALTAR.getUid() + ".name"); return Component.translatable("container." + JEINaturesAuraPlugin.ALTAR + ".name");
} }
@Override @Override
@ -49,9 +49,9 @@ public class AltarCategory implements IRecipeCategory<AltarRecipe> {
@Override @Override
public void setRecipe(IRecipeLayoutBuilder builder, AltarRecipe recipe, IFocusGroup focuses) { public void setRecipe(IRecipeLayoutBuilder builder, AltarRecipe recipe, IFocusGroup focuses) {
builder.addSlot(RecipeIngredientRole.INPUT, 1, 19).addItemStacks(Arrays.asList(recipe.input.getItems())); builder.addSlot(RecipeIngredientRole.INPUT, 0, 18).addItemStacks(Arrays.asList(recipe.input.getItems()));
builder.addSlot(RecipeIngredientRole.OUTPUT, 81, 19).addItemStack(recipe.output); builder.addSlot(RecipeIngredientRole.OUTPUT, 80, 18).addItemStack(recipe.output);
builder.addSlot(RecipeIngredientRole.CATALYST, 27, 19).addItemStacks(recipe.catalyst == Ingredient.EMPTY ? Collections.singletonList(this.altar) : Arrays.asList(recipe.catalyst.getItems())); builder.addSlot(RecipeIngredientRole.CATALYST, 26, 18).addItemStacks(recipe.catalyst == Ingredient.EMPTY ? Collections.singletonList(this.altar) : Arrays.asList(recipe.catalyst.getItems()));
builder.addSlot(RecipeIngredientRole.CATALYST, 52, 19).addItemStack(recipe.requiredType != null ? recipe.getDimensionBottle() : ItemStack.EMPTY); builder.addSlot(RecipeIngredientRole.CATALYST, 51, 18).addItemStack(recipe.requiredType != null ? recipe.getDimensionBottle() : ItemStack.EMPTY);
} }
} }

View file

@ -87,7 +87,7 @@ public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecip
@Override @Override
public Component getTitle() { public Component getTitle() {
return Component.translatable("container." + JEINaturesAuraPlugin.SPAWNER.getUid() + ".name"); return Component.translatable("container." + JEINaturesAuraPlugin.SPAWNER + ".name");
} }
@Override @Override
@ -103,7 +103,7 @@ public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecip
@Override @Override
public void setRecipe(IRecipeLayoutBuilder builder, AnimalSpawnerRecipe recipe, IFocusGroup focuses) { public void setRecipe(IRecipeLayoutBuilder builder, AnimalSpawnerRecipe recipe, IFocusGroup focuses) {
for (var i = 0; i < recipe.ingredients.length; i++) for (var i = 0; i < recipe.ingredients.length; i++)
builder.addSlot(RecipeIngredientRole.INPUT, i * 18 + 1, 69).addItemStacks(Arrays.asList(recipe.ingredients[i].getItems())); builder.addSlot(RecipeIngredientRole.INPUT, i * 18, 68).addItemStacks(Arrays.asList(recipe.ingredients[i].getItems()));
builder.addInvisibleIngredients(RecipeIngredientRole.OUTPUT).addItemStack(new ItemStack(ForgeSpawnEggItem.fromEntityType(recipe.entity))); builder.addInvisibleIngredients(RecipeIngredientRole.OUTPUT).addItemStack(new ItemStack(ForgeSpawnEggItem.fromEntityType(recipe.entity)));
} }
@ -118,7 +118,7 @@ public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecip
matrixStack.pushPose(); matrixStack.pushPose();
var size = Math.max(1F, Math.max(recipe.entity.getWidth(), recipe.entity.getHeight())); var size = Math.max(1F, Math.max(recipe.entity.getWidth(), recipe.entity.getHeight()));
AnimalSpawnerCategory.renderEntity(matrixStack, 36, 56, 100F / size * 0.4F, 40, size * 0.5F, (LivingEntity) entity); AnimalSpawnerCategory.renderEntity(matrixStack, 35, 55, 100F / size * 0.4F, 40, size * 0.5F, (LivingEntity) entity);
matrixStack.popPose(); matrixStack.popPose();
var name = recipe.entity.getDescription().getString(); var name = recipe.entity.getDescription().getString();

View file

@ -29,7 +29,7 @@ public class OfferingCategory implements IRecipeCategory<OfferingRecipe> {
@Override @Override
public Component getTitle() { public Component getTitle() {
return Component.translatable("container." + JEINaturesAuraPlugin.OFFERING.getUid() + ".name"); return Component.translatable("container." + JEINaturesAuraPlugin.OFFERING + ".name");
} }
@Override @Override
@ -44,8 +44,8 @@ public class OfferingCategory implements IRecipeCategory<OfferingRecipe> {
@Override @Override
public void setRecipe(IRecipeLayoutBuilder builder, OfferingRecipe recipe, IFocusGroup focuses) { public void setRecipe(IRecipeLayoutBuilder builder, OfferingRecipe recipe, IFocusGroup focuses) {
builder.addSlot(RecipeIngredientRole.INPUT, 1, 15).addItemStacks(Arrays.asList(recipe.input.getItems())); builder.addSlot(RecipeIngredientRole.INPUT, 0, 14).addItemStacks(Arrays.asList(recipe.input.getItems()));
builder.addSlot(RecipeIngredientRole.OUTPUT, 66, 15).addItemStack(recipe.output); builder.addSlot(RecipeIngredientRole.OUTPUT, 65, 14).addItemStack(recipe.output);
builder.addSlot(RecipeIngredientRole.INPUT, 28, 1).addItemStacks(Arrays.asList(recipe.startItem.getItems())); builder.addSlot(RecipeIngredientRole.INPUT, 27, 0).addItemStacks(Arrays.asList(recipe.startItem.getItems()));
} }
} }

View file

@ -29,7 +29,7 @@ public class TreeRitualCategory implements IRecipeCategory<TreeRitualRecipe> {
@Override @Override
public Component getTitle() { public Component getTitle() {
return Component.translatable("container." + JEINaturesAuraPlugin.TREE_RITUAL.getUid() + ".name"); return Component.translatable("container." + JEINaturesAuraPlugin.TREE_RITUAL + ".name");
} }
@Override @Override
@ -44,12 +44,12 @@ public class TreeRitualCategory implements IRecipeCategory<TreeRitualRecipe> {
@Override @Override
public void setRecipe(IRecipeLayoutBuilder builder, TreeRitualRecipe recipe, IFocusGroup focuses) { public void setRecipe(IRecipeLayoutBuilder builder, TreeRitualRecipe recipe, IFocusGroup focuses) {
builder.addSlot(RecipeIngredientRole.CATALYST, 35, 35).addItemStacks(Arrays.asList(recipe.saplingType.getItems())); builder.addSlot(RecipeIngredientRole.CATALYST, 34, 34).addItemStacks(Arrays.asList(recipe.saplingType.getItems()));
builder.addSlot(RecipeIngredientRole.OUTPUT, 125, 35).addItemStack(recipe.result); builder.addSlot(RecipeIngredientRole.OUTPUT, 124, 34).addItemStack(recipe.result);
var positions = new int[][]{{35, 1}, {35, 69}, {1, 35}, {69, 35}, {12, 12}, {58, 58}, {58, 12}, {12, 58}}; var positions = new int[][]{{35, 1}, {35, 69}, {1, 35}, {69, 35}, {12, 12}, {58, 58}, {58, 12}, {12, 58}};
for (var i = 0; i < recipe.ingredients.length; i++) for (var i = 0; i < recipe.ingredients.length; i++)
builder.addSlot(RecipeIngredientRole.INPUT, positions[i][0], positions[i][1]).addItemStacks(Arrays.asList(recipe.ingredients[i].getItems())); builder.addSlot(RecipeIngredientRole.INPUT, positions[i][0] - 1, positions[i][1] - 1).addItemStacks(Arrays.asList(recipe.ingredients[i].getItems()));
} }
} }

View file

@ -2,7 +2,6 @@ package de.ellpeck.naturesaura.data;
import de.ellpeck.naturesaura.NaturesAura; import de.ellpeck.naturesaura.NaturesAura;
import de.ellpeck.naturesaura.blocks.ModBlocks; import de.ellpeck.naturesaura.blocks.ModBlocks;
import de.ellpeck.naturesaura.reg.ModRegistry;
import net.minecraft.data.DataGenerator; import net.minecraft.data.DataGenerator;
import net.minecraft.data.tags.BlockTagsProvider; import net.minecraft.data.tags.BlockTagsProvider;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
@ -10,7 +9,6 @@ import net.minecraft.tags.BlockTags;
import net.minecraft.tags.TagKey; import net.minecraft.tags.TagKey;
import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.material.Material;
import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.common.data.ExistingFileHelper;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -40,18 +38,5 @@ public class BlockTagProvider extends BlockTagsProvider {
this.tag(BlockTagProvider.NETHER_ALTAR_WOOD).add(Blocks.CRIMSON_PLANKS, Blocks.WARPED_PLANKS); this.tag(BlockTagProvider.NETHER_ALTAR_WOOD).add(Blocks.CRIMSON_PLANKS, Blocks.WARPED_PLANKS);
this.tag(BlockTagProvider.NETHER_ALTAR_STONE).add(Blocks.NETHER_BRICKS); this.tag(BlockTagProvider.NETHER_ALTAR_STONE).add(Blocks.NETHER_BRICKS);
for (var item : ModRegistry.ALL_ITEMS) {
if (!(item instanceof Block b))
continue;
var state = b.defaultBlockState();
if (!state.requiresCorrectToolForDrops())
continue;
var material = state.getMaterial();
if (material == Material.STONE) {
this.tag(BlockTags.MINEABLE_WITH_PICKAXE).add(b);
} else if (material == Material.WOOD) {
this.tag(BlockTags.MINEABLE_WITH_AXE).add(b);
}
}
} }
} }

View file

@ -47,7 +47,7 @@ public class ItemCaveFinder extends ItemImpl {
var sky = levelIn.getBrightness(LightLayer.SKY, offUp); var sky = levelIn.getBrightness(LightLayer.SKY, offUp);
var block = levelIn.getBrightness(LightLayer.BLOCK, offUp); var block = levelIn.getBrightness(LightLayer.BLOCK, offUp);
if (sky > 0 || block > 0) if (sky > 7 || block > 7)
continue; continue;
inst.spawnMagicParticle( inst.spawnMagicParticle(

View file

@ -24,7 +24,7 @@ public class ItemCrimsonMeal extends ItemImpl {
if (level.random.nextInt(5) == 0) { if (level.random.nextInt(5) == 0) {
int age = state.getValue(NetherWartBlock.AGE); int age = state.getValue(NetherWartBlock.AGE);
if (age >= 3) { if (age >= 3) {
ModFeatures.Configured.NETHER_WART_MUSHROOM.value().place((ServerLevel) level, ((ServerLevel) level).getChunkSource().getGenerator(), level.random, pos); ModFeatures.Configured.CRIMSON_AURA_MUSHROOM.value().place((ServerLevel) level, ((ServerLevel) level).getChunkSource().getGenerator(), level.random, pos);
} else { } else {
level.setBlockAndUpdate(pos, state.setValue(NetherWartBlock.AGE, age + 1)); level.setBlockAndUpdate(pos, state.setValue(NetherWartBlock.AGE, age + 1));
} }

View file

@ -66,11 +66,6 @@
"block.naturesaura.aura_mushroom": "Aura Mushroom", "block.naturesaura.aura_mushroom": "Aura Mushroom",
"block.naturesaura.warped_aura_mushroom": "Warped Aura Fungus", "block.naturesaura.warped_aura_mushroom": "Warped Aura Fungus",
"block.naturesaura.crimson_aura_mushroom": "Crimson Aura Fungus", "block.naturesaura.crimson_aura_mushroom": "Crimson Aura Fungus",
"block.naturesaura.potted_aura_bloom": "Potted Aura Bloom",
"block.naturesaura.potted_aura_cactus": "Potted Aura Cactus",
"block.naturesaura.potted_aura_mushroom": "Potted Aura Mushroom",
"block.naturesaura.potted_warped_aura_mushroom": "Potted Warped Aura Fungus",
"block.naturesaura.potted_crimson_aura_mushroom": "Potted Crimson Aura Fungus",
"block.naturesaura.tainted_gold_block": "Tainted Gold Block", "block.naturesaura.tainted_gold_block": "Tainted Gold Block",
"block.naturesaura.nether_grass": "Grassy Netherrack", "block.naturesaura.nether_grass": "Grassy Netherrack",
"block.naturesaura.chorus_generator": "Reaper of Ender Heights", "block.naturesaura.chorus_generator": "Reaper of Ender Heights",

View file

@ -8,10 +8,10 @@
"item": "naturesaura:gold_powder" "item": "naturesaura:gold_powder"
}, },
{ {
"tag": "forge:ores/diamond" "item": "minecraft:diamond_ore"
}, },
{ {
"tag": "forge:ores/redstone" "item": "minecraft:redstone_ore"
} }
], ],
"sapling": { "sapling": {