mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-25 06:24:27 +00:00
Slime in a bottle
This commit is contained in:
1 parent
7f6a9f0a5e
commit
148926490d
12 files changed
+80
-1
No files matched your search
@@ -91,7 +91,7 @@ public class SubTileNarslimmus extends SubTileGenerating {
|
||||
event.entityLiving.getEntityData().setBoolean(TAG_WORLD_SPAWNED, true);
|
||||
}
|
||||
|
||||
public boolean isSlimeChunk(World world, int x, int z) {
|
||||
public static boolean isSlimeChunk(World world, int x, int z) {
|
||||
Chunk chunk = world.getChunkFromBlockCoords(x, z);
|
||||
return chunk.getRandomWithSeed(987234911L).nextInt(10) == 0;
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.spawnerMover);
|
||||
addBlock(ModBlocks.spawnerClaw);
|
||||
addBlock(ModBlocks.cocoon);
|
||||
addItem(ModItems.slimeBottle);
|
||||
addItem(ModItems.blackHoleTalisman);
|
||||
|
||||
if(Botania.gardenOfGlassLoaded) {
|
||||
|
||||
@@ -275,6 +275,7 @@ public final class ModCraftingRecipes {
|
||||
public static IRecipe recipeCacophonium;
|
||||
public static IRecipe recipeManaBomb;
|
||||
public static IRecipe recipeCobweb;
|
||||
public static IRecipe recipeSlimeBottle;
|
||||
|
||||
// Garden of Glass
|
||||
public static IRecipe recipeRootToSapling;
|
||||
@@ -1867,6 +1868,14 @@ public final class ModCraftingRecipes {
|
||||
'M', LibOreDict.MANA_STRING);
|
||||
recipeCobweb = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Slime in a Bottle Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.slimeBottle),
|
||||
"EGE", "ESE", " E ",
|
||||
'E', LibOreDict.ELEMENTIUM,
|
||||
'G', new ItemStack(ModBlocks.elfGlass),
|
||||
'S', new ItemStack(Items.slime_ball));
|
||||
recipeSlimeBottle = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Storage Block/Nugget Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Aug 17, 2015, 1:32:58 AM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.subtile.generating.SubTileNarslimmus;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemSlimeBottle extends ItemMod {
|
||||
|
||||
IIcon activeIcon;
|
||||
|
||||
public ItemSlimeBottle() {
|
||||
setUnlocalizedName(LibItemNames.SLIME_BOTTLE);
|
||||
setMaxStackSize(1);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
activeIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int dmg) {
|
||||
return dmg == 0 ? itemIcon : activeIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int something, boolean somethingelse) {
|
||||
int x = MathHelper.floor_double(entity.posX);
|
||||
int z = MathHelper.floor_double(entity.posZ);
|
||||
boolean slime = SubTileNarslimmus.SpawnIntercepter.isSlimeChunk(world, x, z);
|
||||
int meta = stack.getItemDamage();
|
||||
int newMeta = slime ? 1 : 0;
|
||||
if(meta != newMeta)
|
||||
stack.setItemDamage(newMeta);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -246,6 +246,7 @@ public final class ModItems {
|
||||
public static Item waterBowl;
|
||||
public static Item obedienceStick;
|
||||
public static Item cacophonium;
|
||||
public static Item slimeBottle;
|
||||
|
||||
public static void init() {
|
||||
lexicon = new ItemLexicon();
|
||||
@@ -382,6 +383,7 @@ public final class ModItems {
|
||||
waterBowl = new ItemWaterBowl();
|
||||
obedienceStick = new ItemObedienceStick();
|
||||
cacophonium = new ItemCacophonium();
|
||||
slimeBottle = new ItemSlimeBottle();
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
|
||||
@@ -194,6 +194,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry temperanceStone;
|
||||
public static LexiconEntry terraAxe;
|
||||
public static LexiconEntry obedienceStick;
|
||||
public static LexiconEntry slimeBottle;
|
||||
|
||||
public static LexiconEntry enderAir;
|
||||
public static LexiconEntry enderEyeBlock;
|
||||
@@ -749,6 +750,9 @@ public final class LexiconData {
|
||||
obedienceStick = new BLexiconEntry(LibLexicon.TOOL_OBEDIENCE_STICK, categoryTools);
|
||||
obedienceStick.setPriority().setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeObedienceStick));
|
||||
|
||||
slimeBottle = new ALexiconEntry(LibLexicon.TOOL_SLIME_BOTTLE, categoryTools);
|
||||
slimeBottle.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeSlimeBottle));
|
||||
|
||||
// ENDER ENTRIES
|
||||
enderAir = new BLexiconEntry(LibLexicon.ENDER_AIR, categoryEnder);
|
||||
enderAir.setPriority().setLexiconPages(new PageText("0"));
|
||||
|
||||
@@ -147,6 +147,7 @@ public final class LibItemNames {
|
||||
public static final String WATER_BOWL = "waterBowl";
|
||||
public static final String OBEDIENCE_STICK = "obedienceStick";
|
||||
public static final String CACOPHONIUM = "cacophonium";
|
||||
public static final String SLIME_BOTTLE = "slimeBottle";
|
||||
|
||||
public static final String[] LENS_NAMES = new String[] {
|
||||
"lensNormal",
|
||||
|
||||
@@ -163,6 +163,7 @@ public final class LibLexicon {
|
||||
public static final String TOOL_TEMPERANCE_STONE = "temperanceStone";
|
||||
public static final String TOOL_TERRA_AXE = "terraAxe";
|
||||
public static final String TOOL_OBEDIENCE_STICK = "obedienceStick";
|
||||
public static final String TOOL_SLIME_BOTTLE = "slimeBottle";
|
||||
|
||||
public static final String ENDER_AIR = "enderAir";
|
||||
public static final String ENDER_ENDER_EYE_BLOCK = "enderEyeBlock";
|
||||
|
||||
@@ -1423,6 +1423,7 @@ item.botania:pebble.name=Pebble
|
||||
item.botania:waterBowl.name=Bowl of Water
|
||||
item.botania:obedienceStick.name=Floral Obedience Stick
|
||||
item.botania:cacophonium.name=Cacophonium
|
||||
item.botania:slimeBottle.name=Slime in a Bottle
|
||||
|
||||
# BREW NAMES
|
||||
botania.brew.fallback=Fallback
|
||||
@@ -2456,6 +2457,11 @@ botania.entry.obedienceStick=Floral Obedience Stick
|
||||
botania.page.obedienceStick0=Nobody knows why, but attaching some &1Manasteel&0 to &1Livingwood Twigs&0 creates a stick type device that can make nearby flowers all bind towards a single focus point.<br>Dubbed the &1Floral Obedience Stick&0, right clicking with it on a &1Mana Spreader&0 or &1Mana Pool&0 in the world will bind all relevant nearby flowers to it.
|
||||
botania.page.obedienceStick1=This is not a dumb new age hat
|
||||
|
||||
# -- SLIME IN A BOTTLE
|
||||
botania.entry.slimeBottle=Slime in a Bottle
|
||||
botania.page.slimeBottle0=Placing some slime in an &1Elementium Container&0 seems to have an interesting effect on said slime. When in an area where &1Slimes&0 would naturally spawn underground, the inanimate blob of slime starts jumping for some odd reason.<br>This can definitely prove useful for harvesting slimeballs or setting up a &1Narslimmus&0 however.
|
||||
botania.page.slimeBottle1=JUMPYDOLL
|
||||
|
||||
# - ENDER ARTEFACTS
|
||||
# -- EXTRACTING ENDER AIR
|
||||
botania.entry.enderAir=Extracting Ender Air
|
||||
|
||||
File renamed without changes.
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
File renamed without changes.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Reference in new issue
Block a user