mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 19:58:34 +01:00
made the nether altar work
This commit is contained in:
parent
5be58608b6
commit
b5777f715b
14 changed files with 107 additions and 44 deletions
|
@ -173,7 +173,7 @@ public final class Helper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ActionResultType.FAIL;
|
return ActionResultType.CONSUME;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ICapabilityProvider makeRechargeProvider(ItemStack stack, boolean needsSelected) {
|
public static ICapabilityProvider makeRechargeProvider(ItemStack stack, boolean needsSelected) {
|
||||||
|
|
|
@ -81,7 +81,7 @@ public final class NaturesAuraAPI {
|
||||||
* easily registered using {@link BasicAuraType#register()}.
|
* easily registered using {@link BasicAuraType#register()}.
|
||||||
*/
|
*/
|
||||||
public static final Map<ResourceLocation, IAuraType> AURA_TYPES = new HashMap<>();
|
public static final Map<ResourceLocation, IAuraType> AURA_TYPES = new HashMap<>();
|
||||||
public static final BasicAuraType TYPE_OVERWORLD = new BasicAuraType(new ResourceLocation(MOD_ID, "overworld"), DimensionType.OVERWORLD, 0xbef224, 0).register();
|
public static final BasicAuraType TYPE_OVERWORLD = new BasicAuraType(new ResourceLocation(MOD_ID, "overworld"), DimensionType.OVERWORLD, 0x89cc37, 0).register();
|
||||||
public static final BasicAuraType TYPE_NETHER = new BasicAuraType(new ResourceLocation(MOD_ID, "nether"), DimensionType.THE_NETHER, 0x871c0c, 0).register();
|
public static final BasicAuraType TYPE_NETHER = new BasicAuraType(new ResourceLocation(MOD_ID, "nether"), DimensionType.THE_NETHER, 0x871c0c, 0).register();
|
||||||
public static final BasicAuraType TYPE_END = new BasicAuraType(new ResourceLocation(MOD_ID, "end"), DimensionType.THE_END, 0x302624, 0).register();
|
public static final BasicAuraType TYPE_END = new BasicAuraType(new ResourceLocation(MOD_ID, "end"), DimensionType.THE_END, 0x302624, 0).register();
|
||||||
public static final BasicAuraType TYPE_OTHER = new BasicAuraType(new ResourceLocation(MOD_ID, "other"), null, 0x2fa8a0, Integer.MIN_VALUE).register();
|
public static final BasicAuraType TYPE_OTHER = new BasicAuraType(new ResourceLocation(MOD_ID, "other"), null, 0x2fa8a0, Integer.MIN_VALUE).register();
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package de.ellpeck.naturesaura.api.recipes;
|
package de.ellpeck.naturesaura.api.recipes;
|
||||||
|
|
||||||
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
||||||
|
import de.ellpeck.naturesaura.api.aura.type.IAuraType;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
@ -10,14 +11,16 @@ public class AltarRecipe {
|
||||||
public final ResourceLocation name;
|
public final ResourceLocation name;
|
||||||
public final Ingredient input;
|
public final Ingredient input;
|
||||||
public final ItemStack output;
|
public final ItemStack output;
|
||||||
|
public final IAuraType requiredType;
|
||||||
public final Ingredient catalyst;
|
public final Ingredient catalyst;
|
||||||
public final int aura;
|
public final int aura;
|
||||||
public final int time;
|
public final int time;
|
||||||
|
|
||||||
public AltarRecipe(ResourceLocation name, Ingredient input, ItemStack output, Ingredient catalyst, int aura, int time) {
|
public AltarRecipe(ResourceLocation name, Ingredient input, ItemStack output, IAuraType requiredType, Ingredient catalyst, int aura, int time) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.input = input;
|
this.input = input;
|
||||||
this.output = output;
|
this.output = output;
|
||||||
|
this.requiredType = requiredType;
|
||||||
this.catalyst = catalyst;
|
this.catalyst = catalyst;
|
||||||
this.aura = aura;
|
this.aura = aura;
|
||||||
this.time = time;
|
this.time = time;
|
||||||
|
|
|
@ -42,6 +42,7 @@ public class BlockNatureAltar extends BlockContainerImpl implements ITESRProvide
|
||||||
|
|
||||||
public BlockNatureAltar() {
|
public BlockNatureAltar() {
|
||||||
super("nature_altar", TileEntityNatureAltar::new, ModBlocks.prop(Material.ROCK).hardnessAndResistance(4F).harvestLevel(1).harvestTool(ToolType.PICKAXE));
|
super("nature_altar", TileEntityNatureAltar::new, ModBlocks.prop(Material.ROCK).hardnessAndResistance(4F).harvestLevel(1).harvestTool(ToolType.PICKAXE));
|
||||||
|
this.setDefaultState(this.getDefaultState().with(NETHER, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -30,7 +30,12 @@ import java.util.Random;
|
||||||
|
|
||||||
public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTileEntity {
|
public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTileEntity {
|
||||||
|
|
||||||
private final BasicAuraContainer container = new BasicAuraContainer(NaturesAuraAPI.TYPE_OVERWORLD, 500000);
|
private final BasicAuraContainer container = new BasicAuraContainer(null, 500000) {
|
||||||
|
@Override
|
||||||
|
public int getAuraColor() {
|
||||||
|
return IAuraType.forWorld(TileEntityNatureAltar.this.world).getColor();
|
||||||
|
}
|
||||||
|
};
|
||||||
private final ItemStack[] catalysts = new ItemStack[4];
|
private final ItemStack[] catalysts = new ItemStack[4];
|
||||||
public final ItemStackHandler items = new ItemStackHandlerNA(1, this, true) {
|
public final ItemStackHandler items = new ItemStackHandlerNA(1, this, true) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,12 +59,13 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
};
|
};
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public int bobTimer;
|
public int bobTimer;
|
||||||
public boolean structureFine;
|
public StructureState structureState = StructureState.INVALID;
|
||||||
|
|
||||||
private AltarRecipe currentRecipe;
|
private AltarRecipe currentRecipe;
|
||||||
private int timer;
|
private int timer;
|
||||||
|
|
||||||
private int lastAura;
|
private int lastAura;
|
||||||
|
private boolean firstTick = true;
|
||||||
|
|
||||||
public TileEntityNatureAltar() {
|
public TileEntityNatureAltar() {
|
||||||
super(ModTileEntities.NATURE_ALTAR);
|
super(ModTileEntities.NATURE_ALTAR);
|
||||||
|
@ -82,17 +88,19 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.world.isRemote) {
|
if (!this.world.isRemote) {
|
||||||
if (this.world.getGameTime() % 40 == 0) {
|
if (this.world.getGameTime() % 40 == 0 || this.firstTick) {
|
||||||
boolean fine = Multiblocks.ALTAR.isComplete(this.world, this.pos);
|
StructureState newState = this.getNewState();
|
||||||
if (fine != this.structureFine) {
|
if (newState != this.structureState) {
|
||||||
this.structureFine = fine;
|
this.structureState = newState;
|
||||||
this.sendToClients();
|
this.sendToClients();
|
||||||
}
|
}
|
||||||
|
this.firstTick = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.structureFine) {
|
if (this.structureState != StructureState.INVALID) {
|
||||||
int space = this.container.storeAura(300, true);
|
int space = this.container.storeAura(300, true);
|
||||||
if (space > 0 && this.container.isAcceptableType(IAuraType.forWorld(this.world))) {
|
IAuraType expectedType = this.structureState == StructureState.NETHER ? NaturesAuraAPI.TYPE_NETHER : NaturesAuraAPI.TYPE_OVERWORLD;
|
||||||
|
if (space > 0 && expectedType.isPresentInWorld(this.world)) {
|
||||||
int toStore = Math.min(IAuraChunk.getAuraInArea(this.world, this.pos, 20), space);
|
int toStore = Math.min(IAuraChunk.getAuraInArea(this.world, this.pos, 20), space);
|
||||||
if (toStore > 0) {
|
if (toStore > 0) {
|
||||||
BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 20, this.pos);
|
BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 20, this.pos);
|
||||||
|
@ -107,7 +115,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
this.pos.getY() + rand.nextFloat() * 10F,
|
this.pos.getY() + rand.nextFloat() * 10F,
|
||||||
this.pos.getZ() + (float) rand.nextGaussian() * 10F,
|
this.pos.getZ() + (float) rand.nextGaussian() * 10F,
|
||||||
this.pos.getX() + 0.5F, this.pos.getY() + 0.5F, this.pos.getZ() + 0.5F,
|
this.pos.getX() + 0.5F, this.pos.getY() + 0.5F, this.pos.getZ() + 0.5F,
|
||||||
rand.nextFloat() * 0.1F + 0.1F, 0x89cc37, rand.nextFloat() * 1F + 1F
|
rand.nextFloat() * 0.1F + 0.1F, this.container.getAuraColor(), rand.nextFloat() * 1F + 1F
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,7 +130,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
this.container.drainAura(stored, false);
|
this.container.drainAura(stored, false);
|
||||||
|
|
||||||
if (this.world.getGameTime() % 4 == 0)
|
if (this.world.getGameTime() % 4 == 0)
|
||||||
PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(this.pos.getX(), this.pos.getY(), this.pos.getZ(), PacketParticles.Type.ALTAR_CONVERSION));
|
PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(this.pos.getX(), this.pos.getY(), this.pos.getZ(), PacketParticles.Type.ALTAR_CONVERSION, this.container.getAuraColor()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -140,7 +148,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
this.container.drainAura(req, false);
|
this.container.drainAura(req, false);
|
||||||
|
|
||||||
if (this.timer % 4 == 0)
|
if (this.timer % 4 == 0)
|
||||||
PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(this.pos.getX(), this.pos.getY(), this.pos.getZ(), PacketParticles.Type.ALTAR_CONVERSION));
|
PacketHandler.sendToAllAround(this.world, this.pos, 32, new PacketParticles(this.pos.getX(), this.pos.getY(), this.pos.getZ(), PacketParticles.Type.ALTAR_CONVERSION, this.container.getAuraColor()));
|
||||||
|
|
||||||
this.timer++;
|
this.timer++;
|
||||||
if (this.timer >= this.currentRecipe.time) {
|
if (this.timer >= this.currentRecipe.time) {
|
||||||
|
@ -162,7 +170,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
this.sendToClients();
|
this.sendToClients();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.structureFine) {
|
if (this.structureState != StructureState.INVALID) {
|
||||||
if (rand.nextFloat() >= 0.7F) {
|
if (rand.nextFloat() >= 0.7F) {
|
||||||
int fourths = this.container.getMaxAura() / 4;
|
int fourths = this.container.getMaxAura() / 4;
|
||||||
if (this.container.getStoredAura() > 0) {
|
if (this.container.getStoredAura() > 0) {
|
||||||
|
@ -195,7 +203,7 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
|
|
||||||
private AltarRecipe getRecipeForInput(ItemStack input) {
|
private AltarRecipe getRecipeForInput(ItemStack input) {
|
||||||
for (AltarRecipe recipe : NaturesAuraAPI.ALTAR_RECIPES.values()) {
|
for (AltarRecipe recipe : NaturesAuraAPI.ALTAR_RECIPES.values()) {
|
||||||
if (recipe.input.test(input)) {
|
if (recipe.input.test(input) && (recipe.requiredType == null || recipe.requiredType.isPresentInWorld(this.world))) {
|
||||||
if (recipe.catalyst == Ingredient.EMPTY)
|
if (recipe.catalyst == Ingredient.EMPTY)
|
||||||
return recipe;
|
return recipe;
|
||||||
for (ItemStack stack : this.catalysts)
|
for (ItemStack stack : this.catalysts)
|
||||||
|
@ -206,12 +214,20 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private StructureState getNewState() {
|
||||||
|
if (Multiblocks.ALTAR.isComplete(this.world, this.pos))
|
||||||
|
return StructureState.OVERWORLD;
|
||||||
|
if (Multiblocks.NETHER_ALTAR.isComplete(this.world, this.pos))
|
||||||
|
return StructureState.NETHER;
|
||||||
|
return StructureState.INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeNBT(CompoundNBT compound, SaveType type) {
|
public void writeNBT(CompoundNBT compound, SaveType type) {
|
||||||
super.writeNBT(compound, type);
|
super.writeNBT(compound, type);
|
||||||
if (type != SaveType.BLOCK) {
|
if (type != SaveType.BLOCK) {
|
||||||
compound.put("items", this.items.serializeNBT());
|
compound.put("items", this.items.serializeNBT());
|
||||||
compound.putBoolean("fine", this.structureFine);
|
compound.putString("state", this.structureState.name());
|
||||||
this.container.writeNBT(compound);
|
this.container.writeNBT(compound);
|
||||||
}
|
}
|
||||||
if (type == SaveType.TILE) {
|
if (type == SaveType.TILE) {
|
||||||
|
@ -227,7 +243,8 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
super.readNBT(compound, type);
|
super.readNBT(compound, type);
|
||||||
if (type != SaveType.BLOCK) {
|
if (type != SaveType.BLOCK) {
|
||||||
this.items.deserializeNBT(compound.getCompound("items"));
|
this.items.deserializeNBT(compound.getCompound("items"));
|
||||||
this.structureFine = compound.getBoolean("fine");
|
if (compound.contains("state"))
|
||||||
|
this.structureState = StructureState.valueOf(compound.getString("state"));
|
||||||
this.container.readNBT(compound);
|
this.container.readNBT(compound);
|
||||||
}
|
}
|
||||||
if (type == SaveType.TILE) {
|
if (type == SaveType.TILE) {
|
||||||
|
@ -247,4 +264,10 @@ public class TileEntityNatureAltar extends TileEntityImpl implements ITickableTi
|
||||||
public IItemHandlerModifiable getItemHandler(Direction facing) {
|
public IItemHandlerModifiable getItemHandler(Direction facing) {
|
||||||
return this.items;
|
return this.items;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum StructureState {
|
||||||
|
INVALID,
|
||||||
|
NETHER,
|
||||||
|
OVERWORLD
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ import com.google.common.collect.ImmutableList;
|
||||||
import de.ellpeck.naturesaura.NaturesAura;
|
import de.ellpeck.naturesaura.NaturesAura;
|
||||||
import de.ellpeck.naturesaura.api.recipes.AltarRecipe;
|
import de.ellpeck.naturesaura.api.recipes.AltarRecipe;
|
||||||
import de.ellpeck.naturesaura.blocks.ModBlocks;
|
import de.ellpeck.naturesaura.blocks.ModBlocks;
|
||||||
|
import de.ellpeck.naturesaura.items.ItemAuraBottle;
|
||||||
|
import de.ellpeck.naturesaura.items.ModItems;
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
import mezz.jei.api.constants.VanillaTypes;
|
||||||
import mezz.jei.api.gui.IRecipeLayout;
|
import mezz.jei.api.gui.IRecipeLayout;
|
||||||
import mezz.jei.api.gui.drawable.IDrawable;
|
import mezz.jei.api.gui.drawable.IDrawable;
|
||||||
|
@ -25,7 +27,7 @@ public class AltarCategory implements IRecipeCategory<AltarRecipe> {
|
||||||
private final ItemStack altar = new ItemStack(ModBlocks.NATURE_ALTAR);
|
private final ItemStack altar = new ItemStack(ModBlocks.NATURE_ALTAR);
|
||||||
|
|
||||||
public AltarCategory(IGuiHelper helper) {
|
public AltarCategory(IGuiHelper helper) {
|
||||||
this.background = helper.createDrawable(new ResourceLocation(NaturesAura.MOD_ID, "textures/gui/jei/altar.png"), 0, 0, 78, 57);
|
this.background = helper.createDrawable(new ResourceLocation(NaturesAura.MOD_ID, "textures/gui/jei/altar.png"), 0, 0, 103, 57);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,6 +61,8 @@ public class AltarCategory implements IRecipeCategory<AltarRecipe> {
|
||||||
builder.add(altarRecipe.input.getMatchingStacks());
|
builder.add(altarRecipe.input.getMatchingStacks());
|
||||||
if (altarRecipe.catalyst != Ingredient.EMPTY)
|
if (altarRecipe.catalyst != Ingredient.EMPTY)
|
||||||
builder.add(altarRecipe.catalyst.getMatchingStacks());
|
builder.add(altarRecipe.catalyst.getMatchingStacks());
|
||||||
|
if (altarRecipe.requiredType != null)
|
||||||
|
builder.add(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), altarRecipe.requiredType));
|
||||||
iIngredients.setInputs(VanillaTypes.ITEM, builder.build());
|
iIngredients.setInputs(VanillaTypes.ITEM, builder.build());
|
||||||
iIngredients.setOutput(VanillaTypes.ITEM, altarRecipe.output);
|
iIngredients.setOutput(VanillaTypes.ITEM, altarRecipe.output);
|
||||||
}
|
}
|
||||||
|
@ -68,10 +72,13 @@ public class AltarCategory implements IRecipeCategory<AltarRecipe> {
|
||||||
IGuiItemStackGroup group = iRecipeLayout.getItemStacks();
|
IGuiItemStackGroup group = iRecipeLayout.getItemStacks();
|
||||||
group.init(0, true, 0, 18);
|
group.init(0, true, 0, 18);
|
||||||
group.set(0, Arrays.asList(recipe.input.getMatchingStacks()));
|
group.set(0, Arrays.asList(recipe.input.getMatchingStacks()));
|
||||||
group.init(1, false, 56, 18);
|
group.init(1, false, 80, 18);
|
||||||
group.set(1, recipe.output);
|
group.set(1, recipe.output);
|
||||||
group.init(2, true, 26, 18);
|
group.init(2, true, 26, 18);
|
||||||
group.set(2, recipe.catalyst == Ingredient.EMPTY ?
|
group.set(2, recipe.catalyst == Ingredient.EMPTY ?
|
||||||
Collections.singletonList(this.altar) : Arrays.asList(recipe.catalyst.getMatchingStacks()));
|
Collections.singletonList(this.altar) : Arrays.asList(recipe.catalyst.getMatchingStacks()));
|
||||||
|
group.init(3, true, 51, 18);
|
||||||
|
if (recipe.requiredType != null)
|
||||||
|
group.set(3, ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), recipe.requiredType));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,9 @@ package de.ellpeck.naturesaura.compat.patchouli;
|
||||||
|
|
||||||
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
||||||
import de.ellpeck.naturesaura.api.recipes.AltarRecipe;
|
import de.ellpeck.naturesaura.api.recipes.AltarRecipe;
|
||||||
|
import de.ellpeck.naturesaura.items.ItemAuraBottle;
|
||||||
|
import de.ellpeck.naturesaura.items.ModItems;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import vazkii.patchouli.api.IComponentProcessor;
|
import vazkii.patchouli.api.IComponentProcessor;
|
||||||
import vazkii.patchouli.api.IVariableProvider;
|
import vazkii.patchouli.api.IVariableProvider;
|
||||||
|
@ -30,6 +33,11 @@ public class ProcessorAltar implements IComponentProcessor {
|
||||||
return PatchouliAPI.instance.serializeIngredient(this.recipe.catalyst);
|
return PatchouliAPI.instance.serializeIngredient(this.recipe.catalyst);
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
|
case "type":
|
||||||
|
if (this.recipe.requiredType != null)
|
||||||
|
return PatchouliAPI.instance.serializeItemStack(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), this.recipe.requiredType));
|
||||||
|
else
|
||||||
|
return null;
|
||||||
case "name":
|
case "name":
|
||||||
return this.recipe.output.getDisplayName().getFormattedText();
|
return this.recipe.output.getDisplayName().getFormattedText();
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -120,13 +120,14 @@ public class PacketParticles {
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
ALTAR_CONVERSION((message, world) -> {
|
ALTAR_CONVERSION((message, world) -> {
|
||||||
|
int color = message.data[0];
|
||||||
for (int i = world.rand.nextInt(5) + 2; i >= 0; i--) {
|
for (int i = world.rand.nextInt(5) + 2; i >= 0; i--) {
|
||||||
NaturesAuraAPI.instance().spawnMagicParticle(
|
NaturesAuraAPI.instance().spawnMagicParticle(
|
||||||
message.posX + 0.25F + world.rand.nextFloat() * 0.5F,
|
message.posX + 0.25F + world.rand.nextFloat() * 0.5F,
|
||||||
message.posY + 0.9F + 0.25F * world.rand.nextFloat(),
|
message.posY + 0.9F + 0.25F * world.rand.nextFloat(),
|
||||||
message.posZ + 0.25F + world.rand.nextFloat() * 0.5F,
|
message.posZ + 0.25F + world.rand.nextFloat() * 0.5F,
|
||||||
world.rand.nextGaussian() * 0.02F, world.rand.nextFloat() * 0.02F, world.rand.nextGaussian() * 0.02F,
|
world.rand.nextGaussian() * 0.02F, world.rand.nextFloat() * 0.02F, world.rand.nextGaussian() * 0.02F,
|
||||||
0x00FF00, world.rand.nextFloat() * 1.5F + 0.75F, 20, 0F, false, true);
|
color, world.rand.nextFloat() * 1.5F + 0.75F, 20, 0F, false, true);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
POTION_GEN((message, world) -> {
|
POTION_GEN((message, world) -> {
|
||||||
|
|
|
@ -157,29 +157,29 @@ public final class ModRecipes {
|
||||||
|
|
||||||
new AltarRecipe(res("infused_iron"),
|
new AltarRecipe(res("infused_iron"),
|
||||||
ing(Items.IRON_INGOT), new ItemStack(ModItems.INFUSED_IRON),
|
ing(Items.IRON_INGOT), new ItemStack(ModItems.INFUSED_IRON),
|
||||||
Ingredient.EMPTY, 15000, 80).register();
|
NaturesAuraAPI.TYPE_OVERWORLD, Ingredient.EMPTY, 15000, 80).register();
|
||||||
new AltarRecipe(res("infused_iron_block"),
|
new AltarRecipe(res("infused_iron_block"),
|
||||||
ing(Blocks.IRON_BLOCK), new ItemStack(ModBlocks.INFUSED_IRON_BLOCK),
|
ing(Blocks.IRON_BLOCK), new ItemStack(ModBlocks.INFUSED_IRON_BLOCK),
|
||||||
Ingredient.EMPTY, 135000, 700).register();
|
NaturesAuraAPI.TYPE_OVERWORLD, Ingredient.EMPTY, 135000, 700).register();
|
||||||
new AltarRecipe(res("infused_stone"),
|
new AltarRecipe(res("infused_stone"),
|
||||||
ing(Blocks.STONE), new ItemStack(ModBlocks.INFUSED_STONE),
|
ing(Blocks.STONE), new ItemStack(ModBlocks.INFUSED_STONE),
|
||||||
Ingredient.EMPTY, 7500, 40).register();
|
NaturesAuraAPI.TYPE_OVERWORLD, Ingredient.EMPTY, 7500, 40).register();
|
||||||
|
|
||||||
Ingredient conversion = ing(ModBlocks.CONVERSION_CATALYST);
|
Ingredient conversion = ing(ModBlocks.CONVERSION_CATALYST);
|
||||||
new AltarRecipe(res("breath"), nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_END)), new ItemStack(Items.DRAGON_BREATH), conversion, 20000, 80).register();
|
new AltarRecipe(res("breath"), nbtIng(ItemAuraBottle.setType(new ItemStack(ModItems.AURA_BOTTLE), NaturesAuraAPI.TYPE_END)), new ItemStack(Items.DRAGON_BREATH), NaturesAuraAPI.TYPE_NETHER, conversion, 20000, 80).register();
|
||||||
new AltarRecipe(res("leather"), ing(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), conversion, 10000, 50).register();
|
new AltarRecipe(res("leather"), ing(Items.ROTTEN_FLESH), new ItemStack(Items.LEATHER), NaturesAuraAPI.TYPE_OVERWORLD, conversion, 10000, 50).register();
|
||||||
new AltarRecipe(res("soul_sand"), ing(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), conversion, 5000, 100).register();
|
new AltarRecipe(res("soul_sand"), ing(Blocks.SAND), new ItemStack(Blocks.SOUL_SAND), NaturesAuraAPI.TYPE_NETHER, conversion, 5000, 100).register();
|
||||||
new AltarRecipe(res("nether_wart"), ing(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), conversion, 30000, 250).register();
|
new AltarRecipe(res("nether_wart"), ing(Blocks.RED_MUSHROOM), new ItemStack(Items.NETHER_WART), NaturesAuraAPI.TYPE_NETHER, conversion, 30000, 250).register();
|
||||||
new AltarRecipe(res("prismarine"), ing(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), conversion, 55000, 200).register();
|
new AltarRecipe(res("prismarine"), ing(Items.QUARTZ), new ItemStack(Items.PRISMARINE_SHARD), NaturesAuraAPI.TYPE_NETHER, conversion, 55000, 200).register();
|
||||||
new AltarRecipe(res("water"), ing(Items.GLASS_BOTTLE), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.WATER), conversion, 25000, 200).register();
|
new AltarRecipe(res("water"), ing(Items.GLASS_BOTTLE), PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.WATER), NaturesAuraAPI.TYPE_OVERWORLD, conversion, 25000, 200).register();
|
||||||
new AltarRecipe(res("coal"), ing(Items.CHARCOAL), new ItemStack(Items.COAL), conversion, 30000, 250).register();
|
new AltarRecipe(res("coal"), ing(Items.CHARCOAL), new ItemStack(Items.COAL), NaturesAuraAPI.TYPE_OVERWORLD, conversion, 30000, 250).register();
|
||||||
|
|
||||||
Ingredient crushing = ing(ModBlocks.CRUSHING_CATALYST);
|
Ingredient crushing = ing(ModBlocks.CRUSHING_CATALYST);
|
||||||
new AltarRecipe(res("bone"), ing(Items.BONE), new ItemStack(Items.BONE_MEAL, 6), crushing, 3000, 40).register();
|
new AltarRecipe(res("bone"), ing(Items.BONE), new ItemStack(Items.BONE_MEAL, 6), NaturesAuraAPI.TYPE_OVERWORLD, crushing, 3000, 40).register();
|
||||||
new AltarRecipe(res("sugar"), ing(Items.SUGAR_CANE), new ItemStack(Items.SUGAR, 3), crushing, 3000, 40).register();
|
new AltarRecipe(res("sugar"), ing(Items.SUGAR_CANE), new ItemStack(Items.SUGAR, 3), NaturesAuraAPI.TYPE_OVERWORLD, crushing, 3000, 40).register();
|
||||||
new AltarRecipe(res("blaze"), ing(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4), crushing, 5000, 60).register();
|
new AltarRecipe(res("blaze"), ing(Items.BLAZE_ROD), new ItemStack(Items.BLAZE_POWDER, 4), NaturesAuraAPI.TYPE_NETHER, crushing, 5000, 60).register();
|
||||||
new AltarRecipe(res("glowstone"), ing(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4), crushing, 3000, 40).register();
|
new AltarRecipe(res("glowstone"), ing(Blocks.GLOWSTONE), new ItemStack(Items.GLOWSTONE_DUST, 4), NaturesAuraAPI.TYPE_NETHER, crushing, 3000, 40).register();
|
||||||
new AltarRecipe(res("sand"), ing(Blocks.COBBLESTONE), new ItemStack(Blocks.SAND), crushing, 3000, 40).register();
|
new AltarRecipe(res("sand"), ing(Blocks.COBBLESTONE), new ItemStack(Blocks.SAND), NaturesAuraAPI.TYPE_OVERWORLD, crushing, 3000, 40).register();
|
||||||
|
|
||||||
new OfferingRecipe(res("sky_ingot"),
|
new OfferingRecipe(res("sky_ingot"),
|
||||||
amountIng(new ItemStack(ModItems.INFUSED_IRON, 3)),
|
amountIng(new ItemStack(ModItems.INFUSED_IRON, 3)),
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 743 B |
Binary file not shown.
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4 KiB |
|
@ -4,13 +4,13 @@
|
||||||
{
|
{
|
||||||
"type": "item",
|
"type": "item",
|
||||||
"item": "#input",
|
"item": "#input",
|
||||||
"x": 24,
|
"x": 14,
|
||||||
"y": 26
|
"y": 26
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "item",
|
"type": "item",
|
||||||
"item": "#output",
|
"item": "#output",
|
||||||
"x": 76,
|
"x": 82,
|
||||||
"y": 26,
|
"y": 26,
|
||||||
"link_recipe": true
|
"link_recipe": true
|
||||||
},
|
},
|
||||||
|
@ -18,24 +18,30 @@
|
||||||
"group": "catalyst",
|
"group": "catalyst",
|
||||||
"type": "item",
|
"type": "item",
|
||||||
"item": "#catalyst",
|
"item": "#catalyst",
|
||||||
"x": 50,
|
"x": 36,
|
||||||
"y": 28
|
"y": 26
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "item",
|
||||||
|
"item": "#type",
|
||||||
|
"x": 58,
|
||||||
|
"y": 26
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"group": "altar",
|
"group": "altar",
|
||||||
"type": "item",
|
"type": "item",
|
||||||
"item": "naturesaura:nature_altar",
|
"item": "naturesaura:nature_altar",
|
||||||
"x": 50,
|
"x": 36,
|
||||||
"y": 26
|
"y": 26
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "image",
|
"type": "image",
|
||||||
"image": "naturesaura:textures/gui/patchouli/elements.png",
|
"image": "naturesaura:textures/gui/patchouli/elements.png",
|
||||||
"x": 20,
|
"x": 10,
|
||||||
"y": 13,
|
"y": 13,
|
||||||
"u": 0,
|
"u": 0,
|
||||||
"v": 0,
|
"v": 0,
|
||||||
"width": 75,
|
"width": 91,
|
||||||
"height": 44
|
"height": 44
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"image": "naturesaura:textures/gui/patchouli/elements.png",
|
"image": "naturesaura:textures/gui/patchouli/elements.png",
|
||||||
"x": 16,
|
"x": 16,
|
||||||
"y": 13,
|
"y": 13,
|
||||||
"u": 76,
|
"u": 92,
|
||||||
"v": 0,
|
"v": 0,
|
||||||
"width": 84,
|
"width": 84,
|
||||||
"height": 38
|
"height": 38
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shapeless",
|
||||||
|
"ingredients": [
|
||||||
|
{
|
||||||
|
"item": "minecraft:nether_bricks"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"item": "naturesaura:gold_fiber"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"result": {
|
||||||
|
"item": "naturesaura:gold_nether_brick"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue