mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-25 20:58:34 +01:00
Compare commits
9 commits
f11069764d
...
9314cb6ad6
Author | SHA1 | Date | |
---|---|---|---|
9314cb6ad6 | |||
349e9999f6 | |||
c41f26649e | |||
6e33514b17 | |||
bf2ddd55f0 | |||
f47204bf47 | |||
|
df29593652 | ||
52512b5062 | |||
13f3b75df6 |
13 changed files with 60 additions and 24 deletions
|
@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
|
|||
apply plugin: 'eclipse'
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
version = '37.3'
|
||||
version = '37.4'
|
||||
group = 'de.ellpeck.naturesaura' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = 'NaturesAura'
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -10,6 +10,7 @@ import net.minecraft.world.item.crafting.Ingredient;
|
|||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraftforge.common.Tags;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
|
||||
|
@ -68,7 +69,7 @@ public class BlockEntityBlastFurnaceBooster extends BlockEntityImpl implements I
|
|||
private boolean isApplicable(List<Ingredient> ingredients) {
|
||||
for (var ing : ingredients) {
|
||||
for (var stack : ing.getItems()) {
|
||||
if (stack.getTags().anyMatch(t -> t.location().getPath().startsWith("ores/")))
|
||||
if (stack.is(Tags.Items.ORES) || stack.is(Tags.Items.RAW_MATERIALS))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ public class BlockEntityFurnaceHeater extends BlockEntityImpl implements ITickab
|
|||
this.level.setBlockAndUpdate(tilePos, this.level.getBlockState(tilePos).setValue(AbstractFurnaceBlock.LIT, true));
|
||||
|
||||
data.set(0, 200);
|
||||
//if set higher than 199, it'll never finish because the furnace does ++ and then ==
|
||||
data.set(2, Math.min(data.get(3) - 1, data.get(2) + 5));
|
||||
// we leave some wiggle room for the furnace to do its own checks + the blast furnace booster
|
||||
data.set(2, Math.min(data.get(3) - 2, data.get(2) + 5));
|
||||
|
||||
var spot = IAuraChunk.getHighestSpot(this.level, this.worldPosition, 20, this.worldPosition);
|
||||
var chunk = IAuraChunk.getAuraChunk(this.level, spot);
|
||||
|
|
|
@ -34,7 +34,7 @@ public class AltarCategory implements IRecipeCategory<AltarRecipe> {
|
|||
|
||||
@Override
|
||||
public Component getTitle() {
|
||||
return Component.translatable("container." + JEINaturesAuraPlugin.ALTAR + ".name");
|
||||
return Component.translatable("container." + JEINaturesAuraPlugin.ALTAR.getUid() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -49,9 +49,9 @@ public class AltarCategory implements IRecipeCategory<AltarRecipe> {
|
|||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayoutBuilder builder, AltarRecipe recipe, IFocusGroup focuses) {
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, 0, 18).addItemStacks(Arrays.asList(recipe.input.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.OUTPUT, 80, 18).addItemStack(recipe.output);
|
||||
builder.addSlot(RecipeIngredientRole.CATALYST, 26, 18).addItemStacks(recipe.catalyst == Ingredient.EMPTY ? Collections.singletonList(this.altar) : Arrays.asList(recipe.catalyst.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.CATALYST, 51, 18).addItemStack(recipe.requiredType != null ? recipe.getDimensionBottle() : ItemStack.EMPTY);
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, 1, 19).addItemStacks(Arrays.asList(recipe.input.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.OUTPUT, 81, 19).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, 52, 19).addItemStack(recipe.requiredType != null ? recipe.getDimensionBottle() : ItemStack.EMPTY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecip
|
|||
|
||||
@Override
|
||||
public Component getTitle() {
|
||||
return Component.translatable("container." + JEINaturesAuraPlugin.SPAWNER + ".name");
|
||||
return Component.translatable("container." + JEINaturesAuraPlugin.SPAWNER.getUid() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -103,7 +103,7 @@ public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecip
|
|||
@Override
|
||||
public void setRecipe(IRecipeLayoutBuilder builder, AnimalSpawnerRecipe recipe, IFocusGroup focuses) {
|
||||
for (var i = 0; i < recipe.ingredients.length; i++)
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, i * 18, 68).addItemStacks(Arrays.asList(recipe.ingredients[i].getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, i * 18 + 1, 69).addItemStacks(Arrays.asList(recipe.ingredients[i].getItems()));
|
||||
builder.addInvisibleIngredients(RecipeIngredientRole.OUTPUT).addItemStack(new ItemStack(ForgeSpawnEggItem.fromEntityType(recipe.entity)));
|
||||
}
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecip
|
|||
|
||||
matrixStack.pushPose();
|
||||
var size = Math.max(1F, Math.max(recipe.entity.getWidth(), recipe.entity.getHeight()));
|
||||
AnimalSpawnerCategory.renderEntity(matrixStack, 35, 55, 100F / size * 0.4F, 40, size * 0.5F, (LivingEntity) entity);
|
||||
AnimalSpawnerCategory.renderEntity(matrixStack, 36, 56, 100F / size * 0.4F, 40, size * 0.5F, (LivingEntity) entity);
|
||||
matrixStack.popPose();
|
||||
|
||||
var name = recipe.entity.getDescription().getString();
|
||||
|
|
|
@ -29,7 +29,7 @@ public class OfferingCategory implements IRecipeCategory<OfferingRecipe> {
|
|||
|
||||
@Override
|
||||
public Component getTitle() {
|
||||
return Component.translatable("container." + JEINaturesAuraPlugin.OFFERING + ".name");
|
||||
return Component.translatable("container." + JEINaturesAuraPlugin.OFFERING.getUid() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,8 +44,8 @@ public class OfferingCategory implements IRecipeCategory<OfferingRecipe> {
|
|||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayoutBuilder builder, OfferingRecipe recipe, IFocusGroup focuses) {
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, 0, 14).addItemStacks(Arrays.asList(recipe.input.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.OUTPUT, 65, 14).addItemStack(recipe.output);
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, 27, 0).addItemStacks(Arrays.asList(recipe.startItem.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, 1, 15).addItemStacks(Arrays.asList(recipe.input.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.OUTPUT, 66, 15).addItemStack(recipe.output);
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, 28, 1).addItemStacks(Arrays.asList(recipe.startItem.getItems()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class TreeRitualCategory implements IRecipeCategory<TreeRitualRecipe> {
|
|||
|
||||
@Override
|
||||
public Component getTitle() {
|
||||
return Component.translatable("container." + JEINaturesAuraPlugin.TREE_RITUAL + ".name");
|
||||
return Component.translatable("container." + JEINaturesAuraPlugin.TREE_RITUAL.getUid() + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -44,12 +44,12 @@ public class TreeRitualCategory implements IRecipeCategory<TreeRitualRecipe> {
|
|||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayoutBuilder builder, TreeRitualRecipe recipe, IFocusGroup focuses) {
|
||||
builder.addSlot(RecipeIngredientRole.CATALYST, 34, 34).addItemStacks(Arrays.asList(recipe.saplingType.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.OUTPUT, 124, 34).addItemStack(recipe.result);
|
||||
builder.addSlot(RecipeIngredientRole.CATALYST, 35, 35).addItemStacks(Arrays.asList(recipe.saplingType.getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.OUTPUT, 125, 35).addItemStack(recipe.result);
|
||||
|
||||
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++)
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, positions[i][0] - 1, positions[i][1] - 1).addItemStacks(Arrays.asList(recipe.ingredients[i].getItems()));
|
||||
builder.addSlot(RecipeIngredientRole.INPUT, positions[i][0], positions[i][1]).addItemStacks(Arrays.asList(recipe.ingredients[i].getItems()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package de.ellpeck.naturesaura.data;
|
|||
|
||||
import de.ellpeck.naturesaura.NaturesAura;
|
||||
import de.ellpeck.naturesaura.blocks.ModBlocks;
|
||||
import de.ellpeck.naturesaura.reg.ModRegistry;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.tags.BlockTagsProvider;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
@ -9,6 +10,7 @@ import net.minecraft.tags.BlockTags;
|
|||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -38,5 +40,18 @@ public class BlockTagProvider extends BlockTagsProvider {
|
|||
this.tag(BlockTagProvider.NETHER_ALTAR_WOOD).add(Blocks.CRIMSON_PLANKS, Blocks.WARPED_PLANKS);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ItemCaveFinder extends ItemImpl {
|
|||
|
||||
var sky = levelIn.getBrightness(LightLayer.SKY, offUp);
|
||||
var block = levelIn.getBrightness(LightLayer.BLOCK, offUp);
|
||||
if (sky > 7 || block > 7)
|
||||
if (sky > 0 || block > 0)
|
||||
continue;
|
||||
|
||||
inst.spawnMagicParticle(
|
||||
|
|
|
@ -24,7 +24,7 @@ public class ItemCrimsonMeal extends ItemImpl {
|
|||
if (level.random.nextInt(5) == 0) {
|
||||
int age = state.getValue(NetherWartBlock.AGE);
|
||||
if (age >= 3) {
|
||||
ModFeatures.Configured.CRIMSON_AURA_MUSHROOM.value().place((ServerLevel) level, ((ServerLevel) level).getChunkSource().getGenerator(), level.random, pos);
|
||||
ModFeatures.Configured.NETHER_WART_MUSHROOM.value().place((ServerLevel) level, ((ServerLevel) level).getChunkSource().getGenerator(), level.random, pos);
|
||||
} else {
|
||||
level.setBlockAndUpdate(pos, state.setValue(NetherWartBlock.AGE, age + 1));
|
||||
}
|
||||
|
|
|
@ -66,6 +66,11 @@
|
|||
"block.naturesaura.aura_mushroom": "Aura Mushroom",
|
||||
"block.naturesaura.warped_aura_mushroom": "Warped 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.nether_grass": "Grassy Netherrack",
|
||||
"block.naturesaura.chorus_generator": "Reaper of Ender Heights",
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
"item": "naturesaura:gold_powder"
|
||||
},
|
||||
{
|
||||
"item": "minecraft:diamond_ore"
|
||||
"tag": "forge:ores/diamond"
|
||||
},
|
||||
{
|
||||
"item": "minecraft:redstone_ore"
|
||||
"tag": "forge:ores/redstone"
|
||||
}
|
||||
],
|
||||
"sapling": {
|
||||
|
|
Loading…
Reference in a new issue