mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 05:08:34 +01:00
Misc fixes, including closing #70
This commit is contained in:
parent
ad59eac0cf
commit
c59d7e610e
10 changed files with 109 additions and 64 deletions
|
@ -61,10 +61,6 @@ public final class NaturesAura {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public static ResourceLocation createRes(String resource) {
|
|
||||||
return new ResourceLocation(MOD_ID, resource);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setup(FMLCommonSetupEvent event) {
|
public void setup(FMLCommonSetupEvent event) {
|
||||||
ModConfig.instance.apply();
|
ModConfig.instance.apply();
|
||||||
|
|
||||||
|
|
|
@ -9,17 +9,16 @@ import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
|
||||||
|
|
||||||
public class AnimalSpawnerRecipe {
|
public class AnimalSpawnerRecipe {
|
||||||
|
|
||||||
public final ResourceLocation name;
|
public final ResourceLocation name;
|
||||||
public final Ingredient[] ingredients;
|
public final Ingredient[] ingredients;
|
||||||
public final ResourceLocation entity;
|
public final EntityType entity;
|
||||||
public final int aura;
|
public final int aura;
|
||||||
public final int time;
|
public final int time;
|
||||||
|
|
||||||
public AnimalSpawnerRecipe(ResourceLocation name, ResourceLocation entity, int aura, int time, Ingredient... ingredients) {
|
public AnimalSpawnerRecipe(ResourceLocation name, EntityType entity, int aura, int time, Ingredient... ingredients) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.ingredients = ingredients;
|
this.ingredients = ingredients;
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
|
@ -28,10 +27,7 @@ public class AnimalSpawnerRecipe {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Entity makeEntity(World world, double x, double y, double z) {
|
public Entity makeEntity(World world, double x, double y, double z) {
|
||||||
EntityType entry = ForgeRegistries.ENTITIES.getValue(this.entity);
|
Entity entity = this.entity.create(world);
|
||||||
if (entry == null)
|
|
||||||
return null;
|
|
||||||
Entity entity = entry.create(world);
|
|
||||||
if (x == 0 && y == 0 && z == 0)
|
if (x == 0 && y == 0 && z == 0)
|
||||||
return entity;
|
return entity;
|
||||||
entity.setLocationAndAngles(x, y, z, MathHelper.wrapDegrees(world.rand.nextFloat() * 360F), 0F);
|
entity.setLocationAndAngles(x, y, z, MathHelper.wrapDegrees(world.rand.nextFloat() * 360F), 0F);
|
||||||
|
|
|
@ -126,8 +126,8 @@ public class TileEntityFireworkGenerator extends TileEntityImpl implements ITick
|
||||||
this.toRelease -= IAuraChunk.getAuraChunk(this.world, spot).storeAura(spot, this.toRelease);
|
this.toRelease -= IAuraChunk.getAuraChunk(this.world, spot).storeAura(spot, this.toRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PacketHandler.sendToAllLoaded(this.world, this.pos,
|
PacketHandler.sendToAllLoaded(this.world, this.pos,
|
||||||
new PacketParticles(this.pos.getX(), this.pos.getY(), this.pos.getZ(), 8));*/
|
new PacketParticles(this.pos.getX(), this.pos.getY(), this.pos.getZ(), 8));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
package de.ellpeck.naturesaura.blocks.tiles.render;
|
package de.ellpeck.naturesaura.blocks.tiles.render;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.platform.GLX;
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
import com.mojang.blaze3d.platform.GlStateManager;
|
||||||
import de.ellpeck.naturesaura.NaturesAura;
|
import de.ellpeck.naturesaura.NaturesAura;
|
||||||
import de.ellpeck.naturesaura.blocks.tiles.TileEntityProjectileGenerator;
|
import de.ellpeck.naturesaura.blocks.tiles.TileEntityProjectileGenerator;
|
||||||
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.entity.model.RendererModel;
|
import net.minecraft.client.renderer.entity.model.RendererModel;
|
||||||
import net.minecraft.client.renderer.model.Model;
|
import net.minecraft.client.renderer.model.Model;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||||
|
@ -19,6 +21,10 @@ public class RenderProjectileGenerator extends TileEntityRenderer<TileEntityProj
|
||||||
@Override
|
@Override
|
||||||
public void render(TileEntityProjectileGenerator te, double x, double y, double z, float partialTicks, int destroyStage) {
|
public void render(TileEntityProjectileGenerator te, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.enableAlphaTest();
|
||||||
|
GlStateManager.enableBlend();
|
||||||
|
GlStateManager.alphaFunc(516, 0.003921569F);
|
||||||
|
GlStateManager.depthMask(false);
|
||||||
GlStateManager.translated(x, y, z);
|
GlStateManager.translated(x, y, z);
|
||||||
if (te.nextSide == Direction.NORTH) {
|
if (te.nextSide == Direction.NORTH) {
|
||||||
GlStateManager.rotatef(270, 0, 1, 0);
|
GlStateManager.rotatef(270, 0, 1, 0);
|
||||||
|
@ -33,7 +39,15 @@ public class RenderProjectileGenerator extends TileEntityRenderer<TileEntityProj
|
||||||
GlStateManager.translatef(-0.001F, 0, 0);
|
GlStateManager.translatef(-0.001F, 0, 0);
|
||||||
}
|
}
|
||||||
this.bindTexture(RES);
|
this.bindTexture(RES);
|
||||||
|
int brightness = 15 << 20 | 15 << 4;
|
||||||
|
int j = brightness % 65536;
|
||||||
|
int k = brightness / 65536;
|
||||||
|
GLX.glMultiTexCoord2f(GLX.GL_TEXTURE1, (float) j, (float) k);
|
||||||
this.model.render();
|
this.model.render();
|
||||||
|
GlStateManager.depthMask(true);
|
||||||
|
GlStateManager.alphaFunc(516, 0.1F);
|
||||||
|
GlStateManager.disableAlphaTest();
|
||||||
|
GlStateManager.disableBlend();
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package de.ellpeck.naturesaura.compat.jei;
|
package de.ellpeck.naturesaura.compat.jei;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
|
import com.mojang.blaze3d.platform.GLX;
|
||||||
|
import com.mojang.blaze3d.platform.GlStateManager;
|
||||||
import de.ellpeck.naturesaura.NaturesAura;
|
import de.ellpeck.naturesaura.NaturesAura;
|
||||||
import de.ellpeck.naturesaura.api.recipes.AnimalSpawnerRecipe;
|
import de.ellpeck.naturesaura.api.recipes.AnimalSpawnerRecipe;
|
||||||
import mezz.jei.api.constants.VanillaTypes;
|
import mezz.jei.api.constants.VanillaTypes;
|
||||||
|
@ -10,19 +12,24 @@ import mezz.jei.api.gui.ingredient.IGuiItemStackGroup;
|
||||||
import mezz.jei.api.helpers.IGuiHelper;
|
import mezz.jei.api.helpers.IGuiHelper;
|
||||||
import mezz.jei.api.ingredients.IIngredients;
|
import mezz.jei.api.ingredients.IIngredients;
|
||||||
import mezz.jei.api.recipe.category.IRecipeCategory;
|
import mezz.jei.api.recipe.category.IRecipeCategory;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.entity.EntityType;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.SpawnEggItem;
|
import net.minecraft.item.SpawnEggItem;
|
||||||
import net.minecraft.item.crafting.Ingredient;
|
import net.minecraft.item.crafting.Ingredient;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecipe> {
|
public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecipe> {
|
||||||
|
|
||||||
private final IDrawable background;
|
private final IDrawable background;
|
||||||
|
private final Map<EntityType, Entity> entityCache = new HashMap<>();
|
||||||
|
|
||||||
public AnimalSpawnerCategory(IGuiHelper helper) {
|
public AnimalSpawnerCategory(IGuiHelper helper) {
|
||||||
this.background = helper.createDrawable(new ResourceLocation(NaturesAura.MOD_ID, "textures/gui/jei/animal_spawner.png"), 0, 0, 72, 86);
|
this.background = helper.createDrawable(new ResourceLocation(NaturesAura.MOD_ID, "textures/gui/jei/animal_spawner.png"), 0, 0, 72, 86);
|
||||||
|
@ -59,9 +66,7 @@ public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecip
|
||||||
for (Ingredient ing : animalSpawnerRecipe.ingredients)
|
for (Ingredient ing : animalSpawnerRecipe.ingredients)
|
||||||
builder.add(ing.getMatchingStacks());
|
builder.add(ing.getMatchingStacks());
|
||||||
iIngredients.setInputs(VanillaTypes.ITEM, builder.build());
|
iIngredients.setInputs(VanillaTypes.ITEM, builder.build());
|
||||||
|
iIngredients.setOutput(VanillaTypes.ITEM, new ItemStack(SpawnEggItem.getEgg(animalSpawnerRecipe.entity)));
|
||||||
EntityType entry = ForgeRegistries.ENTITIES.getValue(animalSpawnerRecipe.entity);
|
|
||||||
iIngredients.setOutput(VanillaTypes.ITEM, new ItemStack(SpawnEggItem.getEgg(entry)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -72,4 +77,41 @@ public class AnimalSpawnerCategory implements IRecipeCategory<AnimalSpawnerRecip
|
||||||
group.set(i, Arrays.asList(recipe.ingredients[i].getMatchingStacks()));
|
group.set(i, Arrays.asList(recipe.ingredients[i].getMatchingStacks()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void draw(AnimalSpawnerRecipe recipe, double mouseX, double mouseY) {
|
||||||
|
Minecraft minecraft = Minecraft.getInstance();
|
||||||
|
Entity entity = this.entityCache.get(recipe.entity);
|
||||||
|
if(entity == null){
|
||||||
|
entity = recipe.makeEntity(minecraft.world,0,0,0);
|
||||||
|
this.entityCache.put(recipe.entity,entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
float size = Math.max(1F, Math.max(recipe.entity.getWidth(), recipe.entity.getHeight()));
|
||||||
|
float rot = (minecraft.world.getGameTime() + minecraft.getRenderPartialTicks()) % 360F;
|
||||||
|
renderEntity(entity, 35, 28, rot, 100F / size * 0.4F, size * 0.5F);
|
||||||
|
|
||||||
|
String name = recipe.entity.getName().getFormattedText();
|
||||||
|
minecraft.fontRenderer.drawStringWithShadow(name, 36 - minecraft.fontRenderer.getStringWidth(name) / 2F, 55, 0xFFFFFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void renderEntity(Entity entity, float x, float y, float rotation, float renderScale, float offset) {
|
||||||
|
GlStateManager.enableColorMaterial();
|
||||||
|
GlStateManager.pushMatrix();
|
||||||
|
GlStateManager.color3f(1F, 1F, 1F);
|
||||||
|
GlStateManager.translatef(x, y, 50.0F);
|
||||||
|
GlStateManager.scalef(-renderScale, renderScale, renderScale);
|
||||||
|
GlStateManager.translatef(0F, offset, 0F);
|
||||||
|
GlStateManager.rotatef(180.0F, 0.0F, 0.0F, 1.0F);
|
||||||
|
GlStateManager.rotatef(rotation, 0.0F, 1.0F, 0.0F);
|
||||||
|
RenderHelper.enableStandardItemLighting();
|
||||||
|
Minecraft.getInstance().getRenderManager().playerViewY = 180.0F;
|
||||||
|
Minecraft.getInstance().getRenderManager().renderEntity(entity, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F, false);
|
||||||
|
GlStateManager.popMatrix();
|
||||||
|
RenderHelper.disableStandardItemLighting();
|
||||||
|
GlStateManager.disableRescaleNormal();
|
||||||
|
GlStateManager.activeTexture(GLX.GL_TEXTURE1);
|
||||||
|
GlStateManager.disableTexture();
|
||||||
|
GlStateManager.activeTexture(GLX.GL_TEXTURE0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,11 +2,8 @@ package de.ellpeck.naturesaura.compat.patchouli;
|
||||||
|
|
||||||
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
import de.ellpeck.naturesaura.api.NaturesAuraAPI;
|
||||||
import de.ellpeck.naturesaura.api.recipes.AnimalSpawnerRecipe;
|
import de.ellpeck.naturesaura.api.recipes.AnimalSpawnerRecipe;
|
||||||
import net.minecraft.client.resources.I18n;
|
|
||||||
import net.minecraft.entity.EntityType;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.SpawnEggItem;
|
import net.minecraft.item.SpawnEggItem;
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
|
||||||
import vazkii.patchouli.api.IComponentProcessor;
|
import vazkii.patchouli.api.IComponentProcessor;
|
||||||
import vazkii.patchouli.api.IVariableProvider;
|
import vazkii.patchouli.api.IVariableProvider;
|
||||||
import vazkii.patchouli.api.PatchouliAPI;
|
import vazkii.patchouli.api.PatchouliAPI;
|
||||||
|
@ -31,14 +28,13 @@ public class ProcessorAnimalSpawner implements IComponentProcessor {
|
||||||
else
|
else
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
EntityType entry = ForgeRegistries.ENTITIES.getValue(this.recipe.entity);
|
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case "name":
|
case "name":
|
||||||
return I18n.format("entity." + entry.getName() + ".name");
|
return this.recipe.entity.getName().getFormattedText();
|
||||||
case "entity":
|
case "entity":
|
||||||
return this.recipe.entity.toString();
|
return this.recipe.entity.getRegistryName().toString();
|
||||||
case "egg":
|
case "egg":
|
||||||
ItemStack egg = new ItemStack(SpawnEggItem.getEgg(entry));
|
ItemStack egg = new ItemStack(SpawnEggItem.getEgg(this.recipe.entity));
|
||||||
return PatchouliAPI.instance.serializeItemStack(egg);
|
return PatchouliAPI.instance.serializeItemStack(egg);
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -3,6 +3,7 @@ package de.ellpeck.naturesaura.packet;
|
||||||
import de.ellpeck.naturesaura.NaturesAura;
|
import de.ellpeck.naturesaura.NaturesAura;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
import net.minecraft.entity.player.ServerPlayerEntity;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IWorld;
|
import net.minecraft.world.IWorld;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -16,7 +17,7 @@ public final class PacketHandler {
|
||||||
private static SimpleChannel network;
|
private static SimpleChannel network;
|
||||||
|
|
||||||
public static void init() {
|
public static void init() {
|
||||||
network = NetworkRegistry.newSimpleChannel(NaturesAura.createRes("network"), () -> VERSION, VERSION::equals, VERSION::equals);
|
network = NetworkRegistry.newSimpleChannel(new ResourceLocation(NaturesAura.MOD_ID, "network"), () -> VERSION, VERSION::equals, VERSION::equals);
|
||||||
network.registerMessage(0, PacketParticleStream.class, PacketParticleStream::toBytes, PacketParticleStream::fromBytes, PacketParticleStream::onMessage);
|
network.registerMessage(0, PacketParticleStream.class, PacketParticleStream::toBytes, PacketParticleStream::fromBytes, PacketParticleStream::onMessage);
|
||||||
network.registerMessage(1, PacketParticles.class, PacketParticles::toBytes, PacketParticles::fromBytes, PacketParticles::onMessage);
|
network.registerMessage(1, PacketParticles.class, PacketParticles::toBytes, PacketParticles::fromBytes, PacketParticles::onMessage);
|
||||||
network.registerMessage(2, PacketAuraChunk.class, PacketAuraChunk::toBytes, PacketAuraChunk::fromBytes, PacketAuraChunk::onMessage);
|
network.registerMessage(2, PacketAuraChunk.class, PacketAuraChunk::toBytes, PacketAuraChunk::fromBytes, PacketAuraChunk::onMessage);
|
||||||
|
|
|
@ -223,9 +223,8 @@ public final class ModRecipes {
|
||||||
if (block instanceof FlowerBlock)
|
if (block instanceof FlowerBlock)
|
||||||
NaturesAuraAPI.FLOWERS.addAll(block.getStateContainer().getValidStates());
|
NaturesAuraAPI.FLOWERS.addAll(block.getStateContainer().getValidStates());
|
||||||
|
|
||||||
spawner("cow", "minecraft:cow", 50000, 60, ing(Items.BEEF), ing(Items.LEATHER));
|
|
||||||
for (DyeColor color : DyeColor.values())
|
for (DyeColor color : DyeColor.values())
|
||||||
new AnimalSpawnerRecipe(res("sheep_" + color.getName()), new ResourceLocation("minecraft:sheep"),
|
new AnimalSpawnerRecipe(res("sheep_" + color.getName()), EntityType.SHEEP,
|
||||||
500, 60, ing(ModItems.BIRTH_SPIRIT), ing(Items.MUTTON),
|
500, 60, ing(ModItems.BIRTH_SPIRIT), ing(Items.MUTTON),
|
||||||
ing(Helper.getWool(color))) {
|
ing(Helper.getWool(color))) {
|
||||||
@Override
|
@Override
|
||||||
|
@ -235,39 +234,40 @@ public final class ModRecipes {
|
||||||
return sheep;
|
return sheep;
|
||||||
}
|
}
|
||||||
}.register();
|
}.register();
|
||||||
spawner("chicken", "minecraft:chicken", 30000, 40, ing(Items.FEATHER), ing(Items.EGG));
|
spawner("cow", EntityType.COW, 50000, 60, ing(Items.BEEF), ing(Items.LEATHER));
|
||||||
spawner("pig", "minecraft:pig", 50000, 60, ing(Items.PORKCHOP));
|
spawner("chicken", EntityType.CHICKEN, 30000, 40, ing(Items.FEATHER), ing(Items.EGG));
|
||||||
spawner("blaze", "minecraft:blaze", 150000, 120, ing(Items.BLAZE_ROD), ing(Items.BLAZE_POWDER));
|
spawner("pig", EntityType.PIG, 50000, 60, ing(Items.PORKCHOP));
|
||||||
spawner("ghast", "minecraft:ghast", 120000, 150, ing(Items.GUNPOWDER), ing(Items.GHAST_TEAR));
|
spawner("blaze", EntityType.BLAZE, 150000, 120, ing(Items.BLAZE_ROD), ing(Items.BLAZE_POWDER));
|
||||||
spawner("ocelot", "minecraft:ocelot", 80000, 60, ing(Items.COD), ing(ItemTags.WOOL));
|
spawner("ghast", EntityType.GHAST, 120000, 150, ing(Items.GUNPOWDER), ing(Items.GHAST_TEAR));
|
||||||
spawner("mule", "minecraft:mule", 100000, 100, ing(Items.LEATHER), ing(Blocks.CHEST), ing(Items.APPLE));
|
spawner("ocelot", EntityType.OCELOT, 80000, 60, ing(Items.COD), ing(ItemTags.WOOL));
|
||||||
spawner("bat", "minecraft:bat", 30000, 40, ing(Items.FEATHER));
|
spawner("mule", EntityType.MULE, 100000, 100, ing(Items.LEATHER), ing(Blocks.CHEST), ing(Items.APPLE));
|
||||||
spawner("endermite", "minecraft:endermite", 30000, 40, ing(Items.ENDER_PEARL), ing(Blocks.STONE));
|
spawner("bat", EntityType.BAT, 30000, 40, ing(Items.FEATHER));
|
||||||
spawner("parrot", "minecraft:parrot", 50000, 60, ing(Items.FEATHER), ing(Items.COOKIE));
|
spawner("endermite", EntityType.ENDERMITE, 30000, 40, ing(Items.ENDER_PEARL), ing(Blocks.STONE));
|
||||||
spawner("slime", "minecraft:slime", 30000, 40, ing(Items.SLIME_BALL));
|
spawner("parrot", EntityType.PARROT, 50000, 60, ing(Items.FEATHER), ing(Items.COOKIE));
|
||||||
spawner("spider", "minecraft:spider", 100000, 120, ing(Items.STRING), ing(Items.SPIDER_EYE));
|
spawner("slime", EntityType.SLIME, 30000, 40, ing(Items.SLIME_BALL));
|
||||||
spawner("skeleton", "minecraft:skeleton", 100000, 120, ing(Items.BONE), ing(Items.ARROW));
|
spawner("spider", EntityType.SPIDER, 100000, 120, ing(Items.STRING), ing(Items.SPIDER_EYE));
|
||||||
spawner("enderman", "minecraft:enderman", 120000, 120, ing(Items.ENDER_PEARL));
|
spawner("skeleton", EntityType.SKELETON, 100000, 120, ing(Items.BONE), ing(Items.ARROW));
|
||||||
spawner("silverfish", "minecraft:silverfish", 30000, 40, ing(Blocks.STONE));
|
spawner("enderman", EntityType.ENDERMAN, 120000, 120, ing(Items.ENDER_PEARL));
|
||||||
spawner("squid", "minecraft:squid", 50000, 40, ing(Items.INK_SAC));
|
spawner("silverfish", EntityType.SILVERFISH, 30000, 40, ing(Blocks.STONE));
|
||||||
spawner("stray", "minecraft:stray", 100000, 120, ing(Items.BONE), ing(Blocks.ICE));
|
spawner("squid", EntityType.SQUID, 50000, 40, ing(Items.INK_SAC));
|
||||||
spawner("shulker", "minecraft:shulker", 150000, 100, ing(Items.SHULKER_SHELL));
|
spawner("stray", EntityType.STRAY, 100000, 120, ing(Items.BONE), ing(Blocks.ICE));
|
||||||
spawner("husk", "minecraft:husk", 100000, 120, ing(Items.ROTTEN_FLESH), ing(Blocks.SAND));
|
spawner("shulker", EntityType.SHULKER, 150000, 100, ing(Items.SHULKER_SHELL));
|
||||||
spawner("llama", "minecraft:llama", 60000, 80, ing(ItemTags.WOOL));
|
spawner("husk", EntityType.HUSK, 100000, 120, ing(Items.ROTTEN_FLESH), ing(Blocks.SAND));
|
||||||
spawner("rabbit", "minecraft:rabbit", 30000, 40, ing(Items.RABBIT_HIDE));
|
spawner("llama", EntityType.LLAMA, 60000, 80, ing(ItemTags.WOOL));
|
||||||
spawner("magma_cube", "minecraft:magma_cube", 100000, 100, ing(Items.MAGMA_CREAM));
|
spawner("rabbit", EntityType.RABBIT, 30000, 40, ing(Items.RABBIT_HIDE));
|
||||||
spawner("zombie_pigman", "minecraft:zombie_pigman", 120000, 150, ing(Items.ROTTEN_FLESH), ing(Items.GOLD_NUGGET));
|
spawner("magma_cube", EntityType.MAGMA_CUBE, 100000, 100, ing(Items.MAGMA_CREAM));
|
||||||
spawner("polar_bear", "minecraft:polar_bear", 50000, 60, ing(Items.COD), ing(Blocks.ICE));
|
spawner("zombie_pigman", EntityType.ZOMBIE_PIGMAN, 120000, 150, ing(Items.ROTTEN_FLESH), ing(Items.GOLD_NUGGET));
|
||||||
spawner("mooshroom", "minecraft:mooshroom", 40000, 60, ing(Items.LEATHER), ing(Blocks.RED_MUSHROOM));
|
spawner("polar_bear", EntityType.POLAR_BEAR, 50000, 60, ing(Items.COD), ing(Blocks.ICE));
|
||||||
spawner("guardian", "minecraft:guardian", 150000, 150, ing(Items.PRISMARINE_SHARD), ing(Items.PRISMARINE_CRYSTALS));
|
spawner("mooshroom", EntityType.MOOSHROOM, 40000, 60, ing(Items.LEATHER), ing(Blocks.RED_MUSHROOM));
|
||||||
spawner("horse", "minecraft:horse", 100000, 100, ing(Items.LEATHER));
|
spawner("guardian", EntityType.GUARDIAN, 150000, 150, ing(Items.PRISMARINE_SHARD), ing(Items.PRISMARINE_CRYSTALS));
|
||||||
spawner("donkey", "minecraft:donkey", 100000, 100, ing(Items.LEATHER), ing(Blocks.CHEST));
|
spawner("horse", EntityType.HORSE, 100000, 100, ing(Items.LEATHER));
|
||||||
spawner("cave_spider", "minecraft:cave_spider", 100000, 120, ing(Items.STRING), ing(Items.FERMENTED_SPIDER_EYE));
|
spawner("donkey", EntityType.DONKEY, 100000, 100, ing(Items.LEATHER), ing(Blocks.CHEST));
|
||||||
spawner("creeper", "minecraft:creeper", 100000, 120, ing(Items.GUNPOWDER));
|
spawner("cave_spider", EntityType.CAVE_SPIDER, 100000, 120, ing(Items.STRING), ing(Items.FERMENTED_SPIDER_EYE));
|
||||||
spawner("witch", "minecraft:witch", 150000, 150, ing(Items.GLASS_BOTTLE), ing(Items.GLOWSTONE_DUST));
|
spawner("creeper", EntityType.CREEPER, 100000, 120, ing(Items.GUNPOWDER));
|
||||||
spawner("wither_skeleton", "minecraft:wither_skeleton", 150000, 150, ing(Items.BONE), ing(Blocks.OBSIDIAN));
|
spawner("witch", EntityType.WITCH, 150000, 150, ing(Items.GLASS_BOTTLE), ing(Items.GLOWSTONE_DUST));
|
||||||
spawner("wolf", "minecraft:wolf", 50000, 60, ing(Items.LEATHER), ing(Items.BONE));
|
spawner("wither_skeleton", EntityType.WITHER_SKELETON, 150000, 150, ing(Items.BONE), ing(Blocks.OBSIDIAN));
|
||||||
spawner("zombie", "minecraft:zombie", 100000, 100, ing(Items.ROTTEN_FLESH));
|
spawner("wolf", EntityType.WOLF, 50000, 60, ing(Items.LEATHER), ing(Items.BONE));
|
||||||
|
spawner("zombie", EntityType.ZOMBIE, 100000, 100, ing(Items.ROTTEN_FLESH));
|
||||||
|
|
||||||
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_COAL, 5000));
|
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_COAL, 5000));
|
||||||
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_IRON, 3000));
|
NaturesAuraAPI.OVERWORLD_ORES.add(new WeightedOre(Tags.Blocks.ORES_IRON, 3000));
|
||||||
|
@ -336,11 +336,11 @@ public final class ModRecipes {
|
||||||
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.TRIDENT, 3000000);
|
NaturesAuraAPI.PROJECTILE_GENERATIONS.put(EntityType.TRIDENT, 3000000);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void spawner(String name, String entity, int aura, int time, Ingredient... ings) {
|
private static void spawner(String name, EntityType entity, int aura, int time, Ingredient... ings) {
|
||||||
Ingredient[] actualIngs = new Ingredient[ings.length + 1];
|
Ingredient[] actualIngs = new Ingredient[ings.length + 1];
|
||||||
actualIngs[0] = ing(ModItems.BIRTH_SPIRIT);
|
actualIngs[0] = ing(ModItems.BIRTH_SPIRIT);
|
||||||
System.arraycopy(ings, 0, actualIngs, 1, ings.length);
|
System.arraycopy(ings, 0, actualIngs, 1, ings.length);
|
||||||
new AnimalSpawnerRecipe(res(name), new ResourceLocation(entity), aura, time, actualIngs).register();
|
new AnimalSpawnerRecipe(res(name), entity, aura, time, actualIngs).register();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Ingredient ing(Block... blocks) {
|
private static Ingredient ing(Block... blocks) {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Breathlessness",
|
"name": "Breathlessness",
|
||||||
"icon": "minecraft:wool",
|
"icon": "minecraft:white_wool",
|
||||||
"category": "effects",
|
"category": "effects",
|
||||||
"advancement": "naturesaura:negative_imbalance",
|
"advancement": "naturesaura:negative_imbalance",
|
||||||
"pages": [
|
"pages": [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Magical Botany",
|
"name": "Magical Botany",
|
||||||
"icon": "minecraft:sapling",
|
"icon": "minecraft:oak_sapling",
|
||||||
"category": "intro",
|
"category": "intro",
|
||||||
"pages": [
|
"pages": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue