Cleanup...

This commit is contained in:
Lizbeth Rika committed 2015-05-01 00:58:12 +01:00
1 parent 6c45975558
commit 861f40e64c
78 files changed
+367 -397

No files matched your search

@@ -173,7 +173,7 @@ public final class BotaniaAPI {
addOreWeightNether("oreNetherSilver", 1550); // Nether Ores
addOreWeightNether("oreNetherSteel", 1690); // Nether Ores
addOreWeightNether("oreNetherTin", 3750); // Nether Ores
addSeed(Items.wheat_seeds, Blocks.wheat);
addSeed(Items.potato, Blocks.potatoes);
addSeed(Items.carrot, Blocks.carrots);
@@ -258,7 +258,7 @@ public final class BotaniaAPI {
petalRecipes.add(recipe);
return recipe;
}
/**
* Registers a Pure Daisy Recipe.
* @param input The block that works as an input for the recipe. Can be a Block or an oredict String.
@@ -352,7 +352,7 @@ public final class BotaniaAPI {
subTiles.put(key, subtileClass);
subTileMods.put(key, Loader.instance().activeModContainer().getModId());
}
/**
* Register a SubTileEntity and makes it a mini flower. Also adds the recipe and returns it.
* @see BotaniaAPI#registerSubTile
@@ -360,7 +360,7 @@ public final class BotaniaAPI {
public static RecipeManaInfusion registerMiniSubTile(String key, Class<? extends SubTileEntity> subtileClass, String original) {
registerSubTile(key, subtileClass);
miniFlowers.put(original, key);
RecipeMiniFlower recipe = new RecipeMiniFlower(key, original, 2500);
manaInfusionRecipes.add(recipe);
miniFlowerRecipes.add(recipe);
@@ -443,7 +443,7 @@ public final class BotaniaAPI {
public static void addOreWeight(String ore, int weight) {
oreWeights.put(ore, weight);
}
/**
* Maps an ore (ore dictionary key) to it's weight on the nether world generation. This
* is used for the Orechid Ignem flower. Check the static block in the BotaniaAPI class
@@ -462,7 +462,7 @@ public final class BotaniaAPI {
public static int getOreWeightNether(String ore) {
return oreWeightsNether.get(ore);
}
/**
* Allows an item to be counted as a seed. Any item in this list can be
* dispensed by a dispenser, the block is the block to be placed.
@@ -516,7 +516,7 @@ public final class BotaniaAPI {
public static String getSubTileStringMapping(Class<? extends SubTileEntity> clazz) {
return subTiles.inverse().get(clazz);
}
public static Set<String> getAllSubTiles() {
return subTiles.keySet();
}
@@ -16,7 +16,6 @@ import java.util.List;
import java.util.Map;
import java.util.WeakHashMap;
import net.minecraft.client.Minecraft;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
@@ -34,7 +33,7 @@ public final class CorporeaHelper {
public static final String[] WILDCARD_STRINGS = new String[] {
"...", "~", "+", "?" , "*"
};
/**
* How many items were matched in the last request. If java had "out" params like C# this wouldn't be needed :V
*/
@@ -170,23 +169,23 @@ public final class CorporeaHelper {
CorporeaRequestEvent event = new CorporeaRequestEvent(matcher, itemCount, spark, checkNBT, doit);
if(MinecraftForge.EVENT_BUS.post(event))
return stacks;
List<IInventory> inventories = getInventoriesOnNetwork(spark);
Map<ICorporeaInterceptor, ICorporeaSpark> interceptors = new HashMap();
lastRequestMatches = 0;
lastRequestExtractions = 0;
int count = itemCount;
for(IInventory inv : inventories) {
ICorporeaSpark invSpark = getSparkForInventory(inv);
if(inv instanceof ICorporeaInterceptor) {
ICorporeaInterceptor interceptor = (ICorporeaInterceptor) inv;
interceptor.interceptRequest(matcher, itemCount, invSpark, spark, stacks, inventories, doit);
interceptors.put(interceptor, invSpark);
}
for(int i = inv.getSizeInventory() - 1; i >= 0; i--) {
if(!isValidSlot(inv, i))
continue;
@@ -214,7 +213,7 @@ public final class CorporeaHelper {
}
}
}
for(ICorporeaInterceptor interceptor : interceptors.keySet())
interceptor.interceptRequestLast(matcher, itemCount, interceptors.get(interceptor), spark, stacks, inventories, doit);
@@ -280,11 +279,11 @@ public final class CorporeaHelper {
contains = true;
s = s.substring(wc.length());
}
if(contains)
break;
}
String name = stack.getDisplayName().toLowerCase().trim();
return equalOrContain(name, s, contains) || equalOrContain(name + "s", s, contains) || equalOrContain(name + "es", s, contains) || name.endsWith("y") && equalOrContain(name.substring(0, name.length() - 1) + "ies", s, contains);
@@ -27,14 +27,14 @@ public class CorporeaRequestEvent extends Event {
* If false then items won't be pulled.
*/
public final boolean realRequest;
public CorporeaRequestEvent(Object request, int count, ICorporeaSpark spark, boolean nbt, boolean real) {
this.request = request;
this.count = count;
this.spark = spark;
this.checkNBT = nbt;
this.realRequest = real;
checkNBT = nbt;
realRequest = real;
}
}
@@ -27,12 +27,12 @@ public interface ICorporeaInterceptor {
* be either a String or ItemStack.
*/
public void interceptRequest(Object request, int count, ICorporeaSpark spark, ICorporeaSpark source, List<ItemStack> stacks, List<IInventory> inventories, boolean doit);
/**
* Intercepts a request after all the stacks have been found and processed. Both the
* list of inventories and stacks is complete at this point. The request parameter can
* be either a String or ItemStack.
*/
public void interceptRequestLast(Object request, int count, ICorporeaSpark spark, ICorporeaSpark source, List<ItemStack> stacks, List<IInventory> inventories, boolean doit);
}
@@ -122,7 +122,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
public String getStackSubTileKey(ItemStack stack) {
return null;
}
@Override
public IIcon getSubTileIconForName(String name) {
return Blocks.red_flower.getIcon(0, 0);
@@ -77,7 +77,7 @@ public interface IInternalMethodHandler {
public ItemStack getSubTileAsFloatingFlowerStack(String subTile);
public String getStackSubTileKey(ItemStack stack);
public IIcon getSubTileIconForName(String name);
public void registerBasicSignatureIcons(String name, IIconRegister register);
@@ -23,7 +23,7 @@ public final class VanillaPacketDispatcher {
List players = world.playerEntities;
for(Object player : players)
if(player instanceof EntityPlayerMP) {
EntityPlayerMP mp = (EntityPlayerMP) player;
EntityPlayerMP mp = (EntityPlayerMP) player;
if(pointDistancePlane(mp.posX, mp.posZ, tile.xCoord + 0.5, tile.zCoord + 0.5) < 64)
((EntityPlayerMP) player).playerNetServerHandler.sendPacket(tile.getDescriptionPacket());
}
@@ -34,7 +34,7 @@ public final class VanillaPacketDispatcher {
if(tile != null)
dispatchTEToNearbyPlayers(tile);
}
public static float pointDistancePlane(double x1, double y1, double x2, double y2) {
return (float) Math.hypot(x1 - x2, y1 - y2);
}
@@ -24,5 +24,5 @@ public interface IExtendedWireframeCoordinateListProvider extends IWireframeCoor
* Gets the source wireframe to draw, this one will be drawn thicker.
*/
public ChunkCoordinates getSourceWireframe(EntityPlayer player, ItemStack stack);
}
@@ -100,7 +100,7 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
public String getWebLink() {
return null;
}
/**
* Adds a page to the list of pages.
*/
@@ -116,5 +116,5 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
public int compareTo(LexiconEntry o) {
return getNameForSorting().compareTo(o.getNameForSorting());
}
}
@@ -10,7 +10,6 @@
*/
package vazkii.botania.api.mana;
import net.minecraft.world.World;
/**
* Any TileEntity that implements this is considered a Mana Spreader,
@@ -20,17 +19,17 @@ import net.minecraft.world.World;
public interface IManaSpreader extends IManaBlock {
public float getRotationX();
public float getRotationY();
public void setCanShoot(boolean canShoot);
public int getBurstParticleTick();
public void setBurstParticleTick(int i);
public int getLastBurstDeathTick();
public void setLastBurstDeathTick(int ticksExisted);
}
@@ -18,5 +18,5 @@ package vazkii.botania.api.mana;
public interface IThrottledPacket {
public void markDispatchable();
}
@@ -19,8 +19,8 @@ import cpw.mods.fml.common.eventhandler.Event;
/**
* An event fired when an Elven Portal TE updates. The portal's
* relevant AABB and other stuff is passed in for convenience. This
* is fired in MinecraftForge.EVENT_BUS.
* relevant AABB and other stuff is passed in for convenience. This
* is fired in MinecraftForge.EVENT_BUS.
*/
public class ElvenPortalUpdateEvent extends Event {
@@ -31,12 +31,12 @@ public class ElvenPortalUpdateEvent extends Event {
public final AxisAlignedBB aabb;
public boolean open;
public final List<ItemStack> stacksInside;
public ElvenPortalUpdateEvent(TileEntity te, AxisAlignedBB aabb, boolean open, List<ItemStack> stacks) {
portalTile = te;
this.aabb = aabb;
this.open = open;
stacksInside = stacks;
}
}
@@ -10,8 +10,8 @@
*/
package vazkii.botania.api.recipe;
import vazkii.botania.api.BotaniaAPI;
import net.minecraft.item.ItemStack;
import vazkii.botania.api.BotaniaAPI;
public class RecipeMiniFlower extends RecipeManaInfusion {
@@ -19,7 +19,7 @@ public class RecipeMiniFlower extends RecipeManaInfusion {
super(BotaniaAPI.internalHandler.getSubTileAsStack(flower), BotaniaAPI.internalHandler.getSubTileAsStack(mini), mana);
setAlchemy(true);
}
@Override
public boolean matches(ItemStack stack) {
String key = BotaniaAPI.internalHandler.getStackSubTileKey(stack);
@@ -17,38 +17,38 @@ import net.minecraftforge.oredict.OreDictionary;
import vazkii.botania.api.subtile.SubTileEntity;
public class RecipePureDaisy {
Object input;
Block output;
int outputMeta;
public RecipePureDaisy(Object input, Block output, int outputMeta) {
this.input = input;
this.output = output;
this.outputMeta = outputMeta;
if(input != null && !(input instanceof String || input instanceof Block))
throw new IllegalArgumentException("input must be an oredict String or a Block.");
}
/**
* This gets called every tick, please be careful with your checks.
*/
public boolean matches(World world, int x, int y, int z, SubTileEntity pureDaisy) {
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
world.getBlockMetadata(x, y, z);
if(input instanceof Block && block == input)
return true;
ItemStack stack = new ItemStack(block, 1, world.getBlockMetadata(x, y, z));
String oredict = (String) input;
return isOreDict(stack, oredict);
}
public boolean isOreDict(ItemStack stack, String entry) {
if(stack == null || stack.getItem() == null)
return false;
for(ItemStack ostack : OreDictionary.getOres(entry)) {
ItemStack cstack = ostack.copy();
if(cstack.getItemDamage() == Short.MAX_VALUE)
@@ -60,26 +60,26 @@ public class RecipePureDaisy {
return false;
}
/**
* Returns true if the block was placed (and if the Pure Daisy should do particles and stuffs).
* Should only place the block if !world.isRemote, but should return true if it would've placed
* it otherwise. You may return false to cancel the normal particles and do your own.
* it otherwise. You may return false to cancel the normal particles and do your own.
*/
public boolean set(World world, int x, int y, int z, SubTileEntity pureDaisy) {
if(!world.isRemote)
world.setBlock(x, y, z, output, outputMeta, 1 | 2);
return true;
}
public Object getInput() {
return input;
}
public Block getOutput() {
return output;
}
public int getOutputMeta() {
return outputMeta;
}
@@ -23,7 +23,7 @@ import net.minecraft.util.IIcon;
public abstract class SubTileSignature {
public static final String SPECIAL_FLOWER_PREFIX = "flower.";
/**
* Equivalent to Block.registerBlockIcons.
*/
@@ -45,9 +45,9 @@ public abstract class SubTileSignature {
* as "botaniamisc.noloc".
*/
public abstract String getUnlocalizedLoreTextForStack(ItemStack stack);
/**
* Adds additional text to the tooltip. This text is added after getUnlocalizedLoreTextForStack.
* Adds additional text to the tooltip. This text is added after getUnlocalizedLoreTextForStack.
*/
public void addTooltip(ItemStack stack, EntityPlayer player, List<String> tooltip) {
// NO-OP
@@ -27,10 +27,10 @@ import net.minecraftforge.client.event.RenderPlayerEvent;
import org.lwjgl.opengl.GL11;
import vazkii.botania.api.item.IBaubleRender;
import vazkii.botania.api.item.IPhantomInkable;
import vazkii.botania.api.item.IBaubleRender.Helper;
import vazkii.botania.api.item.IBaubleRender.RenderType;
import vazkii.botania.api.item.ICosmeticAttachable;
import vazkii.botania.api.item.IPhantomInkable;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.item.ModItems;
import vazkii.botania.common.item.equipment.armor.terrasteel.ItemTerrasteelHelm;
@@ -81,7 +81,7 @@ public final class BaubleRenderHandler {
if(inkable.hasPhantomInk(stack))
continue;
}
if(item instanceof ICosmeticAttachable) {
ICosmeticAttachable attachable = (ICosmeticAttachable) item;
ItemStack cosmetic = attachable.getCosmeticItem(stack);
@@ -73,7 +73,7 @@ public final class BoundTileRenderer {
if(coordsList != null)
for(ChunkCoordinates coords : coordsList)
renderBlockOutlineAt(coords, color);
if(stackInSlot.getItem() instanceof IExtendedWireframeCoordinateListProvider) {
ChunkCoordinates coords = ((IExtendedWireframeCoordinateListProvider) stackInSlot.getItem()).getSourceWireframe(player, stackInSlot);
if(coords != null)
@@ -91,7 +91,7 @@ public final class BoundTileRenderer {
private void renderBlockOutlineAt(ChunkCoordinates pos, int color) {
renderBlockOutlineAt(pos, color, 1F);
}
private void renderBlockOutlineAt(ChunkCoordinates pos, int color, float thickness) {
GL11.glPushMatrix();
GL11.glTranslated(pos.posX - RenderManager.renderPosX, pos.posY - RenderManager.renderPosY, pos.posZ - RenderManager.renderPosZ + 1);
@@ -258,7 +258,7 @@ public final class HUDHandler {
}
profiler.endSection();
}
private void renderCrystalCubeHUD(ScaledResolution res, TileCorporeaCrystalCube tile) {
Minecraft mc = Minecraft.getMinecraft();
Profiler profiler = mc.mcProfiler;
@@ -273,7 +273,7 @@ public final class HUDHandler {
int h = res.getScaledHeight();
Gui.drawRect(w / 2 + 8, h / 2 - 12, w / 2 + strlen + 32, h / 2 + 10, 0x44000000);
Gui.drawRect(w / 2 + 6, h / 2 - 14, w / 2 + strlen + 34, h / 2 + 12, 0x44000000);
mc.fontRenderer.drawStringWithShadow(target.getDisplayName(), w / 2 + 30, h / 2 - 10, 0x6666FF);
mc.fontRenderer.drawStringWithShadow(tile.getItemCount() + "x", w / 2 + 30, h / 2, 0xFFFFFF);
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
@@ -281,7 +281,7 @@ public final class HUDHandler {
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, target, w / 2 + 10, h / 2 - 10);
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
}
profiler.endSection();
}
@@ -26,7 +26,6 @@ import net.minecraft.util.StatCollector;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import vazkii.botania.client.core.helper.RenderHelper;
import vazkii.botania.common.item.equipment.tool.ItemTerraPick;
import vazkii.botania.common.lib.LibObfuscation;
import cpw.mods.fml.relauncher.ReflectionHelper;
@@ -51,11 +50,11 @@ public final class TerraPickRankDisplayHandler {
int width = 0;
for(String s : tooltip)
width = Math.max(width, font.getStringWidth(s));
int offx = 11;
int offy = 17;
int height = 3;
int level = ItemTerraPick.getLevel(stack);
int max = ItemTerraPick.LEVELS[Math.min(ItemTerraPick.LEVELS.length - 1, level + 1)];
boolean ss = level >= ItemTerraPick.LEVELS.length - 1;
@@ -63,14 +62,14 @@ public final class TerraPickRankDisplayHandler {
float percent = level == 0 ? 0F : (float) curr / (float) max;
int rainbowWidth = Math.min(width - (ss ? 0 : 1), (int) (width * percent));
float huePer = width == 0 ? 0F : 1F / width;
float hueOff = ((float) ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.01F;
float hueOff = (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) * 0.01F;
GL11.glDisable(GL11.GL_DEPTH_TEST);
Gui.drawRect(mouseX + offx - 1, mouseY - offy - height - 1, mouseX + offx + width + 1, mouseY - offy, 0xFF000000);
for(int i = 0; i < rainbowWidth; i++)
Gui.drawRect(mouseX + offx + i, mouseY - offy - height, mouseX + offx + i + 1, mouseY - offy, Color.HSBtoRGB(hueOff + huePer * i, 1F, 1F));
Gui.drawRect(mouseX + offx + rainbowWidth, mouseY - offy - height, mouseX + offx + width, mouseY - offy, 0xFF555555);
String rank = StatCollector.translateToLocal("botania.rank" + level).replaceAll("&", "\u00a7");
boolean light = GL11.glGetBoolean(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_LIGHTING);
@@ -87,5 +86,5 @@ public final class TerraPickRankDisplayHandler {
}
}
}
}
@@ -35,7 +35,7 @@ public class NEIBotaniaConfig implements IConfigureNEI {
API.registerRecipeHandler(new RecipeHandlerBrewery());
API.registerUsageHandler(new RecipeHandlerBrewery());
API.registerRecipeHandler(new RecipeHandlerPureDaisy());
API.registerUsageHandler(new RecipeHandlerPureDaisy());
}
@@ -31,7 +31,7 @@ public class RecipeHandlerBrewery extends TemplateRecipeHandler {
public CachedBreweryRecipe(RecipeBrew recipe, ItemStack vial) {
if(recipe == null)
return;
setIngredients(recipe.getInputs());
ItemStack toVial;
if (vial == null)
@@ -34,7 +34,7 @@ public class RecipeHandlerElvenTrade extends TemplateRecipeHandler {
public CachedElvenTradeRecipe(RecipeElvenTrade recipe) {
if(recipe == null)
return;
setIngredients(recipe.getInputs());
output = new PositionedStack(recipe.getOutput(), 107, 46);
}
@@ -13,11 +13,7 @@ import org.lwjgl.opengl.GL11;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.recipe.RecipePureDaisy;
import vazkii.botania.client.core.handler.HUDHandler;
import vazkii.botania.client.integration.nei.RecipeHandlerManaPool.CachedManaPoolRecipe;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.client.render.tile.RenderTilePool;
import vazkii.botania.common.block.tile.mana.TilePool;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
import vazkii.botania.common.lib.LibBlockNames;
import codechicken.lib.gui.GuiDraw;
@@ -63,8 +59,6 @@ public class RecipeHandlerPureDaisy extends TemplateRecipeHandler {
@Override
public boolean contains(Collection<PositionedStack> ingredients, ItemStack ingredient) {
if(ingredients == inputs) {
boolean skippedPool = false;
for(PositionedStack stack : ingredients)
if(stack.contains(ingredient))
return true;
@@ -29,68 +29,68 @@ public class ModelBlackHoleCube extends ModelBase {
public ModelRenderer shape1_11;
public ModelBlackHoleCube() {
this.textureWidth = 36;
this.textureHeight = 2;
this.shape1_3 = new ModelRenderer(this, 0, 0);
this.shape1_3.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_3.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
this.setRotateAngle(shape1_3, 0.0F, 1.5707963267948966F, 0.0F);
this.shape1_7 = new ModelRenderer(this, 0, 0);
this.shape1_7.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_7.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
this.setRotateAngle(shape1_7, 0.0F, 1.5707963267948966F, 0.0F);
this.shape1_9 = new ModelRenderer(this, 0, 0);
this.shape1_9.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_9.addBox(-7.0F, 7.0F, 7.0F, 14, 1, 1, 0.0F);
this.setRotateAngle(shape1_9, 0.0F, 3.141592653589793F, 1.5707963267948966F);
this.shape1_11 = new ModelRenderer(this, 0, 0);
this.shape1_11.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_11.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
this.setRotateAngle(shape1_11, 0.0F, 3.141592653589793F, 1.5707963267948966F);
this.shape1 = new ModelRenderer(this, 0, 0);
this.shape1.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1.addBox(-8.0F, 7.0F, 7.0F, 16, 1, 1, 0.0F);
this.shape1_4 = new ModelRenderer(this, 0, 0);
this.shape1_4.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_4.addBox(-8.0F, 7.0F, -8.0F, 16, 1, 1, 0.0F);
this.shape1_8 = new ModelRenderer(this, 0, 0);
this.shape1_8.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_8.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
this.setRotateAngle(shape1_8, 0.0F, 3.141592653589793F, 1.5707963267948966F);
this.shape1_2 = new ModelRenderer(this, 0, 0);
this.shape1_2.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_2.addBox(-8.0F, -8.0F, -8.0F, 16, 1, 1, 0.0F);
this.shape1_1 = new ModelRenderer(this, 0, 0);
this.shape1_1.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_1.addBox(-8.0F, -8.0F, 7.0F, 16, 1, 1, 0.0F);
this.shape1_6 = new ModelRenderer(this, 0, 0);
this.shape1_6.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_6.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
this.setRotateAngle(shape1_6, 0.0F, -1.5707963267948966F, 0.0F);
this.shape1_10 = new ModelRenderer(this, 0, 0);
this.shape1_10.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_10.addBox(-7.0F, -8.0F, 7.0F, 14, 1, 1, 0.0F);
this.setRotateAngle(shape1_10, 0.0F, 3.141592653589793F, 1.5707963267948966F);
this.shape1_5 = new ModelRenderer(this, 0, 0);
this.shape1_5.setRotationPoint(0.0F, 16.0F, 0.0F);
this.shape1_5.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
this.setRotateAngle(shape1_5, 0.0F, -1.5707963267948966F, 0.0F);
textureWidth = 36;
textureHeight = 2;
shape1_3 = new ModelRenderer(this, 0, 0);
shape1_3.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_3.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
setRotateAngle(shape1_3, 0.0F, 1.5707963267948966F, 0.0F);
shape1_7 = new ModelRenderer(this, 0, 0);
shape1_7.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_7.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
setRotateAngle(shape1_7, 0.0F, 1.5707963267948966F, 0.0F);
shape1_9 = new ModelRenderer(this, 0, 0);
shape1_9.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_9.addBox(-7.0F, 7.0F, 7.0F, 14, 1, 1, 0.0F);
setRotateAngle(shape1_9, 0.0F, 3.141592653589793F, 1.5707963267948966F);
shape1_11 = new ModelRenderer(this, 0, 0);
shape1_11.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_11.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
setRotateAngle(shape1_11, 0.0F, 3.141592653589793F, 1.5707963267948966F);
shape1 = new ModelRenderer(this, 0, 0);
shape1.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1.addBox(-8.0F, 7.0F, 7.0F, 16, 1, 1, 0.0F);
shape1_4 = new ModelRenderer(this, 0, 0);
shape1_4.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_4.addBox(-8.0F, 7.0F, -8.0F, 16, 1, 1, 0.0F);
shape1_8 = new ModelRenderer(this, 0, 0);
shape1_8.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_8.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
setRotateAngle(shape1_8, 0.0F, 3.141592653589793F, 1.5707963267948966F);
shape1_2 = new ModelRenderer(this, 0, 0);
shape1_2.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_2.addBox(-8.0F, -8.0F, -8.0F, 16, 1, 1, 0.0F);
shape1_1 = new ModelRenderer(this, 0, 0);
shape1_1.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_1.addBox(-8.0F, -8.0F, 7.0F, 16, 1, 1, 0.0F);
shape1_6 = new ModelRenderer(this, 0, 0);
shape1_6.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_6.addBox(-7.0F, -8.0F, -8.0F, 14, 1, 1, 0.0F);
setRotateAngle(shape1_6, 0.0F, -1.5707963267948966F, 0.0F);
shape1_10 = new ModelRenderer(this, 0, 0);
shape1_10.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_10.addBox(-7.0F, -8.0F, 7.0F, 14, 1, 1, 0.0F);
setRotateAngle(shape1_10, 0.0F, 3.141592653589793F, 1.5707963267948966F);
shape1_5 = new ModelRenderer(this, 0, 0);
shape1_5.setRotationPoint(0.0F, 16.0F, 0.0F);
shape1_5.addBox(-7.0F, 7.0F, -8.0F, 14, 1, 1, 0.0F);
setRotateAngle(shape1_5, 0.0F, -1.5707963267948966F, 0.0F);
}
@Override
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
this.shape1_3.render(f5);
this.shape1_7.render(f5);
this.shape1_9.render(f5);
this.shape1_11.render(f5);
this.shape1.render(f5);
this.shape1_4.render(f5);
this.shape1_8.render(f5);
this.shape1_2.render(f5);
this.shape1_1.render(f5);
this.shape1_6.render(f5);
this.shape1_10.render(f5);
this.shape1_5.render(f5);
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
shape1_3.render(f5);
shape1_7.render(f5);
shape1_9.render(f5);
shape1_11.render(f5);
shape1.render(f5);
shape1_4.render(f5);
shape1_8.render(f5);
shape1_2.render(f5);
shape1_1.render(f5);
shape1_6.render(f5);
shape1_10.render(f5);
shape1_5.render(f5);
}
@@ -12,41 +12,40 @@ package vazkii.botania.client.model;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.entity.Entity;
public class ModelCrystalCube extends ModelBase {
public ModelRenderer cube;
public ModelRenderer base1;
public ModelRenderer base2;
public ModelRenderer cube;
public ModelRenderer base1;
public ModelRenderer base2;
public ModelCrystalCube() {
this.textureWidth = 48;
this.textureHeight = 32;
this.cube = new ModelRenderer(this, 0, 0);
this.cube.setRotationPoint(0.0F, 12.0F, 0.0F);
this.cube.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F);
this.base1 = new ModelRenderer(this, 22, 0);
this.base1.setRotationPoint(0.0F, 16.0F, 0.0F);
this.base1.addBox(-3.0F, 7.0F, -3.0F, 6, 1, 6, 0.0F);
this.base2 = new ModelRenderer(this, 0, 16);
this.base2.setRotationPoint(0.0F, 0.0F, 0.0F);
this.base2.addBox(-5.0F, 3.0F, -5.0F, 10, 4, 10, 0.0F);
this.base1.addChild(this.base2);
}
public ModelCrystalCube() {
textureWidth = 48;
textureHeight = 32;
cube = new ModelRenderer(this, 0, 0);
cube.setRotationPoint(0.0F, 12.0F, 0.0F);
cube.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F);
base1 = new ModelRenderer(this, 22, 0);
base1.setRotationPoint(0.0F, 16.0F, 0.0F);
base1.addBox(-3.0F, 7.0F, -3.0F, 6, 1, 6, 0.0F);
base2 = new ModelRenderer(this, 0, 16);
base2.setRotationPoint(0.0F, 0.0F, 0.0F);
base2.addBox(-5.0F, 3.0F, -5.0F, 10, 4, 10, 0.0F);
base1.addChild(base2);
}
public void renderBase() {
float f5 = 1F / 16F;
this.base1.render(f5);
}
public void renderCube() {
float f5 = 1F / 16F;
this.cube.render(f5);
}
public void renderBase() {
float f5 = 1F / 16F;
base1.render(f5);
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
public void renderCube() {
float f5 = 1F / 16F;
cube.render(f5);
}
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
modelRenderer.rotateAngleX = x;
modelRenderer.rotateAngleY = y;
modelRenderer.rotateAngleZ = z;
}
}
@@ -18,9 +18,7 @@ import net.minecraft.world.IBlockAccess;
import org.lwjgl.opengl.GL11;
import vazkii.botania.client.lib.LibRenderIDs;
import vazkii.botania.client.render.tile.RenderTileCorporeaIndex;
import vazkii.botania.common.block.tile.corporea.TileCorporeaCrystalCube;
import vazkii.botania.common.block.tile.corporea.TileCorporeaIndex;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
public class RenderCorporeaCrystalCube implements ISimpleBlockRenderingHandler {
@@ -46,13 +46,13 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
new ResourceLocation(String.format(LibResources.MODEL_ALTAR_META, 6)),
new ResourceLocation(String.format(LibResources.MODEL_ALTAR_META, 7))
};
private static final ResourceLocation textureMossy = new ResourceLocation(LibResources.MODEL_ALTAR_MOSSY);
ModelAltar model = new ModelAltar();
RenderItem renderItem = new RenderItem();
public static int forceMeta = -1;
@Override
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float pticks) {
TileAltar altar = (TileAltar) tileentity;
@@ -61,7 +61,7 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glColor4f(1F, 1F, 1F, 1F);
Minecraft.getMinecraft().renderEngine.bindTexture(altar.isMossy ? textureMossy : textures[Math.min(textures.length - 1, forceMeta == -1 ? tileentity.getBlockMetadata() : forceMeta)]);
GL11.glTranslated(d0 + 0.5, d1 + 1.5, d2 + 0.5);
GL11.glScalef(1F, -1F, -1F);
model.render();
@@ -163,7 +163,7 @@ public class RenderTileAltar extends TileEntitySpecialRenderer {
GL11.glPopMatrix();
}
GL11.glPopMatrix();
forceMeta = -1;
}
@@ -41,14 +41,14 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
if(entity == null)
entity = new EntityItem(cube.getWorldObj(), cube.xCoord, cube.yCoord, cube.zCoord, new ItemStack(Blocks.stone));
entity.age = ClientTickHandler.ticksInGame;
ItemStack stack = cube.getRequestTarget();
entity.setEntityItemStack(stack);
double time = ClientTickHandler.ticksInGame + f;
double worldTicks = tileentity.getWorldObj() == null ? 0 : time;
GL11.glPushMatrix();
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
GL11.glEnable(GL11.GL_BLEND);
@@ -66,8 +66,8 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
GL11.glTranslatef(0F, 0.8F, 0F);
GL11.glScalef(s, s, s);
GL11.glRotatef(180F, 0F, 0F, 1F);
((Render) RenderManager.instance.entityRenderMap.get(EntityItem.class)).doRender(entity, 0, 0, 0, 1F, f);
GL11.glPopMatrix();
((Render) RenderManager.instance.entityRenderMap.get(EntityItem.class)).doRender(entity, 0, 0, 0, 1F, f);
GL11.glPopMatrix();
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
}
@@ -13,7 +13,6 @@ package vazkii.botania.common.block;
import java.util.List;
import java.util.Random;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@@ -45,6 +44,7 @@ import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
import vazkii.botania.common.item.rod.ItemWaterRod;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
import cpw.mods.fml.common.registry.GameRegistry;
public class BlockAltar extends BlockModContainer implements ILexiconable {
@@ -71,19 +71,19 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
protected boolean shouldRegisterInNameSet() {
return false;
}
@Override
public Block setBlockName(String par1Str) {
GameRegistry.registerBlock(this, ItemBlockWithMetadataAndName.class, par1Str);
return super.setBlockName(par1Str);
}
@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
for(int i = 0; i < 9; i++)
list.add(new ItemStack(item, 1, i));
}
@Override
public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) {
if(par5Entity instanceof EntityItem) {
@@ -163,7 +163,7 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
public int damageDropped(int meta) {
return meta;
}
private boolean isValidWaterContainer(ItemStack stack) {
if (stack.stackSize != 1)
return false;
@@ -148,12 +148,12 @@ public class BlockModFlower extends BlockFlower implements ILexiconable, IPickup
int meta = world.getBlockMetadata(x, y, z);
placeDoubleFlower(world, x, y, z, meta, 1 | 2);
}
public static void placeDoubleFlower(World world, int x, int y, int z, int meta, int flags) {
Block flower = meta >= 8 ? ModBlocks.doubleFlower2 : ModBlocks.doubleFlower1;
int placeMeta = meta & 7;
world.setBlock(x, y, z, flower, placeMeta, flags);
world.setBlock(x, y + 1, z, flower, placeMeta | 8, flags);
}
}
@@ -144,7 +144,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
public void onWorldLoad(WorldEvent.Load event) {
WorldData.get(event.world);
}
@SubscribeEvent
public void onWorldUnload(WorldEvent.Unload event) {
WorldData.get(event.world).markDirty();
@@ -271,7 +271,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
if(data != null)
data.markDirty();
}
@Override
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
return LexiconData.pistonRelay;
@@ -294,7 +294,7 @@ public final class ModBlocks {
blazeBlock = new BlockBlaze();
corporeaInterceptor = new BlockCorporeaInterceptor();
corporeaCrystalCube = new BlockCorporeaCrystalCube();
ModFluffBlocks.init();
for(int i = 0; i < 16; i++)
@@ -308,13 +308,13 @@ public final class ModBlocks {
OreDictionary.registerOre(LibOreDict.DOUBLE_FLOWER[i], new ItemStack(doubleFlower1, 1, i));
OreDictionary.registerOre(LibOreDict.DOUBLE_FLOWER[i + 8], new ItemStack(doubleFlower2, 1, i));
}
OreDictionary.registerOre(LibOreDict.PRISMARINE_BLOCK, new ItemStack(prismarine, 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre(LibOreDict.BLAZE_BLOCK, blazeBlock);
for(int i = 0; i < 16; i++)
OreDictionary.registerOre(LibOreDict.STONE_18_VARIANTS[i], new ItemStack(ModFluffBlocks.stone, 1, i));
// Vanilla OreDict entries
OreDictionary.registerOre("dirt", Blocks.dirt);
OreDictionary.registerOre("grass", Blocks.grass);
@@ -427,12 +427,12 @@ public final class ModBlocks {
private static void registerSubTileWithMini(String key, Class<? extends SubTileEntity> clazz) {
BotaniaAPI.registerSubTile(key, clazz);
for(Class innerClazz : clazz.getDeclaredClasses())
if(innerClazz.getSimpleName().equals("Mini"))
BotaniaAPI.registerMiniSubTile(key + "Chibi", innerClazz, key);
}
private static void registerTile(Class<? extends TileEntity> clazz, String key) {
GameRegistry.registerTileEntity(clazz, LibResources.PREFIX_MOD + key);
}
@@ -34,7 +34,7 @@ public class BlockCorporeaCrystalCube extends BlockCorporeaBase implements ILexi
float f = (1F - 10F / 16F) / 2F;
setBlockBounds(f, 0F, f, 1F - f, 1F, 1F - f);
}
@Override
public void onBlockClicked(World world, int x, int y, int z, EntityPlayer player) {
if(!world.isRemote) {
@@ -42,7 +42,7 @@ public class BlockCorporeaCrystalCube extends BlockCorporeaBase implements ILexi
cube.doRequest(player.isSneaking());
}
}
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int s, float xs, float ys, float zs) {
ItemStack stack = player.getCurrentEquippedItem();
@@ -64,7 +64,7 @@ public class BlockCorporeaCrystalCube extends BlockCorporeaBase implements ILexi
public boolean renderAsNormalBlock() {
return false;
}
@Override
public int getRenderType() {
return LibRenderIDs.idCorporeaCrystalCybe;
@@ -79,7 +79,7 @@ public class BlockCorporeaCrystalCube extends BlockCorporeaBase implements ILexi
public IIcon getIcon(int side, int meta) {
return ModBlocks.storage.getIcon(0, 2);
}
@Override
public TileCorporeaBase createNewTileEntity(World world, int meta) {
return new TileCorporeaCrystalCube();
@@ -12,15 +12,6 @@ package vazkii.botania.common.block.corporea;
import java.util.Random;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.common.block.tile.corporea.TileCorporeaBase;
import vazkii.botania.common.block.tile.corporea.TileCorporeaFunnel;
import vazkii.botania.common.block.tile.corporea.TileCorporeaInterceptor;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.player.EntityPlayer;
@@ -28,6 +19,13 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import vazkii.botania.api.lexicon.ILexiconable;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.common.block.tile.corporea.TileCorporeaBase;
import vazkii.botania.common.block.tile.corporea.TileCorporeaInterceptor;
import vazkii.botania.common.lexicon.LexiconData;
import vazkii.botania.common.lib.LibBlockNames;
public class BlockCorporeaInterceptor extends BlockCorporeaBase implements ILexiconable {
@@ -50,27 +48,27 @@ public class BlockCorporeaInterceptor extends BlockCorporeaBase implements ILexi
public IIcon getIcon(int par1, int par2) {
return icons[par1 > 1 ? 1 : 0];
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
world.setBlockMetadataWithNotify(x, y, z, 0, 1 | 2);
}
@Override
public boolean canProvidePower() {
return true;
}
@Override
public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) {
return world.getBlockMetadata(x, y, z) != 0 ? 15 : 0;
}
@Override
public int tickRate(World p_149738_1_) {
return 2;
}
@Override
public TileCorporeaBase createNewTileEntity(World world, int meta) {
return new TileCorporeaInterceptor();
@@ -26,7 +26,7 @@ import cpw.mods.fml.common.IFuelHandler;
import cpw.mods.fml.common.registry.GameRegistry;
public class BlockBlaze extends BlockMod implements ILexiconable, IFuelHandler {
public BlockBlaze() {
super(Material.iron);
setHardness(3F);
@@ -36,7 +36,7 @@ public class BlockBlaze extends BlockMod implements ILexiconable, IFuelHandler {
setBlockName(LibBlockNames.BLAZE_BLOCK);
GameRegistry.registerFuelHandler(this);
}
@Override
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
return LexiconData.blazeBlock;
@@ -46,5 +46,5 @@ public class BlockBlaze extends BlockMod implements ILexiconable, IFuelHandler {
public int getBurnTime(ItemStack fuel) {
return fuel.getItem() == Item.getItemFromBlock(this) ? TileEntityFurnace.getItemBurnTime(new ItemStack(Items.blaze_rod)) * 9 : 0;
}
}
@@ -38,7 +38,7 @@ public class BlockDirtPath extends BlockMod implements ILexiconable {
setBlockName(LibBlockNames.DIRT_PATH);
useNeighborBrightness = true;
}
@Override
public boolean isToolEffective(String type, int metadata) {
return type.equals("shovel");
@@ -188,7 +188,7 @@ public class BlockSpreader extends BlockModContainer implements IWandable, IWand
if (inv != null) {
for (int j1 = 0; j1 < inv.getSizeInventory() + 1; ++j1) {
ItemStack itemstack = j1 >= inv.getSizeInventory() ? (inv.paddingColor == -1 ? null : new ItemStack(Blocks.wool, 1, inv.paddingColor)) : inv.getStackInSlot(j1);
ItemStack itemstack = j1 >= inv.getSizeInventory() ? inv.paddingColor == -1 ? null : new ItemStack(Blocks.wool, 1, inv.paddingColor) : inv.getStackInSlot(j1);
if(itemstack != null) {
float f = random.nextFloat() * 0.8F + 0.1F;
@@ -11,7 +11,6 @@
package vazkii.botania.common.block.subtile;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ChunkCoordinates;
import net.minecraft.world.World;
@@ -56,7 +55,7 @@ public class SubTilePureDaisy extends SubTileEntity {
World world = supertile.getWorldObj();
if(!world.isAirBlock(coords.posX, coords.posY, coords.posZ)) {
RecipePureDaisy recipe = null;
for(RecipePureDaisy recipe_ : BotaniaAPI.pureDaisyRecipes)
for(RecipePureDaisy recipe_ : BotaniaAPI.pureDaisyRecipes)
if(recipe_.matches(world, coords.posX, coords.posY, coords.posZ, this)) {
recipe = recipe_;
break;
@@ -80,7 +80,7 @@ public class SubTileAgricarnation extends SubTileFunctional {
public int getMaxMana() {
return 200;
}
public int getRange() {
return RANGE;
}
@@ -95,8 +95,8 @@ public class SubTileAgricarnation extends SubTileFunctional {
return LexiconData.agricarnation;
}
public static class Mini extends SubTileAgricarnation {
public static class Mini extends SubTileAgricarnation {
@Override public int getRange() { return RANGE_MINI; }
}
}
@@ -73,7 +73,7 @@ public class SubTileBellethorn extends SubTileFunctional {
public int getManaCost() {
return 24;
}
public int getRange() {
return RANGE;
}
@@ -98,8 +98,8 @@ public class SubTileBellethorn extends SubTileFunctional {
public LexiconEntry getEntry() {
return LexiconData.bellethorne;
}
public static class Mini extends SubTileBellethorn {
public static class Mini extends SubTileBellethorn {
@Override public int getRange() { return RANGE_MINI; }
}
@@ -91,7 +91,7 @@ public class SubTileBubbell extends SubTileFunctional {
public int getColor() {
return 0x0DCF89;
}
public int getRange() {
return RANGE;
}
@@ -105,8 +105,8 @@ public class SubTileBubbell extends SubTileFunctional {
public LexiconEntry getEntry() {
return LexiconData.bubbell;
}
public static class Mini extends SubTileBubbell {
public static class Mini extends SubTileBubbell {
@Override public int getRange() { return RANGE_MINI; }
}
@@ -42,7 +42,7 @@ public class SubTileHopperhock extends SubTileFunctional {
private static final String TAG_FILTER_TYPE = "filterType";
private static final int RANGE_MANA = 10;
private static final int RANGE = 6;
private static final int RANGE_MANA_MINI = 2;
private static final int RANGE_MINI = 1;
@@ -191,7 +191,7 @@ public class SubTileHopperhock extends SubTileFunctional {
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), getRange());
}
public int getRange() {
return mana > 0 ? RANGE_MANA : RANGE;
}
@@ -239,8 +239,8 @@ public class SubTileHopperhock extends SubTileFunctional {
public int getColor() {
return 0x3F3F3F;
}
public static class Mini extends SubTileHopperhock {
public static class Mini extends SubTileHopperhock {
@Override public int getRange() { return mana > 0 ? RANGE_MANA_MINI : RANGE_MINI; }
}
}
@@ -32,7 +32,7 @@ public class SubTileMarimorphosis extends SubTileFunctional {
private static final int COST = 12;
private static final int RANGE = 8;
private static final int RANGE_Y = 5;
private static final int RANGE_MINI = 2;
private static final int RANGE_Y_MINI = 1;
@@ -92,7 +92,7 @@ public class SubTileMarimorphosis extends SubTileFunctional {
int range = getRange();
int rangeY = getRangeY();
for(int i = -range; i < range + 1; i++)
for(int j = -range; j < rangeY; j++)
for(int k = -range; k < range + 1; k++) {
@@ -113,11 +113,11 @@ public class SubTileMarimorphosis extends SubTileFunctional {
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Square(toChunkCoordinates(), getRange());
}
public int getRange() {
return RANGE;
}
public int getRangeY() {
return RANGE_Y;
}
@@ -142,9 +142,9 @@ public class SubTileMarimorphosis extends SubTileFunctional {
return LexiconData.marimorphosis;
}
public static class Mini extends SubTileMarimorphosis {
public static class Mini extends SubTileMarimorphosis {
@Override public int getRange() { return RANGE_MINI; }
@Override public int getRangeY() { return RANGE_Y_MINI; }
}
}
@@ -12,44 +12,44 @@ package vazkii.botania.common.block.subtile.functional;
import java.util.Map;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.common.lexicon.LexiconData;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
public class SubTileOrechidIgnem extends SubTileOrechid {
private static final int COST = 20000;
@Override
public boolean canOperate() {
return supertile.getWorldObj().provider.isHellWorld;
}
@Override
public Map<String, Integer> getOreMap() {
return BotaniaAPI.oreWeightsNether;
}
@Override
public Block getSourceBlock() {
return Blocks.netherrack;
}
@Override
public int getCost() {
return COST;
}
@Override
public int getColor() {
return 0xAE3030;
}
@Override
public LexiconEntry getEntry() {
return LexiconData.orechidIgnem;
}
}
@@ -46,7 +46,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
private static final int RANGE_PLACE_MANA = 8;
private static final int RANGE_PLACE = 6;
private static final int RANGE_PLACE_Y = 6;
private static final int RANGE_PLACE_MANA_MINI = 3;
private static final int RANGE_PLACE_MINI = 2;
private static final int RANGE_PLACE_Y_MINI = 2;
@@ -173,11 +173,11 @@ public class SubTileRannuncarpus extends SubTileFunctional {
public int getRange() {
return mana > 0 ? RANGE_PLACE_MANA : RANGE_PLACE;
}
public int getRangeY() {
return RANGE_PLACE_Y;
}
@Override
public int getMaxMana() {
return 20;
@@ -193,11 +193,11 @@ public class SubTileRannuncarpus extends SubTileFunctional {
return LexiconData.rannuncarpus;
}
public static class Mini extends SubTileRannuncarpus {
public static class Mini extends SubTileRannuncarpus {
@Override public int getRange() { return mana > 0 ? RANGE_PLACE_MANA_MINI : RANGE_PLACE_MINI; }
@Override public int getRangeY() { return RANGE_PLACE_Y_MINI; }
}
static class BlockData {
Block block;
@@ -217,5 +217,5 @@ public class SubTileRannuncarpus extends SubTileFunctional {
}
}
}
@@ -73,7 +73,7 @@ public class SubTileSolegnolia extends SubTileFunctional {
public RadiusDescriptor getRadius() {
return new RadiusDescriptor.Circle(toChunkCoordinates(), RANGE);
}
@Override
public LexiconEntry getEntry() {
return LexiconData.solegnolia;
@@ -110,19 +110,19 @@ public class SubTileOrechid extends SubTileFunctional {
return null;
return possibleCoords.get(supertile.getWorldObj().rand.nextInt(possibleCoords.size()));
}
public boolean canOperate() {
return true;
}
public Map<String, Integer> getOreMap() {
return BotaniaAPI.oreWeights;
}
public Block getSourceBlock() {
return Blocks.stone;
}
public int getCost() {
return COST;
}
@@ -61,7 +61,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
supertile.xCoord + offsetArray[0],
supertile.zCoord + offsetArray[1]
};
Block search = getBlockToSearchFor();
if(supertile.getWorldObj().getBlock(positions[0], supertile.yCoord, positions[1]) == search && (getBlockToSearchBelow() == null || supertile.getWorldObj().getBlock(positions[0], supertile.yCoord - 1, positions[1]) == getBlockToSearchBelow()) && supertile.getWorldObj().getBlockMetadata(positions[0], supertile.yCoord, positions[1]) == 0) {
if(search != Blocks.water)
@@ -71,11 +71,11 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS)
if(supertile.getWorldObj().getBlock(positions[0] + dir.offsetX, supertile.yCoord, positions[1] + dir.offsetZ) == search)
waterAround++;
if(waterAround < 2)
supertile.getWorldObj().setBlockToAir(positions[0], supertile.yCoord, positions[1]);
}
burnTime += getBurnTime();
sync();
playSound();
@@ -117,7 +117,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
return flowers;
}
public void doBurnParticles() {
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.05F, 0.05F, 0.7F, (float) Math.random() / 6, (float) -Math.random() / 60);
}
@@ -129,7 +129,7 @@ public class SubTileHydroangeas extends SubTilePassiveGenerating {
public Block getBlockToSearchBelow() {
return null;
}
public void playSound() {
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "random.drink", 0.02F, 0.5F + (float) Math.random() * 0.5F);
}
@@ -32,7 +32,7 @@ public class SubTileThermalily extends SubTileHydroangeas {
public void doBurnParticles() {
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + 0.55 + Math.random() * 0.2 - 0.1, supertile.yCoord + 0.9 + Math.random() * 0.2 - 0.1, supertile.zCoord + 0.5, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
}
@Override
public int getSurroundingFlowers() {
return 0;
@@ -102,12 +102,12 @@ public class TileAlfPortal extends TileMod {
if(!hasUnloadedParts) {
ticksOpen++;
AxisAlignedBB aabb = getPortalAABB();
boolean open = ticksOpen > 60;
ElvenPortalUpdateEvent event = new ElvenPortalUpdateEvent(this, aabb, open, stacksIn);
MinecraftForge.EVENT_BUS.post(event);
if(ticksOpen > 60) {
ticksSinceLastItem++;
if(ConfigHandler.elfPortalParticlesEnabled)
@@ -133,7 +133,7 @@ public class TileAlfPortal extends TileMod {
}
}
} else closeNow = false;
if(closeNow) {
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 1 | 2);
for(int i = 0; i < 36; i++)
@@ -145,7 +145,7 @@ public class TileAlfPortal extends TileMod {
blockParticle(meta);
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, newMeta, 1 | 2);
}
hasUnloadedParts = false;
}
@@ -339,7 +339,7 @@ public class TileAlfPortal extends TileMod {
hasUnloadedParts = true;
return true; // Don't fuck everything up if there's a chunk unload
}
Block blockat = worldObj.getBlock(x, y, z);
if(block == Blocks.air ? blockat.isAir(worldObj, x, y, z) : blockat == block) {
if(meta == -1)
@@ -12,23 +12,13 @@ package vazkii.botania.common.block.tile.corporea;
import java.util.List;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import vazkii.botania.api.corporea.CorporeaHelper;
import vazkii.botania.api.corporea.ICorporeaSpark;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
import vazkii.botania.api.wand.IWandHUD;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.core.helper.InventoryHelper;
import vazkii.botania.common.lib.LibBlockNames;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
public class TileCorporeaCrystalCube extends TileCorporeaBase {
@@ -38,14 +28,14 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase {
ItemStack requestTarget;
int itemCount = 0;
int ticks = 0;
@Override
public void updateEntity() {
++ticks;
if(ticks % 20 == 0)
updateCount();
}
public void setRequestTarget(ItemStack stack) {
if(stack != null) {
ItemStack copy = stack.copy();
@@ -55,13 +45,13 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase {
if(!worldObj.isRemote)
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
}
}
public ItemStack getRequestTarget() {
return requestTarget;
}
public int getItemCount() {
return itemCount;
}
@@ -69,7 +59,7 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase {
public void doRequest(boolean fullStack) {
if(worldObj.isRemote)
return;
ICorporeaSpark spark = getSpark();
if(spark != null && spark.getMaster() != null && requestTarget != null) {
List<ItemStack> stacks = CorporeaHelper.requestItem(requestTarget, fullStack ? requestTarget.getMaxStackSize() : 1, spark, true, true);
@@ -89,14 +79,14 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase {
private void updateCount() {
if(worldObj.isRemote)
return;
itemCount = 0;
ICorporeaSpark spark = getSpark();
if(spark != null && spark.getMaster() != null && requestTarget != null) {
List<ItemStack> stacks = CorporeaHelper.requestItem(requestTarget, -1, spark, true, false);
for(ItemStack stack : stacks)
itemCount += stack.stackSize;
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
}
}
@@ -84,7 +84,7 @@ public class TileCorporeaFunnel extends TileCorporeaBase {
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
return false;
}
@Override
public int getSizeInventory() {
return 1;
@@ -13,7 +13,6 @@ package vazkii.botania.common.block.tile.corporea;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.item.EntityItemFrame;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
@@ -31,7 +30,7 @@ public class TileCorporeaInterceptor extends TileCorporeaBase implements ICorpor
public boolean isItemValidForSlot(int i, ItemStack itemstack) {
return false;
}
@Override
public int getSizeInventory() {
return 1;
@@ -55,16 +54,16 @@ public class TileCorporeaInterceptor extends TileCorporeaBase implements ICorpor
int missing = count;
for(ItemStack stack_ : stacks)
missing -= stack_.stackSize;
if(missing > 0 && getBlockMetadata() == 0) {
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 1 | 2);
worldObj.scheduleBlockUpdate(xCoord, yCoord, zCoord, getBlockType(), 2);
return;
}
}
}
public boolean requestMatches(Object request, ItemStack filter) {
if(request instanceof ItemStack) {
ItemStack stack = (ItemStack) request;
@@ -74,7 +73,7 @@ public class TileCorporeaInterceptor extends TileCorporeaBase implements ICorpor
String name = (String) request;
return CorporeaHelper.stacksMatch(filter, name);
}
public List<ItemStack> getFilter() {
List<ItemStack> filter = new ArrayList();
@@ -84,7 +84,7 @@ public class TilePool extends TileMod implements IManaPool, IDyablePool, IKeyLoc
String inputKey = "";
String outputKey = "";
int ticks = 0;
boolean sendPacket = false;
@@ -192,7 +192,7 @@ public class TilePool extends TileMod implements IManaPool, IDyablePool, IKeyLoc
if(Math.random() > particleChance)
Botania.proxy.wispFX(worldObj, xCoord + 0.3 + Math.random() * 0.5, yCoord + 0.6 + Math.random() * 0.25, zCoord + Math.random(), color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random() / 3F, (float) -Math.random() / 25F, 2F);
}
if(sendPacket && ticks % 10 == 0) {
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
sendPacket = false;
@@ -245,7 +245,7 @@ public class TilePool extends TileMod implements IManaPool, IDyablePool, IKeyLoc
}
}
}
ticks++;
}
@@ -208,7 +208,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
cmp.setBoolean(TAG_REQUEST_UPDATE, requestsClientUpdate);
cmp.setInteger(TAG_PADDING_COLOR, paddingColor);
cmp.setBoolean(TAG_CAN_SHOOT_BURST, canShootBurst);
cmp.setString(TAG_INPUT_KEY, inputKey);
cmp.setString(TAG_OUTPUT_KEY, outputKey);
@@ -266,7 +266,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
addBlock(ModFluffBlocks.darkPrismarineSlab);
addBlock(ModBlocks.blazeBlock);
addBlock(ModBlocks.reedBlock);
addBlock(ModFluffBlocks.reedStairs);
addBlock(ModFluffBlocks.reedSlab);
@@ -322,7 +322,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
addBlock(ModFluffBlocks.sunnyQuartz);
addBlock(ModFluffBlocks.sunnyQuartzSlab);
addBlock(ModFluffBlocks.sunnyQuartzStairs);
if(ConfigHandler.stones18Enabled) {
addBlock(ModFluffBlocks.stone);
for(int i= 0; i < 8; i++)
@@ -330,7 +330,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
for(int i= 0; i < 8; i++)
addBlock(ModFluffBlocks.stoneSlabs[i]);
}
addBlock(ModFluffBlocks.biomeStoneA);
addBlock(ModFluffBlocks.biomeStoneB);
for(int i = 0; i < 24; i++)
@@ -175,7 +175,7 @@ public final class ConfigHandler {
desc = "Set this to false to disable the 1.8 Stones available as mana alchemy recipes. This only disables the recipes and entries. Old ones that are already in the world will stay.";
stones18Enabled = loadPropBool("18stones.enabled", desc, stones18Enabled);
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);
@@ -155,7 +155,7 @@ public class InternalMethodHandler extends DummyMethodHandler {
public String getStackSubTileKey(ItemStack stack) {
return ItemBlockSpecialFlower.getType(stack);
}
@Override
public IManaNetwork getManaNetworkInstance() {
return ManaNetworkHandler.instance;
@@ -10,8 +10,8 @@
*/
package vazkii.botania.common.core.helper;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
import net.minecraft.entity.Entity;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
public final class MathHelper {
@@ -995,7 +995,7 @@ public final class ModCraftingRecipes {
// Moss Stone Recipe
addShapelessOreDictRecipe(new ItemStack(Blocks.mossy_cobblestone), "cobblestone", new ItemStack(ModItems.vineBall));
recipeMossStone = BotaniaAPI.getLatestAddedRecipe();
// Prismarine Recipe
addOreDictRecipe(new ItemStack(ModBlocks.prismarine, 1, 0),
" S ", "SBS", " S ",
@@ -1565,7 +1565,7 @@ public final class ModCraftingRecipes {
// Corporea Funnel Recipe
addShapelessOreDictRecipe(new ItemStack(ModBlocks.corporeaInterceptor), new ItemStack(Blocks.redstone_block), new ItemStack(ModItems.corporeaSpark));
recipeCorporeaInterceptor = BotaniaAPI.getLatestAddedRecipe();
// End Stone Brick Recipes
GameRegistry.addRecipe(new ItemStack(ModBlocks.endStoneBrick, 4),
"SS", "SS",
@@ -1681,12 +1681,12 @@ public final class ModCraftingRecipes {
}
// Blaze Light Recipe
addOreDictRecipe(new ItemStack(ModBlocks.blazeBlock),
addOreDictRecipe(new ItemStack(ModBlocks.blazeBlock),
"BBB", "BBB", "BBB",
'B', "rodBlaze");
recipeBlazeBlock = BotaniaAPI.getLatestAddedRecipe();
addShapelessOreDictRecipe(new ItemStack(Items.blaze_rod, 9), LibOreDict.BLAZE_BLOCK);
// Metamorphic Petal Apothecary Recipes
for(int i = 0; i < 8; i++)
GameRegistry.addRecipe(new ItemStack(ModBlocks.altar, 1, i + 1),
@@ -1694,15 +1694,15 @@ public final class ModCraftingRecipes {
'S', new ItemStack(ModFluffBlocks.biomeStoneA, 1, i + 8),
'A', new ItemStack(ModBlocks.altar));
recipesAltarMeta = BotaniaAPI.getLatestAddedRecipes(8);
// Corporea Crystal Cube Recipe
addOreDictRecipe(new ItemStack(ModBlocks.corporeaCrystalCube),
addOreDictRecipe(new ItemStack(ModBlocks.corporeaCrystalCube),
"C", "G", "W",
'C', new ItemStack(ModItems.corporeaSpark),
'G', new ItemStack(ModBlocks.elfGlass),
'W', LibOreDict.DREAM_WOOD);
recipeCorporeaCrystalCube = BotaniaAPI.getLatestAddedRecipe();
// Storage Block Recipes
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
"III", "III", "III",
@@ -11,20 +11,20 @@
package vazkii.botania.common.crafting;
import net.minecraft.init.Blocks;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.lib.LibOreDict;
import vazkii.botania.api.BotaniaAPI;
public final class ModPureDaisyRecipes {
public static void init() {
BotaniaAPI.registerPureDaisyRecipe("stone", ModBlocks.livingrock, 0);
BotaniaAPI.registerPureDaisyRecipe("logWood", ModBlocks.livingwood, 0);
BotaniaAPI.registerPureDaisyRecipe("netherrack", Blocks.cobblestone, 0);
BotaniaAPI.registerPureDaisyRecipe("soulSand", Blocks.sand, 0);
BotaniaAPI.registerPureDaisyRecipe("ice", Blocks.packed_ice, 0);
BotaniaAPI.registerPureDaisyRecipe(LibOreDict.BLAZE_BLOCK, Blocks.obsidian, 0);
}
}
@@ -97,7 +97,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
this(((TileEntity)spreader).getWorldObj());
TileEntity tile = (TileEntity) spreader;
this.fake = fake;
setBurstSourceCoords(tile.xCoord, tile.yCoord, tile.zCoord);
@@ -609,7 +609,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
setDead();
}
}
protected void onRecieverImpact(IManaReceiver tile, int x, int y, int z) {
int mana = getMana();
if(tile instanceof IManaCollector)
@@ -647,7 +647,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
public void setFake(boolean fake) {
this.fake = fake;
}
public void setScanBeam() {
scanBeam = true;
}
@@ -815,7 +815,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
public final ChunkCoordinates coords;
public final Block block;
public final int meta;
public boolean invalid = false;
public PositionProperties(Entity entity) {
@@ -836,7 +836,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
invalid = true;
return false;
}
Block block = world.getBlock(coords.posX , coords.posY, coords.posZ);
int meta = world.getBlockMetadata(coords.posX, coords.posY, coords.posZ);
return block == this.block && meta == this.meta;
@@ -50,7 +50,7 @@ public class EntityPoolMinecart extends EntityMinecart {
public Block func_145817_o() {
return ModBlocks.pool;
}
@Override
public ItemStack getCartItem() {
return new ItemStack(ModItems.poolMinecart);
@@ -89,7 +89,7 @@ public class ItemFlowerBag extends ItemMod {
player.openGui(Botania.instance, LibGuiIDs.FLOWER_BAG, world, 0, 0, 0);
return stack;
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int s, float xs, float ys, float zs) {
TileEntity tile = world.getTileEntity(x, y, z);
@@ -100,31 +100,31 @@ public class ItemFlowerBag extends ItemMod {
ItemStack[] stacks = loadStacks(stack);
ItemStack[] newStacks = new ItemStack[stacks.length];
boolean putAny = false;
int i = 0;
for(ItemStack petal : stacks) {
if(petal != null) {
int count = InventoryHelper.testInventoryInsertion(inv, petal, side);
InventoryHelper.insertItemIntoInventory(inv, petal, side, -1);
ItemStack newPetal = petal.copy();
if(newPetal.stackSize == 0)
newPetal = null;
newStacks[i] = newPetal;
putAny |= count > 0;
}
i++;
}
setStacks(stack, newStacks);
if(putAny && inv instanceof TileEntityChest) {
TileEntityChest chest = (TileEntityChest) inv;
player.displayGUIChest(chest);
}
}
return true;
}
return false;
@@ -40,7 +40,7 @@ public class ItemGrassHorn extends ItemMod {
private static final int SUBTYPES = 3;
IIcon[] icons;
IIcon vuvuzelaIcon;
public ItemGrassHorn() {
super();
setMaxStackSize(1);
@@ -66,7 +66,7 @@ public class ItemGrassHorn extends ItemMod {
public IIcon getIconIndex(ItemStack par1ItemStack) {
return par1ItemStack.getDisplayName().toLowerCase().contains("vuvuzela") ? vuvuzelaIcon : super.getIconIndex(par1ItemStack);
}
@Override
public IIcon getIcon(ItemStack stack, int pass) {
return getIconIndex(stack);
@@ -149,7 +149,7 @@ public class ItemGrassHorn extends ItemMod {
}
}
}
@Override
public boolean isFull3D() {
return true;
@@ -397,7 +397,7 @@ public final class ModItems {
OreDictionary.registerOre(LibOreDict.VIAL, new ItemStack(vial, 1, 0));
OreDictionary.registerOre(LibOreDict.FLASK, new ItemStack(vial, 1, 1));
BotaniaAPI.blackListItemFromLoonium(lexicon);
BotaniaAPI.blackListItemFromLoonium(overgrowthSeed);
BotaniaAPI.blackListItemFromLoonium(blackLotus);
@@ -405,7 +405,7 @@ public final class ModItems {
int max = Item.getIdFromItem(Items.record_wait);
for(int i = min; i <= max; i++)
BotaniaAPI.blackListItemFromLoonium(Item.getItemById(i));
OreDictionary.registerOre("rodBlaze", Items.blaze_rod);
}
}
@@ -83,14 +83,14 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
String type = getType(par1ItemStack);
SubTileSignature sig = BotaniaAPI.getSignatureForName(type);
if(ConfigHandler.referencesEnabled) {
String refUnlocalized = sig.getUnlocalizedLoreTextForStack(par1ItemStack);
String refLocalized = StatCollector.translateToLocal(refUnlocalized);
if(!refLocalized.equals(refUnlocalized))
par3List.add(EnumChatFormatting.ITALIC + refLocalized);
}
String mod = BotaniaAPI.subTileMods.get(type);
if(!mod.equals(LibMisc.MOD_ID))
par3List.add(EnumChatFormatting.ITALIC + "[" + mod + "]");
@@ -99,7 +99,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
ItemStack cosmetic = getCosmeticItem(par1ItemStack);
if(cosmetic != null)
addStringToTooltip(String.format(StatCollector.translateToLocal("botaniamisc.hasCosmetic"), cosmetic.getDisplayName()), par3List);
if(hasPhantomInk(par1ItemStack))
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.hasPhantomInk"), par3List);
}
@@ -198,12 +198,12 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
public static void setLastPlayerHashcode(ItemStack stack, int hash) {
ItemNBTHelper.setInt(stack, TAG_HASHCODE, hash);
}
@Override
public boolean hasPhantomInk(ItemStack stack) {
return ItemNBTHelper.getBoolean(stack, TAG_PHANTOM_INK, false);
}
@Override
public void setPhantomInk(ItemStack stack, boolean ink) {
ItemNBTHelper.setBoolean(stack, TAG_PHANTOM_INK, ink);
@@ -110,18 +110,18 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
stack.getTagCompound().removeTag("display");
}
}
String hash(String str) {
if(str != null)
try {
MessageDigest md = MessageDigest.getInstance("SHA-256");
return new HexBinaryAdapter().marshal(md.digest(salt(str).getBytes()));
return new HexBinaryAdapter().marshal(md.digest(salt(str).getBytes()));
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
return "";
}
// Might as well be called sugar given it's not secure at all :D
String salt(String str) {
str = str += "wowsuchsaltmuchsecurityverywow";
@@ -135,10 +135,10 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
do {
indB = rand.nextInt(l);
} while(indB == indA);
char c = (char) ((int) chrs[indA] ^ (int) chrs[indB]);
char c = (char) (chrs[indA] ^ chrs[indB]);
chrs[indA] = c;
}
return String.copyValueOf(chrs);
}
@@ -16,7 +16,6 @@ import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
@@ -28,9 +27,7 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
import org.lwjgl.opengl.GL11;
import vazkii.botania.api.item.IBaubleRender;
import vazkii.botania.api.mana.ManaItemHandler;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.Botania;
import vazkii.botania.common.lib.LibItemNames;
import baubles.api.BaubleType;
import baubles.common.lib.PlayerHandler;
@@ -73,7 +70,7 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender {
if(event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;
String s = playerStr(player);
ItemStack belt = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
if(playersWithStepup.contains(s)) {
if(shouldPlayerHaveStepup(player)) {
@@ -86,7 +83,7 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender {
} else {
player.stepHeight = 0.5F;
playersWithStepup.remove(s);
}
}
} else if(shouldPlayerHaveStepup(player)) {
playersWithStepup.add(s);
player.stepHeight = 1F;
@@ -99,7 +96,7 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender {
if(event.entityLiving instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entityLiving;
ItemStack belt = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3);
if(belt != null && belt.getItem() instanceof ItemTravelBelt) {
player.motionY += ((ItemTravelBelt) belt.getItem()).jump;
player.fallDistance = -((ItemTravelBelt) belt.getItem()).fallBuffer;
@@ -66,7 +66,7 @@ public class ItemManaResource extends ItemMod implements IFlowerComponent, IElve
if(rightEvent && correctStack && ender) {
MovingObjectPosition pos = ToolCommons.raytraceFromEntity(event.world, event.entityPlayer, false, 5F);
if(pos == null) {
ItemStack stack1 = new ItemStack(this, 1, 15);
event.entityPlayer.addStat(ModAchievements.enderAirMake, 1);
@@ -112,7 +112,7 @@ public class ItemFlugelEye extends ItemRelic {
boolean firstTick = isFirstTick(stack);
if(eqLastTick != equipped)
setEquipped(stack, equipped);
if((!equipped || firstTick) && entity instanceof EntityLivingBase) {
int angles = 360;
int segAngles = angles / SEGMENTS;
@@ -125,7 +125,7 @@ public class ItemFlugelEye extends ItemRelic {
private static int getSegmentLookedAt(ItemStack stack, EntityLivingBase player) {
float yaw = getCheckingAngle(player, getRotationBase(stack));
int angles = 360;
int segAngles = angles / SEGMENTS;
for(int seg = 0; seg < SEGMENTS; seg++) {
@@ -162,11 +162,11 @@ public class ItemFlugelEye extends ItemRelic {
public static boolean isFirstTick(ItemStack stack) {
return ItemNBTHelper.getBoolean(stack, TAG_FIRST_TICK, true);
}
public static void tickFirst(ItemStack stack) {
ItemNBTHelper.setBoolean(stack, TAG_FIRST_TICK, false);
}
public static boolean wasEquipped(ItemStack stack) {
return ItemNBTHelper.getBoolean(stack, TAG_EQUIPPED, false);
}
@@ -68,7 +68,7 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
ItemStack lokiRing = getLokiRing(player);
if(lokiRing == null || player.worldObj.isRemote)
return;
int slot = -1;
InventoryBaubles inv = PlayerHandler.getPlayerBaubles(player);
for(int i = 0; i < inv.getSizeInventory(); i++) {
@@ -172,7 +172,7 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
public List<ChunkCoordinates> getWireframesToDraw(EntityPlayer player, ItemStack stack) {
if(getLokiRing(player) != stack)
return null;
MovingObjectPosition lookPos = Minecraft.getMinecraft().objectMouseOver;
if(lookPos != null && !player.worldObj.isAirBlock(lookPos.blockX, lookPos.blockY, lookPos.blockZ) && lookPos.entityHit == null) {
@@ -196,7 +196,7 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
return null;
}
@Override
public ChunkCoordinates getSourceWireframe(EntityPlayer player, ItemStack stack) {
return getOriginPos(stack);
@@ -49,5 +49,5 @@ public class BLexiconEntry extends LexiconEntry {
public String getWebLink() {
return "http://botaniamod.net/lexicon.php#" + unlocalizedName;
}
}
@@ -394,7 +394,7 @@ public final class LexiconData {
flowerShrinking = new BLexiconEntry(LibLexicon.FFLOWER_SHRINKING, categoryFunctionalFlowers);
flowerShrinking.setPriority().setLexiconPages(new PageText("0"), new PageManaInfusionRecipe("1", BotaniaAPI.miniFlowerRecipes));
jadedAmaranthus = new BLexiconEntry(LibLexicon.FFLOWER_JADED_AMARANTHUS, categoryFunctionalFlowers);
jadedAmaranthus.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.jadedAmaranthusRecipe), new PageText("2"));
@@ -415,7 +415,7 @@ public final class LexiconData {
orechidIgnem = new ALexiconEntry(LibLexicon.FFLOWER_ORECHID_IGNEM, categoryFunctionalFlowers);
orechidIgnem.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.orechidIgnemRecipe));
if(ConfigHandler.fallenKanadeEnabled) {
fallenKanade = new BLexiconEntry(LibLexicon.FFLOWER_FALLEN_KANADE, categoryFunctionalFlowers);
fallenKanade.setLexiconPages(new PageText(Botania.bloodMagicLoaded ? "0a" : "0"), new PagePetalRecipe("1", ModPetalRecipes.fallenKanadeRecipe), new PageText("2"));
@@ -728,7 +728,7 @@ public final class LexiconData {
corporeaInterceptor = new ALexiconEntry(LibLexicon.ENDER_CORPOREA_INTERCEPTOR, categoryEnder);
corporeaInterceptor.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeCorporeaInterceptor));
endStoneDecor = new BLexiconEntry(LibLexicon.ENDER_END_STONE_DECOR, categoryEnder);
endStoneDecor.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeEndStoneBricks), new PageCraftingRecipe("2", ModCraftingRecipes.recipeEndStoneChiseledBricks));
@@ -743,7 +743,7 @@ public final class LexiconData {
corporeaCrystalCube = new ALexiconEntry(LibLexicon.ENDER_CORPOREA_CRYSTAL_CUBE, categoryEnder);
corporeaCrystalCube.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeCorporeaCrystalCube));
// BAUBLES ENTRIES
baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles);
baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2"));
@@ -897,11 +897,11 @@ 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));
}
blazeBlock = new BLexiconEntry(LibLexicon.MISC_BLAZE_BLOCK, categoryMisc);
blazeBlock.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeBlazeBlock));
LexiconRecipeMappings.map(new ItemStack(Blocks.obsidian), blazeBlock, 0);
if(Botania.bcTriggersLoaded) {
bcIntegration = new BLexiconEntry(LibLexicon.MISC_BC_INTEGRATION, categoryMisc);
bcIntegration.setLexiconPages(new PageText("0")).setIcon(new ItemStack(Items.redstone));
@@ -26,7 +26,6 @@ import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.internal.IGuiLexiconEntry;
import vazkii.botania.api.lexicon.ILexicon;
import vazkii.botania.api.lexicon.LexiconPage;
@@ -69,7 +69,7 @@ public final class LibObfuscation {
// EntityThrowable
public static final String[] THROWER = new String[] { "thrower", "field_70192_c", "g" };
// GuiContainer
public static final String[] THE_SLOT = new String[] { "theSlot", "field_147006_u", "u" };
}
@@ -42,46 +42,46 @@ public final class LibOreDict {
public static final String PRISMARINE_BLOCK = "blockPrismarine";
public static final String BLAZE_BLOCK = "blockBlaze";
public static final String[] FLOWER = new String[] {
"mysticFlowerWhite", "mysticFlowerOrange", "mysticFlowerMagenta", "mysticFlowerLightBlue",
"mysticFlowerYellow", "mysticFlowerLime", "mysticFlowerPink", "mysticFlowerGray",
public static final String[] FLOWER = new String[] {
"mysticFlowerWhite", "mysticFlowerOrange", "mysticFlowerMagenta", "mysticFlowerLightBlue",
"mysticFlowerYellow", "mysticFlowerLime", "mysticFlowerPink", "mysticFlowerGray",
"mysticFlowerLightGray", "mysticFlowerCyan", "mysticFlowerPurple", "mysticFlowerBlue",
"mysticFlowerBrown", "mysticFlowerGreen", "mysticFlowerRed", "mysticFlowerBlack"
"mysticFlowerBrown", "mysticFlowerGreen", "mysticFlowerRed", "mysticFlowerBlack"
};
public static final String[] DOUBLE_FLOWER = new String[] {
"mysticFlowerWhiteDouble", "mysticFlowerOrangeDouble", "mysticFlowerMagentaDouble", "mysticFlowerLightBlueDouble",
"mysticFlowerYellowDouble", "mysticFlowerLimeDouble", "mysticFlowerPinkDouble", "mysticFlowerGrayDouble",
public static final String[] DOUBLE_FLOWER = new String[] {
"mysticFlowerWhiteDouble", "mysticFlowerOrangeDouble", "mysticFlowerMagentaDouble", "mysticFlowerLightBlueDouble",
"mysticFlowerYellowDouble", "mysticFlowerLimeDouble", "mysticFlowerPinkDouble", "mysticFlowerGrayDouble",
"mysticFlowerLightGrayDouble", "mysticFlowerCyanDouble", "mysticFlowerPurpleDouble", "mysticFlowerBlueDouble",
"mysticFlowerBrownDouble", "mysticFlowerGreenDouble", "mysticFlowerRedDouble", "mysticFlowerBlackDouble"
};
public static final String[] PETAL = new String[] {
"petalWhite", "petalOrange", "petalMagenta", "petalLightBlue",
"petalYellow", "petalLime", "petalPink", "petalGray",
"petalLightGray", "petalCyan", "petalPurple", "petalBlue",
"petalBrown", "petalGreen", "petalRed", "petalBlack"
"petalWhite", "petalOrange", "petalMagenta", "petalLightBlue",
"petalYellow", "petalLime", "petalPink", "petalGray",
"petalLightGray", "petalCyan", "petalPurple", "petalBlue",
"petalBrown", "petalGreen", "petalRed", "petalBlack"
};
public static final String[] DYE = new String[] {
"dyeWhite", "dyeOrange", "dyeMagenta", "dyeLightBlue",
"dyeYellow", "dyeLime", "dyePink", "dyeGray",
public static final String[] DYE = new String[] {
"dyeWhite", "dyeOrange", "dyeMagenta", "dyeLightBlue",
"dyeYellow", "dyeLime", "dyePink", "dyeGray",
"dyeLightGray", "dyeCyan", "dyePurple", "dyeBlue",
"dyeBrown", "dyeGreen", "dyeRed", "dyeBlack"
"dyeBrown", "dyeGreen", "dyeRed", "dyeBlack"
};
public static final String[] MANA_PETAL = new String[] {
public static final String[] MANA_PETAL = new String[] {
"manaPetalWhite", "manaPetalOrange", "manaPetalMagenta", "manaPetalLightBlue",
"manaPetalYellow", "manaPetalLime", "manaPetalPink", "manaPetalGray",
"manaPetalLightGray", "manaPetalCyan", "manaPetalPurple", "manaPetalBlue",
"manaPetalBrown", "manaPetalGreen", "manaPetalRed", "manaPetalBlack"
"manaPetalYellow", "manaPetalLime", "manaPetalPink", "manaPetalGray",
"manaPetalLightGray", "manaPetalCyan", "manaPetalPurple", "manaPetalBlue",
"manaPetalBrown", "manaPetalGreen", "manaPetalRed", "manaPetalBlack"
};
public static final String[] RUNE = new String[] {
"runeWaterB", "runeFireB", "runeEarthB", "runeAirB",
"runeSpringB", "runeSummerB", "runeAutumnB", "runeWinterB",
"runeManaB", "runeLustB", "runeGluttonyB", "runeGreedB",
"runeSlothB", "runeWrathB", "runeEnvyB", "runePrideB"
public static final String[] RUNE = new String[] {
"runeWaterB", "runeFireB", "runeEarthB", "runeAirB",
"runeSpringB", "runeSummerB", "runeAutumnB", "runeWinterB",
"runeManaB", "runeLustB", "runeGluttonyB", "runeGreedB",
"runeSlothB", "runeWrathB", "runeEnvyB", "runePrideB"
};
public static final String[] STONE_18_VARIANTS = new String[] {