mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-12 16:27:37 +00:00
Lots o' Cleanup.
This commit is contained in:
1 parent
2ba614dcb5
commit
b63a3fd2c3
93 files changed
+339
-414
No files matched your search
@@ -50,7 +50,7 @@ public final class BotaniaAPI {
|
||||
private static List<LexiconEntry> allEntries = new ArrayList<LexiconEntry>();
|
||||
|
||||
public static Map<String, KnowledgeType> knowledgeTypes = new HashMap<String, KnowledgeType>();
|
||||
|
||||
|
||||
public static List<RecipePetals> petalRecipes = new ArrayList<RecipePetals>();
|
||||
public static List<RecipeRuneAltar> runeAltarRecipes = new ArrayList<RecipeRuneAltar>();
|
||||
public static List<RecipeManaInfusion> manaInfusionRecipes = new ArrayList<RecipeManaInfusion>();
|
||||
@@ -68,12 +68,12 @@ public final class BotaniaAPI {
|
||||
|
||||
public static ArmorMaterial elementiumArmorMaterial = EnumHelper.addArmorMaterial("B_ELEMENTIUM", 18, new int[] { 2, 6, 5, 2 }, 18);
|
||||
public static ToolMaterial elementiumToolMaterial = EnumHelper.addToolMaterial("B_ELEMENTIUM", 3, 720, 6.2F, 2F, 20);
|
||||
|
||||
|
||||
public static ArmorMaterial terrasteelArmorMaterial = EnumHelper.addArmorMaterial("TERRASTEEL", 34, new int[] {3, 8, 6, 3}, 26);
|
||||
public static ToolMaterial terrasteelToolMaterial = EnumHelper.addToolMaterial("TERRASTEEL", 3, 2300, 9F, 3F, 26);
|
||||
|
||||
public static KnowledgeType basicKnowledge, elvenKnowledge;
|
||||
|
||||
|
||||
static {
|
||||
registerSubTile("", DummySubTile.class);
|
||||
|
||||
@@ -137,7 +137,7 @@ public final class BotaniaAPI {
|
||||
*/
|
||||
public static IInternalMethodHandler internalHandler = new DummyMethodHandler();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Registers a new Knowledge Type.
|
||||
* @param id The ID for this knowledge type.
|
||||
@@ -148,7 +148,7 @@ public final class BotaniaAPI {
|
||||
knowledgeTypes.put(id, type);
|
||||
return type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers a Petal Recipe.
|
||||
* @param output The ItemStack to craft.
|
||||
@@ -199,7 +199,7 @@ public final class BotaniaAPI {
|
||||
recipe.setAlchemy(true);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Register a Mana Infusion Recipe and flags it as an Conjuration recipe (requires a
|
||||
* Conjuration Catalyst below the pool).
|
||||
@@ -210,7 +210,7 @@ public final class BotaniaAPI {
|
||||
recipe.setConjuration(true);
|
||||
return recipe;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Registers a Elven Trade recipe (throw an item in an Alfheim Portal).
|
||||
* @param output The ItemStack to return.
|
||||
|
||||
@@ -78,7 +78,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
|
||||
public LexiconPage manaInfusionRecipePage(String key, RecipeManaInfusion recipe) {
|
||||
return dummyPage(key);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconPage elvenTradePage(String key, List<RecipeElvenTrade> recipes) {
|
||||
return dummyPage(key);
|
||||
|
||||
@@ -60,7 +60,7 @@ public interface IInternalMethodHandler {
|
||||
public LexiconPage elvenTradePage(String key, List<RecipeElvenTrade> recipes);
|
||||
|
||||
public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe);
|
||||
|
||||
|
||||
public IManaNetwork getManaNetworkInstance();
|
||||
|
||||
public ItemStack getSubTileAsStack(String subTile);
|
||||
|
||||
@@ -12,10 +12,10 @@ public interface ILexicon {
|
||||
* BotaniaAPI.
|
||||
*/
|
||||
public boolean isKnowledgeUnlocked(ItemStack stack, KnowledgeType knowledge);
|
||||
|
||||
|
||||
/**
|
||||
* Unlocks a specfic type of knowledge.
|
||||
*/
|
||||
public void unlockKnowledge(ItemStack stack, KnowledgeType knowledge);
|
||||
|
||||
|
||||
}
|
||||
@@ -7,13 +7,13 @@ public class KnowledgeType {
|
||||
public final String id;
|
||||
public final EnumChatFormatting color;
|
||||
public final boolean autoUnlock;
|
||||
|
||||
|
||||
public KnowledgeType(String id, EnumChatFormatting color, boolean autoUnlock) {
|
||||
this.id = id;
|
||||
this.color = color;
|
||||
this.autoUnlock = autoUnlock;
|
||||
}
|
||||
|
||||
|
||||
public String getUnlocalizedName() {
|
||||
return "botania.knowledge." + id;
|
||||
}
|
||||
|
||||
@@ -15,15 +15,14 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.Botania;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
|
||||
public class LexiconEntry implements Comparable<LexiconEntry> {
|
||||
|
||||
public final String unlocalizedName;
|
||||
public final LexiconCategory category;
|
||||
|
||||
|
||||
private KnowledgeType type = BotaniaAPI.basicKnowledge;
|
||||
|
||||
public List<LexiconPage> pages = new ArrayList<LexiconPage>();
|
||||
@@ -44,7 +43,7 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
|
||||
priority = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sets the Knowledge type of this entry.
|
||||
*/
|
||||
@@ -52,7 +51,7 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
|
||||
this.type = type;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public KnowledgeType getKnowledgeType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@ public class TileSignature {
|
||||
|
||||
public final TileEntity tile;
|
||||
public final boolean remoteWorld;
|
||||
|
||||
|
||||
public TileSignature(TileEntity tile, boolean remoteWorld) {
|
||||
this.tile = tile;
|
||||
this.remoteWorld = remoteWorld;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import net.minecraft.item.ItemStack;
|
||||
* must implement this or it'll just go back in.
|
||||
*/
|
||||
public interface IElvenItem {
|
||||
|
||||
|
||||
public boolean isElvenItem(ItemStack stack);
|
||||
|
||||
}
|
||||
@@ -3,12 +3,11 @@ package vazkii.botania.api.recipe;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public class RecipeElvenTrade {
|
||||
|
||||
|
||||
ItemStack output;
|
||||
List<Object> inputs;
|
||||
|
||||
@@ -28,11 +27,9 @@ public class RecipeElvenTrade {
|
||||
public boolean matches(List<ItemStack> stacks, boolean remove) {
|
||||
List<Object> inputsMissing = new ArrayList(inputs);
|
||||
List<ItemStack> stacksToRemove = new ArrayList();
|
||||
|
||||
int i = 0;
|
||||
|
||||
for(ItemStack stack : stacks) {
|
||||
if(stack == null) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if(inputsMissing.isEmpty())
|
||||
@@ -71,9 +68,8 @@ public class RecipeElvenTrade {
|
||||
inputsMissing.remove(stackIndex);
|
||||
else if(oredictIndex != -1)
|
||||
inputsMissing.remove(oredictIndex);
|
||||
i++;
|
||||
}
|
||||
|
||||
|
||||
if(remove)
|
||||
for(ItemStack r : stacksToRemove)
|
||||
stacks.remove(r);
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.awt.Color;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -53,7 +52,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
linkCollector();
|
||||
|
||||
if(canGeneratePassively()) {
|
||||
|
||||
@@ -14,5 +14,5 @@ public interface ICoordBoundItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ChunkCoordinates getBinding(ItemStack stack);
|
||||
|
||||
|
||||
}
|
||||
@@ -19,19 +19,15 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.api.wand.ICoordBoundItem;
|
||||
import vazkii.botania.api.wand.ITileBound;
|
||||
import vazkii.botania.api.wand.IWireframeAABBProvider;
|
||||
import vazkii.botania.common.item.ItemTwigWand;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public final class BoundTileRenderer {
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ClientTickHandler {
|
||||
for(TileSignature sig : list) {
|
||||
if(!sig.remoteWorld)
|
||||
continue;
|
||||
|
||||
|
||||
TileEntity tile = sig.tile;
|
||||
if(tile instanceof IManaCollector)
|
||||
((IManaCollector) tile).onClientDisplayTick();
|
||||
|
||||
@@ -103,9 +103,9 @@ public class ClientProxy extends CommonProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TilePylon.class, new RenderTilePylon());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEnchanter.class, new RenderTileEnchanter());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileAlfPortal.class, new RenderTileAlfPortal());
|
||||
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPixie.class, new RenderPixie());
|
||||
|
||||
|
||||
ShaderHelper.initShaders();
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
buttonList.add(new GuiButtonInvisible(i, left + x, top + y, 110, 10, ""));
|
||||
}
|
||||
populateIndex();
|
||||
}
|
||||
}
|
||||
populateBookmarks();
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
populateBookmarks();
|
||||
bookmarksNeedPopulation = false;
|
||||
}
|
||||
|
||||
|
||||
super.drawScreen(par1, par2, par3);
|
||||
}
|
||||
|
||||
@@ -100,12 +100,12 @@ public class GuiLexicon extends GuiScreen {
|
||||
font.setUnicodeFlag(true);
|
||||
int l = font.getStringWidth(s.trim());
|
||||
int fontOff = 0;
|
||||
|
||||
|
||||
if(!drawLeft) {
|
||||
x += l / 2;
|
||||
fontOff = 2;
|
||||
}
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
@@ -128,7 +128,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if(par1GuiButton.id >= BOOKMARK_START)
|
||||
if(par1GuiButton.id >= BOOKMARK_START)
|
||||
handleBookmark(par1GuiButton);
|
||||
else {
|
||||
int i = par1GuiButton.id - 3;
|
||||
@@ -163,10 +163,10 @@ public class GuiLexicon extends GuiScreen {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bookmarksNeedPopulation = true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean doesGuiPauseGame() {
|
||||
return false;
|
||||
@@ -215,13 +215,13 @@ public class GuiLexicon extends GuiScreen {
|
||||
if(button.id >= BOOKMARK_START)
|
||||
remove.add(button);
|
||||
buttonList.removeAll(remove);
|
||||
|
||||
|
||||
int len = bookmarks.size();
|
||||
boolean thisExists = false;
|
||||
for(GuiLexicon lex : bookmarks)
|
||||
if(lex.getTitle().equals(getTitle()))
|
||||
thisExists = true;
|
||||
|
||||
|
||||
boolean addEnabled = len < 10 && this instanceof IParented && !thisExists;
|
||||
for(int i = 0; i < len + (addEnabled ? 1 : 0); i++) {
|
||||
boolean isAdd = i == bookmarks.size();
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import vazkii.botania.api.internal.IGuiLexiconEntry;
|
||||
import vazkii.botania.api.lexicon.IAddonEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
@@ -88,7 +89,7 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if(par1GuiButton.id >= BOOKMARK_START)
|
||||
if(par1GuiButton.id >= BOOKMARK_START)
|
||||
handleBookmark(par1GuiButton);
|
||||
else
|
||||
switch(par1GuiButton.id) {
|
||||
@@ -156,14 +157,14 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
|
||||
public void setParent(GuiLexicon gui) {
|
||||
parent = gui;
|
||||
}
|
||||
|
||||
|
||||
int fx = 0;
|
||||
boolean swiped = false;
|
||||
|
||||
@Override
|
||||
protected void mouseClickMove(int x, int y, int button, long time) {
|
||||
if(button == 0 && Math.abs(x - fx) > 100 && mc.gameSettings.touchscreen && !swiped) {
|
||||
double swipe = (double) (x - fx) / Math.max(1, (double) time);
|
||||
double swipe = (x - fx) / Math.max(1, (double) time);
|
||||
if(swipe < 0.5) {
|
||||
nextPage();
|
||||
swiped = true;
|
||||
@@ -173,34 +174,34 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int par1, int par2, int par3) {
|
||||
super.mouseClicked(par1, par2, par3);
|
||||
|
||||
|
||||
fx = par1;
|
||||
if(par3 == 1)
|
||||
back();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void handleMouseInput() {
|
||||
super.handleMouseInput();
|
||||
|
||||
|
||||
if(Mouse.getEventButton() == 0)
|
||||
swiped = false;
|
||||
|
||||
int w = Mouse.getEventDWheel();
|
||||
if(w < 0)
|
||||
nextPage();
|
||||
else if(w > 0)
|
||||
prevPage();
|
||||
|
||||
int w = Mouse.getEventDWheel();
|
||||
if(w < 0)
|
||||
nextPage();
|
||||
else if(w > 0)
|
||||
prevPage();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char par1, int par2) {
|
||||
if(par2 == 203 || par2 == 200 || par2 == 201) // Left, Up, Page Up
|
||||
prevPage();
|
||||
prevPage();
|
||||
else if(par2 == 205 || par2 == 208 || par2 == 209) // Right, Down Page Down
|
||||
nextPage();
|
||||
else if(par2 == 14) // Backspace
|
||||
@@ -209,20 +210,20 @@ public class GuiLexiconEntry extends GuiLexicon implements IGuiLexiconEntry, IPa
|
||||
mc.displayGuiScreen(new GuiLexicon());
|
||||
ClientTickHandler.notifyPageChange();
|
||||
}
|
||||
|
||||
|
||||
super.keyTyped(par1, par2);
|
||||
}
|
||||
|
||||
|
||||
void back() {
|
||||
if(backButton.enabled)
|
||||
actionPerformed(backButton);
|
||||
}
|
||||
|
||||
|
||||
void nextPage() {
|
||||
if(rightButton.enabled)
|
||||
actionPerformed(rightButton);
|
||||
}
|
||||
|
||||
|
||||
void prevPage() {
|
||||
if(leftButton.enabled)
|
||||
actionPerformed(leftButton);
|
||||
|
||||
@@ -15,11 +15,12 @@ import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import vazkii.botania.api.lexicon.ILexicon;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
@@ -87,7 +88,7 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if(par1GuiButton.id >= BOOKMARK_START)
|
||||
if(par1GuiButton.id >= BOOKMARK_START)
|
||||
handleBookmark(par1GuiButton);
|
||||
else
|
||||
switch(par1GuiButton.id) {
|
||||
@@ -127,14 +128,14 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
public void setParent(GuiLexicon gui) {
|
||||
parent = gui;
|
||||
}
|
||||
|
||||
|
||||
int fx = 0;
|
||||
boolean swiped = false;
|
||||
|
||||
@Override
|
||||
protected void mouseClickMove(int x, int y, int button, long time) {
|
||||
if(button == 0 && Math.abs(x - fx) > 100 && mc.gameSettings.touchscreen && !swiped) {
|
||||
double swipe = (double) (x - fx) / Math.max(1, (double) time);
|
||||
double swipe = (x - fx) / Math.max(1, (double) time);
|
||||
if(swipe < 0.5) {
|
||||
nextPage();
|
||||
swiped = true;
|
||||
@@ -144,34 +145,34 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int par1, int par2, int par3) {
|
||||
super.mouseClicked(par1, par2, par3);
|
||||
|
||||
|
||||
fx = par1;
|
||||
if(par3 == 1)
|
||||
back();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void handleMouseInput() {
|
||||
super.handleMouseInput();
|
||||
|
||||
|
||||
if(Mouse.getEventButton() == 0)
|
||||
swiped = false;
|
||||
|
||||
int w = Mouse.getEventDWheel();
|
||||
if(w < 0)
|
||||
nextPage();
|
||||
else if(w > 0)
|
||||
prevPage();
|
||||
|
||||
int w = Mouse.getEventDWheel();
|
||||
if(w < 0)
|
||||
nextPage();
|
||||
else if(w > 0)
|
||||
prevPage();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char par1, int par2) {
|
||||
if(par2 == 203 || par2 == 200 || par2 == 201) // Left, Up, Page Up
|
||||
prevPage();
|
||||
prevPage();
|
||||
else if(par2 == 205 || par2 == 208 || par2 == 209) // Right, Down Page Down
|
||||
nextPage();
|
||||
else if(par2 == 14) // Backspace
|
||||
@@ -180,20 +181,20 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
mc.displayGuiScreen(new GuiLexicon());
|
||||
ClientTickHandler.notifyPageChange();
|
||||
}
|
||||
|
||||
|
||||
super.keyTyped(par1, par2);
|
||||
}
|
||||
|
||||
|
||||
void back() {
|
||||
if(backButton.enabled)
|
||||
actionPerformed(backButton);
|
||||
}
|
||||
|
||||
|
||||
void nextPage() {
|
||||
if(rightButton.enabled)
|
||||
actionPerformed(rightButton);
|
||||
}
|
||||
|
||||
|
||||
void prevPage() {
|
||||
if(leftButton.enabled)
|
||||
actionPerformed(leftButton);
|
||||
|
||||
@@ -3,5 +3,5 @@ package vazkii.botania.client.gui;
|
||||
public interface IParented {
|
||||
|
||||
public void setParent(GuiLexicon gui);
|
||||
|
||||
|
||||
}
|
||||
@@ -13,11 +13,11 @@ import vazkii.botania.client.gui.GuiLexicon;
|
||||
public class GuiButtonBookmark extends GuiButton {
|
||||
|
||||
GuiLexicon gui = new GuiLexicon();
|
||||
|
||||
|
||||
public GuiButtonBookmark(int par1, int par2, int par3, GuiLexicon gui, String str) {
|
||||
super(par1, par2, par3, gui.bookmarkWidth(str) + 5, 11, str);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft mc, int par2, int par3) {
|
||||
gui.drawBookmark(xPosition, yPosition, displayString, false);
|
||||
@@ -32,7 +32,7 @@ public class GuiButtonBookmark extends GuiButton {
|
||||
tooltip.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("botaniamisc.clickToSee"));
|
||||
tooltip.add(EnumChatFormatting.GRAY + StatCollector.translateToLocal("botaniamisc.shiftToRemove"));
|
||||
}
|
||||
|
||||
|
||||
int tooltipY = (tooltip.size() + 1) * 5;
|
||||
if(k == 2)
|
||||
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
|
||||
|
||||
@@ -63,10 +63,10 @@ public class ModelPixie extends ModelBase {
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
|
||||
|
||||
RightWing.rotateAngleY = -(MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.5F);
|
||||
LeftWing.rotateAngleY = MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.5F;
|
||||
LeftWing.rotateAngleY = MathHelper.cos(f2 * 1.7F) * (float)Math.PI * 0.5F;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class RenderPixie extends RenderLiving {
|
||||
char c0 = 61680;
|
||||
int j = c0 % 65536;
|
||||
int k = c0 / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j / 1.0F, (float)k / 1.0F);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, j / 1.0F, k / 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, f1);
|
||||
return 1;
|
||||
|
||||
@@ -67,20 +67,20 @@ public class RenderLexicon implements IItemRenderer {
|
||||
boolean bevo = Minecraft.getMinecraft().thePlayer.getCommandSenderName().equals("BevoLJ");
|
||||
String title = ModItems.lexicon.getItemStackDisplayName(null);
|
||||
String origTitle = title;
|
||||
|
||||
|
||||
if(Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem() != null)
|
||||
title = Minecraft.getMinecraft().thePlayer.getCurrentEquippedItem().getDisplayName();
|
||||
if(title.equals(origTitle) && bevo)
|
||||
title = StatCollector.translateToLocal("item.botania:lexicon.bevo");
|
||||
|
||||
|
||||
font.drawString(font.trimStringToWidth(title, 80), 0, 0, 0xD69700);
|
||||
GL11.glTranslatef(0F, 10F, 0F);
|
||||
GL11.glScalef(0.6F, 0.6F, 0.6F);
|
||||
font.drawString(EnumChatFormatting.ITALIC + "" + EnumChatFormatting.BOLD + String.format(StatCollector.translateToLocal("botaniamisc.edition"), ItemLexicon.getEdition()), 0, 0, 0xA07100);
|
||||
|
||||
|
||||
GL11.glTranslatef(0F, 15F, 0F);
|
||||
font.drawString(StatCollector.translateToLocal("botaniamisc.lexiconcover0"), 0, 0, 0x79ff92);
|
||||
|
||||
|
||||
GL11.glTranslatef(0F, 10F, 0F);
|
||||
font.drawString(EnumChatFormatting.UNDERLINE + StatCollector.translateToLocal("botaniamisc.lexiconcover1"), 0, 0, 0x79ff92);
|
||||
|
||||
@@ -90,7 +90,7 @@ public class RenderLexicon implements IItemRenderer {
|
||||
GL11.glTranslatef(5F, -0.3F, 0F);
|
||||
font.drawString(EnumChatFormatting.BOLD + "~", 0, 0, 0x002206);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
GL11.glTranslatef(0F, 25F, 0F);
|
||||
font.drawString(StatCollector.translateToLocal("botaniamisc.lexiconcover2"), 0, 0, 0x79ff92);
|
||||
GL11.glTranslatef(0F, 10F, 0F);
|
||||
@@ -99,7 +99,7 @@ public class RenderLexicon implements IItemRenderer {
|
||||
GL11.glTranslatef(0F, 10F, 0F);
|
||||
font.drawString(StatCollector.translateToLocal("botaniamisc.lexiconcover4"), 0, 0, 0x79ff92);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ public class BlockAlchemyCatalyst extends BlockMod implements ILexiconable {
|
||||
public BlockAlchemyCatalyst() {
|
||||
this(LibBlockNames.ALCHEMY_CATALYST);
|
||||
}
|
||||
|
||||
|
||||
public BlockAlchemyCatalyst(String name) {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
|
||||
@@ -21,7 +21,6 @@ import net.minecraft.entity.item.EntityItem;
|
||||
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.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -85,13 +84,13 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if(stack != null && (stack.getItem() == Items.water_bucket || (stack.getItem() == ModItems.waterRod && ManaItemHandler.requestManaExact(stack, par5EntityPlayer, ItemWaterRod.COST, false)))) {
|
||||
if(stack != null && (stack.getItem() == Items.water_bucket || stack.getItem() == ModItems.waterRod && ManaItemHandler.requestManaExact(stack, par5EntityPlayer, ItemWaterRod.COST, false))) {
|
||||
if(!tile.hasWater) {
|
||||
if(stack.getItem() == ModItems.waterRod)
|
||||
ManaItemHandler.requestManaExact(stack, par5EntityPlayer, ItemWaterRod.COST, true);
|
||||
else if(!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, new ItemStack(Items.bucket));
|
||||
|
||||
|
||||
tile.hasWater = true;
|
||||
par1World.func_147453_f(par2, par3, par4, this);
|
||||
par1World.markBlockForUpdate(par2, par3, par4);
|
||||
|
||||
@@ -15,9 +15,7 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Facing;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.block.tile.TileBifrost;
|
||||
@@ -43,12 +41,12 @@ public class BlockBifrost extends BlockModContainer {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean shouldSideBeRendered1(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
||||
Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
|
||||
public boolean shouldSideBeRendered1(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
||||
Block block = p_149646_1_.getBlock(p_149646_2_, p_149646_3_, p_149646_4_);
|
||||
|
||||
return block == this ? false : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
|
||||
}
|
||||
|
||||
return block == this ? false : super.shouldSideBeRendered(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, p_149646_5_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, int p_149646_2_, int p_149646_3_, int p_149646_4_, int p_149646_5_) {
|
||||
return shouldSideBeRendered1(p_149646_1_, p_149646_2_, p_149646_3_, p_149646_4_, 1 - p_149646_5_);
|
||||
|
||||
@@ -23,7 +23,7 @@ public class BlockConjurationCatalyst extends BlockAlchemyCatalyst {
|
||||
public BlockConjurationCatalyst() {
|
||||
super(LibBlockNames.CONJURATION_CATALYST);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.conjurationCatalyst;
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import vazkii.botania.common.item.block.ItemBlockDreamwood;
|
||||
import vazkii.botania.common.item.block.ItemBlockPool;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BlockDreamwood extends BlockLivingwood {
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class BlockLivingwood extends BlockMod implements ILexiconable {
|
||||
public BlockLivingwood() {
|
||||
this(LibBlockNames.LIVING_WOOD);
|
||||
}
|
||||
|
||||
|
||||
public BlockLivingwood(String name) {
|
||||
super(Material.wood);
|
||||
setHardness(2.0F);
|
||||
@@ -52,7 +52,7 @@ public class BlockLivingwood extends BlockMod implements ILexiconable {
|
||||
protected boolean shouldRegisterInNameSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int damageDropped(int par1) {
|
||||
return par1;
|
||||
@@ -63,11 +63,11 @@ public class BlockLivingwood extends BlockMod implements ILexiconable {
|
||||
register(par1Str);
|
||||
return super.setBlockName(par1Str);
|
||||
}
|
||||
|
||||
|
||||
void register(String name) {
|
||||
GameRegistry.registerBlock(this, ItemBlockWithMetadataAndName.class, name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for(int i = 0; i < TYPES; i++)
|
||||
|
||||
@@ -37,7 +37,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
public class BlockPlatform extends BlockCamo implements ILexiconable {
|
||||
|
||||
IIcon[] icons;
|
||||
|
||||
|
||||
public BlockPlatform() {
|
||||
super(Material.wood);
|
||||
setHardness(2.0F);
|
||||
@@ -45,12 +45,12 @@ public class BlockPlatform extends BlockCamo implements ILexiconable {
|
||||
setStepSound(Block.soundTypeWood);
|
||||
setBlockName(LibBlockNames.PLATFORM);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean shouldRegisterInNameSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int damageDropped(int par1) {
|
||||
return par1;
|
||||
@@ -79,7 +79,7 @@ public class BlockPlatform extends BlockCamo implements ILexiconable {
|
||||
public IIcon getIcon(int par1, int par2) {
|
||||
return icons[Math.min(2 - 1, par2)];
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) {
|
||||
if(par1World.getBlockMetadata(par2, par3, par4) == 0 && par7Entity != null && par7Entity.posY > par3 + (par7Entity instanceof EntityPlayer ? 2 : 0) && (!(par7Entity instanceof EntityPlayer) || !par7Entity.isSneaking()))
|
||||
|
||||
@@ -70,7 +70,7 @@ public class BlockRuneAltar extends BlockModContainer implements IWandable, ILex
|
||||
if(par5EntityPlayer.isSneaking()) {
|
||||
TileRuneAltar altar = (TileRuneAltar) par1World.getTileEntity(par2, par3, par4);
|
||||
|
||||
if(altar.manaToGet == 0)
|
||||
if(altar.manaToGet == 0)
|
||||
for(int i = altar.getSizeInventory() - 1; i >= 0; i--) {
|
||||
ItemStack stackAt = altar.getStackInSlot(i);
|
||||
if(stackAt != null) {
|
||||
|
||||
@@ -195,7 +195,7 @@ public final class ModBlocks {
|
||||
dreamwood = new BlockDreamwood();
|
||||
conjurationCatalyst = new BlockConjurationCatalyst();
|
||||
bifrost = new BlockBifrost();
|
||||
|
||||
|
||||
livingwoodStairs = new BlockLivingwoodStairs();
|
||||
livingwoodSlab = new BlockLivingwoodSlab(false);
|
||||
livingwoodSlabFull = new BlockLivingwoodSlab(true);
|
||||
@@ -214,14 +214,14 @@ public final class ModBlocks {
|
||||
dreamwoodPlankStairs = new BlockDreamwoodPlankStairs();
|
||||
dreamwoodPlankSlab = new BlockDreamwoodPlankSlab(false);
|
||||
dreamwoodPlankSlabFull = new BlockDreamwoodPlankSlab(true);
|
||||
|
||||
|
||||
if(ConfigHandler.darkQuartzEnabled) {
|
||||
darkQuartz = new BlockSpecialQuartz(LibBlockNames.QUARTZ_DARK);
|
||||
darkQuartzSlab = new BlockSpecialQuartzSlab(darkQuartz, false);
|
||||
darkQuartzSlabFull = new BlockSpecialQuartzSlab(darkQuartz, true);
|
||||
darkQuartzStairs = new BlockSpecialQuartzStairs(darkQuartz);
|
||||
}
|
||||
|
||||
|
||||
manaQuartz = new BlockSpecialQuartz(LibBlockNames.QUARTZ_MANA);
|
||||
manaQuartzSlab = new BlockSpecialQuartzSlab(manaQuartz, false);
|
||||
manaQuartzSlabFull = new BlockSpecialQuartzSlab(manaQuartz, true);
|
||||
@@ -251,7 +251,7 @@ public final class ModBlocks {
|
||||
((BlockModSlab) lavenderQuartzSlabFull).register();
|
||||
((BlockModSlab) redQuartzSlab).register();
|
||||
((BlockModSlab) redQuartzSlabFull).register();
|
||||
|
||||
|
||||
((BlockModSlab) livingwoodSlab).register();
|
||||
((BlockModSlab) livingwoodSlabFull).register();
|
||||
((BlockModSlab) livingwoodPlankSlab).register();
|
||||
@@ -264,7 +264,7 @@ public final class ModBlocks {
|
||||
((BlockModSlab) dreamwoodSlabFull).register();
|
||||
((BlockModSlab) dreamwoodPlankSlab).register();
|
||||
((BlockModSlab) dreamwoodPlankSlabFull).register();
|
||||
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
OreDictionary.registerOre(LibOreDict.FLOWER[i], new ItemStack(flower, 1, i));
|
||||
|
||||
|
||||
@@ -26,9 +26,7 @@ import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.slabs.BlockModSlab;
|
||||
import vazkii.botania.common.item.block.ItemBlockModSlab;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -12,17 +12,7 @@
|
||||
package vazkii.botania.common.block.decor.quartz;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.decor.stairs.BlockModStairs;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BlockSpecialQuartzStairs extends BlockModStairs {
|
||||
|
||||
|
||||
@@ -1,22 +1,15 @@
|
||||
package vazkii.botania.common.block.decor.slabs;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class BlockLivingSlab extends BlockModSlab {
|
||||
|
||||
Block source;
|
||||
int meta;
|
||||
|
||||
|
||||
public BlockLivingSlab(boolean full, Block source, int meta) {
|
||||
super(full, source.getMaterial(), source.getUnlocalizedName().replaceAll("tile.", "") + meta + "Slab" + (full ? "Full" : ""));
|
||||
setStepSound(source.stepSound);
|
||||
|
||||
@@ -2,29 +2,27 @@ package vazkii.botania.common.block.decor.slabs;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.item.block.ItemBlockModSlab;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class BlockModSlab extends BlockSlab implements ILexiconable {
|
||||
|
||||
String name;
|
||||
|
||||
|
||||
public BlockModSlab(boolean full, Material mat, String name) {
|
||||
super(full, mat);
|
||||
this.name = name;
|
||||
@@ -34,7 +32,7 @@ public abstract class BlockModSlab extends BlockSlab implements ILexiconable {
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public abstract BlockSlab getFullBlock();
|
||||
|
||||
public abstract BlockSlab getSingleBlock();
|
||||
@@ -59,7 +57,7 @@ public abstract class BlockModSlab extends BlockSlab implements ILexiconable {
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
public void register() {
|
||||
GameRegistry.registerBlock(this, ItemBlockModSlab.class, name);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.block.decor.slabs.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.slabs.BlockLivingSlab;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.block.decor.slabs.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.slabs.BlockLivingSlab;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.block.decor.slabs.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.slabs.BlockLivingSlab;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.block.decor.slabs.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.slabs.BlockLivingSlab;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.block.decor.slabs.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.slabs.BlockLivingSlab;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.block.decor.slabs.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.slabs.BlockLivingSlab;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package vazkii.botania.common.block.decor.stairs;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -8,10 +7,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.decor.quartz.BlockSpecialQuartz;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BlockModStairs extends BlockStairs implements ILexiconable {
|
||||
|
||||
@@ -31,5 +30,5 @@ public class BlockModStairs extends BlockStairs implements ILexiconable {
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.decorativeBlocks;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class SubTileAgricarnation extends SubTileFunctional {
|
||||
|
||||
boolean isPlant(int x, int y, int z) {
|
||||
Block block = supertile.getWorldObj().getBlock(x, y, z);
|
||||
if(block == Blocks.grass || block == Blocks.leaves || block == Blocks.leaves2 || (block instanceof BlockBush && !(block instanceof BlockCrops) && !(block instanceof BlockSapling)))
|
||||
if(block == Blocks.grass || block == Blocks.leaves || block == Blocks.leaves2 || block instanceof BlockBush && !(block instanceof BlockCrops) && !(block instanceof BlockSapling))
|
||||
return false;
|
||||
|
||||
Material mat = block.getMaterial();
|
||||
|
||||
@@ -31,20 +31,20 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
|
||||
int windTicks = 0;
|
||||
int orientation = 0;
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(orientation + 2);
|
||||
if(supertile.getWorldObj().rand.nextInt(4) == 0)
|
||||
Botania.proxy.wispFX(supertile.getWorldObj(), supertile.xCoord + Math.random(), supertile.yCoord + Math.random(), supertile.zCoord + Math.random(), 0.05F, 0.05F, 0.05F, 0.25F + (float) Math.random() * 0.15F, dir.offsetX * 0.1F, dir.offsetY * 0.1F, dir.offsetZ * 0.1F);
|
||||
|
||||
|
||||
if(windTicks == 0 && mana > 0) {
|
||||
windTicks = 20;
|
||||
mana--;
|
||||
}
|
||||
|
||||
|
||||
if(windTicks > 0 && redstoneSignal == 0) {
|
||||
int x = supertile.xCoord;
|
||||
int y = supertile.yCoord;
|
||||
@@ -52,35 +52,35 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
int w = 2;
|
||||
int h = 3;
|
||||
int l = 16;
|
||||
|
||||
|
||||
AxisAlignedBB axis = null;
|
||||
switch(orientation) {
|
||||
case 0 :
|
||||
axis = AxisAlignedBB.getBoundingBox(x - w, y - h, z - l, x + w + 1, y + h, z);
|
||||
break;
|
||||
case 1 :
|
||||
axis = AxisAlignedBB.getBoundingBox(x - w, y - h, z + 1, x + w + 1, y + h, z + l + 1);
|
||||
break;
|
||||
case 2 :
|
||||
axis = AxisAlignedBB.getBoundingBox(x - l, y - h, z - w, x, y + h, z + w + 1);
|
||||
break;
|
||||
case 3 :
|
||||
axis = AxisAlignedBB.getBoundingBox(x + 1, y - h, z - w, x + l + 1, y + h, z + w + 1);
|
||||
case 0 :
|
||||
axis = AxisAlignedBB.getBoundingBox(x - w, y - h, z - l, x + w + 1, y + h, z);
|
||||
break;
|
||||
case 1 :
|
||||
axis = AxisAlignedBB.getBoundingBox(x - w, y - h, z + 1, x + w + 1, y + h, z + l + 1);
|
||||
break;
|
||||
case 2 :
|
||||
axis = AxisAlignedBB.getBoundingBox(x - l, y - h, z - w, x, y + h, z + w + 1);
|
||||
break;
|
||||
case 3 :
|
||||
axis = AxisAlignedBB.getBoundingBox(x + 1, y - h, z - w, x + l + 1, y + h, z + w + 1);
|
||||
}
|
||||
|
||||
|
||||
if(axis != null) {
|
||||
List<EntityItem> items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, axis);
|
||||
for(EntityItem item : items) {
|
||||
item.motionX += (double) dir.offsetX * 0.05;
|
||||
item.motionY += (double) dir.offsetY * 0.05;
|
||||
item.motionZ += (double) dir.offsetZ * 0.05;
|
||||
item.motionX += dir.offsetX * 0.05;
|
||||
item.motionY += dir.offsetY * 0.05;
|
||||
item.motionZ += dir.offsetZ * 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
windTicks--;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onWanded(EntityPlayer player, ItemStack wand) {
|
||||
if(player == null)
|
||||
@@ -94,36 +94,36 @@ public class SubTileDaffomill extends SubTileFunctional {
|
||||
}
|
||||
else return super.onWanded(player, wand);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getColor() {
|
||||
return 0xD8BA00;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxMana() {
|
||||
return 100;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.daffomill;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToPacketNBT(NBTTagCompound cmp) {
|
||||
super.writeToPacketNBT(cmp);
|
||||
|
||||
|
||||
cmp.setInteger(TAG_ORIENTATION, orientation);
|
||||
cmp.setInteger(TAG_WIND_TICKS, windTicks);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromPacketNBT(NBTTagCompound cmp) {
|
||||
super.readFromPacketNBT(cmp);
|
||||
|
||||
|
||||
orientation = cmp.getInteger(TAG_ORIENTATION);
|
||||
windTicks = cmp.getInteger(TAG_WIND_TICKS);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -122,7 +122,7 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
if(filterEntry == null)
|
||||
continue;
|
||||
anyFilter = true;
|
||||
|
||||
|
||||
if(stack.isItemEqual(filterEntry) && ItemStack.areItemStackTagsEqual(filterEntry, stack))
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -58,9 +58,9 @@ public class TileAlfPortal extends TileMod {
|
||||
private static final String TAG_TICKS_SINCE_LAST_ITEM = "ticksSinceLastItem";
|
||||
private static final String TAG_STACK_COUNT = "stackCount";
|
||||
private static final String TAG_STACK = "portalStack";
|
||||
|
||||
|
||||
List<ItemStack> stacksIn = new ArrayList();
|
||||
|
||||
|
||||
public int ticksOpen = 0;
|
||||
int ticksSinceLastItem = 0;
|
||||
private boolean closeNow = false;
|
||||
@@ -95,7 +95,7 @@ public class TileAlfPortal extends TileMod {
|
||||
}
|
||||
|
||||
ticksOpen++;
|
||||
|
||||
|
||||
if(ticksOpen > 60) {
|
||||
ticksSinceLastItem++;
|
||||
blockParticle(meta);
|
||||
@@ -114,7 +114,7 @@ public class TileAlfPortal extends TileMod {
|
||||
ticksSinceLastItem = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(ticksSinceLastItem >= 20) {
|
||||
if(!worldObj.isRemote)
|
||||
resolveRecipes();
|
||||
@@ -164,7 +164,7 @@ public class TileAlfPortal extends TileMod {
|
||||
AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(xCoord - 1, yCoord + 1, zCoord, xCoord + 2, yCoord + 4, zCoord + 1);
|
||||
if(getBlockMetadata() == 2)
|
||||
aabb = AxisAlignedBB.getBoundingBox(xCoord, yCoord + 1, zCoord - 1, xCoord + 1, yCoord + 4, zCoord + 2);
|
||||
|
||||
|
||||
return aabb;
|
||||
}
|
||||
|
||||
@@ -202,11 +202,11 @@ public class TileAlfPortal extends TileMod {
|
||||
worldObj.spawnEntityInWorld(item);
|
||||
ticksSinceLastItem = 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound cmp) {
|
||||
super.writeToNBT(cmp);
|
||||
|
||||
|
||||
cmp.setInteger(TAG_STACK_COUNT, stacksIn.size());
|
||||
int i = 0;
|
||||
for(ItemStack stack : stacksIn) {
|
||||
@@ -216,11 +216,11 @@ public class TileAlfPortal extends TileMod {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound cmp) {
|
||||
super.readFromNBT(cmp);
|
||||
|
||||
|
||||
int count = cmp.getInteger(TAG_STACK_COUNT);
|
||||
stacksIn.clear();
|
||||
for(int i = 0; i < count; i++) {
|
||||
@@ -229,7 +229,7 @@ public class TileAlfPortal extends TileMod {
|
||||
stacksIn.add(stack);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_TICKS_OPEN, ticksOpen);
|
||||
|
||||
@@ -11,16 +11,15 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.tile;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.Botania;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import vazkii.botania.common.Botania;
|
||||
|
||||
public class TileBifrost extends TileMod {
|
||||
|
||||
private static final String TAG_TICKS = "ticks";
|
||||
|
||||
|
||||
public int ticks = 0;
|
||||
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(!worldObj.isRemote) {
|
||||
@@ -29,20 +28,20 @@ public class TileBifrost extends TileMod {
|
||||
for(int i = 0; i < 4; i++)
|
||||
Botania.proxy.sparkleFX(worldObj, xCoord + Math.random(), yCoord + Math.random(), zCoord + Math.random(), (float) Math.random(), (float) Math.random(), (float) Math.random(), 0.45F + 0.2F * (float) Math.random(), 6);
|
||||
} else ticks--;
|
||||
} else if(Math.random() < 0.1)
|
||||
} else if(Math.random() < 0.1)
|
||||
Botania.proxy.sparkleFX(worldObj, xCoord + Math.random(), yCoord + Math.random(), zCoord + Math.random(), (float) Math.random(), (float) Math.random(), (float) Math.random(), 0.45F + 0.2F * (float) Math.random(), 6);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.writeToNBT(par1nbtTagCompound);
|
||||
par1nbtTagCompound.setInteger(TAG_TICKS, ticks);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound par1nbtTagCompound) {
|
||||
super.readFromNBT(par1nbtTagCompound);
|
||||
ticks = par1nbtTagCompound.getInteger(TAG_TICKS);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class TilePool extends TileMod implements IManaPool {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(stack == null)
|
||||
return false;
|
||||
|
||||
|
||||
if(stack.getItem() == ModItems.dye && !worldObj.isRemote) {
|
||||
int meta = stack.getItemDamage();
|
||||
if(meta != color) {
|
||||
|
||||
@@ -62,7 +62,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
private static final String TAG_ROTATION_TICKS = "rotationTicks";
|
||||
private static final String TAG_TICK_ROTATION_X = "tickRotationX";
|
||||
private static final String TAG_TICK_ROTATION_Y = "tickRotationY";
|
||||
|
||||
|
||||
private static final String TAG_FORCE_CLIENT_BINDING_X = "forceClientBindingX";
|
||||
private static final String TAG_FORCE_CLIENT_BINDING_Y = "forceClientBindingY";
|
||||
private static final String TAG_FORCE_CLIENT_BINDING_Z = "forceClientBindingZ";
|
||||
@@ -85,7 +85,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
public boolean canShootBurst = true;
|
||||
public int lastBurstDeathTick = -1;
|
||||
public int burstParticleTick = 0;
|
||||
|
||||
|
||||
public int rotationTicks = 0;
|
||||
public float tickRotationX, tickRotationY;
|
||||
|
||||
@@ -119,14 +119,14 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
ManaNetworkEvent.addCollector(this);
|
||||
added = true;
|
||||
}
|
||||
|
||||
|
||||
if(rotationTicks > 0) {
|
||||
rotationX += tickRotationX;
|
||||
rotationY += tickRotationY;
|
||||
|
||||
if(rotationTicks == 1)
|
||||
checkForReceiver();
|
||||
|
||||
|
||||
rotationTicks--;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
cmp.setInteger(TAG_ROTATION_TICKS, rotationTicks);
|
||||
cmp.setFloat(TAG_TICK_ROTATION_X, tickRotationX);
|
||||
cmp.setFloat(TAG_TICK_ROTATION_Y, tickRotationY);
|
||||
|
||||
|
||||
requestsClientUpdate = false;
|
||||
}
|
||||
|
||||
@@ -304,7 +304,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
public boolean isRedstone() {
|
||||
return worldObj == null ? staticRedstone : getBlockMetadata() == 1;
|
||||
}
|
||||
|
||||
|
||||
public boolean isDreamwood() {
|
||||
return worldObj == null ? staticDreamwood : getBlockMetadata() == 2;
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.signalFlare);
|
||||
|
||||
addBlock(ModBlocks.dreamwood);
|
||||
|
||||
|
||||
addBlock(ModBlocks.livingwoodStairs);
|
||||
addBlock(ModBlocks.livingwoodSlab);
|
||||
addBlock(ModBlocks.livingwoodPlankStairs);
|
||||
@@ -99,7 +99,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModBlocks.dreamwoodSlab);
|
||||
addBlock(ModBlocks.dreamwoodPlankStairs);
|
||||
addBlock(ModBlocks.dreamwoodPlankSlab);
|
||||
|
||||
|
||||
addItem(ModItems.quartz);
|
||||
if(ConfigHandler.darkQuartzEnabled) {
|
||||
addBlock(ModBlocks.darkQuartz);
|
||||
@@ -145,7 +145,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addItem(ModItems.elementiumChest);
|
||||
addItem(ModItems.elementiumLegs);
|
||||
addItem(ModItems.elementiumBoots);
|
||||
|
||||
|
||||
addItem(ModItems.tinyPlanet);
|
||||
addBlock(ModBlocks.tinyPlanet);
|
||||
addItem(ModItems.manaRing);
|
||||
|
||||
@@ -91,7 +91,7 @@ public final class ConfigHandler {
|
||||
|
||||
desc = "Set to false to disable the Smokey Quartz blocks. This config option is here for those using Thaumic Tinkerer";
|
||||
darkQuartzEnabled = loadPropBool("darkQuartz.enabled", desc, darkQuartzEnabled);
|
||||
|
||||
|
||||
desc = "The quanity of flower patches to generate in the world, defaults to 3, the lower the number the less patches geenrate.";
|
||||
flowerQuantity = loadPropInt("worldgen.flower.quantity", desc, 3);
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ public class InternalMethodHandler implements IInternalMethodHandler {
|
||||
public LexiconPage elvenTradesPage(String key, RecipeElvenTrade recipe) {
|
||||
return new PageElvenRecipe(key, recipe);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getSubTileAsStack(String subTile) {
|
||||
return ItemBlockSpecialFlower.ofType(subTile);
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
for(TileSignature sig : tiles) {
|
||||
if(sig.remoteWorld != remoteCheck)
|
||||
continue;
|
||||
|
||||
|
||||
TileEntity tile = sig.tile;
|
||||
float distance = MathHelper.pointDistanceSpace(tile.xCoord, tile.yCoord, tile.zCoord, pos.posX, pos.posY, pos.posZ);
|
||||
if(distance > limit)
|
||||
@@ -127,6 +127,6 @@ public final class ManaNetworkHandler implements IManaNetwork {
|
||||
|
||||
return map.get(world);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -1,14 +1,14 @@
|
||||
package vazkii.botania.common.core.handler;
|
||||
|
||||
import vazkii.botania.common.entity.EntityPixie;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
import vazkii.botania.common.entity.EntityPixie;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class PixieHandler {
|
||||
@@ -18,45 +18,45 @@ public class PixieHandler {
|
||||
if(!event.entityLiving.worldObj.isRemote && event.entityLiving instanceof EntityPlayer && event.source.getEntity() != null && event.source.getEntity() instanceof EntityLivingBase) {
|
||||
EntityPlayer player = (EntityPlayer) event.entityLiving;
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
|
||||
|
||||
float chance = getChance(stack);
|
||||
for(int i = 0; i < player.inventory.armorInventory.length; i++)
|
||||
chance += getChance(player.inventory.armorInventory[i]);
|
||||
|
||||
for (ItemStack element : player.inventory.armorInventory)
|
||||
chance += getChance(element);
|
||||
|
||||
InventoryBaubles baubles = PlayerHandler.getPlayerBaubles(player);
|
||||
for(int i = 0; i < baubles.getSizeInventory(); i++)
|
||||
chance += getChance(baubles.getStackInSlot(i));
|
||||
|
||||
|
||||
System.out.println(chance);
|
||||
if(Math.random() < chance) {
|
||||
EntityPixie pixie = new EntityPixie(player.worldObj);
|
||||
pixie.setPosition(player.posX, player.posY + 2, player.posZ);
|
||||
|
||||
|
||||
float dmg = 4;
|
||||
if(stack != null && stack.getItem() == ModItems.elementiumSword)
|
||||
dmg += 2;
|
||||
|
||||
|
||||
pixie.setProps((EntityLivingBase) event.source.getEntity(), player, dmg);
|
||||
player.worldObj.spawnEntityInWorld(pixie);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
float getChance(ItemStack stack) {
|
||||
if(stack == null)
|
||||
return 0F;
|
||||
|
||||
|
||||
Item item = stack.getItem();
|
||||
if(item instanceof IPixieSpawner)
|
||||
return ((IPixieSpawner) item).getPixieChance(stack);
|
||||
|
||||
|
||||
return 0F;
|
||||
}
|
||||
|
||||
|
||||
public static interface IPixieSpawner {
|
||||
|
||||
|
||||
public float getPixieChance(ItemStack stack);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -11,13 +11,11 @@
|
||||
*/
|
||||
package vazkii.botania.common.core.helper;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import vazkii.botania.common.block.tile.TileSimpleInventory;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -125,7 +123,7 @@ public class InventoryHelper {
|
||||
|
||||
int itemSizeCounter = item.stackSize;
|
||||
int[] availableSlots = new int[0];
|
||||
|
||||
|
||||
if(inventory instanceof ISidedInventory)
|
||||
availableSlots = ((ISidedInventory) inventory).getAccessibleSlotsFromSide(side.ordinal());
|
||||
else {
|
||||
@@ -133,11 +131,11 @@ public class InventoryHelper {
|
||||
for(int i = 0; i < slotCount; i++)
|
||||
availableSlots[i] = i;
|
||||
}
|
||||
|
||||
|
||||
for(int i : availableSlots) {
|
||||
if(itemSizeCounter <= 0)
|
||||
break;
|
||||
|
||||
|
||||
if (!inventory.isItemValidForSlot(i, item))
|
||||
continue;
|
||||
|
||||
@@ -153,7 +151,7 @@ public class InventoryHelper {
|
||||
itemSizeCounter -= Math.min(itemSizeCounter, space);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(itemSizeCounter != item.stackSize) {
|
||||
itemSizeCounter = Math.max(itemSizeCounter, 0);
|
||||
return item.stackSize - itemSizeCounter;
|
||||
|
||||
@@ -30,10 +30,10 @@ public final class MathHelper {
|
||||
entity.motionY = finalVector.y * modifier;
|
||||
entity.motionZ = finalVector.z * modifier;
|
||||
}
|
||||
|
||||
|
||||
private static final String[] ORDINAL_SUFFIXES = new String[]{ "th", "st", "nd", "rd", "th", "th", "th", "th", "th", "th" };
|
||||
public static String numberToOrdinal(int i) {
|
||||
return i % 100 == 11 || i % 100 == 12 || i % 100 == 13 ? i + "th" : i + ORDINAL_SUFFIXES[i % 10];
|
||||
return i % 100 == 11 || i % 100 == 12 || i % 100 == 13 ? i + "th" : i + ORDINAL_SUFFIXES[i % 10];
|
||||
}
|
||||
|
||||
}
|
||||
@@ -27,7 +27,7 @@ import cpw.mods.fml.common.gameevent.TickEvent.Phase;
|
||||
public final class VersionChecker {
|
||||
|
||||
private static final int FLAVOUR_MESSAGES = 36;
|
||||
|
||||
|
||||
public static boolean doneChecking = false;
|
||||
public static String onlineVersion = "";
|
||||
public static boolean triedToWarnPlayer = false;
|
||||
|
||||
@@ -733,24 +733,24 @@ public final class ModCrafingRecipes {
|
||||
recipeRedQuartz = addQuartzRecipes(4, Items.redstone, ModBlocks.redQuartz, ModBlocks.redQuartzStairs, ModBlocks.redQuartzSlab);
|
||||
|
||||
// Alfheim Portal Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.alfPortal),
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.alfPortal),
|
||||
"WWW", "WTW", "WWW",
|
||||
'W', LibOreDict.LIVING_WOOD,
|
||||
'T', LibOreDict.TERRA_STEEL);
|
||||
recipeAlfPortal = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Natura Pylon Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModBlocks.pylon, 1, 1), ModBlocks.pylon, LibOreDict.LIFE_ESSENCE, LibOreDict.LIFE_ESSENCE);
|
||||
recipeNaturaPylon = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Rod of the Seas Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.waterRod),
|
||||
addOreDictRecipe(new ItemStack(ModItems.waterRod),
|
||||
" B", " T ", "R ",
|
||||
'B', new ItemStack(Items.potionitem),
|
||||
'T', LibOreDict.LIVINGWOOD_TWIG,
|
||||
'R', LibOreDict.RUNE[0]);
|
||||
recipeWaterRod = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Elementium Armor & Tools Recipes
|
||||
addOreDictRecipe(new ItemStack(ModItems.elementiumHelm),
|
||||
"SSS", "S S",
|
||||
@@ -792,9 +792,9 @@ public final class ModCrafingRecipes {
|
||||
"S ", " S",
|
||||
'S', LibOreDict.ELEMENTIUM);
|
||||
recipeElementiumShears = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Extrapolated Bucket Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.openBucket),
|
||||
addOreDictRecipe(new ItemStack(ModItems.openBucket),
|
||||
"E E", " E ",
|
||||
'E', LibOreDict.ELEMENTIUM);
|
||||
recipeOpenBucket = BotaniaAPI.getLatestAddedRecipe();
|
||||
@@ -807,38 +807,38 @@ public final class ModCrafingRecipes {
|
||||
'B',LibOreDict.PIXIE_DUST,
|
||||
'P', new ItemStack(ModBlocks.alchemyCatalyst));
|
||||
recipeConjurationCatalyst = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Life Aggregator Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.spawnerMover),
|
||||
addOreDictRecipe(new ItemStack(ModItems.spawnerMover),
|
||||
"EIE", "IDI", "EIE",
|
||||
'E', LibOreDict.LIFE_ESSENCE,
|
||||
'I', LibOreDict.ELEMENTIUM,
|
||||
'D', LibOreDict.DRAGONSTONE);
|
||||
recipeSpawnerMover = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Great Fairy Ring Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.pixieRing),
|
||||
addOreDictRecipe(new ItemStack(ModItems.pixieRing),
|
||||
"DE ", "E E", " E ",
|
||||
'D', LibOreDict.PIXIE_DUST,
|
||||
'E', LibOreDict.ELEMENTIUM);
|
||||
recipePixieRing = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Globetrotter's Sash Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.superTravelBelt),
|
||||
addOreDictRecipe(new ItemStack(ModItems.superTravelBelt),
|
||||
"E ", " S ", "L E",
|
||||
'E', LibOreDict.ELEMENTIUM,
|
||||
'L', LibOreDict.LIFE_ESSENCE,
|
||||
'S', new ItemStack(ModItems.travelBelt));
|
||||
recipeSuperTravelBelt = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Rod of Bifrost Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.rainbowRod),
|
||||
addOreDictRecipe(new ItemStack(ModItems.rainbowRod),
|
||||
" PD", " EP", "E ",
|
||||
'P', LibOreDict.PIXIE_DUST,
|
||||
'E', LibOreDict.ELEMENTIUM,
|
||||
'D', LibOreDict.DRAGONSTONE);
|
||||
recipeRainbowRod = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Spectral Platform Recipe
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.platform, 1, 1),
|
||||
"343", "0 0",
|
||||
@@ -846,7 +846,7 @@ public final class ModCrafingRecipes {
|
||||
'3', new ItemStack(ModBlocks.dreamwood, 0, 3),
|
||||
'4', new ItemStack(ModBlocks.dreamwood, 0, 4));
|
||||
recipeSpectralPlatform = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Elven Mana Spreader Recipes
|
||||
for(int i = 0; i < 16; i++)
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.spreader, 1, 2),
|
||||
@@ -855,7 +855,7 @@ public final class ModCrafingRecipes {
|
||||
'P', LibOreDict.MANA_PETAL[i],
|
||||
'E', LibOreDict.ELEMENTIUM);
|
||||
recipesDreamwoodSpreader = BotaniaAPI.getLatestAddedRecipes(16);
|
||||
|
||||
|
||||
// Mana and Terrasteel Block Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
@@ -878,7 +878,7 @@ public final class ModCrafingRecipes {
|
||||
addStairsAndSlabs(ModBlocks.dreamwood, 0, ModBlocks.dreamwoodStairs, ModBlocks.dreamwoodSlab);
|
||||
addStairsAndSlabs(ModBlocks.dreamwood, 1, ModBlocks.dreamwoodPlankStairs, ModBlocks.dreamwoodPlankSlab);
|
||||
}
|
||||
|
||||
|
||||
private static void addStairsAndSlabs(Block block, int meta, Block stairs, Block slab) {
|
||||
GameRegistry.addRecipe(new ItemStack(slab, 6),
|
||||
"QQQ",
|
||||
|
||||
@@ -38,5 +38,5 @@ public class ModManaConjurationRecipes {
|
||||
soulSandRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.soul_sand, 2), new ItemStack(Blocks.soul_sand), 1500);
|
||||
gravelRecipe = BotaniaAPI.registerManaConjurationRecipe(new ItemStack(Blocks.gravel, 2), new ItemStack(Blocks.gravel), 720);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -95,7 +95,7 @@ public final class ModPetalRecipes {
|
||||
clayconiaRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_CLAYCONIA), gray, lightGray, lightGrayMana, lightGrayMana, grayMana, cyan, runeEarth);
|
||||
looniumRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_LOONIUM), green, green, greenMana, greenMana, gray, grayMana, runeSloth, runeGluttony, runeEnvy, redstoneRoot);
|
||||
daffomillRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAFFOMILL), white, whiteMana, brown, yellowMana, runeAir, redstoneRoot);
|
||||
|
||||
|
||||
ItemStack stack = new ItemStack(Items.skull, 1, 3);
|
||||
ItemNBTHelper.setString(stack, "SkullOwner", "Vazkii");
|
||||
Object[] inputs = new Object[16];
|
||||
|
||||
@@ -17,7 +17,7 @@ import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class EntityFlyingCreature extends EntityAmbientCreature {
|
||||
|
||||
|
||||
public EntityFlyingCreature(World par1World) {
|
||||
super(par1World);
|
||||
}
|
||||
|
||||
@@ -11,23 +11,19 @@
|
||||
*/
|
||||
package vazkii.botania.common.entity;
|
||||
|
||||
import vazkii.botania.common.Botania;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.Botania;
|
||||
|
||||
public class EntityPixie extends EntityFlyingCreature {
|
||||
|
||||
EntityPlayer player = null;
|
||||
float damage = 0;
|
||||
|
||||
|
||||
public EntityPixie(World world) {
|
||||
super(world);
|
||||
super(world);
|
||||
setSize(1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@@ -36,7 +32,7 @@ public class EntityPixie extends EntityFlyingCreature {
|
||||
this.player = player;
|
||||
this.damage = damage;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void updateEntityActionState() {
|
||||
EntityLivingBase target = getAttackTarget();
|
||||
@@ -59,7 +55,7 @@ public class EntityPixie extends EntityFlyingCreature {
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
renderYawOffset = rotationYaw = -((float)Math.atan2(motionX, motionZ)) * 180.0F / (float)Math.PI;
|
||||
}
|
||||
|
||||
@@ -77,7 +73,7 @@ public class EntityPixie extends EntityFlyingCreature {
|
||||
|
||||
public void die() {
|
||||
setDead();
|
||||
|
||||
|
||||
if(worldObj.isRemote)
|
||||
for(int i = 0; i < 12; i++)
|
||||
Botania.proxy.sparkleFX(worldObj, posX + (Math.random() - 0.5) * 0.25, posY + 0.5 + (Math.random() - 0.5) * 0.25, posZ + (Math.random() - 0.5) * 0.25, 1F, 0.25F, 0.9F, 1F + (float) Math.random() * 0.25F, 5);
|
||||
|
||||
@@ -62,5 +62,5 @@ public class ItemDirtRod extends ItemMod implements IManaUsingItem {
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -20,7 +20,6 @@ import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.entity.EntityPixie;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemFertilizer extends ItemMod {
|
||||
|
||||
@@ -14,13 +14,8 @@ package vazkii.botania.common.item;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
@@ -71,7 +66,7 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item));
|
||||
@@ -89,27 +84,27 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
String edition = EnumChatFormatting.GOLD + String.format(StatCollector.translateToLocal("botaniamisc.edition"), getEdition());
|
||||
if(!edition.isEmpty())
|
||||
par3List.add(edition);
|
||||
|
||||
|
||||
List<KnowledgeType> typesKnown = new ArrayList();
|
||||
for(String s : BotaniaAPI.knowledgeTypes.keySet()) {
|
||||
KnowledgeType type = BotaniaAPI.knowledgeTypes.get(s);
|
||||
if(isKnowledgeUnlocked(par1ItemStack, type))
|
||||
typesKnown.add(type);
|
||||
}
|
||||
|
||||
|
||||
String format = typesKnown.size() == 1 ? "botaniamisc.knowledgeTypesSingular" : "botaniamisc.knowledgeTypesPlural";
|
||||
addStringToTooltip(String.format(StatCollector.translateToLocal(format), typesKnown.size()), par3List);
|
||||
|
||||
|
||||
for(KnowledgeType type : typesKnown)
|
||||
addStringToTooltip(" \u2022 " + StatCollector.translateToLocal(type.getUnlocalizedName()), par3List);
|
||||
|
||||
|
||||
} else addStringToTooltip(StatCollector.translateToLocal("botaniamisc.shiftinfo"), par3List);
|
||||
}
|
||||
|
||||
private void addStringToTooltip(String s, List<String> tooltip) {
|
||||
tooltip.add(s.replaceAll("&", "\u00a7"));
|
||||
}
|
||||
|
||||
|
||||
public static String getEdition() {
|
||||
String version = LibMisc.BUILD;
|
||||
int build = version.contains("ANT") ? 0 : Integer.parseInt(version);
|
||||
@@ -140,11 +135,11 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
public void unlockKnowledge(ItemStack stack, KnowledgeType knowledge) {
|
||||
ItemNBTHelper.setBoolean(stack, TAG_KNOWLEDGE_PREFIX + knowledge.id, true);
|
||||
}
|
||||
|
||||
|
||||
public static void forceMessage(ItemStack stack, boolean forced) {
|
||||
ItemNBTHelper.setBoolean(stack, TAG_FORCED_MESSAGE, forced);
|
||||
}
|
||||
|
||||
|
||||
public static boolean isMessageForced(ItemStack stack) {
|
||||
return ItemNBTHelper.getBoolean(stack, TAG_FORCED_MESSAGE, false);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
@@ -11,18 +11,12 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import net.minecraft.block.material.Material;
|
||||
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.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.FillBucketEvent;
|
||||
import cpw.mods.fml.common.eventhandler.Event;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemOpenBucket extends ItemMod {
|
||||
|
||||
@@ -30,7 +24,7 @@ public class ItemOpenBucket extends ItemMod {
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(LibItemNames.OPEN_BUCKET);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
MovingObjectPosition movingobjectposition = getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true);
|
||||
|
||||
@@ -14,7 +14,6 @@ package vazkii.botania.common.item;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
@@ -35,24 +34,24 @@ public class ItemRainbowRod extends ItemMod implements IManaUsingItem {
|
||||
setUnlocalizedName(LibItemNames.RAINBOW_ROD);
|
||||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if(!par2World.isRemote && par1ItemStack.getItemDamage() == 0 && ManaItemHandler.requestManaExact(par1ItemStack, par3EntityPlayer, MANA_COST, false)) {
|
||||
Block place = ModBlocks.bifrost;
|
||||
Vector3 vector = new Vector3(par3EntityPlayer.getLookVec()).normalize();
|
||||
|
||||
|
||||
double x = par3EntityPlayer.posX;
|
||||
double y = par3EntityPlayer.posY;
|
||||
double z = par3EntityPlayer.posZ;
|
||||
|
||||
|
||||
double lx = 0;
|
||||
double ly = -1;
|
||||
double lz = 0;
|
||||
|
||||
|
||||
int count = 0;
|
||||
|
||||
while(count < 100 && (((int) lx == (int) x && (int) ly == (int) y && (int) lz == (int) z) || par2World.getBlock((int) x, (int) y, (int) z).isAir(par2World, (int) x, (int) y, (int) z)) || par2World.getBlock((int) x, (int) y, (int) z) == place) {
|
||||
|
||||
while(count < 100 && ((int) lx == (int) x && (int) ly == (int) y && (int) lz == (int) z || par2World.getBlock((int) x, (int) y, (int) z).isAir(par2World, (int) x, (int) y, (int) z)) || par2World.getBlock((int) x, (int) y, (int) z) == place) {
|
||||
for(int i = -2; i < 1; i++)
|
||||
for(int j = -2; j < 1; j++)
|
||||
if(par2World.getBlock((int) x + i, (int) y, (int) z + j).isAir(par2World, (int) x + i, (int) y, (int) z + j) || par2World.getBlock((int) x + i, (int) y, (int) z + j) == place) {
|
||||
@@ -62,33 +61,33 @@ public class ItemRainbowRod extends ItemMod implements IManaUsingItem {
|
||||
Botania.proxy.sparkleFX(par2World, tile.xCoord + Math.random(), tile.yCoord + Math.random(), tile.zCoord + Math.random(), (float) Math.random(), (float) Math.random(), (float) Math.random(), 0.45F + 0.2F * (float) Math.random(), 6);
|
||||
tile.ticks = TIME;
|
||||
}
|
||||
|
||||
|
||||
lx = x;
|
||||
ly = y;
|
||||
lz = z;
|
||||
|
||||
|
||||
x += vector.x;
|
||||
y += vector.y;
|
||||
z += vector.z;
|
||||
count++;
|
||||
}
|
||||
|
||||
|
||||
if(count > 0) {
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.levelup", 0.5F, 0.25F);
|
||||
ManaItemHandler.requestManaExact(par1ItemStack, par3EntityPlayer, MANA_COST, false);
|
||||
par1ItemStack.setItemDamage(TIME);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
|
||||
if(par1ItemStack.isItemDamaged())
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
@@ -98,5 +97,5 @@ public class ItemRainbowRod extends ItemMod implements IManaUsingItem {
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -24,7 +24,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
@@ -33,25 +32,25 @@ public class ItemSpawnerMover extends ItemMod {
|
||||
|
||||
public static final String TAG_SPAWNER = "spawner";
|
||||
private static final String TAG_PLACE_DELAY = "placeDelay";
|
||||
|
||||
|
||||
IIcon iconNormal, iconSpawner;
|
||||
|
||||
|
||||
public ItemSpawnerMover() {
|
||||
setUnlocalizedName(LibItemNames.SPAWNER_MOVER);
|
||||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
iconNormal = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
iconSpawner = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return getIconIndex(stack);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
return hasData(par1ItemStack) ? iconSpawner : iconNormal;
|
||||
@@ -65,7 +64,7 @@ public class ItemSpawnerMover extends ItemMod {
|
||||
if(tag.hasKey("EntityId"))
|
||||
return tag;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -73,7 +72,7 @@ public class ItemSpawnerMover extends ItemMod {
|
||||
NBTTagCompound tag = getSpawnerTag(stack);
|
||||
if(tag != null)
|
||||
return tag.getString("EntityId");
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -172,7 +171,7 @@ public class ItemSpawnerMover extends ItemMod {
|
||||
player.renderBrokenItemStack(itemstack);
|
||||
for(int i = 0; i < 60; i++)
|
||||
Botania.proxy.sparkleFX(world, x + Math.random(), y + Math.random(), z + Math.random(), (float) Math.random(), (float) Math.random(), (float) Math.random(), 0.45F + 0.2F * (float) Math.random(), 6);
|
||||
|
||||
|
||||
--itemstack.stackSize;
|
||||
}
|
||||
|
||||
@@ -199,7 +198,7 @@ public class ItemSpawnerMover extends ItemMod {
|
||||
te.readFromNBT(tag);
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,9 @@ public class ItemTerraformRod extends ItemMod implements IManaUsingItem {
|
||||
|
||||
private static final int COST_PER = 55;
|
||||
|
||||
static final List<Block> validBlocks = new ArrayList() {{
|
||||
static final List<Block> validBlocks = new ArrayList() {private static final long serialVersionUID = 1378413169035169782L;
|
||||
|
||||
{
|
||||
add(Blocks.stone);
|
||||
add(Blocks.dirt);
|
||||
add(Blocks.grass);
|
||||
|
||||
@@ -14,8 +14,6 @@ package vazkii.botania.common.item;
|
||||
import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import org.lwjgl.Sys;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -90,11 +88,11 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
|
||||
rotation = (float) (diffVec.angle(rotVec) * 180F / Math.PI);
|
||||
if(par5 < boundSpreader.posY)
|
||||
rotation = -rotation;
|
||||
|
||||
|
||||
float rotationYTick = rotation / ticks;
|
||||
spreader.tickRotationY = rotationYTick;
|
||||
}
|
||||
|
||||
|
||||
par3World.markBlockForUpdate(boundSpreader.posX, boundSpreader.posY, boundSpreader.posZ);
|
||||
return true;
|
||||
} else setBoundSpreader(par1ItemStack, 0, -1, 0);
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemWaterRod extends ItemMod implements IManaUsingItem {
|
||||
|
||||
@@ -194,7 +194,7 @@ public final class ModItems {
|
||||
pixieRing = new ItemPixieRing();
|
||||
superTravelBelt = new ItemSuperTravelBelt();
|
||||
rainbowRod = new ItemRainbowRod();
|
||||
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal, 1, i));
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ public abstract class ItemElementiumArmor extends ItemManasteelArmor implements
|
||||
public ItemElementiumArmor(int type, String name) {
|
||||
super(type, name, BotaniaAPI.elementiumArmorMaterial);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type) {
|
||||
return slot == 2 ? LibResources.MODEL_ELEMENTIUM_1 : LibResources.MODEL_ELEMENTIUM_0;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ public class ItemElementiumChest extends ItemElementiumArmor {
|
||||
public ItemElementiumChest() {
|
||||
super(1, LibItemNames.ELEMENTIUM_CHEST);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getPixieChance(ItemStack stack) {
|
||||
return 8F / (25F / 24F) * 1.5F;
|
||||
|
||||
+1
-1
@@ -13,5 +13,5 @@ public class ItemElementiumHelm extends ItemElementiumArmor {
|
||||
public float getPixieChance(ItemStack stack) {
|
||||
return 5F / (25F / 24F) * 1.5F;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+1
-1
@@ -8,7 +8,7 @@ public class ItemElementiumLegs extends ItemElementiumArmor {
|
||||
public ItemElementiumLegs() {
|
||||
super(2, LibItemNames.ELEMENTIUM_LEGS);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getPixieChance(ItemStack stack) {
|
||||
return 7F / (25F / 24F) * 1.5F;
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import baubles.api.BaubleType;
|
||||
import vazkii.botania.common.core.handler.PixieHandler.IPixieSpawner;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import baubles.api.BaubleType;
|
||||
|
||||
public class ItemPixieRing extends ItemBauble implements IPixieSpawner {
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
public class ItemTravelBelt extends ItemBauble {
|
||||
|
||||
final float speed;
|
||||
|
||||
|
||||
public ItemTravelBelt() {
|
||||
this(LibItemNames.TRAVEL_BELT, 0.035F);
|
||||
}
|
||||
|
||||
|
||||
public ItemTravelBelt(String name, float speed) {
|
||||
super(name);
|
||||
this.speed = speed;
|
||||
@@ -43,7 +43,7 @@ public class ItemTravelBelt extends ItemBauble {
|
||||
@Override
|
||||
public void onWornTick(ItemStack stack, EntityLivingBase entity) {
|
||||
super.onWornTick(stack, entity);
|
||||
|
||||
|
||||
if(entity instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
if((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)
|
||||
|
||||
@@ -2,7 +2,6 @@ package vazkii.botania.common.item.equipment.tool.elementium;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -26,10 +25,10 @@ public class ItemElementiumAxe extends ItemManasteelAxe {
|
||||
super(BotaniaAPI.elementiumToolMaterial, LibItemNames.ELEMENTIUM_AXE);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
|
||||
// Thanks to SpitefulFox for the drop rates
|
||||
// https://github.com/SpitefulFox/ForbiddenMagic/blob/master/src/com/spiteful/forbidden/FMEventHandler.java
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityDrops(LivingDropsEvent event) {
|
||||
if(event.recentlyHit && event.source.getEntity() != null && event.source.getEntity() instanceof EntityPlayer) {
|
||||
@@ -37,14 +36,14 @@ public class ItemElementiumAxe extends ItemManasteelAxe {
|
||||
if(weapon != null && weapon.getItem() == this) {
|
||||
Random rand = event.entity.worldObj.rand;
|
||||
int looting = EnchantmentHelper.getEnchantmentLevel(Enchantment.fortune.effectId, weapon);
|
||||
|
||||
if(event.entityLiving instanceof EntitySkeleton && rand.nextInt(26) <= (3 + looting))
|
||||
|
||||
if(event.entityLiving instanceof EntitySkeleton && rand.nextInt(26) <= 3 + looting)
|
||||
addDrop(event, new ItemStack(Items.skull, 1, ((EntitySkeleton)event.entityLiving).getSkeletonType()));
|
||||
else if(event.entityLiving instanceof EntityZombie && rand.nextInt(26) <= (2 + 2 * looting))
|
||||
else if(event.entityLiving instanceof EntityZombie && rand.nextInt(26) <= 2 + 2 * looting)
|
||||
addDrop(event, new ItemStack(Items.skull, 1, 2));
|
||||
else if(event.entityLiving instanceof EntityCreeper && rand.nextInt(26) <= (2 + 2 * looting))
|
||||
else if(event.entityLiving instanceof EntityCreeper && rand.nextInt(26) <= 2 + 2 * looting)
|
||||
addDrop(event, new ItemStack(Items.skull, 1, 4));
|
||||
else if(event.entityLiving instanceof EntityPlayer && rand.nextInt(11) <= (1 + looting)) {
|
||||
else if(event.entityLiving instanceof EntityPlayer && rand.nextInt(11) <= 1 + looting) {
|
||||
ItemStack head = new ItemStack(Items.skull, 1, 3);
|
||||
NBTTagCompound nametag = new NBTTagCompound();
|
||||
nametag.setString("SkullOwner", ((EntityPlayer)event.entityLiving).getCommandSenderName());
|
||||
@@ -54,11 +53,11 @@ public class ItemElementiumAxe extends ItemManasteelAxe {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void addDrop(LivingDropsEvent event, ItemStack drop) {
|
||||
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, drop);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
event.drops.add(entityitem);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -15,7 +15,9 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class ItemElementiumPick extends ItemManasteelPick {
|
||||
|
||||
static final List<Block> validBlocks = new ArrayList() {{
|
||||
static final List<Block> validBlocks = new ArrayList() {private static final long serialVersionUID = 2265395319423142758L;
|
||||
|
||||
{
|
||||
add(Blocks.dirt);
|
||||
add(Blocks.sand);
|
||||
add(Blocks.gravel);
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class ItemElementiumShears extends ItemManasteelShears {
|
||||
public int getMaxItemUseDuration(ItemStack par1ItemStack) {
|
||||
return 72000;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
|
||||
|
||||
+3
-3
@@ -17,7 +17,7 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
public class ItemElementiumShovel extends ItemManasteelShovel {
|
||||
|
||||
public static Material[] materialsShovel = new Material[]{ Material.grass, Material.ground, Material.sand, Material.snow, Material.craftedSnow, Material.clay };
|
||||
|
||||
|
||||
public ItemElementiumShovel() {
|
||||
super(BotaniaAPI.elementiumToolMaterial, LibItemNames.ELEMENTIUM_SHOVEL);
|
||||
}
|
||||
@@ -32,14 +32,14 @@ public class ItemElementiumShovel extends ItemManasteelShovel {
|
||||
if (block == null)
|
||||
return false;
|
||||
|
||||
ForgeDirection direction = ForgeDirection.getOrientation(block.sideHit);
|
||||
ForgeDirection.getOrientation(block.sideHit);
|
||||
int fortune = EnchantmentHelper.getFortuneModifier(player);
|
||||
boolean silk = EnchantmentHelper.getSilkTouchModifier(player);
|
||||
|
||||
Block blk = world.getBlock(x, y, z);
|
||||
if(blk instanceof BlockFalling)
|
||||
ToolCommons.removeBlocksInIteration(player, stack, world, x, y, z, 0, -12, 0, 1, 12, 1, blk, materialsShovel, silk, fortune);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -16,5 +16,5 @@ public class ItemElementiumSword extends ItemManasteelSword implements IPixieSpa
|
||||
public float getPixieChance(ItemStack stack) {
|
||||
return 0.5F;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -17,7 +17,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemAxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ItemManasteelShears extends ItemShears implements IManaUsingItem {
|
||||
public ItemManasteelShears() {
|
||||
this(LibItemNames.MANASTEEL_SHEARS);
|
||||
}
|
||||
|
||||
|
||||
public ItemManasteelShears(String name) {
|
||||
setCreativeTab(BotaniaCreativeTab.INSTANCE);
|
||||
setUnlocalizedName(name);
|
||||
|
||||
@@ -17,7 +17,6 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemSpade;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
|
||||
@@ -2,7 +2,6 @@ package vazkii.botania.common.lexicon;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
import vazkii.botania.common.Botania;
|
||||
|
||||
public class ALexiconEntry extends BLexiconEntry {
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry platform;
|
||||
public static LexiconEntry conjurationCatalyst;
|
||||
public static LexiconEntry spectralPlatform;
|
||||
|
||||
|
||||
public static LexiconEntry manaBlaster;
|
||||
public static LexiconEntry grassSeeds;
|
||||
public static LexiconEntry dirtRod;
|
||||
@@ -154,7 +154,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry flightTiara;
|
||||
public static LexiconEntry pixieRing;
|
||||
public static LexiconEntry superTravelBelt;
|
||||
|
||||
|
||||
public static LexiconEntry alfhomancyIntro;
|
||||
public static LexiconEntry elvenMessage;
|
||||
public static LexiconEntry elvenResources;
|
||||
@@ -269,7 +269,7 @@ public final class LexiconData {
|
||||
|
||||
dreamwoodSpreader = new ALexiconEntry(LibLexicon.MANA_DREAMWOOD_SPREADER, categoryMana);
|
||||
dreamwoodSpreader.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipesDreamwoodSpreader));
|
||||
|
||||
|
||||
// FUNCTIONAL FLOWERS ENTRIES
|
||||
functionalIntro = new BLexiconEntry(LibLexicon.FFLOWER_INTRO, categoryFunctionalFlowers);
|
||||
functionalIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageCraftingRecipe("4", ModCrafingRecipes.recipeRedstoneRoot));
|
||||
@@ -329,7 +329,7 @@ public final class LexiconData {
|
||||
|
||||
daffomill = new BLexiconEntry(LibLexicon.GFLOWER_DAFFOMILL, categoryFunctionalFlowers);
|
||||
daffomill.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.daffomillRecipe));
|
||||
|
||||
|
||||
// GENERATING FLOWERS ENTRIES
|
||||
generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers);
|
||||
generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"));
|
||||
@@ -397,12 +397,12 @@ public final class LexiconData {
|
||||
platform.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipePlatform));
|
||||
|
||||
conjurationCatalyst = new ALexiconEntry(LibLexicon.DEVICE_MANA_CONJURATION, categoryDevices);
|
||||
conjurationCatalyst.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeConjurationCatalyst), new PageManaInfusionRecipe("2", ModManaConjurationRecipes.redstoneRecipe), new PageManaInfusionRecipe("3", ModManaConjurationRecipes.glowstoneRecipe), new PageManaInfusionRecipe("4", ModManaConjurationRecipes.quartzRecipe),
|
||||
new PageManaInfusionRecipe("5", ModManaConjurationRecipes.coalRecipe), new PageManaInfusionRecipe("6", ModManaConjurationRecipes.snowballRecipe), new PageManaInfusionRecipe("7", ModManaConjurationRecipes.netherrackRecipe), new PageManaInfusionRecipe("8", ModManaConjurationRecipes.soulSandRecipe), new PageManaInfusionRecipe("9", ModManaConjurationRecipes.gravelRecipe));
|
||||
|
||||
conjurationCatalyst.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeConjurationCatalyst), new PageManaInfusionRecipe("2", ModManaConjurationRecipes.redstoneRecipe), new PageManaInfusionRecipe("3", ModManaConjurationRecipes.glowstoneRecipe), new PageManaInfusionRecipe("4", ModManaConjurationRecipes.quartzRecipe),
|
||||
new PageManaInfusionRecipe("5", ModManaConjurationRecipes.coalRecipe), new PageManaInfusionRecipe("6", ModManaConjurationRecipes.snowballRecipe), new PageManaInfusionRecipe("7", ModManaConjurationRecipes.netherrackRecipe), new PageManaInfusionRecipe("8", ModManaConjurationRecipes.soulSandRecipe), new PageManaInfusionRecipe("9", ModManaConjurationRecipes.gravelRecipe));
|
||||
|
||||
spectralPlatform = new ALexiconEntry(LibLexicon.DEVICE_SPECTRAL_PLATFORM, categoryDevices);
|
||||
spectralPlatform.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeSpectralPlatform));
|
||||
|
||||
|
||||
// TOOLS ENTRIES
|
||||
manaBlaster = new BLexiconEntry(LibLexicon.TOOL_MANA_BLASTER, categoryTools);
|
||||
manaBlaster.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCrafingRecipes.recipeManaBlaster));
|
||||
@@ -438,21 +438,21 @@ public final class LexiconData {
|
||||
|
||||
waterRod = new BLexiconEntry(LibLexicon.TOOL_WATER_ROD, categoryTools);
|
||||
waterRod.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeWaterRod));
|
||||
|
||||
|
||||
elfGear = new ALexiconEntry(LibLexicon.TOOL_ELF_GEAR, categoryTools);
|
||||
elfGear.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCrafingRecipes.recipeElementiumPick), new PageText("4"), new PageCraftingRecipe("5", ModCrafingRecipes.recipeElementiumShovel),
|
||||
new PageText("6"), new PageCraftingRecipe("7", ModCrafingRecipes.recipeElementiumAxe), new PageText("8"), new PageCraftingRecipe("9", ModCrafingRecipes.recipeElementiumShears), new PageText("10"), new PageCraftingRecipe("11", ModCrafingRecipes.recipeElementiumSword),
|
||||
new PageCraftingRecipe("12", ModCrafingRecipes.recipeElementiumHelm), new PageCraftingRecipe("13", ModCrafingRecipes.recipeElementiumChest), new PageCraftingRecipe("14", ModCrafingRecipes.recipeElementiumLegs), new PageCraftingRecipe("15", ModCrafingRecipes.recipeElementiumBoots));
|
||||
|
||||
|
||||
openBucket = new ALexiconEntry(LibLexicon.TOOL_OPEN_BUCKET, categoryTools);
|
||||
openBucket.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeOpenBucket));
|
||||
|
||||
|
||||
spawnerMover = new ALexiconEntry(LibLexicon.TOOL_SPAWNER_MOVER, categoryTools);
|
||||
spawnerMover.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeSpawnerMover));
|
||||
|
||||
|
||||
rainbowRod = new ALexiconEntry(LibLexicon.TOOL_RAINBOW_ROD, categoryTools);
|
||||
rainbowRod.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeRainbowRod));
|
||||
|
||||
|
||||
// BAUBLES ENTRIES
|
||||
baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles);
|
||||
baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2"));
|
||||
@@ -498,22 +498,22 @@ public final class LexiconData {
|
||||
|
||||
pixieRing = new ALexiconEntry(LibLexicon.BAUBLE_PIXIE_RING, categoryBaubles);
|
||||
pixieRing.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipePixieRing));
|
||||
|
||||
|
||||
superTravelBelt = new ALexiconEntry(LibLexicon.BAUBLE_SUPER_TRAVEL_BELT, categoryBaubles);
|
||||
superTravelBelt.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeSuperTravelBelt));
|
||||
|
||||
|
||||
// ALFHOMANCY ENTRIES
|
||||
alfhomancyIntro = new BLexiconEntry(LibLexicon.ALF_INTRO, categoryAlfhomancy);
|
||||
alfhomancyIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeAlfPortal), new PageCraftingRecipe("3", ModCrafingRecipes.recipeNaturaPylon),
|
||||
new PageImage("4", LibResources.ENTRY_PORTAL0), new PageImage("5", LibResources.ENTRY_PORTAL1), new PageImage("6", LibResources.ENTRY_PORTAL2), new PageImage("7", LibResources.ENTRY_PORTAL3),
|
||||
new PageImage("4", LibResources.ENTRY_PORTAL0), new PageImage("5", LibResources.ENTRY_PORTAL1), new PageImage("6", LibResources.ENTRY_PORTAL2), new PageImage("7", LibResources.ENTRY_PORTAL3),
|
||||
new PageImage("8", LibResources.ENTRY_PORTAL4), new PageText("9"), new PageText("10"), new PageText("11"));
|
||||
|
||||
elvenMessage = new ALexiconEntry(LibLexicon.ALF_MESSAGE, categoryAlfhomancy);
|
||||
elvenMessage.setPriority().setLexiconPages(new PageImage("0", LibResources.ENTRY_ELVEN_GARDE), new PageText("1"), new PageText("2"), new PageText("3"), new PageText("4"), new PageText("5"), new PageText("6"));
|
||||
|
||||
|
||||
elvenResources = new ALexiconEntry(LibLexicon.ALF_RESOURCES, categoryAlfhomancy);
|
||||
elvenResources.setPriority().setLexiconPages(new PageText("0"), new PageElvenRecipe("1", ModElvenTradeRecipes.dreamwoodRecipe), new PageElvenRecipe("2", ModElvenTradeRecipes.elementiumRecipe), new PageElvenRecipe("3", ModElvenTradeRecipes.pixieDustRecipe), new PageElvenRecipe("4", ModElvenTradeRecipes.dragonstoneRecipe));
|
||||
|
||||
|
||||
// MISCLENAEOUS ENTRIES
|
||||
unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc);
|
||||
unstableBlocks.setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_UNSTABLE_BLOCK), new PageCraftingRecipe("2", ModCrafingRecipes.recipesUnstableBlocks), new PageText("3"), new PageImage("4", LibResources.ENTRY_UNSTABLE_BEACON), new PageCraftingRecipe("5", ModCrafingRecipes.recipesManaBeacons), new PageText("6"), new PageCraftingRecipe("7", ModCrafingRecipes.recipesSignalFlares));
|
||||
@@ -526,7 +526,7 @@ public final class LexiconData {
|
||||
else decorativeBlocks.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeLivingrockDecor1), new PageCraftingRecipe("2", ModCrafingRecipes.recipeLivingrockDecor2), new PageCraftingRecipe("3", ModCrafingRecipes.recipeLivingrockDecor3), new PageCraftingRecipe("4", ModCrafingRecipes.recipeLivingrockDecor4),
|
||||
new PageCraftingRecipe("5", ModCrafingRecipes.recipeLivingwoodDecor1), new PageCraftingRecipe("6", ModCrafingRecipes.recipeLivingwoodDecor2), new PageCraftingRecipe("7", ModCrafingRecipes.recipeLivingwoodDecor3), new PageCraftingRecipe("8", ModCrafingRecipes.recipeLivingwoodDecor4), new PageCraftingRecipe("9", ModCrafingRecipes.recipeLivingwoodDecor5),
|
||||
new PageText("10"), new PageManaInfusionRecipe("12", ModManaInfusionRecipes.manaQuartzRecipe), new PageCraftingRecipe("13", ModCrafingRecipes.recipeBlazeQuartz), new PageCraftingRecipe("14", ModCrafingRecipes.recipesLavenderQuartz), new PageCraftingRecipe("15", ModCrafingRecipes.recipeRedQuartz));
|
||||
|
||||
|
||||
dispenserTweaks = new BLexiconEntry(LibLexicon.MISC_DISPENSER_TWEAKS, categoryMisc);
|
||||
dispenserTweaks.setLexiconPages(new PageText("0"));
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
@@ -22,7 +21,6 @@ import vazkii.botania.api.lexicon.LexiconRecipeMappings;
|
||||
import vazkii.botania.api.recipe.RecipeElvenTrade;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.block.BlockAlfPortal;
|
||||
import vazkii.botania.common.crafting.ModElvenTradeRecipes;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -54,17 +52,15 @@ public class PageElvenRecipe extends PageRecipe {
|
||||
public void renderRecipe(IGuiLexiconEntry gui, int mx, int my) {
|
||||
RecipeElvenTrade recipe = recipes.get(recipeAt);
|
||||
TextureManager render = Minecraft.getMinecraft().renderEngine;
|
||||
FontRenderer font = Minecraft.getMinecraft().fontRenderer;
|
||||
|
||||
render.bindTexture(elvenTradeOverlay);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
((GuiScreen) gui).drawTexturedModalRect(gui.getLeft(), gui.getTop(), 0, 0, gui.getWidth(), gui.getHeight());
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
|
||||
|
||||
renderItemAtGridPos(gui, 3, 1, recipe.getOutput(), false);
|
||||
|
||||
|
||||
List<Object> inputs = recipe.getInputs();
|
||||
int i = 0;
|
||||
for(Object obj : inputs) {
|
||||
@@ -80,7 +76,7 @@ public class PageElvenRecipe extends PageRecipe {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
RenderItem.getInstance().renderIcon(gui.getLeft() + 22, gui.getTop() + 36, portalIcon, 48, 48);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderItemAtInputPos(IGuiLexiconEntry gui, int x, ItemStack stack) {
|
||||
if(stack == null || stack.getItem() == null)
|
||||
|
||||
@@ -29,7 +29,7 @@ public final class LibOreDict {
|
||||
public static final String ELEMENTIUM = "ingotElvenElementium";
|
||||
public static final String PIXIE_DUST = "elvenPixieDust";
|
||||
public static final String DRAGONSTONE = "elvenDragonstone";
|
||||
|
||||
|
||||
public static final String[] FLOWER = new String[] {
|
||||
"mysticFlowerWhite", "mysticFlowerOrange", "mysticFlowerMagenta", "mysticFlowerLightBlue", "mysticFlowerYellow", "mysticFlowerLime", "mysticFlowerPink", "mysticFlowerGray", "mysticFlowerLightGray", "mysticFlowerCyan", "mysticFlowerPurple", "mysticFlowerBlue", "mysticFlowerBrown", "mysticFlowerGreen", "mysticFlowerRed", "mysticFlowerBlack",
|
||||
};
|
||||
|
||||
@@ -29,12 +29,12 @@ public class GuiHandler implements IGuiHandler {
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
switch(ID) {
|
||||
case LibGuiIDs.LEXICON : {
|
||||
GuiLexicon lex = GuiLexicon.currentOpenLexicon;
|
||||
lex.stackUsed = player.getCurrentEquippedItem();
|
||||
if(lex.stackUsed == null || !(lex.stackUsed.getItem() instanceof ILexicon))
|
||||
return null;
|
||||
return lex;
|
||||
}
|
||||
GuiLexicon lex = GuiLexicon.currentOpenLexicon;
|
||||
GuiLexicon.stackUsed = player.getCurrentEquippedItem();
|
||||
if(GuiLexicon.stackUsed == null || !(GuiLexicon.stackUsed.getItem() instanceof ILexicon))
|
||||
return null;
|
||||
return lex;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
package vazkii.botania.test;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
|
||||
@@ -43,8 +42,6 @@ public class WorldTreeGenerator {
|
||||
|
||||
public void generateRing(int yoff, int radius) {
|
||||
Block block = ModBlocks.dreamwood;
|
||||
Block leaves = Blocks.leaves2;
|
||||
|
||||
y = yoff;
|
||||
|
||||
for(int i = 0; i < 720; i++) {
|
||||
|
||||
Reference in new issue
Block a user