mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Cleanup.
This commit is contained in:
1 parent
bc0a3cb98e
commit
eaec1a3baa
42 files changed
+159
-180
No files matched your search
@@ -411,7 +411,7 @@ public final class BotaniaAPI {
|
||||
public static void blackListItemFromLoonium(Item item) {
|
||||
looniumBlacklist.add(item);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the last recipe to have been added to the recipe list.
|
||||
*/
|
||||
|
||||
@@ -230,7 +230,7 @@ public final class CorporeaHelper {
|
||||
* Gets if the slot passed in can be extracted from by a spark.
|
||||
*/
|
||||
public static boolean isValidSlot(IInventory inv, int slot) {
|
||||
return !(inv instanceof ISidedInventory) || (arrayHas(((ISidedInventory) inv).getAccessibleSlotsFromSide(ForgeDirection.UP.ordinal()), slot) && ((ISidedInventory) inv).canExtractItem(slot, inv.getStackInSlot(slot), ForgeDirection.UP.ordinal()));
|
||||
return !(inv instanceof ISidedInventory) || arrayHas(((ISidedInventory) inv).getAccessibleSlotsFromSide(ForgeDirection.UP.ordinal()), slot) && ((ISidedInventory) inv).canExtractItem(slot, inv.getStackInSlot(slot), ForgeDirection.UP.ordinal());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,12 +12,11 @@ package vazkii.botania.api.internal;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import vazkii.botania.common.core.helper.MathHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import vazkii.botania.common.core.helper.MathHelper;
|
||||
|
||||
public final class VanillaPacketDispatcher {
|
||||
|
||||
@@ -28,11 +27,11 @@ public final class VanillaPacketDispatcher {
|
||||
if(MathHelper.pointDistancePlane(player.posX, player.posZ, tile.xCoord + 0.5, tile.zCoord + 0.5) < 64 && player instanceof EntityPlayerMP)
|
||||
((EntityPlayerMP) player).playerNetServerHandler.sendPacket(tile.getDescriptionPacket());
|
||||
}
|
||||
|
||||
|
||||
public static void dispatchTEToNearbyPlayers(World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
if(tile != null)
|
||||
dispatchTEToNearbyPlayers(tile);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -29,11 +29,9 @@ import vazkii.botania.api.item.IBaubleRender;
|
||||
import vazkii.botania.api.item.IBaubleRender.Helper;
|
||||
import vazkii.botania.api.item.IBaubleRender.RenderType;
|
||||
import vazkii.botania.api.item.ICosmeticAttachable;
|
||||
import vazkii.botania.common.block.BlockModFlower;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.armor.terrasteel.ItemTerrasteelHelm;
|
||||
import vazkii.botania.common.item.material.ItemManaResource;
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
@@ -16,20 +16,19 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.item.IBaubleRender.Helper;
|
||||
import vazkii.botania.api.subtile.signature.SubTileSignature;
|
||||
import vazkii.botania.client.core.helper.ShaderHelper;
|
||||
import vazkii.botania.common.block.BlockModFlower;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.version.VersionChecker;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
@@ -41,28 +40,28 @@ public final class ContributorFancinessHandler {
|
||||
|
||||
private volatile static Map<String, IIcon> flowerMap = null;
|
||||
private static boolean startedLoading = false;
|
||||
|
||||
|
||||
public static void render(RenderPlayerEvent.Specials event) {
|
||||
if(!startedLoading) {
|
||||
new ThreadContributorListLoader();
|
||||
startedLoading = true;
|
||||
}
|
||||
|
||||
|
||||
String name = event.entityPlayer.getDisplayName();
|
||||
|
||||
|
||||
if(name.equals("Vazkii"))
|
||||
renderFancyExclusiveDevStuffBecauseImAnEvilDevWhoDoesntCareAboutTheCommunityBooo(event);
|
||||
|
||||
|
||||
name = name.toLowerCase();
|
||||
if(flowerMap != null && flowerMap.containsKey(name))
|
||||
renderFlower(event, flowerMap.get(name));
|
||||
}
|
||||
|
||||
|
||||
public static void load(Properties props) {
|
||||
flowerMap = new HashMap();
|
||||
for(String key : props.stringPropertyNames()) {
|
||||
String value = props.getProperty(key);
|
||||
|
||||
|
||||
try {
|
||||
int i = Integer.parseInt(value);
|
||||
if(i < 0 || i >= 16)
|
||||
@@ -75,7 +74,7 @@ public final class ContributorFancinessHandler {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static void renderFancyExclusiveDevStuffBecauseImAnEvilDevWhoDoesntCareAboutTheCommunityBooo(RenderPlayerEvent event) {
|
||||
GL11.glPushMatrix();
|
||||
@@ -106,7 +105,7 @@ public final class ContributorFancinessHandler {
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
private static void renderFlower(RenderPlayerEvent event, IIcon icon) {
|
||||
GL11.glPushMatrix();
|
||||
Helper.translateToHeadLevel(event.entityPlayer);
|
||||
@@ -125,7 +124,7 @@ public final class ContributorFancinessHandler {
|
||||
ShaderHelper.releaseShader();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
public static class ThreadContributorListLoader extends Thread {
|
||||
|
||||
public ThreadContributorListLoader() {
|
||||
|
||||
@@ -26,7 +26,6 @@ import net.minecraft.item.ItemRecord;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntitySkull;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldSettings.GameType;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
@@ -263,7 +262,7 @@ public class ClientProxy extends CommonProxy {
|
||||
public boolean isTheClientPlayer(EntityLivingBase entity) {
|
||||
return entity == Minecraft.getMinecraft().thePlayer;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isClientPlayerWearingMonocle() {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
@@ -320,7 +319,7 @@ public class ClientProxy extends CommonProxy {
|
||||
mc.ingameGUI.setRecordPlayingMessage(record.getRecordNameLocal());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public long getWorldElapsedTicks() {
|
||||
return ClientTickHandler.ticksInGame;
|
||||
|
||||
@@ -114,7 +114,7 @@ public final class ModAchievements {
|
||||
relicLokiRing = new AchievementMod(LibAchievementNames.RELIC_LOKI_RING, -5, 6, ModItems.lokiRing, null);
|
||||
relicAesirRing = new AchievementMod(LibAchievementNames.RELIC_AESIR_RING, -7, 5, ModItems.aesirRing, null).setSpecial();
|
||||
}
|
||||
|
||||
|
||||
ItemStack desu = new ItemStack(ModItems.manaGun);
|
||||
desu.setStackDisplayName("desu gun");
|
||||
desuGun = new AchievementMod(LibAchievementNames.DESU_GUN, -8, -2, desu, null).setSpecial();
|
||||
|
||||
@@ -69,7 +69,7 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
tile.collideEntityItem((EntityItem) par5Entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, int x, int y, int z) {
|
||||
TileAltar tile = (TileAltar) world.getTileEntity(x, y, z);
|
||||
|
||||
@@ -40,75 +40,75 @@ public class BlockFakeAir extends BlockModContainer {
|
||||
if(shouldRemove(world, x, y, z))
|
||||
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
||||
}
|
||||
|
||||
|
||||
private boolean shouldRemove(World world, int x, int y, int z) {
|
||||
return !world.isRemote && world.getTileEntity(x, y, z) == null || !(world.getTileEntity(x, y, z) instanceof TileFakeAir) || !((TileFakeAir) world.getTileEntity(x, y, z)).canStay();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||
if(shouldRemove(world, x, y, z))
|
||||
world.setBlock(x, y, z, Blocks.water);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int tickRate(World p_149738_1_) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean registerInCreative() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockNormalCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isBlockNormalCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity e) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCollideCheck(int par1, boolean par2) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canEntityDestroy(IBlockAccess world, int x, int y, int z, Entity e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public boolean canCollideCheck(int par1, boolean par2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDropFromExplosion(Explosion par1Explosion) {
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean canBeReplacedByLeaves(IBlockAccess world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList(); // Empty List
|
||||
}
|
||||
@Override
|
||||
public boolean canDropFromExplosion(Explosion par1Explosion) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList(); // Empty List
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAir(IBlockAccess world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAir(IBlockAccess world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileFakeAir();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -22,7 +22,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
@@ -281,7 +281,7 @@ public final class ModBlocks {
|
||||
doubleFlower1 = new BlockModDoubleFlower(false);
|
||||
doubleFlower2 = new BlockModDoubleFlower(true);
|
||||
fakeAir = new BlockFakeAir();
|
||||
|
||||
|
||||
ModFluffBlocks.init();
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
|
||||
@@ -137,7 +137,7 @@ public final class ModFluffBlocks {
|
||||
public static Block sunnyQuartzSlab;
|
||||
public static Block sunnyQuartzSlabFull;
|
||||
public static Block sunnyQuartzStairs;
|
||||
|
||||
|
||||
public static Block dirtPathSlab;
|
||||
public static Block dirtPathSlabFull;
|
||||
|
||||
@@ -152,7 +152,7 @@ public final class ModFluffBlocks {
|
||||
public static Block[] stoneStairs = new Block[8];
|
||||
public static Block[] stoneSlabs = new Block[8];
|
||||
public static Block[] stoneFullSlabs = new Block[8];
|
||||
|
||||
|
||||
public static Block endStoneSlab;
|
||||
public static Block endStoneSlabFull;
|
||||
public static Block endStoneStairs;
|
||||
@@ -210,7 +210,7 @@ public final class ModFluffBlocks {
|
||||
biomeStoneA = new BlockBiomeStoneA();
|
||||
biomeStoneB = new BlockBiomeStoneB();
|
||||
stone = new Block18Stone();
|
||||
|
||||
|
||||
if(ConfigHandler.darkQuartzEnabled) {
|
||||
darkQuartz = new BlockSpecialQuartz(LibBlockNames.QUARTZ_DARK);
|
||||
darkQuartzSlab = new BlockSpecialQuartzSlab(darkQuartz, false);
|
||||
@@ -242,7 +242,7 @@ public final class ModFluffBlocks {
|
||||
sunnyQuartzSlab = new BlockSpecialQuartzSlab(sunnyQuartz, false);
|
||||
sunnyQuartzSlabFull = new BlockSpecialQuartzSlab(sunnyQuartz, true);
|
||||
sunnyQuartzStairs = new BlockSpecialQuartzStairs(sunnyQuartz);
|
||||
|
||||
|
||||
dirtPathSlab = new BlockDirtPathSlab(false);
|
||||
dirtPathSlabFull = new BlockDirtPathSlab(true);
|
||||
|
||||
@@ -253,7 +253,7 @@ public final class ModFluffBlocks {
|
||||
biomeStoneSlabs[i] = new BlockBiomeStoneSlab(false, block, meta, i);
|
||||
biomeStoneFullSlabs[i] = new BlockBiomeStoneSlab(true, block, meta, i);
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
int meta = i > 3 ? i + 4 : i;
|
||||
stoneStairs[i] = new Block18StoneStairs(meta);
|
||||
@@ -281,7 +281,7 @@ public final class ModFluffBlocks {
|
||||
((BlockModSlab) elfQuartzSlabFull).register();
|
||||
((BlockModSlab) sunnyQuartzSlab).register();
|
||||
((BlockModSlab) sunnyQuartzSlabFull).register();
|
||||
|
||||
|
||||
((BlockModSlab) livingwoodSlab).register();
|
||||
((BlockModSlab) livingwoodSlabFull).register();
|
||||
((BlockModSlab) livingwoodPlankSlab).register();
|
||||
@@ -326,7 +326,7 @@ public final class ModFluffBlocks {
|
||||
((BlockModSlab) biomeStoneSlabs[i]).register();
|
||||
((BlockModSlab) biomeStoneFullSlabs[i]).register();
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
((BlockModSlab) stoneSlabs[i]).register();
|
||||
((BlockModSlab) stoneFullSlabs[i]).register();
|
||||
|
||||
@@ -22,7 +22,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
@@ -30,6 +29,7 @@ import vazkii.botania.common.block.BlockMod;
|
||||
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class Block18Stone extends BlockMod implements ILexiconable {
|
||||
|
||||
@@ -86,5 +86,5 @@ public class Block18Stone extends BlockMod implements ILexiconable {
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.stoneAlchemy;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.slabs;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -39,10 +38,10 @@ public class Block18StoneSlab extends BlockLivingSlab {
|
||||
public BlockSlab getSingleBlock() {
|
||||
return (BlockSlab) ModFluffBlocks.stoneSlabs[index];
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.stoneAlchemy;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -10,20 +10,19 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.stairs;
|
||||
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
|
||||
public class Block18StoneStairs extends BlockLivingStairs {
|
||||
|
||||
public Block18StoneStairs(int meta) {
|
||||
super(ModFluffBlocks.stone, meta);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.stoneAlchemy;
|
||||
|
||||
@@ -18,7 +18,6 @@ import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.ISubTileContainer;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor.Circle;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.TileFakeAir;
|
||||
@@ -91,7 +90,7 @@ public class SubTileBubbell extends SubTileFunctional {
|
||||
public int getColor() {
|
||||
return 0x0DCF89;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RadiusDescriptor getRadius() {
|
||||
return new RadiusDescriptor.Circle(toChunkCoordinates(), RANGE);
|
||||
@@ -101,5 +100,5 @@ public class SubTileBubbell extends SubTileFunctional {
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.bubbell;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import net.minecraftforge.common.ChestGenHooks;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor.Square;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
|
||||
@@ -26,18 +25,18 @@ public class SubTileLoonuim extends SubTileFunctional {
|
||||
|
||||
private static final int COST = 35000;
|
||||
private static final int RANGE = 3;
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
if(redstoneSignal == 0 && ticksExisted % 200 == 0 && mana >= COST) {
|
||||
Random rand = supertile.getWorldObj().rand;
|
||||
|
||||
|
||||
ItemStack stack;
|
||||
do {
|
||||
stack = ChestGenHooks.getOneItem(ChestGenHooks.DUNGEON_CHEST, rand);
|
||||
} while(stack == null || BotaniaAPI.looniumBlacklist.contains(stack.getItem()));
|
||||
|
||||
|
||||
int bound = RANGE * 2 + 1;
|
||||
EntityItem entity = new EntityItem(supertile.getWorldObj(), supertile.xCoord - RANGE + rand.nextInt(bound) , supertile.yCoord + 1, supertile.zCoord - RANGE + rand.nextInt(bound), stack);
|
||||
entity.motionX = 0;
|
||||
@@ -71,7 +70,7 @@ public class SubTileLoonuim extends SubTileFunctional {
|
||||
public boolean acceptsRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RadiusDescriptor getRadius() {
|
||||
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
|
||||
|
||||
+10
-11
@@ -16,14 +16,13 @@ import java.util.WeakHashMap;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor.Circle;
|
||||
import vazkii.botania.api.subtile.SubTileFunctional;
|
||||
import vazkii.botania.common.core.helper.MathHelper;
|
||||
|
||||
public class SubTileSolegnolia extends SubTileFunctional {
|
||||
|
||||
private static final int RANGE = 5;
|
||||
|
||||
|
||||
public static Set<SubTileSolegnolia> existingFlowers = Collections.newSetFromMap(new WeakHashMap());
|
||||
private static boolean registered = false;
|
||||
|
||||
@@ -36,41 +35,41 @@ public class SubTileSolegnolia extends SubTileFunctional {
|
||||
if(!registered)
|
||||
registered = true;
|
||||
}
|
||||
|
||||
|
||||
if(ticksExisted % 10 == 0 && mana > 0)
|
||||
mana--;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean acceptsRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public static boolean hasSolegnoliaAround(Entity e) {
|
||||
for(SubTileSolegnolia flower : existingFlowers) {
|
||||
if(flower.mana == 0 || flower.redstoneSignal > 0 || flower.supertile.getWorldObj() != e.worldObj || flower.supertile.getWorldObj().getTileEntity(flower.supertile.xCoord, flower.supertile.yCoord, flower.supertile.zCoord) != flower.supertile)
|
||||
continue;
|
||||
|
||||
|
||||
if(MathHelper.pointDistanceSpace(e.posX, e.posY, e.posZ, flower.supertile.xCoord + 0.5, flower.supertile.yCoord + 0.5, flower.supertile.zCoord + 0.5) <= RANGE)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 20;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0xC99C4D;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RadiusDescriptor getRadius() {
|
||||
return new RadiusDescriptor.Circle(toChunkCoordinates(), RANGE);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -10,33 +10,33 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.tile;
|
||||
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBubbell;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import vazkii.botania.common.block.subtile.functional.SubTileBubbell;
|
||||
|
||||
public class TileFakeAir extends TileMod {
|
||||
|
||||
private static final String TAG_FLOWER_X = "flowerX";
|
||||
private static final String TAG_FLOWER_Y = "flowerY";
|
||||
private static final String TAG_FLOWER_Z = "flowerZ";
|
||||
|
||||
|
||||
int flowerX, flowerY, flowerZ;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void setFlower(TileEntity tile) {
|
||||
flowerX = tile.xCoord;
|
||||
flowerY = tile.yCoord;
|
||||
flowerZ = tile.zCoord;
|
||||
}
|
||||
|
||||
|
||||
public boolean canStay() {
|
||||
return SubTileBubbell.isValidBubbell(worldObj, flowerX, flowerY, flowerZ);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeToNBT(par1nbtTagCompound);
|
||||
@@ -44,7 +44,7 @@ public class TileFakeAir extends TileMod {
|
||||
par1nbtTagCompound.setInteger(TAG_FLOWER_Y, flowerY);
|
||||
par1nbtTagCompound.setInteger(TAG_FLOWER_Z, flowerZ);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readFromNBT(par1nbtTagCompound);
|
||||
@@ -52,5 +52,5 @@ public class TileFakeAir extends TileMod {
|
||||
flowerY = par1nbtTagCompound.getInteger(TAG_FLOWER_Y);
|
||||
flowerZ = par1nbtTagCompound.getInteger(TAG_FLOWER_Z);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -318,13 +318,13 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModFluffBlocks.sunnyQuartz);
|
||||
addBlock(ModFluffBlocks.sunnyQuartzSlab);
|
||||
addBlock(ModFluffBlocks.sunnyQuartzStairs);
|
||||
|
||||
|
||||
addBlock(ModFluffBlocks.stone);
|
||||
for(int i= 0; i < 8; i++)
|
||||
addBlock(ModFluffBlocks.stoneStairs[i]);
|
||||
for(int i= 0; i < 8; i++)
|
||||
addBlock(ModFluffBlocks.stoneSlabs[i]);
|
||||
|
||||
|
||||
addBlock(ModFluffBlocks.biomeStoneA);
|
||||
addBlock(ModFluffBlocks.biomeStoneB);
|
||||
for(int i = 0; i < 24; i++)
|
||||
|
||||
@@ -171,10 +171,10 @@ public final class ConfigHandler {
|
||||
|
||||
desc = "Set this to false to disable the Relic System. This only disables the entries, drops and achievements. Old ones that are already in the world will stay.";
|
||||
relicsEnabled = loadPropBool("relics.enabled", desc, relicsEnabled);
|
||||
|
||||
|
||||
desc = "Set this to false to make the Ring of Odin not apply fire resistance. Mostly for people who use Witchery transformations.";
|
||||
ringOfOdinFireResist = loadPropBool("ringOfOdin.fireResist", desc, ringOfOdinFireResist);
|
||||
|
||||
|
||||
desc = "The quantity of Botania flower patches to generate in the world, defaults to 2, the lower the number the less patches generate.";
|
||||
flowerQuantity = loadPropInt("worldgen.flower.quantity", desc, flowerQuantity);
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ public class CommonProxy {
|
||||
public boolean openWikiPage(World world, Block block, MovingObjectPosition pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void playRecordClientSided(World world, int x, int y, int z, ItemRecord record) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@@ -80,13 +80,13 @@ public class ThreadDownloadMod extends Thread {
|
||||
File f1 = new File(dir, fileName);
|
||||
if(!f1.exists())
|
||||
f.renameTo(f1);
|
||||
|
||||
|
||||
if(Minecraft.getMinecraft().thePlayer != null)
|
||||
Minecraft.getMinecraft().thePlayer.addChatMessage(new ChatComponentTranslation("botania.versioning.doneDownloading", fileName).setChatStyle(new ChatStyle().setColor(EnumChatFormatting.GREEN)));
|
||||
|
||||
Desktop.getDesktop().open(dir);
|
||||
VersionChecker.downloadedFile = true;
|
||||
|
||||
|
||||
finalize();
|
||||
} catch(Throwable e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -831,7 +831,7 @@ public final class ModCraftingRecipes {
|
||||
addQuartzRecipes(5, null, ModFluffBlocks.elfQuartz, ModFluffBlocks.elfQuartzStairs, ModFluffBlocks.elfQuartzSlab);
|
||||
|
||||
recipeSunnyQuartz = addQuartzRecipes(6, Item.getItemFromBlock(Blocks.double_plant), ModFluffBlocks.sunnyQuartz, ModFluffBlocks.sunnyQuartzStairs, ModFluffBlocks.sunnyQuartzSlab);
|
||||
|
||||
|
||||
// Alfheim Portal Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.alfPortal),
|
||||
"WWW", "WTW", "WWW",
|
||||
@@ -1651,17 +1651,17 @@ public final class ModCraftingRecipes {
|
||||
recipe18StoneBrick = new ArrayList();
|
||||
recipe18StoneChisel = new ArrayList();
|
||||
for(int i = 0; i < 4; i++) {
|
||||
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 8, i + 4),
|
||||
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 8, i + 4),
|
||||
"SSS", "S S", "SSS",
|
||||
'S', new ItemStack(ModFluffBlocks.stone, 1, i));
|
||||
recipe18StonePolish.add(BotaniaAPI.getLatestAddedRecipe());
|
||||
|
||||
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 4, i + 8),
|
||||
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 4, i + 8),
|
||||
"SS", "SS",
|
||||
'S', new ItemStack(ModFluffBlocks.stone, 1, i));
|
||||
recipe18StoneBrick.add(BotaniaAPI.getLatestAddedRecipe());
|
||||
|
||||
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 1, i + 12),
|
||||
|
||||
addOreDictRecipe(new ItemStack(ModFluffBlocks.stone, 1, i + 12),
|
||||
"S", "S",
|
||||
'S', new ItemStack(ModFluffBlocks.stoneSlabs[i + 4], 1, i));
|
||||
recipe18StoneChisel.add(BotaniaAPI.getLatestAddedRecipe());
|
||||
|
||||
@@ -128,7 +128,7 @@ public final class ModManaAlchemyRecipes {
|
||||
coarseDirtRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.dirt, 1, 1), new ItemStack(Blocks.dirt), 120);
|
||||
|
||||
prismarineRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.manaResource, 1, 10), new ItemStack(Items.quartz), 200);
|
||||
|
||||
|
||||
stoneRecipes = new ArrayList();
|
||||
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModFluffBlocks.stone), "stone", 200));
|
||||
for(int i = 0; i < 4; i++)
|
||||
|
||||
@@ -113,7 +113,7 @@ public final class ModPetalRecipes {
|
||||
marimorphosisRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_MARIMORPHOSIS), grayMana, yellow, green, lime, lightBlue, red, runeEarth, runeFire, redstoneRoot);
|
||||
bubbellRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BUBBELL), cyanMana, cyan, blue, lightBlue, lightBlueMana, runeWater, runeSummer, pixieDust);
|
||||
solegnoliaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SOLEGNOLIA), brown, red, brownMana, red, blue, redstoneRoot);
|
||||
|
||||
|
||||
ItemStack stack = new ItemStack(Items.skull, 1, 3);
|
||||
ItemNBTHelper.setString(stack, "SkullOwner", "Vazkii");
|
||||
Object[] inputs = new Object[16];
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class BlackHoleTalismanExtractRecipe implements IRecipe {
|
||||
int meta = ItemBlackHoleTalisman.getBlockMeta(talisman);
|
||||
return new ItemStack(block, Math.min(64, count), meta);
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.item.ItemKeepIvy;
|
||||
import vazkii.botania.common.item.ItemRegenIvy;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
|
||||
|
||||
@@ -282,11 +282,11 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
setTPDelay(4);
|
||||
spawnPixies = isAggored();
|
||||
}
|
||||
|
||||
|
||||
setAggroed(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDeath(DamageSource p_70645_1_) {
|
||||
super.onDeath(p_70645_1_);
|
||||
@@ -296,7 +296,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
if(!anyWithArmor)
|
||||
((EntityPlayer) entitylivingbase).addStat(ModAchievements.gaiaGuardianNoArmor, 1);
|
||||
}
|
||||
|
||||
|
||||
worldObj.playSoundAtEntity(this, "random.explode", 20F, (1F + (worldObj.rand.nextFloat() - worldObj.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
worldObj.spawnParticle("hugeexplosion", posX, posY, posZ, 1D, 0D, 0D);
|
||||
}
|
||||
@@ -320,7 +320,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
boolean hard = isHardMode();
|
||||
entityDropItem(new ItemStack(ModItems.manaResource, hard ? 16 : 8, 5), 1F);
|
||||
boolean droppedRecord = false;
|
||||
|
||||
|
||||
if(hard) {
|
||||
entityDropItem(new ItemStack(ModItems.ancientWill, 1, rand.nextInt(6)), 1F);
|
||||
if(ConfigHandler.relicsEnabled)
|
||||
@@ -345,12 +345,12 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
if(Math.random() < 0.3) {
|
||||
int i = Item.getIdFromItem(Items.record_13);
|
||||
int j = Item.getIdFromItem(Items.record_wait);
|
||||
int k = i + this.rand.nextInt(j - i + 1);
|
||||
int k = i + rand.nextInt(j - i + 1);
|
||||
entityDropItem(new ItemStack(Item.getItemById(k)), 1F);
|
||||
droppedRecord = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!droppedRecord && Math.random() < 0.2)
|
||||
entityDropItem(new ItemStack(hard ? ModItems.recordGaia2 : ModItems.recordGaia1), 1F);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
private static final String TAG_UPGRADE = "upgrade";
|
||||
|
||||
Set<ISparkEntity> transfers = Collections.newSetFromMap(new WeakHashMap());
|
||||
|
||||
|
||||
int removeTransferants = 2;
|
||||
boolean firstTick = false;
|
||||
|
||||
@@ -318,18 +318,18 @@ public class EntitySpark extends Entity implements ISparkEntity {
|
||||
@Override
|
||||
public Collection<ISparkEntity> getTransfers() {
|
||||
Collection<ISparkEntity> removals = new ArrayList();
|
||||
NBTTagList newTransfers = new NBTTagList();
|
||||
new NBTTagList();
|
||||
|
||||
for(ISparkEntity e : transfers) {
|
||||
ISparkEntity spark = (ISparkEntity) e;
|
||||
ISparkEntity spark = e;
|
||||
int upgr = getUpgrade();
|
||||
int supgr = spark.getUpgrade();
|
||||
ISparkAttachable atile = spark.getAttachedTile();
|
||||
|
||||
if(!(spark != this && !spark.areIncomingTransfersDone() && atile != null && !atile.isFull() && (upgr == 0 && supgr == 2 || upgr == 3 && (supgr == 0 || supgr == 1) || !(atile instanceof IManaPool))))
|
||||
removals.add((ISparkEntity) e);
|
||||
removals.add(e);
|
||||
}
|
||||
|
||||
|
||||
if(!removals.isEmpty())
|
||||
transfers.removeAll(removals);
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.core.helper.InventoryHelper;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.crafting.recipe.AncientWillRecipe;
|
||||
import vazkii.botania.common.crafting.recipe.BlackHoleTalismanExtractRecipe;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@@ -50,11 +49,11 @@ public class ItemBlackHoleTalisman extends ItemMod {
|
||||
setUnlocalizedName(LibItemNames.BLACK_HOLE_TALISMAN);
|
||||
setMaxStackSize(1);
|
||||
setHasSubtypes(true);
|
||||
|
||||
|
||||
GameRegistry.addRecipe(new BlackHoleTalismanExtractRecipe());
|
||||
RecipeSorter.register("botania:blackHoleTalismanExtract", BlackHoleTalismanExtractRecipe.class, Category.SHAPELESS, "");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if(getBlock(par1ItemStack) != Blocks.air && par3EntityPlayer.isSneaking()) {
|
||||
@@ -124,14 +123,12 @@ public class ItemBlackHoleTalisman extends ItemMod {
|
||||
int meta = getBlockMeta(itemstack);
|
||||
|
||||
int highest = -1;
|
||||
boolean hasFreeSlot = false;
|
||||
int[] counts = new int[player.inventory.getSizeInventory() - player.inventory.armorInventory.length];
|
||||
Arrays.fill(counts, 0);
|
||||
|
||||
for(int i = 0; i < counts.length; i++) {
|
||||
ItemStack stack = player.inventory.getStackInSlot(i);
|
||||
if(stack == null) {
|
||||
hasFreeSlot = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -174,29 +171,29 @@ public class ItemBlackHoleTalisman extends ItemMod {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem(ItemStack itemStack) {
|
||||
int count = getBlockCount(itemStack);
|
||||
if(count == 0)
|
||||
return null;
|
||||
|
||||
|
||||
int extract = Math.min(64, count);
|
||||
ItemStack copy = itemStack.copy();
|
||||
remove(copy, extract);
|
||||
|
||||
|
||||
int dmg = copy.getItemDamage();
|
||||
if(dmg == 1)
|
||||
copy.setItemDamage(0);
|
||||
|
||||
|
||||
return copy;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasContainerItem(ItemStack stack) {
|
||||
return getContainerItem(stack) != null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack p_77630_1_) {
|
||||
return false;
|
||||
|
||||
@@ -366,7 +366,7 @@ public final class ModItems {
|
||||
blackHoleTalisman = new ItemBlackHoleTalisman();
|
||||
recordGaia1 = new ItemRecordGaia1();
|
||||
recordGaia2 = new ItemRecordGaia2();
|
||||
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal, 1, i));
|
||||
|
||||
@@ -172,7 +172,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack p_77630_1_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static UUID getBaubleUUID(ItemStack stack) {
|
||||
long most = ItemNBTHelper.getLong(stack, TAG_BAUBLE_UUID_MOST, 0);
|
||||
if(most == 0) {
|
||||
@@ -181,7 +181,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
ItemNBTHelper.setLong(stack, TAG_BAUBLE_UUID_LEAST, uuid.getLeastSignificantBits());
|
||||
return getBaubleUUID(stack);
|
||||
}
|
||||
|
||||
|
||||
long least = ItemNBTHelper.getLong(stack, TAG_BAUBLE_UUID_LEAST, 0);
|
||||
return new UUID(most, least);
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
for(int i = 0; i < SUBTYPES + 1; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
super.addHiddenTooltip(par1ItemStack, par2EntityPlayer, par3List, par4);
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ItemHolyCloak extends ItemBauble implements IBaubleRender {
|
||||
if(belt != null && belt.getItem() instanceof ItemHolyCloak && !isInEffect(belt)) {
|
||||
ItemHolyCloak cloak = (ItemHolyCloak) belt.getItem();
|
||||
int cooldown = getCooldown(belt);
|
||||
|
||||
|
||||
// Used to prevent StackOverflows with mobs that deal damage when damaged
|
||||
setInEffect(belt, true);
|
||||
if(cooldown == 0 && cloak.effectOnDamage(event, player, belt))
|
||||
@@ -111,11 +111,11 @@ public class ItemHolyCloak extends ItemBauble implements IBaubleRender {
|
||||
public static void setCooldown(ItemStack stack, int cooldown) {
|
||||
ItemNBTHelper.setInt(stack, TAG_COOLDOWN, cooldown);
|
||||
}
|
||||
|
||||
|
||||
public static boolean isInEffect(ItemStack stack) {
|
||||
return ItemNBTHelper.getBoolean(stack, TAG_IN_EFFECT, false);
|
||||
}
|
||||
|
||||
|
||||
public static void setInEffect(ItemStack stack, boolean effect) {
|
||||
ItemNBTHelper.setBoolean(stack, TAG_IN_EFFECT, effect);
|
||||
}
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ public class ItemManasteelAxe extends ItemAxe implements IManaUsingItem, ISortab
|
||||
boolean did = stackAt.getItem().onItemUse(stackAt, player, world, x, y, z, s, sx, sy, sz);
|
||||
if(stackAt.stackSize == 0)
|
||||
player.inventory.setInventorySlotContents(i, null);
|
||||
|
||||
|
||||
ItemsRemainingRenderHandler.set(player, new ItemStack(Blocks.sapling), SAPLING_PATTERN);
|
||||
return did;
|
||||
}
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ public class ItemManasteelPick extends ItemPickaxe implements IManaUsingItem, IS
|
||||
boolean did = stackAt.getItem().onItemUse(stackAt, player, world, x, y, z, s, sx, sy, sz);
|
||||
if(stackAt.stackSize == 0)
|
||||
player.inventory.setInventorySlotContents(i, null);
|
||||
|
||||
|
||||
ItemsRemainingRenderHandler.set(player, new ItemStack(Blocks.torch), TORCH_PATTERN);
|
||||
return did;
|
||||
}
|
||||
|
||||
@@ -10,23 +10,22 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.record;
|
||||
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemRecord;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemModRecord extends ItemRecord {
|
||||
|
||||
private final String file;
|
||||
|
||||
|
||||
public ItemModRecord(String record, String name) {
|
||||
super("botania:" + record);
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
@@ -55,5 +54,5 @@ public class ItemModRecord extends ItemRecord {
|
||||
public ResourceLocation getRecordResource(String name) {
|
||||
return new ResourceLocation(file);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -11,7 +11,6 @@
|
||||
package vazkii.botania.common.item.relic;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
|
||||
@@ -12,7 +12,6 @@ package vazkii.botania.common.item.relic;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.SharedMonsterAttributes;
|
||||
@@ -26,7 +25,6 @@ import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.common.Config;
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
|
||||
@@ -44,7 +42,7 @@ public class ItemOdinRing extends ItemRelicBauble {
|
||||
public ItemOdinRing() {
|
||||
super(LibItemNames.ODIN_RING);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
|
||||
damageNegations.add(DamageSource.drown.damageType);
|
||||
damageNegations.add(DamageSource.fall.damageType);
|
||||
damageNegations.add(DamageSource.lava.damageType);
|
||||
|
||||
@@ -457,10 +457,10 @@ public final class LexiconData {
|
||||
|
||||
bubbell = new ALexiconEntry(LibLexicon.FFLOWER_BUBBELL, categoryFunctionalFlowers);
|
||||
bubbell.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.bubbellRecipe));
|
||||
|
||||
|
||||
solegnolia = new BLexiconEntry(LibLexicon.FFLOWER_SOLEGNOLIA, categoryFunctionalFlowers);
|
||||
solegnolia.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.solegnoliaRecipe));
|
||||
|
||||
|
||||
// GENERATING FLOWERS ENTRIES
|
||||
generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers);
|
||||
generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"));
|
||||
@@ -828,7 +828,7 @@ public final class LexiconData {
|
||||
|
||||
if(ConfigHandler.relicsEnabled) {
|
||||
relics = new ALexiconEntry(LibLexicon.ALF_RELICS, categoryAlfhomancy);
|
||||
relics.setLexiconPages(new PageText("0")).setIcon(new ItemStack(ModItems.dice));
|
||||
relics.setLexiconPages(new PageText("0")).setIcon(new ItemStack(ModItems.dice));
|
||||
}
|
||||
|
||||
// MISCLENAEOUS ENTRIES
|
||||
@@ -878,7 +878,7 @@ public final class LexiconData {
|
||||
|
||||
stoneAlchemy = new BLexiconEntry(LibLexicon.MISC_STONE_ALCHEMY, categoryMisc);
|
||||
stoneAlchemy.setLexiconPages(new PageText("0"), new PageManaInfusionRecipe("1", ModManaAlchemyRecipes.stoneRecipes), new PageCraftingRecipe("2", ModCraftingRecipes.recipe18StonePolish), new PageCraftingRecipe("3", ModCraftingRecipes.recipe18StoneBrick), new PageCraftingRecipe("4", ModCraftingRecipes.recipe18StoneChisel));
|
||||
|
||||
|
||||
if(Botania.bcTriggersLoaded) {
|
||||
bcIntegration = new BLexiconEntry(LibLexicon.MISC_BC_INTEGRATION, categoryMisc);
|
||||
bcIntegration.setLexiconPages(new PageText("0")).setIcon(new ItemStack(Items.redstone));
|
||||
|
||||
Reference in new issue
Block a user