mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
Some cleanup...
This commit is contained in:
1 parent
5f3381fd5d
commit
0bb3f56f46
105 files changed
+711
-782
No files matched your search
@@ -98,7 +98,7 @@ public final class BotaniaAPI {
|
||||
|
||||
public static KnowledgeType basicKnowledge;
|
||||
public static KnowledgeType elvenKnowledge;
|
||||
|
||||
|
||||
// This is here for completeness sake, but you shouldn't use it
|
||||
public static KnowledgeType relicKnowledge;
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
|
||||
public void drawSimpleManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void drawComplexManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res, ItemStack bindDisplay, boolean properlyBound) {
|
||||
// NO-OP
|
||||
@@ -159,7 +159,7 @@ public class DummyMethodHandler implements IInternalMethodHandler {
|
||||
public ItemStack getBindDisplayForFlowerType(SubTileEntity e) {
|
||||
return new ItemStack(Blocks.stone, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderLexiconText(int x, int y, int width, int height, String unlocalizedText) {
|
||||
// NO-OP
|
||||
|
||||
@@ -99,10 +99,10 @@ public interface IInternalMethodHandler {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void drawComplexManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res, ItemStack bindDisplay, boolean properlyBound);
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ItemStack getBindDisplayForFlowerType(SubTileEntity e);
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderLexiconText(int x, int y, int width, int height, String unlocalizedText);
|
||||
|
||||
@@ -121,5 +121,5 @@ public interface IInternalMethodHandler {
|
||||
public boolean isBotaniaFlower(World world, int x, int y, int z);
|
||||
|
||||
public void sendBaubleUpdatePacket(EntityPlayer player, int slot);
|
||||
|
||||
|
||||
}
|
||||
@@ -25,7 +25,7 @@ public class TinyPotatoRenderEvent extends Event {
|
||||
public final String name;
|
||||
public final double x, y, z;
|
||||
public final float partTicks;
|
||||
|
||||
|
||||
public TinyPotatoRenderEvent(TileEntity tile, String name, double x, double y, double z, float partTicks) {
|
||||
this.tile = tile;
|
||||
this.name = name;
|
||||
@@ -34,5 +34,5 @@ public class TinyPotatoRenderEvent extends Event {
|
||||
this.z = z;
|
||||
this.partTicks = partTicks;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class LexiconEntry implements Comparable<LexiconEntry> {
|
||||
public String getUnlocalizedName() {
|
||||
return unlocalizedName;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isVisible() {
|
||||
return true;
|
||||
|
||||
@@ -60,7 +60,7 @@ public class RecipePureDaisy {
|
||||
ores = OreDictionary.getOres(entry);
|
||||
oreMap.put(entry, ores);
|
||||
}
|
||||
|
||||
|
||||
for(ItemStack ostack : ores) {
|
||||
ItemStack cstack = ostack.copy();
|
||||
if(cstack.getItemDamage() == Short.MAX_VALUE)
|
||||
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.internal.IManaNetwork;
|
||||
import vazkii.botania.api.mana.IManaCollector;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
|
||||
/**
|
||||
@@ -32,7 +31,7 @@ import vazkii.botania.api.mana.IManaPool;
|
||||
public class SubTileFunctional extends SubTileEntity {
|
||||
|
||||
public static final int RANGE = 10;
|
||||
|
||||
|
||||
private static final String TAG_MANA = "mana";
|
||||
|
||||
private static final String TAG_POOL_X = "poolX";
|
||||
@@ -120,7 +119,7 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void linkToForcefully(TileEntity pool) {
|
||||
linkedPool = pool;
|
||||
}
|
||||
@@ -206,7 +205,7 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean isValidBinding() {
|
||||
return linkedPool != null && !linkedPool.isInvalid() && supertile.getWorldObj().getTileEntity(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord) == linkedPool;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ import vazkii.botania.api.mana.IManaCollector;
|
||||
public class SubTileGenerating extends SubTileEntity {
|
||||
|
||||
public static final int RANGE = 6;
|
||||
|
||||
|
||||
private static final String TAG_MANA = "mana";
|
||||
|
||||
private static final String TAG_COLLECTOR_X = "collectorX";
|
||||
@@ -116,7 +116,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void linkToForcefully(TileEntity collector) {
|
||||
linkedCollector = collector;
|
||||
}
|
||||
@@ -238,7 +238,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean isValidBinding() {
|
||||
return linkedCollector != null && !linkedCollector.isInvalid() && supertile.getWorldObj().getTileEntity(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord) == linkedCollector;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public final class ContributorFancinessHandler {
|
||||
|
||||
private volatile static Map<String, IIcon> flowerMap = null;
|
||||
private static boolean startedLoading = false;
|
||||
|
||||
|
||||
private static boolean phi = true;
|
||||
|
||||
public static void render(RenderPlayerEvent.Specials event) {
|
||||
|
||||
@@ -59,7 +59,6 @@ import vazkii.botania.common.item.ItemCraftingHalo;
|
||||
import vazkii.botania.common.item.ItemTwigWand;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemFlightTiara;
|
||||
import vazkii.botania.common.item.relic.ItemFlugelEye;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
@@ -74,7 +73,7 @@ public final class HUDHandler {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
Profiler profiler = mc.mcProfiler;
|
||||
ItemStack equippedStack = mc.thePlayer.getCurrentEquippedItem();
|
||||
|
||||
|
||||
if(event.type == ElementType.ALL) {
|
||||
profiler.startSection("botania-hud");
|
||||
MovingObjectPosition pos = mc.objectMouseOver;
|
||||
@@ -126,7 +125,7 @@ public final class HUDHandler {
|
||||
ItemFlugelEye.renderHUD(event.resolution, mc.thePlayer, equippedStack);
|
||||
profiler.endSection();
|
||||
}*/
|
||||
|
||||
|
||||
profiler.startSection("manaBar");
|
||||
EntityPlayer player = mc.thePlayer;
|
||||
int totalMana = 0;
|
||||
@@ -404,20 +403,20 @@ public final class HUDHandler {
|
||||
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
|
||||
public static void drawComplexManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res, ItemStack bindDisplay, boolean properlyBound) {
|
||||
drawSimpleManaHUD(color, mana, maxMana, name, res);
|
||||
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
int x = res.getScaledWidth() / 2 + 55;
|
||||
int y = res.getScaledHeight() / 2 + 12;
|
||||
|
||||
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, bindDisplay, x, y);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
|
||||
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
if(properlyBound) {
|
||||
mc.fontRenderer.drawStringWithShadow("\u2714", x + 10, y + 9, 0x004C00);
|
||||
|
||||
@@ -46,7 +46,7 @@ public final class ItemsRemainingRenderHandler {
|
||||
float alpha = ticks + partTicks > start ? 1F : (ticks + partTicks) / start;
|
||||
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public final class PresistantVariableHelper {
|
||||
notesCmp.setString(s, note);
|
||||
}
|
||||
cmp.setTag(TAG_LEXICON_NOTES, notesCmp);
|
||||
|
||||
|
||||
cmp.setBoolean(TAG_FIRST_LOAD, firstLoad);
|
||||
|
||||
injectNBTToFile(cmp, getCacheFile());
|
||||
@@ -91,7 +91,7 @@ public final class PresistantVariableHelper {
|
||||
for(Challenge c : ModChallenges.challengeLookup.values())
|
||||
c.readFromNBT(challengesCmp);
|
||||
}
|
||||
|
||||
|
||||
if(cmp.hasKey(TAG_LEXICON_NOTES)) {
|
||||
NBTTagCompound notesCmp = cmp.getCompoundTag(TAG_LEXICON_NOTES);
|
||||
Set<String> keys = notesCmp.func_150296_c();
|
||||
|
||||
@@ -65,7 +65,7 @@ public class GuiFlowerBag extends GuiContainer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean checkHotbarKeys(int p_146983_1_) {
|
||||
return false;
|
||||
|
||||
@@ -23,7 +23,6 @@ import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatAllowedCharacters;
|
||||
@@ -64,7 +63,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
public static ItemStack stackUsed;
|
||||
|
||||
public static HashMap<String, String> notes = new HashMap();
|
||||
|
||||
|
||||
private static final String TAG_TYPE = "type";
|
||||
|
||||
private static final int[] KONAMI_CODE = { 200, 200, 208, 208, 203, 205, 203, 205, 48, 30 };
|
||||
@@ -94,7 +93,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
public static boolean notesEnabled;
|
||||
static int notesMoveTime;
|
||||
public String note = "";
|
||||
|
||||
|
||||
List<LexiconCategory> allCategories;
|
||||
|
||||
String title;
|
||||
@@ -114,7 +113,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
String key = getNotesKey();
|
||||
if(notes.containsKey(key))
|
||||
note = notes.get(key);
|
||||
|
||||
|
||||
onInitGui();
|
||||
|
||||
putTutorialArrow();
|
||||
@@ -161,7 +160,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
}
|
||||
buttonList.add(new GuiButtonNotes(this, NOTES_BUTTON_ID, left - 4, top - 4));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
if(notesEnabled && notesMoveTime < NOTE_TWEEN_TIME)
|
||||
@@ -180,7 +179,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
drawNotes(par3);
|
||||
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
drawTexturedModalRect(left, top, 0, 0, guiWidth, guiHeight);
|
||||
@@ -240,31 +239,31 @@ public class GuiLexicon extends GuiScreen {
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void drawNotes(float part) {
|
||||
int size = 105;
|
||||
|
||||
|
||||
float time = notesMoveTime;
|
||||
if(notesMoveTime < NOTE_TWEEN_TIME && notesEnabled)
|
||||
time += part;
|
||||
else if(notesMoveTime > 0 && !notesEnabled)
|
||||
time -= part;
|
||||
|
||||
int drawSize = (int) ((float) size * time / (float) NOTE_TWEEN_TIME);
|
||||
|
||||
int drawSize = (int) (size * time / NOTE_TWEEN_TIME);
|
||||
int x = left - drawSize;
|
||||
int y = top + 10;
|
||||
|
||||
|
||||
drawTexturedModalRect(x, y, 146, 0, drawSize, 125);
|
||||
|
||||
|
||||
String noteDisplay = note;
|
||||
if(notesEnabled && ClientTickHandler.ticksInGame % 20 < 10)
|
||||
noteDisplay += "&r_";
|
||||
|
||||
|
||||
fontRendererObj.drawString(StatCollector.translateToLocal("botaniamisc.notes"), x + 5, y - 7, 0x666666);
|
||||
|
||||
|
||||
boolean unicode = fontRendererObj.getUnicodeFlag();
|
||||
fontRendererObj.setUnicodeFlag(true);
|
||||
|
||||
|
||||
PageText.renderText(x + 5, y - 3, 92, 120, 0, noteDisplay);
|
||||
fontRendererObj.setUnicodeFlag(unicode);
|
||||
}
|
||||
@@ -505,7 +504,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
@Override
|
||||
protected void keyTyped(char par1, int par2) {
|
||||
handleNoteKey(par1, par2);
|
||||
|
||||
|
||||
if(!notesEnabled && closeScreenOnInvKey() && mc.gameSettings.keyBindInventory.getKeyCode() == par2) {
|
||||
mc.displayGuiScreen(null);
|
||||
mc.setIngameFocus();
|
||||
@@ -521,12 +520,12 @@ public class GuiLexicon extends GuiScreen {
|
||||
|
||||
super.keyTyped(par1, par2);
|
||||
}
|
||||
|
||||
|
||||
public void handleNoteKey(char par1, int par2) {
|
||||
if(notesEnabled) {
|
||||
Keyboard.enableRepeatEvents(true);
|
||||
boolean changed = false;
|
||||
|
||||
|
||||
if(par2 == 14 && note.length() > 0) {
|
||||
if(isCtrlKeyDown())
|
||||
note = "";
|
||||
@@ -537,12 +536,12 @@ public class GuiLexicon extends GuiScreen {
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
||||
if((ChatAllowedCharacters.isAllowedCharacter(par1) || par2 == 28) && note.length() < 250) {
|
||||
note += par2 == 28 ? "<br>" : par1;
|
||||
changed = true;
|
||||
}
|
||||
|
||||
|
||||
if(changed) {
|
||||
notes.put(getNotesKey(), note);
|
||||
PresistantVariableHelper.saveSafe();
|
||||
@@ -572,7 +571,7 @@ public class GuiLexicon extends GuiScreen {
|
||||
public String getNotesKey() {
|
||||
return "index";
|
||||
}
|
||||
|
||||
|
||||
public void load(NBTTagCompound cmp) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public class GuiLexiconChallenge extends GuiLexicon implements IParented {
|
||||
challenge = c;
|
||||
setTitle();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getNotesKey() {
|
||||
return "challenge_" + challenge.unlocalizedName;
|
||||
|
||||
@@ -141,7 +141,7 @@ public class GuiLexiconChallengesList extends GuiLexicon implements IParented {
|
||||
public GuiLexicon copy() {
|
||||
return new GuiLexiconChallengesList();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getNotesKey() {
|
||||
return "challengelist";
|
||||
|
||||
@@ -53,7 +53,7 @@ public class GuiLexiconHistory extends GuiLexiconIndex {
|
||||
public void load(NBTTagCompound cmp) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getNotesKey() {
|
||||
return "history";
|
||||
|
||||
@@ -363,7 +363,7 @@ public class GuiLexiconIndex extends GuiLexicon implements IParented {
|
||||
gui.setTitle();
|
||||
return gui;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getNotesKey() {
|
||||
return "category_" + (category == null ? "lexindex" : category.unlocalizedName);
|
||||
|
||||
@@ -25,7 +25,7 @@ import vazkii.botania.client.gui.lexicon.GuiLexicon;
|
||||
public class GuiButtonNotes extends GuiButtonLexicon {
|
||||
|
||||
GuiLexicon parent;
|
||||
|
||||
|
||||
public GuiButtonNotes(GuiLexicon parent, int id, int x, int y) {
|
||||
super(id, x, y, 11, 11, "");
|
||||
this.parent = parent;
|
||||
@@ -48,10 +48,10 @@ public class GuiButtonNotes extends GuiButtonLexicon {
|
||||
if(parent.note != null && !parent.note.isEmpty())
|
||||
Minecraft.getMinecraft().fontRenderer.drawStringWithShadow("!", xPosition + 10, yPosition, 0xFF0000);
|
||||
}
|
||||
|
||||
|
||||
int tooltipY = (tooltip.size() - 1) * 10;
|
||||
if(k == 2)
|
||||
RenderHelper.renderTooltip(par2, par3 + tooltipY, tooltip);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -12,22 +12,21 @@ package vazkii.botania.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCocoon extends ModelBase {
|
||||
|
||||
public ModelRenderer shape;
|
||||
|
||||
public ModelCocoon() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
shape = new ModelRenderer(this, 0, 0);
|
||||
shape.setRotationPoint(0.0F, 22.0F, 0.0F);
|
||||
shape.addBox(-5.0F, -8.0F, -7.0F, 10, 10, 14, 0.0F);
|
||||
}
|
||||
public ModelRenderer shape;
|
||||
|
||||
public void render() {
|
||||
shape.render(1F / 16F);
|
||||
}
|
||||
public ModelCocoon() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
shape = new ModelRenderer(this, 0, 0);
|
||||
shape.setRotationPoint(0.0F, 22.0F, 0.0F);
|
||||
shape.addBox(-5.0F, -8.0F, -7.0F, 10, 10, 14, 0.0F);
|
||||
}
|
||||
|
||||
public void render() {
|
||||
shape.render(1F / 16F);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,10 +12,10 @@ package vazkii.botania.client.render.block;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureUtil;
|
||||
import net.minecraft.client.resources.data.AnimationMetadataSection;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
import cpw.mods.fml.relauncher.ReflectionHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -45,5 +45,5 @@ public class RenderCocoon implements ISimpleBlockRenderingHandler {
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -26,29 +26,28 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.core.helper.ShaderHelper;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.entity.EntityBabylonWeapon;
|
||||
import vazkii.botania.common.item.relic.ItemKingKey;
|
||||
|
||||
public class RenderBabylonWeapon extends Render {
|
||||
|
||||
private static final ResourceLocation babylon = new ResourceLocation(LibResources.MISC_BABYLON);
|
||||
|
||||
|
||||
@Override
|
||||
public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) {
|
||||
EntityBabylonWeapon weapon = (EntityBabylonWeapon) par1Entity;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)par2, (float)par4, (float)par6);
|
||||
GL11.glRotatef(weapon.getRotation(), 0F, 1F, 0F);
|
||||
|
||||
|
||||
int live = weapon.getLiveTicks();
|
||||
int delay = weapon.getDelay();
|
||||
float charge = Math.min(10F, Math.max(live, weapon.getChargeTicks()) + par9);
|
||||
float chargeMul = charge / 10F;
|
||||
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
GL11.glPushMatrix();
|
||||
float s = 1.5F;
|
||||
@@ -61,12 +60,12 @@ public class RenderBabylonWeapon extends Render {
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
|
||||
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240, 240);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getIconWidth(), icon.getIconHeight(), 1F / 16F);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
GL11.glColor4f(1F, 1F, 1F, chargeMul);
|
||||
@@ -78,22 +77,22 @@ public class RenderBabylonWeapon extends Render {
|
||||
Random rand = new Random(weapon.getUniqueID().getMostSignificantBits());
|
||||
GL11.glRotatef(-90F, 1F, 0F, 0F);
|
||||
GL11.glTranslatef(0F, -0.3F + rand.nextFloat() * 0.1F, 1F);
|
||||
|
||||
|
||||
s = chargeMul;
|
||||
if(live > delay)
|
||||
s -= Math.min(1F, (float) (live - delay + par9) * 0.2F);
|
||||
s -= Math.min(1F, (live - delay + par9) * 0.2F);
|
||||
s *= 2F;
|
||||
GL11.glScalef(s, s, s);
|
||||
|
||||
GL11.glRotatef(charge * 9F + (weapon.ticksExisted + par9) * 0.5F + rand.nextFloat() * 360F, 0F, 1F, 0F);
|
||||
|
||||
|
||||
tes.startDrawingQuads();
|
||||
tes.addVertexWithUV(-1, 0, -1, 0, 0);
|
||||
tes.addVertexWithUV(-1, 0, 1, 0, 1);
|
||||
tes.addVertexWithUV(1, 0, 1, 1, 1);
|
||||
tes.addVertexWithUV(1, 0, -1, 1, 0);
|
||||
tes.draw();
|
||||
|
||||
|
||||
ShaderHelper.releaseShader();
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
||||
@@ -10,19 +10,15 @@
|
||||
*/
|
||||
package vazkii.botania.client.render.entity;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.common.entity.EntityManaStorm;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class RenderManaStorm extends Render {
|
||||
|
||||
@@ -32,7 +28,7 @@ public class RenderManaStorm extends Render {
|
||||
GL11.glTranslated(x, y, z);
|
||||
EntityManaStorm storm = (EntityManaStorm) e;
|
||||
float maxScale = 1.95F;
|
||||
float scale = 0.05F + ((float) storm.burstsFired / EntityManaStorm.TOTAL_BURSTS - (float) ((storm.deathTime == 0 ? 0 : (storm.deathTime + pticks)) / EntityManaStorm.DEATH_TIME)) * maxScale;
|
||||
float scale = 0.05F + ((float) storm.burstsFired / EntityManaStorm.TOTAL_BURSTS - (storm.deathTime == 0 ? 0 : storm.deathTime + pticks) / EntityManaStorm.DEATH_TIME) * maxScale;
|
||||
RenderHelper.renderStar(0x00FF00, scale, scale, scale, e.getUniqueID().getMostSignificantBits());
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
@@ -34,11 +34,11 @@ public class RenderTileCocoon extends TileEntitySpecialRenderer {
|
||||
float rot = 0F;
|
||||
float modval = 60F - (float) cocoon.timePassed / (float) TileCocoon.TOTAL_TIME * 30F;
|
||||
if(cocoon.timePassed % modval < 10) {
|
||||
float mod = (cocoon.timePassed + f) % (float) modval;
|
||||
float v = (float) mod / 5 * (float) Math.PI * 2;
|
||||
float mod = (cocoon.timePassed + f) % modval;
|
||||
float v = mod / 5 * (float) Math.PI * 2;
|
||||
rot = (float) Math.sin(v) * (float) Math.log(cocoon.timePassed + f);
|
||||
}
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
@@ -25,7 +25,7 @@ import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.common.block.BlockLightRelay;
|
||||
|
||||
public class RenderTileLightRelay extends TileEntitySpecialRenderer {
|
||||
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float pticks) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
@@ -49,12 +49,12 @@ public class RenderTileLightRelay extends TileEntitySpecialRenderer {
|
||||
float r = 180.0F - RenderManager.instance.playerViewY;
|
||||
GL11.glRotatef(r, 0F, 1F, 0F);
|
||||
GL11.glRotatef(-RenderManager.instance.playerViewX, 1F, 0F, 0F);
|
||||
|
||||
|
||||
float off = 0.25F;
|
||||
GL11.glTranslatef(0F, off, 0F);
|
||||
GL11.glRotated(time, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(0F, -off, 0F);
|
||||
|
||||
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
func_77026_a(tessellator, iicon);
|
||||
GL11.glPopMatrix();
|
||||
@@ -63,7 +63,7 @@ public class RenderTileLightRelay extends TileEntitySpecialRenderer {
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
private void func_77026_a(Tessellator p_77026_1_, IIcon p_77026_2_) {
|
||||
float f = p_77026_2_.getMinU();
|
||||
float f1 = p_77026_2_.getMaxU();
|
||||
|
||||
@@ -31,7 +31,6 @@ import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.client.model.ModelTinyPotato;
|
||||
import vazkii.botania.common.block.tile.TileTinyPotato;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemBaubleCosmetic;
|
||||
import vazkii.botania.common.item.material.ItemManaResource;
|
||||
|
||||
public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
@@ -67,10 +66,10 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
GL11.glRotatef(rotZ, 0F, 0F, 1F);
|
||||
|
||||
model.render();
|
||||
|
||||
|
||||
GL11.glPushMatrix();
|
||||
String name = potato.name.toLowerCase();
|
||||
|
||||
|
||||
mc.renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
float scale = 1F / 4F;
|
||||
GL11.glTranslatef(0F, 1F, 0F);
|
||||
@@ -118,9 +117,9 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
renderIcon(ModItems.cosmetic.getIconFromDamage(24));
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
MinecraftForge.EVENT_BUS.post(new TinyPotatoRenderEvent(potato, potato.name, d0, d1, d2, var8));
|
||||
|
||||
|
||||
GL11.glRotatef(-rotZ, 0F, 0F, 1F);
|
||||
GL11.glRotatef(-rotY, 0F, 1F, 0F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
@@ -162,7 +161,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
public void renderIcon(IIcon icon) {
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
|
||||
@@ -34,7 +34,7 @@ import cpw.mods.fml.common.event.FMLServerStoppingEvent;
|
||||
public class Botania {
|
||||
|
||||
public static boolean gardenOfGlassLoaded = false;
|
||||
|
||||
|
||||
public static boolean thaumcraftLoaded = false;
|
||||
public static boolean bcTriggersLoaded = false;
|
||||
public static boolean bloodMagicLoaded = false;
|
||||
@@ -51,12 +51,12 @@ public class Botania {
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
gardenOfGlassLoaded = Loader.isModLoaded("GardenOfGlass");
|
||||
|
||||
|
||||
thaumcraftLoaded = Loader.isModLoaded("Thaumcraft");
|
||||
bcTriggersLoaded = ModAPIManager.INSTANCE.hasAPI("BuildCraftAPI|statements");
|
||||
bloodMagicLoaded = Loader.isModLoaded("AWWayofTime"); // Psh, noob
|
||||
coloredLightsLoaded = Loader.isModLoaded("easycoloredlights");
|
||||
|
||||
|
||||
lightHelper = coloredLightsLoaded ? new LightHelperColored() : new LightHelperVanilla();
|
||||
|
||||
proxy.preInit(event);
|
||||
|
||||
@@ -172,7 +172,7 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
return false;
|
||||
if(stack.getItem() == ModItems.waterBowl)
|
||||
return true;
|
||||
|
||||
|
||||
if(stack.getItem() instanceof IFluidContainerItem) {
|
||||
FluidStack fluidStack = ((IFluidContainerItem) stack.getItem()).getFluid(stack);
|
||||
return fluidStack != null && fluidStack.getFluid() == FluidRegistry.WATER && fluidStack.amount >= FluidContainerRegistry.BUCKET_VOLUME;
|
||||
@@ -184,7 +184,7 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
private ItemStack getContainer(ItemStack stack) {
|
||||
if(stack.getItem() == ModItems.waterBowl)
|
||||
return new ItemStack(Items.bowl);
|
||||
|
||||
|
||||
if (stack.getItem().hasContainerItem(stack))
|
||||
return stack.getItem().getContainerItem(stack);
|
||||
else if (stack.getItem() instanceof IFluidContainerItem) {
|
||||
|
||||
@@ -11,14 +11,7 @@
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.block.tile.TileCocoon;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -28,6 +21,12 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.block.tile.TileCocoon;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class BlockCocoon extends BlockModContainer implements ILexiconable {
|
||||
|
||||
@@ -41,32 +40,32 @@ public class BlockCocoon extends BlockModContainer implements ILexiconable {
|
||||
float f1 = 14F / 16F;
|
||||
setBlockBounds(f, 0F, f, 1F - f, f1, 1F - f);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
||||
return Blocks.web.getBlockTextureFromSide(0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idCocoon;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int s, float xs, float ys, float zs) {
|
||||
TileCocoon cocoon = (TileCocoon) world.getTileEntity(x, y, z);
|
||||
@@ -79,17 +78,17 @@ public class BlockCocoon extends BlockModContainer implements ILexiconable {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean canSilkHarvest() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileCocoon();
|
||||
|
||||
@@ -12,7 +12,6 @@ package vazkii.botania.common.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.monster.EntityBlaze;
|
||||
@@ -48,9 +47,10 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
||||
return p_149691_1_ == 1 ? top : (p_149691_1_ == 0 ? top : (p_149691_2_ == 2 && p_149691_1_ == 2 ? face : (p_149691_2_ == 3 && p_149691_1_ == 5 ? face : (p_149691_2_ == 0 && p_149691_1_ == 3 ? face : (p_149691_2_ == 1 && p_149691_1_ == 4 ? face : this.blockIcon)))));
|
||||
return p_149691_1_ == 1 ? top : p_149691_1_ == 0 ? top : p_149691_2_ == 2 && p_149691_1_ == 2 ? face : p_149691_2_ == 3 && p_149691_1_ == 5 ? face : p_149691_2_ == 0 && p_149691_1_ == 3 ? face : p_149691_2_ == 1 && p_149691_1_ == 4 ? face : blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,7 +62,7 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable {
|
||||
p_149726_1_.setBlock(p_149726_2_, p_149726_3_ - 1, p_149726_4_, getBlockById(0), 0, 2);
|
||||
p_149726_1_.setBlock(p_149726_2_, p_149726_3_ - 2, p_149726_4_, getBlockById(0), 0, 2);
|
||||
EntityBlaze blaze = new EntityBlaze(p_149726_1_);
|
||||
blaze.setLocationAndAngles((double)p_149726_2_ + 0.5D, (double)p_149726_3_ - 1.95D, (double)p_149726_4_ + 0.5D, 0.0F, 0.0F);
|
||||
blaze.setLocationAndAngles(p_149726_2_ + 0.5D, p_149726_3_ - 1.95D, p_149726_4_ + 0.5D, 0.0F, 0.0F);
|
||||
blaze.getEntityData().setBoolean(TAG_FEL_SPAWNED, true);
|
||||
p_149726_1_.spawnEntityInWorld(blaze);
|
||||
p_149726_1_.notifyBlockChange(p_149726_2_, p_149726_3_, p_149726_4_, getBlockById(0));
|
||||
@@ -73,15 +73,16 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
int l = MathHelper.floor_double((double)(p_149689_5_.rotationYaw * 4.0F / 360.0F) + 2.5D) & 3;
|
||||
int l = MathHelper.floor_double(p_149689_5_.rotationYaw * 4.0F / 360.0F + 2.5D) & 3;
|
||||
p_149689_1_.setBlockMetadataWithNotify(p_149689_2_, p_149689_3_, p_149689_4_, l, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
||||
face = IconHelper.forBlock(p_149651_1_, this);
|
||||
top = Blocks.pumpkin.getIcon(0, 0);
|
||||
this.blockIcon = Blocks.pumpkin.getIcon(2, 0);
|
||||
blockIcon = Blocks.pumpkin.getIcon(2, 0);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -44,17 +44,17 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean getBlocksMovement(IBlockAccess p_149655_1_, int p_149655_2_, int p_149655_3_, int p_149655_4_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(x, y, z) || world.isBlockIndirectlyGettingPowered(x, y + 1, z);
|
||||
@@ -67,7 +67,7 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
} else if(!power && powered)
|
||||
world.setBlockMetadataWithNotify(x, y, z, meta & -9, 4);
|
||||
}
|
||||
|
||||
|
||||
public void pickUpEntities(World world, int x, int y, int z) {
|
||||
List<TileLightRelay> relays = new ArrayList();
|
||||
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS) {
|
||||
@@ -78,7 +78,7 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
relays.add(relay);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!relays.isEmpty()) {
|
||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1));
|
||||
if(!entities.isEmpty()) {
|
||||
@@ -94,5 +94,5 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.luminizerTransport;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -13,7 +13,6 @@ package vazkii.botania.common.block;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -23,13 +22,11 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.wand.IWandBindable;
|
||||
import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
@@ -37,6 +34,7 @@ import vazkii.botania.common.block.tile.TileLightRelay;
|
||||
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BlockLightRelay extends BlockModContainer implements IWandable, ILexiconable {
|
||||
|
||||
@@ -64,7 +62,7 @@ public class BlockLightRelay extends BlockModContainer implements IWandable, ILe
|
||||
for(int i = 0; i < 2; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return meta == 0 ? 0 : 1;
|
||||
@@ -79,7 +77,7 @@ public class BlockLightRelay extends BlockModContainer implements IWandable, ILe
|
||||
public boolean getBlocksMovement(IBlockAccess p_149655_1_, int p_149655_2_, int p_149655_3_, int p_149655_4_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int s, float xs, float ys, float zs) {
|
||||
((TileLightRelay) world.getTileEntity(x, y, z)).mountEntity(player);
|
||||
@@ -115,9 +113,9 @@ public class BlockLightRelay extends BlockModContainer implements IWandable, ILe
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
invIcon = IconHelper.forBlock(par1IconRegister, this, 0);
|
||||
worldIcon = IconHelper.forBlock(par1IconRegister, this, 1);
|
||||
worldIcon = IconHelper.forBlock(par1IconRegister, this, 1);
|
||||
invIconRed = IconHelper.forBlock(par1IconRegister, this, 2);
|
||||
worldIconRed = IconHelper.forBlock(par1IconRegister, this, 3);
|
||||
worldIconRed = IconHelper.forBlock(par1IconRegister, this, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -107,7 +107,7 @@ public class BlockModDoubleFlower extends BlockDoublePlant implements ILexiconab
|
||||
|
||||
if(this.canSilkHarvest(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_) && EnchantmentHelper.getSilkTouchModifier(p_149636_2_)) {
|
||||
ArrayList<ItemStack> items = new ArrayList<ItemStack>();
|
||||
ItemStack itemstack = this.createStackedBlock(p_149636_6_);
|
||||
ItemStack itemstack = createStackedBlock(p_149636_6_);
|
||||
|
||||
if(itemstack != null)
|
||||
items.add(itemstack);
|
||||
|
||||
@@ -257,7 +257,7 @@ public class BlockPistonRelay extends BlockMod implements IWandable, ILexiconabl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ConcurrentModificationException failsafe
|
||||
ArrayList<String> remove = new ArrayList(removeThese);
|
||||
for(String s : remove) {
|
||||
|
||||
@@ -10,19 +10,18 @@
|
||||
*/
|
||||
package vazkii.botania.common.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
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.item.ModItems;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class BlockRoot extends BlockMod implements ILexiconable {
|
||||
|
||||
@@ -33,25 +32,25 @@ public class BlockRoot extends BlockMod implements ILexiconable {
|
||||
setBlockName(LibBlockNames.ROOT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return ModItems.manaResource;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int damageDropped(int p_149692_1_) {
|
||||
return 20;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random r) {
|
||||
return 2 + r.nextInt(3);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.gardenOfGlass;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -319,7 +319,7 @@ public final class ModBlocks {
|
||||
lightRelay = new BlockLightRelay();
|
||||
lightLauncher = new BlockLightLauncher();
|
||||
manaBomb = new BlockManaBomb();
|
||||
|
||||
|
||||
ModFluffBlocks.init();
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
|
||||
@@ -163,12 +163,12 @@ public final class ModFluffBlocks {
|
||||
public static Block[] biomeStoneSlabs = new Block[24];
|
||||
public static Block[] biomeStoneFullSlabs = new Block[24];
|
||||
public static Block biomeStoneWall;
|
||||
|
||||
|
||||
public static Block[] stoneStairs = new Block[8];
|
||||
public static Block[] stoneSlabs = new Block[8];
|
||||
public static Block[] stoneFullSlabs = new Block[8];
|
||||
public static Block stoneWall;
|
||||
|
||||
|
||||
public static Block endStoneSlab;
|
||||
public static Block endStoneSlabFull;
|
||||
public static Block endStoneStairs;
|
||||
@@ -217,7 +217,7 @@ public final class ModFluffBlocks {
|
||||
thatchStairs = new BlockThatchStairs();
|
||||
thatchSlab = new BlockThatchSlab(false);
|
||||
thatchSlabFull = new BlockThatchSlab(true);
|
||||
|
||||
|
||||
netherBrickStairs = new BlockCustomBrickStairs();
|
||||
netherBrickSlab = new BlockCustomBrickSlab(false);
|
||||
netherBrickSlabFull = new BlockCustomBrickSlab(true);
|
||||
@@ -293,7 +293,7 @@ public final class ModFluffBlocks {
|
||||
enderBrickSlab = new BlockEnderBrickSlab(false);
|
||||
enderBrickSlabFull = new BlockEnderBrickSlab(true);
|
||||
enderBrickStairs = new BlockEnderBrickStairs();
|
||||
|
||||
|
||||
if(ConfigHandler.darkQuartzEnabled) {
|
||||
((BlockModSlab) darkQuartzSlab).register();
|
||||
((BlockModSlab) darkQuartzSlabFull).register();
|
||||
@@ -352,7 +352,7 @@ public final class ModFluffBlocks {
|
||||
((BlockModSlab) endStoneSlabFull).register();
|
||||
((BlockModSlab) enderBrickSlab).register();
|
||||
((BlockModSlab) enderBrickSlabFull).register();
|
||||
|
||||
|
||||
for(int i = 0; i < 24; i++) {
|
||||
((BlockModSlab) biomeStoneSlabs[i]).register();
|
||||
((BlockModSlab) biomeStoneFullSlabs[i]).register();
|
||||
|
||||
@@ -17,7 +17,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntityFurnace;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.Botania;
|
||||
|
||||
@@ -27,7 +27,6 @@ import vazkii.botania.common.block.BlockModContainer;
|
||||
import vazkii.botania.common.block.tile.TileManaFlame;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import vazkii.botania.common.world.SkyblockWorldEvents;
|
||||
import vazkii.botania.common.world.WorldTypeSkyblock;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
@@ -82,7 +81,7 @@ public class BlockManaFlame extends BlockModContainer {
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int s, float xs, float ys, float zs) {
|
||||
if(WorldTypeSkyblock.isWorldSkyblock(world)) {
|
||||
@@ -94,7 +93,7 @@ public class BlockManaFlame extends BlockModContainer {
|
||||
player.dropPlayerItemWithRandomChoice(new ItemStack(ModItems.lexicon), false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,6 @@ import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.render.block.InterpolatedIcon;
|
||||
import vazkii.botania.common.block.BlockMod;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
@@ -80,7 +79,7 @@ public class BlockPrismarine extends BlockMod implements ILexiconable {
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
icons = new IIcon[TYPES];
|
||||
for(int i = 1; i < TYPES; i++)
|
||||
icons[i] = IconHelper.forBlock(par1IconRegister, this, i);
|
||||
icons[i] = IconHelper.forBlock(par1IconRegister, this, i);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -46,7 +46,7 @@ public abstract class BlockModSlab extends BlockSlab implements ILexiconable {
|
||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
|
||||
return Item.getItemFromBlock(getSingleBlock());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int quantityDropped(int meta, int fortune, Random random) {
|
||||
return super.quantityDropped(meta, fortune, random);
|
||||
|
||||
@@ -10,13 +10,12 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.walls;
|
||||
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
|
||||
public class Block18StoneWall extends BlockVariantWall {
|
||||
|
||||
@@ -25,7 +24,7 @@ public class Block18StoneWall extends BlockVariantWall {
|
||||
setHardness(1.5F);
|
||||
setResistance(10F);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.stoneAlchemy;
|
||||
|
||||
@@ -10,21 +10,12 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.walls;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockBiomeStoneWall extends BlockVariantWall {
|
||||
|
||||
@@ -38,5 +29,5 @@ public class BlockBiomeStoneWall extends BlockVariantWall {
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.marimorphosis;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -12,11 +12,6 @@ package vazkii.botania.common.block.decor.walls;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockWall;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -26,12 +21,17 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BlockModWall extends BlockWall implements ILexiconable {
|
||||
|
||||
Block block;
|
||||
int meta;
|
||||
|
||||
|
||||
public BlockModWall(Block block, int meta) {
|
||||
super(block);
|
||||
this.block = block;
|
||||
@@ -43,35 +43,35 @@ public class BlockModWall extends BlockWall implements ILexiconable {
|
||||
public boolean canPlaceTorchOnTop(World world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Block setBlockName(String par1Str) {
|
||||
register(par1Str);
|
||||
return super.setBlockName(par1Str);
|
||||
}
|
||||
|
||||
|
||||
public void register(String name) {
|
||||
GameRegistry.registerBlock(this, ItemBlockMod.class, name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
list.add(new ItemStack(item));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return block.getIcon(side, this.meta);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.decorativeBlocks;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -10,13 +10,12 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.walls;
|
||||
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
|
||||
public class BlockPrismarineWall extends BlockModWall {
|
||||
|
||||
@@ -26,7 +25,7 @@ public class BlockPrismarineWall extends BlockModWall {
|
||||
setResistance(10.0F);
|
||||
setStepSound(soundTypeStone);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.prismarine;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
package vazkii.botania.common.block.decor.walls;
|
||||
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class BlockReedWall extends BlockModWall {
|
||||
|
||||
|
||||
@@ -12,28 +12,25 @@ package vazkii.botania.common.block.decor.walls;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class BlockVariantWall extends BlockModWall {
|
||||
|
||||
int metaStates;
|
||||
int metaShift;
|
||||
|
||||
|
||||
public BlockVariantWall(Block block, int metaStates, int metaShift) {
|
||||
super(block, 0);
|
||||
this.metaStates = metaStates;
|
||||
this.metaShift = metaShift;
|
||||
}
|
||||
|
||||
|
||||
public BlockVariantWall(Block block, int metaStates) {
|
||||
this(block, metaStates, 0);
|
||||
}
|
||||
@@ -42,17 +39,17 @@ public class BlockVariantWall extends BlockModWall {
|
||||
public void register(String name) {
|
||||
GameRegistry.registerBlock(this, ItemBlockWithMetadataAndName.class, name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List list) {
|
||||
for(int i = 0; i < metaStates; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return block.getIcon(side, meta + metaShift);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.walls.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.walls.BlockModWall;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.walls.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.walls.BlockModWall;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.walls.living;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.decor.walls.BlockModWall;
|
||||
|
||||
|
||||
@@ -97,9 +97,9 @@ public class BlockPrism extends BlockModContainer implements IManaTrigger, ILexi
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
|
||||
if(lens == null && isHeldItemLens) {
|
||||
if(!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
if(!par5EntityPlayer.capabilities.isCreativeMode)
|
||||
par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, null);
|
||||
|
||||
|
||||
prism.setInventorySlotContents(0, heldItem.copy());
|
||||
prism.markDirty();
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta | 1, 1 | 2);
|
||||
|
||||
@@ -130,13 +130,13 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
boolean itemEqual = stack.getItem() == filterEntry.getItem();
|
||||
boolean damageEqual = stack.getItemDamage() == filterEntry.getItemDamage();
|
||||
boolean nbtEqual = ItemStack.areItemStackTagsEqual(filterEntry, stack);
|
||||
|
||||
|
||||
if(itemEqual && damageEqual && nbtEqual)
|
||||
return true;
|
||||
|
||||
|
||||
if(!stack.getHasSubtypes() && stack.isItemStackDamageable() && stack.getMaxStackSize() == 1 && itemEqual && nbtEqual)
|
||||
return true;
|
||||
|
||||
|
||||
if(stack.getItem() instanceof IManaItem && itemEqual)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ public class SubTileOrechid extends SubTileFunctional {
|
||||
public int getDelay() {
|
||||
return Botania.gardenOfGlassLoaded ? DELAY_GOG : DELAY;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RadiusDescriptor getRadius() {
|
||||
return new RadiusDescriptor.Square(toChunkCoordinates(), RANGE);
|
||||
|
||||
@@ -112,7 +112,7 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory, I
|
||||
if(!worldObj.isRemote) {
|
||||
for(int i = 0; i < getSizeInventory(); i++)
|
||||
setInventorySlotContents(i, null);
|
||||
|
||||
|
||||
stack.stackSize--;
|
||||
if(stack.stackSize == 0)
|
||||
item.setDead();
|
||||
@@ -120,7 +120,7 @@ public class TileAltar extends TileSimpleInventory implements ISidedInventory, I
|
||||
ItemStack output = recipe.getOutput().copy();
|
||||
EntityItem outputItem = new EntityItem(worldObj, xCoord + 0.5, yCoord + 1.5, zCoord + 0.5, output);
|
||||
worldObj.spawnEntityInWorld(outputItem);
|
||||
|
||||
|
||||
setWater(false);
|
||||
worldObj.func_147453_f(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
}
|
||||
|
||||
@@ -10,11 +10,8 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.tile;
|
||||
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.EntityAgeable;
|
||||
import net.minecraft.entity.EntityCreature;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityChicken;
|
||||
import net.minecraft.entity.passive.EntityCow;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
@@ -25,12 +22,13 @@ import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import cpw.mods.fml.common.registry.VillagerRegistry;
|
||||
|
||||
public class TileCocoon extends TileMod {
|
||||
|
||||
private static final String TAG_TIME_PASSED = "timePassed";
|
||||
private static final String TAG_EMERALDS_GIVEN = "emeraldsGiven";
|
||||
|
||||
|
||||
public static final int TOTAL_TIME = 2400;
|
||||
public static final int MAX_EMERALDS = 20;
|
||||
|
||||
@@ -50,9 +48,9 @@ public class TileCocoon extends TileMod {
|
||||
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
|
||||
|
||||
EntityAgeable entity = null;
|
||||
|
||||
|
||||
float villagerChance = Math.min(1F, (float) emeraldsGiven / (float) MAX_EMERALDS);
|
||||
|
||||
|
||||
if(Math.random() < villagerChance) {
|
||||
EntityVillager villager = new EntityVillager(worldObj);
|
||||
VillagerRegistry.applyRandomTrade(villager, worldObj.rand);
|
||||
@@ -92,7 +90,7 @@ public class TileCocoon extends TileMod {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(entity != null) {
|
||||
entity.setPosition(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5);
|
||||
entity.setGrowingAge(-24000);
|
||||
|
||||
@@ -11,20 +11,17 @@
|
||||
package vazkii.botania.common.block.tile;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.api.wand.IWandBindable;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
@@ -45,13 +42,13 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
public void mountEntity(EntityLivingBase e) {
|
||||
if(e.ridingEntity != null || worldObj.isRemote || bindY == -1 || !isValidBinding())
|
||||
return;
|
||||
|
||||
|
||||
EntityPlayerMover mover = new EntityPlayerMover(worldObj, xCoord, yCoord, zCoord, bindX, bindY, bindZ);
|
||||
worldObj.spawnEntityInWorld(mover);
|
||||
e.mountEntity(mover);
|
||||
worldObj.playSoundAtEntity(mover, "botania:lightRelay", 0.2F, (float) Math.random() * 0.3F + 0.7F);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
ticksElapsed++;
|
||||
@@ -80,7 +77,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean isValidBinding() {
|
||||
Block block = worldObj.getBlock(bindX, bindY, bindZ);
|
||||
return block == ModBlocks.lightRelay;
|
||||
@@ -124,17 +121,17 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
cmp.setInteger(TAG_BIND_Y, bindY);
|
||||
cmp.setInteger(TAG_BIND_Z, bindZ);
|
||||
}
|
||||
|
||||
|
||||
public static class EntityPlayerMover extends Entity {
|
||||
|
||||
private static final String TAG_EXIT_X = "exitX";
|
||||
private static final String TAG_EXIT_Y = "exitY";
|
||||
private static final String TAG_EXIT_Z = "exitZ";
|
||||
|
||||
|
||||
public EntityPlayerMover(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
|
||||
public EntityPlayerMover(World world, int x, int y, int z, int exitX, int exitY, int exitZ) {
|
||||
this(world);
|
||||
setPosition(x + 0.5, y + 0.5, z + 0.5);
|
||||
@@ -145,7 +142,7 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
protected void entityInit() {
|
||||
setSize(0F, 0F);
|
||||
noClip = true;
|
||||
|
||||
|
||||
dataWatcher.addObject(20, 0);
|
||||
dataWatcher.addObject(21, 0);
|
||||
dataWatcher.addObject(22, 0);
|
||||
@@ -153,23 +150,23 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
dataWatcher.setObjectWatched(21);
|
||||
dataWatcher.setObjectWatched(22);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
if(ticksExisted % 30 == 0)
|
||||
worldObj.playSoundAtEntity(this, "botania:lightRelay", 0.2F, (float) Math.random() * 0.3F + 0.7F);
|
||||
worldObj.playSoundAtEntity(this, "botania:lightRelay", 0.2F, (float) Math.random() * 0.3F + 0.7F);
|
||||
|
||||
if(riddenByEntity == null && !worldObj.isRemote) {
|
||||
setDead();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int exitX = getExitX();
|
||||
int exitY = getExitY();
|
||||
int exitZ = getExitZ();
|
||||
|
||||
|
||||
int x = net.minecraft.util.MathHelper.floor_double(posX);
|
||||
int y = net.minecraft.util.MathHelper.floor_double(posY);
|
||||
int z = net.minecraft.util.MathHelper.floor_double(posZ);
|
||||
@@ -183,45 +180,44 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
worldObj.setBlockMetadataWithNotify(x, y, z, meta | 8, 1 | 2);
|
||||
worldObj.scheduleBlockUpdate(x, y, z, tile.getBlockType(), tile.getBlockType().tickRate(worldObj));
|
||||
}
|
||||
|
||||
|
||||
ChunkCoordinates bind = ((TileLightRelay) tile).getBinding();
|
||||
if(bind != null) {
|
||||
setExit(bind.posX, bind.posY, bind.posZ);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
posY += 1.5;
|
||||
setDead();
|
||||
} else {
|
||||
Vector3 thisVec = Vector3.fromEntity(this);
|
||||
Vector3 motVec = thisVec.negate().add(exitX + 0.5, exitY + 0.5, exitZ + 0.5).normalize().multiply(0.5);
|
||||
|
||||
float partMod = 0F;
|
||||
|
||||
Color color;
|
||||
|
||||
|
||||
int count = 4;
|
||||
for(int i = 0; i < count; i++) {
|
||||
color = Color.getHSBColor((float) (ticksExisted / 36F) + (1F / count * i), 1F, 1F);
|
||||
double rad = Math.PI * 2.0 / count * i + ((double) ticksExisted / Math.PI);
|
||||
color = Color.getHSBColor(ticksExisted / 36F + 1F / count * i, 1F, 1F);
|
||||
double rad = Math.PI * 2.0 / count * i + ticksExisted / Math.PI;
|
||||
double cos = Math.cos(rad);
|
||||
double sin = Math.sin(rad);
|
||||
double s = 0.4;
|
||||
|
||||
Botania.proxy.sparkleFX(worldObj, posX + cos * s, posY - 0.5, posZ + sin * s, (float) color.getRed() / 255F, (float) color.getGreen() / 255F, (float) color.getBlue() / 255F, 1.2F, 10);
|
||||
|
||||
Botania.proxy.sparkleFX(worldObj, posX + cos * s, posY - 0.5, posZ + sin * s, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, 1.2F, 10);
|
||||
}
|
||||
|
||||
posX += motVec.x;
|
||||
posX += motVec.x;
|
||||
posY += motVec.y;
|
||||
posZ += motVec.z;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldRiderSit() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) {
|
||||
return false;
|
||||
@@ -238,25 +234,25 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
cmp.setInteger(TAG_EXIT_Y, getExitY());
|
||||
cmp.setInteger(TAG_EXIT_Z, getExitZ());
|
||||
}
|
||||
|
||||
|
||||
public int getExitX() {
|
||||
return dataWatcher.getWatchableObjectInt(20);
|
||||
}
|
||||
|
||||
|
||||
public int getExitY() {
|
||||
return dataWatcher.getWatchableObjectInt(21);
|
||||
}
|
||||
|
||||
|
||||
public int getExitZ() {
|
||||
return dataWatcher.getWatchableObjectInt(22);
|
||||
}
|
||||
|
||||
|
||||
public void setExit(int x, int y, int z) {
|
||||
dataWatcher.updateObject(20, x);
|
||||
dataWatcher.updateObject(21, y);
|
||||
dataWatcher.updateObject(22, z);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class TileTinyPotato extends TileMod {
|
||||
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "botania:doit", 1F, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void jump() {
|
||||
if(jumpTicks == 0)
|
||||
jumpTicks = 20;
|
||||
|
||||
@@ -21,15 +21,15 @@ public class PotionClear extends PotionMod {
|
||||
public PotionClear() {
|
||||
super(ConfigHandler.potionIDClear, LibPotionNames.CLEAR, false, 0xFFFFFF, 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isInstant() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void affectEntity(EntityLivingBase e, EntityLivingBase e1, int t, double d) {
|
||||
e1.curePotionEffects(new ItemStack(Items.milk_bucket));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -116,7 +116,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModBlocks.felPumpkin);
|
||||
addItem(ModItems.waterBowl);
|
||||
}
|
||||
|
||||
|
||||
addBlock(ModBlocks.livingrock);
|
||||
addBlock(ModBlocks.livingwood);
|
||||
addBlock(ModBlocks.openCrate);
|
||||
@@ -367,13 +367,13 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
for(int i = 0; i < 24; i++)
|
||||
addBlock(ModFluffBlocks.biomeStoneSlabs[i]);
|
||||
addBlock(ModFluffBlocks.biomeStoneWall);
|
||||
|
||||
|
||||
addBlock(ModBlocks.endStoneBrick);
|
||||
addBlock(ModFluffBlocks.endStoneSlab);
|
||||
addBlock(ModFluffBlocks.endStoneStairs);
|
||||
addBlock(ModFluffBlocks.enderBrickSlab);
|
||||
addBlock(ModFluffBlocks.enderBrickStairs);
|
||||
|
||||
|
||||
addItem(ModItems.cosmetic);
|
||||
}
|
||||
|
||||
@@ -385,7 +385,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
ItemStack stack = new ItemStack(block);
|
||||
block.getSubBlocks(stack.getItem(), this, list);
|
||||
}
|
||||
|
||||
|
||||
private void addStack(ItemStack stack) {
|
||||
list.add(stack);
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
*/
|
||||
package vazkii.botania.common.core.command;
|
||||
|
||||
import vazkii.botania.common.core.helper.MathHelper;
|
||||
import vazkii.botania.common.world.SkyblockWorldEvents;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.common.core.helper.MathHelper;
|
||||
import vazkii.botania.common.world.SkyblockWorldEvents;
|
||||
|
||||
public class CommandSkyblockSpread extends CommandBase {
|
||||
|
||||
@@ -30,37 +30,37 @@ public class CommandSkyblockSpread extends CommandBase {
|
||||
public String getCommandUsage(ICommandSender p_71518_1_) {
|
||||
return "<player> [<range>]";
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRequiredPermissionLevel() {
|
||||
return 2;
|
||||
}
|
||||
public int getRequiredPermissionLevel() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processCommand(ICommandSender sender, String[] args) {
|
||||
int maxAllowed = 1000000;
|
||||
int minAllowed = 250;
|
||||
int minDist = 100;
|
||||
|
||||
|
||||
int maxrange = 200000;
|
||||
if(args.length == 2)
|
||||
maxrange = parseInt(sender, args[1]);
|
||||
|
||||
|
||||
if(maxrange > maxAllowed)
|
||||
throw new CommandException("botaniamisc.skyblockRangeTooHigh");
|
||||
if(maxrange < minAllowed)
|
||||
throw new CommandException(StatCollector.translateToLocal("botaniamisc.skyblockRangeTooLow"));
|
||||
|
||||
|
||||
EntityPlayer player = getPlayer(sender, args[0]);
|
||||
if(player != null) {
|
||||
ChunkCoordinates spawn = player.worldObj.getSpawnPoint();
|
||||
int x, z;
|
||||
|
||||
|
||||
do {
|
||||
x = player.worldObj.rand.nextInt(maxrange) - maxrange / 2 + spawn.posX;
|
||||
z = player.worldObj.rand.nextInt(maxrange) - maxrange / 2 + spawn.posZ;
|
||||
} while(MathHelper.pointDistancePlane(x, z, spawn.posX, spawn.posZ) < minDist);
|
||||
|
||||
|
||||
SkyblockWorldEvents.spawnPlayer(player, x, spawn.posY, z, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,12 +190,12 @@ public class InternalMethodHandler extends DummyMethodHandler {
|
||||
public void drawComplexManaHUD(int color, int mana, int maxMana, String name, ScaledResolution res, ItemStack bindDisplay, boolean properlyBound) {
|
||||
HUDHandler.drawComplexManaHUD(color, mana, maxMana, name, res, bindDisplay, properlyBound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getBindDisplayForFlowerType(SubTileEntity e) {
|
||||
return e instanceof SubTileGenerating ? new ItemStack(ModBlocks.spreader) : e instanceof SubTileFunctional ? new ItemStack(ModBlocks.pool) : new ItemStack(ModItems.twigWand);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderLexiconText(int x, int y, int width, int height, String unlocalizedText) {
|
||||
PageText.renderText(x, y, width, height, unlocalizedText);
|
||||
@@ -247,7 +247,7 @@ public class InternalMethodHandler extends DummyMethodHandler {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
return block == ModBlocks.flower || block == ModBlocks.shinyFlower || block == ModBlocks.specialFlower;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void sendBaubleUpdatePacket(EntityPlayer player, int slot) {
|
||||
if(player instanceof EntityPlayerMP)
|
||||
|
||||
@@ -19,7 +19,6 @@ import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldType;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
@@ -103,7 +102,7 @@ public class CommonProxy {
|
||||
ChestGenHandler.init();
|
||||
|
||||
LexiconData.init();
|
||||
|
||||
|
||||
if(Botania.gardenOfGlassLoaded)
|
||||
new WorldTypeSkyblock();
|
||||
}
|
||||
|
||||
@@ -1615,12 +1615,12 @@ public final class ModCraftingRecipes {
|
||||
'B', new ItemStack(ModBlocks.endStoneBrick),
|
||||
'P', new ItemStack(Items.ender_pearl));
|
||||
recipeEnderBricks = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.endStoneBrick, 2, 3),
|
||||
"B", "B",
|
||||
'B', new ItemStack(ModBlocks.endStoneBrick, 1, 2));
|
||||
recipePillarEnderBricks = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Livingwood Bow Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.livingwoodBow),
|
||||
" TS", "T S", " TS",
|
||||
@@ -1808,12 +1808,12 @@ public final class ModCraftingRecipes {
|
||||
|
||||
// Cocoon of Caprice Recipe
|
||||
if(Botania.gardenOfGlassLoaded)
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.cocoon),
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.cocoon),
|
||||
"SSS", "SFS", "SIS",
|
||||
'S', new ItemStack(Items.string),
|
||||
'F', new ItemStack(ModBlocks.felPumpkin),
|
||||
'I', LibOreDict.MANA_STEEL);
|
||||
else addOreDictRecipe(new ItemStack(ModBlocks.cocoon),
|
||||
else addOreDictRecipe(new ItemStack(ModBlocks.cocoon),
|
||||
"SSS", "SPS", "SDS",
|
||||
'S', new ItemStack(Items.string),
|
||||
'P', LibOreDict.PIXIE_DUST,
|
||||
@@ -1823,69 +1823,69 @@ public final class ModCraftingRecipes {
|
||||
// Luminizer Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModBlocks.lightRelay), LibOreDict.RED_STRING, LibOreDict.DRAGONSTONE, new ItemStack(Items.glowstone_dust), new ItemStack(Items.glowstone_dust));
|
||||
recipeLuminizer = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Detector Luminizer Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModBlocks.lightRelay, 1, 1), new ItemStack(ModBlocks.lightRelay), new ItemStack(Items.redstone));
|
||||
recipeDetectorLuminizer = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Luminizer Launcher Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.lightLauncher),
|
||||
"DDD", "DLD",
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.lightLauncher),
|
||||
"DDD", "DLD",
|
||||
'D', LibOreDict.DREAM_WOOD,
|
||||
'L', new ItemStack(ModBlocks.lightRelay));
|
||||
recipeLuminizerLauncher = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Floral Obedience Stick Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.obedienceStick),
|
||||
addOreDictRecipe(new ItemStack(ModItems.obedienceStick),
|
||||
" M", " T ", "T ",
|
||||
'M', LibOreDict.MANA_STEEL,
|
||||
'T', LibOreDict.LIVINGWOOD_TWIG);
|
||||
recipeObedienceStick = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Cacophonium Recipe
|
||||
if(OreDictionary.getOres("ingotBrass").isEmpty())
|
||||
addOreDictRecipe(new ItemStack(ModItems.cacophonium),
|
||||
addOreDictRecipe(new ItemStack(ModItems.cacophonium),
|
||||
" G ", "GNG", "GG ",
|
||||
'G', "ingotGold",
|
||||
'N', new ItemStack(Blocks.noteblock));
|
||||
else addOreDictRecipe(new ItemStack(ModItems.cacophonium),
|
||||
else addOreDictRecipe(new ItemStack(ModItems.cacophonium),
|
||||
" G ", "GNG", "GG ",
|
||||
'G', "ingotBrass",
|
||||
'N', new ItemStack(Blocks.noteblock));
|
||||
recipeCacophonium = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Manastorm Charge Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.manaBomb),
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.manaBomb),
|
||||
"LTL", "TGT", "LTL",
|
||||
'L', LibOreDict.LIVING_WOOD,
|
||||
'T', new ItemStack(Blocks.tnt),
|
||||
'G', LibOreDict.LIFE_ESSENCE);
|
||||
recipeManaBomb = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Cobweb Recipe
|
||||
addOreDictRecipe(new ItemStack(Blocks.web),
|
||||
addOreDictRecipe(new ItemStack(Blocks.web),
|
||||
"S S", " M ", "S S",
|
||||
'S', new ItemStack(Items.string),
|
||||
'M', LibOreDict.MANA_STRING);
|
||||
recipeCobweb = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Slime in a Bottle Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.slimeBottle),
|
||||
addOreDictRecipe(new ItemStack(ModItems.slimeBottle),
|
||||
"EGE", "ESE", " E ",
|
||||
'E', LibOreDict.ELEMENTIUM,
|
||||
'G', new ItemStack(ModBlocks.elfGlass),
|
||||
'S', new ItemStack(Items.slime_ball));
|
||||
recipeSlimeBottle = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Starcaller Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.starSword),
|
||||
addOreDictRecipe(new ItemStack(ModItems.starSword),
|
||||
" I", "AD ", "TA ",
|
||||
'I', LibOreDict.ELEMENTIUM,
|
||||
'D', LibOreDict.DRAGONSTONE,
|
||||
'A', LibOreDict.ENDER_AIR_BOTTLE,
|
||||
'T', new ItemStack(ModItems.terraSword));
|
||||
recipeStarSword = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Storage Block/Nugget Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
@@ -1958,7 +1958,7 @@ public final class ModCraftingRecipes {
|
||||
addWall(ModFluffBlocks.biomeStoneA, i + 8, ModFluffBlocks.biomeStoneWall, i);
|
||||
for(int i = 0; i < 4; i++)
|
||||
addWall(ModFluffBlocks.stone, i, ModFluffBlocks.stoneWall, i);
|
||||
|
||||
|
||||
// Biome Stone Recipes
|
||||
for(int i = 0; i < 8; i++) {
|
||||
GameRegistry.addSmelting(new ItemStack(ModFluffBlocks.biomeStoneA, 1, i + 8), new ItemStack(ModFluffBlocks.biomeStoneA, 1, i), 0.1F);
|
||||
@@ -1978,7 +1978,7 @@ public final class ModCraftingRecipes {
|
||||
// Misc Recipes
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.reeds, 9, 0), new ItemStack(ModBlocks.reedBlock));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.wheat, 4, 0), new ItemStack(ModBlocks.thatch));
|
||||
|
||||
|
||||
if(Botania.gardenOfGlassLoaded)
|
||||
initGardenOfGlass();
|
||||
}
|
||||
@@ -1987,19 +1987,19 @@ public final class ModCraftingRecipes {
|
||||
// Root to Sapling
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.sapling), LibOreDict.ROOT, LibOreDict.ROOT, LibOreDict.ROOT, LibOreDict.ROOT);
|
||||
recipeRootToSapling = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Root to Fertilizer
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.fertilizer), LibOreDict.ROOT);
|
||||
recipeRootToFertilizer = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Pebble to Cobble
|
||||
addShapelessOreDictRecipe(new ItemStack(Blocks.cobblestone), LibOreDict.PEBBLE, LibOreDict.PEBBLE, LibOreDict.PEBBLE, LibOreDict.PEBBLE);
|
||||
recipePebbleCobblestone = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Magma Pearl to Slimeball
|
||||
addShapelessOreDictRecipe(new ItemStack(Items.slime_ball), new ItemStack(Items.magma_cream), new ItemStack(Items.water_bucket));
|
||||
recipeMagmaToSlimeball = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Fel Pumpkin
|
||||
GameRegistry.addRecipe(new ItemStack(ModBlocks.felPumpkin),
|
||||
" S ", "BPF", " G ",
|
||||
@@ -2009,7 +2009,7 @@ public final class ModCraftingRecipes {
|
||||
'F', new ItemStack(Items.rotten_flesh),
|
||||
'G', new ItemStack(Items.gunpowder));
|
||||
recipeFelPumpkin = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Ender Portal
|
||||
addOreDictRecipe(new ItemStack(Blocks.end_portal_frame),
|
||||
"OGO",
|
||||
@@ -2017,7 +2017,7 @@ public final class ModCraftingRecipes {
|
||||
'G', LibOreDict.LIFE_ESSENCE);
|
||||
recipeEndPortal = BotaniaAPI.getLatestAddedRecipe();
|
||||
}
|
||||
|
||||
|
||||
private static void addStairsAndSlabs(Block block, int meta, Block stairs, Block slab) {
|
||||
GameRegistry.addRecipe(new ItemStack(slab, 6),
|
||||
"QQQ",
|
||||
@@ -2029,10 +2029,10 @@ public final class ModCraftingRecipes {
|
||||
"Q ", "QQ ", "QQQ",
|
||||
'Q', new ItemStack(block, 1, meta));
|
||||
}
|
||||
|
||||
|
||||
private static void addWall(Block block, int blockMeta, Block wall, int wallMeta) {
|
||||
GameRegistry.addRecipe(new ItemStack(wall, 6, wallMeta),
|
||||
"BBB", "BBB",
|
||||
GameRegistry.addRecipe(new ItemStack(wall, 6, wallMeta),
|
||||
"BBB", "BBB",
|
||||
'B', new ItemStack(block, 1, blockMeta));
|
||||
}
|
||||
|
||||
|
||||
@@ -137,12 +137,12 @@ public final class ModManaAlchemyRecipes {
|
||||
for(int i = 0; i < 4; i++)
|
||||
stoneRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModFluffBlocks.stone, 1, i), new ItemStack(ModFluffBlocks.stone, 1, i == 0 ? 3 : i - 1), 200));
|
||||
}
|
||||
|
||||
|
||||
tallgrassRecipes = new ArrayList();
|
||||
tallgrassRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.deadbush), new ItemStack(Blocks.tallgrass, 1, 2), 500));
|
||||
tallgrassRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.tallgrass, 1, 1), new ItemStack(Blocks.deadbush), 500));
|
||||
tallgrassRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.tallgrass, 1, 2), new ItemStack(Blocks.tallgrass, 1, 1), 500));
|
||||
|
||||
|
||||
flowersRecipes = new ArrayList();
|
||||
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.red_flower), new ItemStack(Blocks.yellow_flower), 400));
|
||||
flowersRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Blocks.red_flower, 1, 1), new ItemStack(Blocks.red_flower), 400));
|
||||
|
||||
@@ -44,7 +44,7 @@ public final class ModManaInfusionRecipes {
|
||||
public static RecipeManaInfusion manaStringRecipe;
|
||||
|
||||
public static RecipeManaInfusion sugarCaneRecipe;
|
||||
|
||||
|
||||
public static void init() {
|
||||
poolRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModBlocks.pool), new ItemStack(ModBlocks.pool, 1, 2), 320);
|
||||
|
||||
@@ -84,7 +84,7 @@ public final class ModManaInfusionRecipes {
|
||||
|
||||
if(Botania.gardenOfGlassLoaded)
|
||||
sugarCaneRecipe = BotaniaAPI.registerManaInfusionRecipe(new ItemStack(Items.reeds), new ItemStack(Blocks.hay_block), 2000);
|
||||
|
||||
|
||||
BotaniaAPI.registerManaInfusionRecipe(new ItemStack(ModItems.manaBottle), new ItemStack(Items.glass_bottle), 5000);
|
||||
}
|
||||
|
||||
|
||||
@@ -95,11 +95,11 @@ public final class ModPetalRecipes {
|
||||
dreadthorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DREADTHORN), blackMana, purpleMana, cyan, cyan, black, purple, redstoneRoot);
|
||||
heiseiDreamRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HEISEI_DREAM), purpleMana, pinkMana, magentaMana, purple, pink, magenta, runeWrath, pixieDust);
|
||||
tigerseyeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_TIGERSEYE), yellow, brownMana, orangeMana, lime, runeAutumn);
|
||||
|
||||
|
||||
if(Botania.gardenOfGlassLoaded)
|
||||
orechidRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID), gray, grayMana, lightGray, lightGrayMana, lightBlue, yellow, green, red);
|
||||
else orechidRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID), gray, grayMana, lightGray, lightGrayMana, lightBlue, yellow, green, red, runePride, runeSloth, redstoneRoot, pixieDust);
|
||||
|
||||
|
||||
orechidIgnemRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ORECHID_IGNEM), red, redMana, black, blackMana, white, white, blue, yellow, runePride, runeSloth, redstoneRoot, pixieDust);
|
||||
if(ConfigHandler.fallenKanadeEnabled)
|
||||
fallenKanadeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_FALLEN_KANADE), white, whiteMana, whiteMana, yellowMana, orangeMana, brownMana, runeSpring);
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
package vazkii.botania.common.crafting;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibOreDict;
|
||||
|
||||
@@ -81,7 +81,7 @@ public class HelmRevealingRecipe implements IRecipe {
|
||||
//Copy Runic Hardening
|
||||
byte runicHardening = ItemNBTHelper.getByte(helmCopy, "RS.HARDEN", (byte)0);
|
||||
ItemNBTHelper.setByte(newHelm, "RS.HARDEN", runicHardening);
|
||||
|
||||
|
||||
return newHelm;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,14 +34,14 @@ public class EntityBabylonWeapon extends EntityThrowableCopy {
|
||||
private static final String TAG_LIVE_TICKS = "liveTicks";
|
||||
private static final String TAG_DELAY = "delay";
|
||||
private static final String TAG_ROTATION = "rotation";
|
||||
|
||||
|
||||
public EntityBabylonWeapon(World world) {
|
||||
super(world);
|
||||
}
|
||||
|
||||
public EntityBabylonWeapon(World world, EntityLivingBase thrower) {
|
||||
super(world, thrower);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
@@ -139,7 +139,7 @@ public class EntityBabylonWeapon extends EntityThrowableCopy {
|
||||
}
|
||||
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
motionX = x;
|
||||
motionY = y;
|
||||
motionZ = z;
|
||||
@@ -147,7 +147,7 @@ public class EntityBabylonWeapon extends EntityThrowableCopy {
|
||||
if(liveTime > delay)
|
||||
Botania.proxy.wispFX(worldObj, posX, posY, posZ, 1F, 1F, 0F, 0.3F, 0F);
|
||||
|
||||
if(liveTime > (200 + delay))
|
||||
if(liveTime > 200 + delay)
|
||||
setDead();
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ public class EntityBabylonWeapon extends EntityThrowableCopy {
|
||||
setDead();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound cmp) {
|
||||
super.writeEntityToNBT(cmp);
|
||||
@@ -170,7 +170,7 @@ public class EntityBabylonWeapon extends EntityThrowableCopy {
|
||||
cmp.setInteger(TAG_DELAY, getDelay());
|
||||
cmp.setFloat(TAG_ROTATION, getRotation());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound cmp) {
|
||||
super.readEntityFromNBT(cmp);
|
||||
@@ -221,7 +221,7 @@ public class EntityBabylonWeapon extends EntityThrowableCopy {
|
||||
public void setDelay(int delay) {
|
||||
dataWatcher.updateObject(24, delay);
|
||||
}
|
||||
|
||||
|
||||
public float getRotation() {
|
||||
return dataWatcher.getWatchableObjectFloat(25);
|
||||
}
|
||||
@@ -229,5 +229,5 @@ public class EntityBabylonWeapon extends EntityThrowableCopy {
|
||||
public void setRotation(float rot) {
|
||||
dataWatcher.updateObject(25, rot);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -19,7 +19,6 @@ import java.util.regex.Pattern;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -374,7 +373,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
if(par1) {
|
||||
for(int pl = 0; pl < playersWhoAttacked.size(); pl++) {
|
||||
boolean hard = isHardMode();
|
||||
entityDropItem(new ItemStack(ModItems.manaResource, pl == 0 ? (hard ? 16 : 8) : (hard ? 10 : 6), 5), 1F);
|
||||
entityDropItem(new ItemStack(ModItems.manaResource, pl == 0 ? hard ? 16 : 8 : hard ? 10 : 6, 5), 1F);
|
||||
boolean droppedRecord = false;
|
||||
|
||||
if(hard) {
|
||||
@@ -438,7 +437,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
@Override
|
||||
public void onLivingUpdate() {
|
||||
super.onLivingUpdate();
|
||||
|
||||
|
||||
boolean peaceful = worldObj.difficultySetting == EnumDifficulty.PEACEFUL;
|
||||
if(!worldObj.isRemote && peaceful)
|
||||
setDead();
|
||||
@@ -759,7 +758,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
GL11.glPushMatrix();
|
||||
int px = x + 160;
|
||||
int py = y + 12;
|
||||
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ItemStack stack = new ItemStack(Items.skull, 1, 3);
|
||||
mc.renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
@@ -767,7 +766,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderItem.getInstance().renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, stack, px, py);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
|
||||
|
||||
boolean unicode = mc.fontRenderer.getUnicodeFlag();
|
||||
mc.fontRenderer.setUnicodeFlag(true);
|
||||
mc.fontRenderer.drawStringWithShadow("" + getPlayerCount(), px + 15, py + 4, 0xFFFFFF);
|
||||
@@ -806,16 +805,17 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
|
||||
return background ? null : shaderCallback;
|
||||
}
|
||||
|
||||
|
||||
public static class BeaconComponent extends MultiblockComponent {
|
||||
|
||||
public BeaconComponent(ChunkCoordinates relPos) {
|
||||
super(relPos, Blocks.iron_block, 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean matches(World world, int x, int y, int z) {
|
||||
return world.getBlock(x, y, z).isBeaconBase(world, x, y, z, x - relPos.posX, y - relPos.posY, z - relPos.posZ);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public class EntityFallingStar extends EntityThrowableCopy {
|
||||
super(world);
|
||||
setSize(0F, 0F);
|
||||
}
|
||||
|
||||
|
||||
public EntityFallingStar(World world, EntityLivingBase e) {
|
||||
super(world, e);
|
||||
setSize(0F, 0F);
|
||||
@@ -37,15 +37,15 @@ public class EntityFallingStar extends EntityThrowableCopy {
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
|
||||
|
||||
float dist = 1.5F;
|
||||
for(int i = 0; i < 10; i++) {
|
||||
float xs = (float) (Math.random() - 0.5) * dist;
|
||||
float xs = (float) (Math.random() - 0.5) * dist;
|
||||
float ys = (float) (Math.random() - 0.5) * dist;
|
||||
float zs = (float) (Math.random() - 0.5) * dist;
|
||||
Botania.proxy.sparkleFX(worldObj, posX + xs, posY + ys, posZ + zs, 1F, 0.4F, 1F, 2F, 6);
|
||||
}
|
||||
|
||||
|
||||
EntityLivingBase thrower = getThrower();
|
||||
if(!worldObj.isRemote && thrower != null) {
|
||||
AxisAlignedBB axis = AxisAlignedBB.getBoundingBox(posX, posY, posZ, lastTickPosX, lastTickPosY, lastTickPosZ).expand(2, 2, 2);
|
||||
@@ -60,7 +60,7 @@ public class EntityFallingStar extends EntityThrowableCopy {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(ticksExisted > 200)
|
||||
setDead();
|
||||
}
|
||||
@@ -73,11 +73,11 @@ public class EntityFallingStar extends EntityThrowableCopy {
|
||||
pos.entityHit.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) thrower), 10);
|
||||
else pos.entityHit.attackEntityFrom(DamageSource.generic, 10);
|
||||
}
|
||||
|
||||
|
||||
Block block = worldObj.getBlock(pos.blockX, pos.blockY, pos.blockZ);
|
||||
if(ConfigHandler.blockBreakParticles && !block.isAir(worldObj, pos.blockX, pos.blockY, pos.blockZ))
|
||||
worldObj.playAuxSFX(2001, pos.blockX, pos.blockY, pos.blockZ, Block.getIdFromBlock(block) + (worldObj.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ) << 12));
|
||||
|
||||
|
||||
setDead();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.lens.ItemLens;
|
||||
@@ -27,11 +26,11 @@ public class EntityManaStorm extends Entity {
|
||||
|
||||
public static final int TOTAL_BURSTS = 250;
|
||||
public static final int DEATH_TIME = 200;
|
||||
|
||||
|
||||
public int liveTime;
|
||||
public int burstsFired;
|
||||
public int deathTime;
|
||||
|
||||
|
||||
public EntityManaStorm(World p_i1582_1_) {
|
||||
super(p_i1582_1_);
|
||||
}
|
||||
@@ -40,19 +39,19 @@ public class EntityManaStorm extends Entity {
|
||||
protected void entityInit() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
liveTime++;
|
||||
|
||||
int diffTime = Math.max(1, 30 - (int) ((float) liveTime / 45f));
|
||||
|
||||
int diffTime = Math.max(1, 30 - (int) (liveTime / 45f));
|
||||
if(burstsFired < TOTAL_BURSTS && liveTime % diffTime == 0) {
|
||||
if(!worldObj.isRemote)
|
||||
spawnBurst();
|
||||
burstsFired++;
|
||||
}
|
||||
|
||||
|
||||
if(burstsFired >= TOTAL_BURSTS) {
|
||||
deathTime++;
|
||||
if(deathTime >= DEATH_TIME) {
|
||||
@@ -61,7 +60,7 @@ public class EntityManaStorm extends Entity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void spawnBurst() {
|
||||
EntityManaBurst burst = new EntityManaBurst(worldObj);
|
||||
burst.setPosition(posX, posY, posZ);
|
||||
@@ -76,7 +75,7 @@ public class EntityManaStorm extends Entity {
|
||||
|
||||
ItemStack lens = new ItemStack(ModItems.lens, 1, ItemLens.STORM);
|
||||
burst.setSourceLens(lens);
|
||||
|
||||
|
||||
Vector3 motion = new Vector3(Math.random() - 0.5, Math.random() - 0.5, Math.random() - 0.5).normalize().multiply(motionModifier);
|
||||
burst.setMotion(motion.x, motion.y, motion.z);
|
||||
worldObj.spawnEntityInWorld(burst);
|
||||
|
||||
@@ -66,7 +66,7 @@ public class EntityPinkWither extends EntityWither {
|
||||
protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
// COPYPASTA
|
||||
|
||||
private double func_82214_u(int p_82214_1_)
|
||||
|
||||
@@ -42,24 +42,24 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
private String throwerName;
|
||||
private int ticksInGround;
|
||||
private int ticksInAir;
|
||||
private static final String __OBFID = "CL_00001723";
|
||||
|
||||
public EntityThrowableCopy(World p_i1776_1_)
|
||||
{
|
||||
super(p_i1776_1_);
|
||||
this.setSize(0.25F, 0.25F);
|
||||
setSize(0.25F, 0.25F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {}
|
||||
|
||||
/**
|
||||
* Checks if the entity is in range to render by using the past in distance and comparing it to its average edge
|
||||
* length * 64 * renderDistanceWeight Args: distance
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean isInRangeToRenderDist(double p_70112_1_)
|
||||
{
|
||||
double d1 = this.boundingBox.getAverageEdgeLength() * 4.0D;
|
||||
double d1 = boundingBox.getAverageEdgeLength() * 4.0D;
|
||||
d1 *= 64.0D;
|
||||
return p_70112_1_ < d1 * d1;
|
||||
}
|
||||
@@ -67,28 +67,28 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
public EntityThrowableCopy(World p_i1777_1_, EntityLivingBase p_i1777_2_)
|
||||
{
|
||||
super(p_i1777_1_);
|
||||
this.thrower = p_i1777_2_;
|
||||
this.setSize(0.25F, 0.25F);
|
||||
this.setLocationAndAngles(p_i1777_2_.posX, p_i1777_2_.posY + (double)p_i1777_2_.getEyeHeight(), p_i1777_2_.posZ, p_i1777_2_.rotationYaw, p_i1777_2_.rotationPitch);
|
||||
this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
|
||||
this.posY -= 0.10000000149011612D;
|
||||
this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
this.yOffset = 0.0F;
|
||||
thrower = p_i1777_2_;
|
||||
setSize(0.25F, 0.25F);
|
||||
setLocationAndAngles(p_i1777_2_.posX, p_i1777_2_.posY + p_i1777_2_.getEyeHeight(), p_i1777_2_.posZ, p_i1777_2_.rotationYaw, p_i1777_2_.rotationPitch);
|
||||
posX -= MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * 0.16F;
|
||||
posY -= 0.10000000149011612D;
|
||||
posZ -= MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * 0.16F;
|
||||
setPosition(posX, posY, posZ);
|
||||
yOffset = 0.0F;
|
||||
float f = 0.4F;
|
||||
this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * f);
|
||||
this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI) * f);
|
||||
this.motionY = (double)(-MathHelper.sin((this.rotationPitch + this.func_70183_g()) / 180.0F * (float)Math.PI) * f);
|
||||
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, this.func_70182_d(), 1.0F);
|
||||
motionX = -MathHelper.sin(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI) * f;
|
||||
motionZ = MathHelper.cos(rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(rotationPitch / 180.0F * (float)Math.PI) * f;
|
||||
motionY = -MathHelper.sin((rotationPitch + func_70183_g()) / 180.0F * (float)Math.PI) * f;
|
||||
setThrowableHeading(motionX, motionY, motionZ, func_70182_d(), 1.0F);
|
||||
}
|
||||
|
||||
public EntityThrowableCopy(World p_i1778_1_, double p_i1778_2_, double p_i1778_4_, double p_i1778_6_)
|
||||
{
|
||||
super(p_i1778_1_);
|
||||
this.ticksInGround = 0;
|
||||
this.setSize(0.25F, 0.25F);
|
||||
this.setPosition(p_i1778_2_, p_i1778_4_, p_i1778_6_);
|
||||
this.yOffset = 0.0F;
|
||||
ticksInGround = 0;
|
||||
setSize(0.25F, 0.25F);
|
||||
setPosition(p_i1778_2_, p_i1778_4_, p_i1778_6_);
|
||||
yOffset = 0.0F;
|
||||
}
|
||||
|
||||
protected float func_70182_d()
|
||||
@@ -104,259 +104,265 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
/**
|
||||
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
|
||||
*/
|
||||
public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
|
||||
{
|
||||
float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_);
|
||||
p_70186_1_ /= (double)f2;
|
||||
p_70186_3_ /= (double)f2;
|
||||
p_70186_5_ /= (double)f2;
|
||||
p_70186_1_ += this.rand.nextGaussian() * 0.007499999832361937D * (double)p_70186_8_;
|
||||
p_70186_3_ += this.rand.nextGaussian() * 0.007499999832361937D * (double)p_70186_8_;
|
||||
p_70186_5_ += this.rand.nextGaussian() * 0.007499999832361937D * (double)p_70186_8_;
|
||||
p_70186_1_ *= (double)p_70186_7_;
|
||||
p_70186_3_ *= (double)p_70186_7_;
|
||||
p_70186_5_ *= (double)p_70186_7_;
|
||||
this.motionX = p_70186_1_;
|
||||
this.motionY = p_70186_3_;
|
||||
this.motionZ = p_70186_5_;
|
||||
float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70186_3_, (double)f3) * 180.0D / Math.PI);
|
||||
this.ticksInGround = 0;
|
||||
}
|
||||
@Override
|
||||
public void setThrowableHeading(double p_70186_1_, double p_70186_3_, double p_70186_5_, float p_70186_7_, float p_70186_8_)
|
||||
{
|
||||
float f2 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_3_ * p_70186_3_ + p_70186_5_ * p_70186_5_);
|
||||
p_70186_1_ /= f2;
|
||||
p_70186_3_ /= f2;
|
||||
p_70186_5_ /= f2;
|
||||
p_70186_1_ += rand.nextGaussian() * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_3_ += rand.nextGaussian() * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_5_ += rand.nextGaussian() * 0.007499999832361937D * p_70186_8_;
|
||||
p_70186_1_ *= p_70186_7_;
|
||||
p_70186_3_ *= p_70186_7_;
|
||||
p_70186_5_ *= p_70186_7_;
|
||||
motionX = p_70186_1_;
|
||||
motionY = p_70186_3_;
|
||||
motionZ = p_70186_5_;
|
||||
float f3 = MathHelper.sqrt_double(p_70186_1_ * p_70186_1_ + p_70186_5_ * p_70186_5_);
|
||||
prevRotationYaw = rotationYaw = (float)(Math.atan2(p_70186_1_, p_70186_5_) * 180.0D / Math.PI);
|
||||
prevRotationPitch = rotationPitch = (float)(Math.atan2(p_70186_3_, f3) * 180.0D / Math.PI);
|
||||
ticksInGround = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the velocity to the args. Args: x, y, z
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
|
||||
{
|
||||
this.motionX = p_70016_1_;
|
||||
this.motionY = p_70016_3_;
|
||||
this.motionZ = p_70016_5_;
|
||||
/**
|
||||
* Sets the velocity to the args. Args: x, y, z
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setVelocity(double p_70016_1_, double p_70016_3_, double p_70016_5_)
|
||||
{
|
||||
motionX = p_70016_1_;
|
||||
motionY = p_70016_3_;
|
||||
motionZ = p_70016_5_;
|
||||
|
||||
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
|
||||
{
|
||||
float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
|
||||
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
|
||||
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(p_70016_3_, (double)f) * 180.0D / Math.PI);
|
||||
}
|
||||
}
|
||||
if (prevRotationPitch == 0.0F && prevRotationYaw == 0.0F)
|
||||
{
|
||||
float f = MathHelper.sqrt_double(p_70016_1_ * p_70016_1_ + p_70016_5_ * p_70016_5_);
|
||||
prevRotationYaw = rotationYaw = (float)(Math.atan2(p_70016_1_, p_70016_5_) * 180.0D / Math.PI);
|
||||
prevRotationPitch = rotationPitch = (float)(Math.atan2(p_70016_3_, f) * 180.0D / Math.PI);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
public void onUpdate()
|
||||
{
|
||||
this.lastTickPosX = this.posX;
|
||||
this.lastTickPosY = this.posY;
|
||||
this.lastTickPosZ = this.posZ;
|
||||
super.onUpdate();
|
||||
/**
|
||||
* Called to update the entity's position/logic.
|
||||
*/
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
lastTickPosX = posX;
|
||||
lastTickPosY = posY;
|
||||
lastTickPosZ = posZ;
|
||||
super.onUpdate();
|
||||
|
||||
if (this.throwableShake > 0)
|
||||
{
|
||||
--this.throwableShake;
|
||||
}
|
||||
if (throwableShake > 0)
|
||||
{
|
||||
--throwableShake;
|
||||
}
|
||||
|
||||
if (this.inGround)
|
||||
{
|
||||
if (this.worldObj.getBlock(this.field_145788_c, this.field_145786_d, this.field_145787_e) == this.field_145785_f)
|
||||
{
|
||||
++this.ticksInGround;
|
||||
if (inGround)
|
||||
{
|
||||
if (worldObj.getBlock(field_145788_c, field_145786_d, field_145787_e) == field_145785_f)
|
||||
{
|
||||
++ticksInGround;
|
||||
|
||||
if (this.ticksInGround == 1200)
|
||||
{
|
||||
this.setDead();
|
||||
}
|
||||
if (ticksInGround == 1200)
|
||||
{
|
||||
setDead();
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this.inGround = false;
|
||||
this.motionX *= (double)(this.rand.nextFloat() * 0.2F);
|
||||
this.motionY *= (double)(this.rand.nextFloat() * 0.2F);
|
||||
this.motionZ *= (double)(this.rand.nextFloat() * 0.2F);
|
||||
this.ticksInGround = 0;
|
||||
this.ticksInAir = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
++this.ticksInAir;
|
||||
}
|
||||
inGround = false;
|
||||
motionX *= rand.nextFloat() * 0.2F;
|
||||
motionY *= rand.nextFloat() * 0.2F;
|
||||
motionZ *= rand.nextFloat() * 0.2F;
|
||||
ticksInGround = 0;
|
||||
ticksInAir = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
++ticksInAir;
|
||||
}
|
||||
|
||||
Vec3 vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
Vec3 vec31 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31);
|
||||
vec3 = Vec3.createVectorHelper(this.posX, this.posY, this.posZ);
|
||||
vec31 = Vec3.createVectorHelper(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
|
||||
Vec3 vec3 = Vec3.createVectorHelper(posX, posY, posZ);
|
||||
Vec3 vec31 = Vec3.createVectorHelper(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
MovingObjectPosition movingobjectposition = worldObj.rayTraceBlocks(vec3, vec31);
|
||||
vec3 = Vec3.createVectorHelper(posX, posY, posZ);
|
||||
vec31 = Vec3.createVectorHelper(posX + motionX, posY + motionY, posZ + motionZ);
|
||||
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
vec31 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
|
||||
}
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
vec31 = Vec3.createVectorHelper(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord);
|
||||
}
|
||||
|
||||
if (!this.worldObj.isRemote)
|
||||
{
|
||||
Entity entity = null;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
double d0 = 0.0D;
|
||||
EntityLivingBase entitylivingbase = this.getThrower();
|
||||
if (!worldObj.isRemote)
|
||||
{
|
||||
Entity entity = null;
|
||||
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.addCoord(motionX, motionY, motionZ).expand(1.0D, 1.0D, 1.0D));
|
||||
double d0 = 0.0D;
|
||||
EntityLivingBase entitylivingbase = getThrower();
|
||||
|
||||
for (int j = 0; j < list.size(); ++j)
|
||||
{
|
||||
Entity entity1 = (Entity)list.get(j);
|
||||
for (int j = 0; j < list.size(); ++j)
|
||||
{
|
||||
Entity entity1 = (Entity)list.get(j);
|
||||
|
||||
if (entity1.canBeCollidedWith() && (entity1 != entitylivingbase || this.ticksInAir >= 5))
|
||||
{
|
||||
float f = 0.3F;
|
||||
AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31);
|
||||
if (entity1.canBeCollidedWith() && (entity1 != entitylivingbase || ticksInAir >= 5))
|
||||
{
|
||||
float f = 0.3F;
|
||||
AxisAlignedBB axisalignedbb = entity1.boundingBox.expand(f, f, f);
|
||||
MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31);
|
||||
|
||||
if (movingobjectposition1 != null)
|
||||
{
|
||||
double d1 = vec3.distanceTo(movingobjectposition1.hitVec);
|
||||
if (movingobjectposition1 != null)
|
||||
{
|
||||
double d1 = vec3.distanceTo(movingobjectposition1.hitVec);
|
||||
|
||||
if (d1 < d0 || d0 == 0.0D)
|
||||
{
|
||||
entity = entity1;
|
||||
d0 = d1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (d1 < d0 || d0 == 0.0D)
|
||||
{
|
||||
entity = entity1;
|
||||
d0 = d1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
}
|
||||
if (entity != null)
|
||||
{
|
||||
movingobjectposition = new MovingObjectPosition(entity);
|
||||
}
|
||||
}
|
||||
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && this.worldObj.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ) == Blocks.portal)
|
||||
{
|
||||
this.setInPortal();
|
||||
}
|
||||
else
|
||||
{
|
||||
this.onImpact(movingobjectposition);
|
||||
}
|
||||
}
|
||||
if (movingobjectposition != null)
|
||||
{
|
||||
if (movingobjectposition.typeOfHit == MovingObjectPosition.MovingObjectType.BLOCK && worldObj.getBlock(movingobjectposition.blockX, movingobjectposition.blockY, movingobjectposition.blockZ) == Blocks.portal)
|
||||
{
|
||||
setInPortal();
|
||||
}
|
||||
else
|
||||
{
|
||||
onImpact(movingobjectposition);
|
||||
}
|
||||
}
|
||||
|
||||
this.posX += this.motionX;
|
||||
this.posY += this.motionY;
|
||||
this.posZ += this.motionZ;
|
||||
float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
|
||||
posX += motionX;
|
||||
posY += motionY;
|
||||
posZ += motionZ;
|
||||
float f1 = MathHelper.sqrt_double(motionX * motionX + motionZ * motionZ);
|
||||
rotationYaw = (float)(Math.atan2(motionX, motionZ) * 180.0D / Math.PI);
|
||||
|
||||
for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)f1) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
|
||||
{
|
||||
;
|
||||
}
|
||||
for (rotationPitch = (float)(Math.atan2(motionY, f1) * 180.0D / Math.PI); rotationPitch - prevRotationPitch < -180.0F; prevRotationPitch -= 360.0F)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
|
||||
{
|
||||
this.prevRotationPitch += 360.0F;
|
||||
}
|
||||
while (rotationPitch - prevRotationPitch >= 180.0F)
|
||||
{
|
||||
prevRotationPitch += 360.0F;
|
||||
}
|
||||
|
||||
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
|
||||
{
|
||||
this.prevRotationYaw -= 360.0F;
|
||||
}
|
||||
while (rotationYaw - prevRotationYaw < -180.0F)
|
||||
{
|
||||
prevRotationYaw -= 360.0F;
|
||||
}
|
||||
|
||||
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
|
||||
{
|
||||
this.prevRotationYaw += 360.0F;
|
||||
}
|
||||
while (rotationYaw - prevRotationYaw >= 180.0F)
|
||||
{
|
||||
prevRotationYaw += 360.0F;
|
||||
}
|
||||
|
||||
this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
|
||||
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
|
||||
float f2 = 0.99F;
|
||||
float f3 = this.getGravityVelocity();
|
||||
rotationPitch = prevRotationPitch + (rotationPitch - prevRotationPitch) * 0.2F;
|
||||
rotationYaw = prevRotationYaw + (rotationYaw - prevRotationYaw) * 0.2F;
|
||||
float f2 = 0.99F;
|
||||
float f3 = getGravityVelocity();
|
||||
|
||||
if (this.isInWater())
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
float f4 = 0.25F;
|
||||
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f4, this.posY - this.motionY * (double)f4, this.posZ - this.motionZ * (double)f4, this.motionX, this.motionY, this.motionZ);
|
||||
}
|
||||
if (isInWater())
|
||||
{
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
float f4 = 0.25F;
|
||||
worldObj.spawnParticle("bubble", posX - motionX * f4, posY - motionY * f4, posZ - motionZ * f4, motionX, motionY, motionZ);
|
||||
}
|
||||
|
||||
f2 = 0.8F;
|
||||
}
|
||||
f2 = 0.8F;
|
||||
}
|
||||
|
||||
this.motionX *= (double)f2;
|
||||
this.motionY *= (double)f2;
|
||||
this.motionZ *= (double)f2;
|
||||
this.motionY -= (double)f3;
|
||||
this.setPosition(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
motionX *= f2;
|
||||
motionY *= f2;
|
||||
motionZ *= f2;
|
||||
motionY -= f3;
|
||||
setPosition(posX, posY, posZ);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the amount of gravity to apply to the thrown entity with each tick.
|
||||
*/
|
||||
protected float getGravityVelocity()
|
||||
{
|
||||
return 0.03F;
|
||||
}
|
||||
/**
|
||||
* Gets the amount of gravity to apply to the thrown entity with each tick.
|
||||
*/
|
||||
protected float getGravityVelocity()
|
||||
{
|
||||
return 0.03F;
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when this EntityThrowable hits a block or entity.
|
||||
*/
|
||||
protected abstract void onImpact(MovingObjectPosition p_70184_1_);
|
||||
/**
|
||||
* Called when this EntityThrowable hits a block or entity.
|
||||
*/
|
||||
protected abstract void onImpact(MovingObjectPosition p_70184_1_);
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
|
||||
{
|
||||
p_70014_1_.setShort("xTile", (short)this.field_145788_c);
|
||||
p_70014_1_.setShort("yTile", (short)this.field_145786_d);
|
||||
p_70014_1_.setShort("zTile", (short)this.field_145787_e);
|
||||
p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145785_f));
|
||||
p_70014_1_.setByte("shake", (byte)this.throwableShake);
|
||||
p_70014_1_.setByte("inGround", (byte)(this.inGround ? 1 : 0));
|
||||
/**
|
||||
* (abstract) Protected helper method to write subclass entity data to NBT.
|
||||
*/
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound p_70014_1_)
|
||||
{
|
||||
p_70014_1_.setShort("xTile", (short)field_145788_c);
|
||||
p_70014_1_.setShort("yTile", (short)field_145786_d);
|
||||
p_70014_1_.setShort("zTile", (short)field_145787_e);
|
||||
p_70014_1_.setByte("inTile", (byte)Block.getIdFromBlock(field_145785_f));
|
||||
p_70014_1_.setByte("shake", (byte)throwableShake);
|
||||
p_70014_1_.setByte("inGround", (byte)(inGround ? 1 : 0));
|
||||
|
||||
if ((this.throwerName == null || this.throwerName.length() == 0) && this.thrower != null && this.thrower instanceof EntityPlayer)
|
||||
{
|
||||
this.throwerName = this.thrower.getCommandSenderName();
|
||||
}
|
||||
if ((throwerName == null || throwerName.length() == 0) && thrower != null && thrower instanceof EntityPlayer)
|
||||
{
|
||||
throwerName = thrower.getCommandSenderName();
|
||||
}
|
||||
|
||||
p_70014_1_.setString("ownerName", this.throwerName == null ? "" : this.throwerName);
|
||||
}
|
||||
p_70014_1_.setString("ownerName", throwerName == null ? "" : throwerName);
|
||||
}
|
||||
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
|
||||
{
|
||||
this.field_145788_c = p_70037_1_.getShort("xTile");
|
||||
this.field_145786_d = p_70037_1_.getShort("yTile");
|
||||
this.field_145787_e = p_70037_1_.getShort("zTile");
|
||||
this.field_145785_f = Block.getBlockById(p_70037_1_.getByte("inTile") & 255);
|
||||
this.throwableShake = p_70037_1_.getByte("shake") & 255;
|
||||
this.inGround = p_70037_1_.getByte("inGround") == 1;
|
||||
this.throwerName = p_70037_1_.getString("ownerName");
|
||||
/**
|
||||
* (abstract) Protected helper method to read subclass entity data from NBT.
|
||||
*/
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound p_70037_1_)
|
||||
{
|
||||
field_145788_c = p_70037_1_.getShort("xTile");
|
||||
field_145786_d = p_70037_1_.getShort("yTile");
|
||||
field_145787_e = p_70037_1_.getShort("zTile");
|
||||
field_145785_f = Block.getBlockById(p_70037_1_.getByte("inTile") & 255);
|
||||
throwableShake = p_70037_1_.getByte("shake") & 255;
|
||||
inGround = p_70037_1_.getByte("inGround") == 1;
|
||||
throwerName = p_70037_1_.getString("ownerName");
|
||||
|
||||
if (this.throwerName != null && this.throwerName.length() == 0)
|
||||
{
|
||||
this.throwerName = null;
|
||||
}
|
||||
}
|
||||
if (throwerName != null && throwerName.length() == 0)
|
||||
{
|
||||
throwerName = null;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getShadowSize()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public float getShadowSize()
|
||||
{
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
public EntityLivingBase getThrower()
|
||||
{
|
||||
if (this.thrower == null && this.throwerName != null && this.throwerName.length() > 0)
|
||||
{
|
||||
this.thrower = this.worldObj.getPlayerEntityByName(this.throwerName);
|
||||
}
|
||||
public EntityLivingBase getThrower()
|
||||
{
|
||||
if (thrower == null && throwerName != null && throwerName.length() > 0)
|
||||
{
|
||||
thrower = worldObj.getPlayerEntityByName(throwerName);
|
||||
}
|
||||
|
||||
return this.thrower;
|
||||
}
|
||||
return thrower;
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,7 @@ public class ItemBlackHoleTalisman extends ItemMod {
|
||||
int meta = getBlockMeta(par1ItemStack);
|
||||
return super.getItemStackDisplayName(par1ItemStack) + (block == null ? "" : " (" + EnumChatFormatting.GREEN + new ItemStack(block, meta).getDisplayName() + EnumChatFormatting.RESET + ")");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItem(ItemStack itemStack) {
|
||||
int count = getBlockCount(itemStack);
|
||||
|
||||
@@ -32,12 +32,12 @@ public class ItemCacophonium extends ItemMod {
|
||||
private static final String TAG_SOUND = "sound";
|
||||
private static final String TAG_SOUND_NAME = "soundName";
|
||||
private static final String TAG_HAS_SOUND = "hasSound";
|
||||
|
||||
|
||||
public ItemCacophonium() {
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(LibItemNames.CACOPHONIUM);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer player, EntityLivingBase entity) {
|
||||
if(entity instanceof EntityLiving) {
|
||||
@@ -49,36 +49,36 @@ public class ItemCacophonium extends ItemMod {
|
||||
else if(living instanceof EntitySlime)
|
||||
sound = "mob.slime." + (((EntitySlime) living).getSlimeSize() > 1 ? "big" : "small");
|
||||
else sound = (String) ReflectionHelper.findMethod(EntityLiving.class, living, LibObfuscation.GET_LIVING_SOUND).invoke(living);
|
||||
|
||||
|
||||
if(sound != null) {
|
||||
String s = EntityList.getEntityString(entity);
|
||||
if(s == null)
|
||||
s = "generic";
|
||||
if(s == null)
|
||||
s = "generic";
|
||||
|
||||
ItemNBTHelper.setString(stack, TAG_SOUND, sound);
|
||||
ItemNBTHelper.setString(stack, TAG_SOUND_NAME, "entity." + s + ".name");
|
||||
ItemNBTHelper.setBoolean(stack, TAG_HAS_SOUND, true);
|
||||
player.inventory.setInventorySlotContents(player.inventory.currentItem, stack.copy());
|
||||
|
||||
|
||||
if(player.worldObj.isRemote)
|
||||
player.swingItem();
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean adv) {
|
||||
if(ItemNBTHelper.getBoolean(stack, TAG_HAS_SOUND, false))
|
||||
list.add(StatCollector.translateToLocal(ItemNBTHelper.getString(stack, TAG_SOUND_NAME, "")));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
|
||||
return EnumAction.block;
|
||||
@@ -95,7 +95,7 @@ public class ItemCacophonium extends ItemMod {
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, 72000);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
String sound = ItemNBTHelper.getString(stack, TAG_SOUND, "");
|
||||
|
||||
@@ -151,14 +151,14 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Botania.proxy.setLexiconStack(stack);
|
||||
player.addStat(ModAchievements.lexiconUse, 1);
|
||||
player.openGui(Botania.instance, LibGuiIDs.LEXICON, world, 0, 0, 0);
|
||||
if(!world.isRemote && !skipSound)
|
||||
world.playSoundAtEntity(player, "botania:lexiconOpen", 0.5F, 1F);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int idk, boolean something) {
|
||||
int ticks = getQueueTicks(stack);
|
||||
|
||||
@@ -30,7 +30,7 @@ public class ItemObedienceStick extends ItemMod {
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(LibItemNames.OBEDIENCE_STICK);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int s, float xs, float ys, float zs) {
|
||||
TileEntity tileAt = world.getTileEntity(x, y, z);
|
||||
@@ -38,7 +38,7 @@ public class ItemObedienceStick extends ItemMod {
|
||||
boolean pool = tileAt instanceof IManaPool;
|
||||
Actuator act = pool ? Actuator.functionalActuator : Actuator.generatingActuator;
|
||||
int range = pool ? SubTileFunctional.RANGE : SubTileGenerating.RANGE;
|
||||
|
||||
|
||||
for(int i = -range; i < range + 1; i++)
|
||||
for(int j = -range; j < range + 1; j++)
|
||||
for(int k = -range; k < range + 1; k++) {
|
||||
@@ -47,7 +47,7 @@ public class ItemObedienceStick extends ItemMod {
|
||||
int zp = z + k;
|
||||
if(MathHelper.pointDistanceSpace(xp, yp, zp, x, y, z) > range)
|
||||
continue;
|
||||
|
||||
|
||||
TileEntity tile = world.getTileEntity(xp, yp, zp);
|
||||
if(tile instanceof ISubTileContainer) {
|
||||
SubTileEntity subtile = ((ISubTileContainer) tile).getSubTile();
|
||||
@@ -58,7 +58,7 @@ public class ItemObedienceStick extends ItemMod {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(player.worldObj.isRemote)
|
||||
player.swingItem();
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public class ItemObedienceStick extends ItemMod {
|
||||
|
||||
public static abstract class Actuator {
|
||||
public static final Actuator generatingActuator = new Actuator() {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean actuate(SubTileEntity flower, TileEntity tile) {
|
||||
if(flower instanceof SubTileGenerating) {
|
||||
@@ -76,11 +76,11 @@ public class ItemObedienceStick extends ItemMod {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
public static final Actuator functionalActuator = new Actuator() {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean actuate(SubTileEntity flower, TileEntity tile) {
|
||||
if(flower instanceof SubTileFunctional) {
|
||||
@@ -89,11 +89,11 @@ public class ItemObedienceStick extends ItemMod {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
public abstract boolean actuate(SubTileEntity flower, TileEntity tile);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -23,24 +23,24 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
public class ItemSlimeBottle extends ItemMod {
|
||||
|
||||
IIcon activeIcon;
|
||||
|
||||
|
||||
public ItemSlimeBottle() {
|
||||
setUnlocalizedName(LibItemNames.SLIME_BOTTLE);
|
||||
setMaxStackSize(1);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
activeIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int dmg) {
|
||||
return dmg == 0 ? itemIcon : activeIcon;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int something, boolean somethingelse) {
|
||||
int x = MathHelper.floor_double(entity.posX);
|
||||
@@ -51,5 +51,5 @@ public class ItemSlimeBottle extends ItemMod {
|
||||
if(meta != newMeta)
|
||||
stack.setItemDamage(newMeta);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -146,11 +146,11 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static void doParticleBeam(World world, Vector3 orig, Vector3 end) {
|
||||
if(!world.isRemote)
|
||||
return;
|
||||
|
||||
|
||||
Vector3 diff = end.copy().sub(orig);
|
||||
Vector3 movement = diff.copy().normalize().multiply(0.05);
|
||||
int iters = (int) (diff.mag() / movement.mag());
|
||||
|
||||
@@ -18,5 +18,5 @@ public class ItemWaterBowl extends ItemMod {
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(LibItemNames.WATER_BOWL);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -387,7 +387,7 @@ public final class ModItems {
|
||||
cacophonium = new ItemCacophonium();
|
||||
slimeBottle = new ItemSlimeBottle();
|
||||
starSword = new ItemStarSword();
|
||||
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal, 1, i));
|
||||
|
||||
@@ -79,7 +79,7 @@ public abstract class ItemBrewBase extends ItemMod implements IBrewItem {
|
||||
if(!world.isRemote) {
|
||||
for(PotionEffect effect : getBrew(stack).getPotionEffects(stack)) {
|
||||
PotionEffect newEffect = new PotionEffect(effect.getPotionID(), effect.getDuration(), effect.getAmplifier(), true);
|
||||
Potion potion = Potion.potionTypes[newEffect.getPotionID()];
|
||||
Potion potion = Potion.potionTypes[newEffect.getPotionID()];
|
||||
if(potion.isInstant())
|
||||
potion.affectEntity(player, player, newEffect.getAmplifier(), 1F);
|
||||
else player.addPotionEffect(newEffect);
|
||||
|
||||
@@ -19,6 +19,7 @@ import java.util.List;
|
||||
import javax.xml.bind.annotation.adapters.HexBinaryAdapter;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
@@ -26,7 +27,6 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -36,8 +36,6 @@ import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.GuiIngameForge;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
@@ -155,28 +153,28 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
|
||||
return String.copyValueOf(chrs);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onWornTick(ItemStack stack, EntityLivingBase player) {
|
||||
super.onWornTick(stack, player);
|
||||
|
||||
|
||||
if(player instanceof EntityPlayer) {
|
||||
EntityPlayer p = (EntityPlayer) player;
|
||||
boolean flying = p.capabilities.isFlying;
|
||||
|
||||
|
||||
int time = ItemNBTHelper.getInt(stack, TAG_TIME_LEFT, MAX_FLY_TIME);
|
||||
int newTime = time;
|
||||
if(flying && time > 0 && !ItemNBTHelper.getBoolean(stack, TAG_INFINITE_FLIGHT, false))
|
||||
newTime--;
|
||||
else if(!flying && time < MAX_FLY_TIME && player.ticksExisted % 2 == 0)
|
||||
newTime++;
|
||||
|
||||
|
||||
ItemNBTHelper.setBoolean(stack, TAG_FLYING, flying);
|
||||
if(newTime != time)
|
||||
ItemNBTHelper.setInt(stack, TAG_TIME_LEFT, newTime);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
public void updatePlayerFlyStatus(LivingUpdateEvent event) {
|
||||
if(event.entityLiving instanceof EntityPlayer) {
|
||||
@@ -287,10 +285,10 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
boolean flying = ItemNBTHelper.getBoolean(armor, TAG_FLYING, false);
|
||||
return (left > (flying ? 0 : MAX_FLY_TIME / 10) || player.inventory.hasItem(ModItems.flugelEye)) && ManaItemHandler.requestManaExact(armor, player, getCost(armor, left), false);
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public int getCost(ItemStack stack, int timeLeft) {
|
||||
return timeLeft <= 0 ? COST_OVERKILL : COST;
|
||||
}
|
||||
@@ -451,25 +449,25 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void renderHUD(ScaledResolution resolution, EntityPlayer player, ItemStack stack) {
|
||||
int u = Math.max(1, stack.getItemDamage()) * 9 - 9;
|
||||
int v = 0;
|
||||
|
||||
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.renderEngine.bindTexture(textureHud);
|
||||
int x = resolution.getScaledWidth() / 2 + 10;
|
||||
int y = resolution.getScaledHeight() - 49;
|
||||
if(player.getAir() < 300)
|
||||
y -= 10;
|
||||
|
||||
|
||||
int left = ItemNBTHelper.getInt(stack, TAG_TIME_LEFT, MAX_FLY_TIME);
|
||||
|
||||
|
||||
int segTime = MAX_FLY_TIME / 10;
|
||||
int segs = (left / segTime) + 1;
|
||||
int segs = left / segTime + 1;
|
||||
int last = left % segTime;
|
||||
|
||||
|
||||
for(int i = 0; i < segs; i++) {
|
||||
float trans = 1F;
|
||||
if(i == segs - 1) {
|
||||
@@ -478,14 +476,14 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
|
||||
|
||||
GL11.glColor4f(1F, 1F, 1F, trans);
|
||||
RenderHelper.drawTexturedModalRect(x, y, 0, u, v, 9, 9);
|
||||
x += 8;
|
||||
}
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
mc.renderEngine.bindTexture(GuiIngameForge.icons);
|
||||
mc.renderEngine.bindTexture(Gui.icons);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.util.List;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -36,8 +35,6 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import baubles.common.network.PacketHandler;
|
||||
import baubles.common.network.PacketSyncBauble;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -10,39 +10,26 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.tool;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.internal.IManaBurst;
|
||||
import vazkii.botania.api.mana.BurstProperties;
|
||||
import vazkii.botania.common.achievement.ICraftAchievement;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.entity.EntityFallingStar;
|
||||
import vazkii.botania.common.entity.EntityManaBurst;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelSword;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemStarSword extends ItemManasteelSword implements ICraftAchievement {
|
||||
|
||||
private static final String TAG_ATTACKER_USERNAME = "attackerUsername";
|
||||
|
||||
private static final int MANA_PER_DAMAGE = 120;
|
||||
|
||||
public ItemStarSword() {
|
||||
@@ -64,14 +51,14 @@ public class ItemStarSword extends ItemManasteelSword implements ICraftAchieveme
|
||||
Vector3 motVec = new Vector3((Math.random() - 0.5) * 18, 24, (Math.random() - 0.5) * 18);
|
||||
posVec.add(motVec);
|
||||
motVec.normalize().negate().multiply(1.5);
|
||||
|
||||
|
||||
EntityFallingStar star = new EntityFallingStar(par2World, player);
|
||||
star.setPosition(posVec.x, posVec.y, posVec.z);
|
||||
star.motionX = motVec.x;
|
||||
star.motionY = motVec.y;
|
||||
star.motionZ = motVec.z;
|
||||
par2World.spawnEntityInWorld(star);
|
||||
|
||||
|
||||
ToolCommons.damageItem(par1ItemStack, 1, player, MANA_PER_DAMAGE);
|
||||
par2World.playSoundAtEntity(player, "botania:starcaller", 0.4F, 1.4F);
|
||||
}
|
||||
@@ -94,5 +81,5 @@ public class ItemStarSword extends ItemManasteelSword implements ICraftAchieveme
|
||||
return ModAchievements.terrasteelWeaponCraft;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -62,7 +62,7 @@ public class ItemLens extends ItemMod implements ILens, ITinyPlanetExcempt {
|
||||
PISTON = 16,
|
||||
LIGHT = 17,
|
||||
WARP = 18;
|
||||
|
||||
|
||||
public static final int STORM = 5000;
|
||||
|
||||
private static final int PROP_NONE = 0,
|
||||
@@ -282,7 +282,7 @@ public class ItemLens extends ItemMod implements ILens, ITinyPlanetExcempt {
|
||||
public static Lens getLens(int index) {
|
||||
if(index == STORM)
|
||||
return stormLens;
|
||||
|
||||
|
||||
Lens lens = lenses[index];
|
||||
return lens == null ? fallbackLens : lens;
|
||||
}
|
||||
@@ -316,7 +316,7 @@ public class ItemLens extends ItemMod implements ILens, ITinyPlanetExcempt {
|
||||
|
||||
return sourceLens;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldPull(ItemStack stack) {
|
||||
return stack.getItemDamage() != STORM;
|
||||
|
||||
@@ -38,13 +38,13 @@ public class LensInfluence extends Lens {
|
||||
for(Entity movable : movables) {
|
||||
if(movable == burst)
|
||||
continue;
|
||||
|
||||
|
||||
if(movable instanceof IManaBurst) {
|
||||
IManaBurst otherBurst = (IManaBurst) movable;
|
||||
ItemStack lens = otherBurst.getSourceLens();
|
||||
if(lens != null && lens.getItem() == ModItems.lens && lens.getItemDamage() == ItemLens.INFLUENCE)
|
||||
continue;
|
||||
|
||||
|
||||
((IManaBurst) movable).setMotion(entity.motionX, entity.motionY, entity.motionZ);
|
||||
} else {
|
||||
movable.motionX = entity.motionX;
|
||||
|
||||
@@ -28,5 +28,5 @@ public class LensStorm extends Lens {
|
||||
|
||||
return dead;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -121,7 +121,7 @@ public class ItemManaResource extends ItemMod implements IFlowerComponent, IElve
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
for(int i = 0; i < types; i++)
|
||||
if(Botania.gardenOfGlassLoaded || (i != 20 && i != 21))
|
||||
if(Botania.gardenOfGlassLoaded || i != 20 && i != 21)
|
||||
par3List.add(new ItemStack(par1, 1, i));
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
@@ -81,7 +80,7 @@ public class ItemDice extends ItemRelic {
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldDamageWrongPlayer() {
|
||||
return false;
|
||||
|
||||
@@ -220,4 +220,4 @@ public class ItemExcaliber extends ItemManasteelSword implements IRelic, ILensEf
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
*/
|
||||
@@ -10,15 +10,12 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.relic;
|
||||
|
||||
import javax.swing.Icon;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
@@ -33,7 +30,7 @@ public class ItemFlugelEye extends ItemRelic implements ICoordBoundItem, IManaUs
|
||||
public ItemFlugelEye() {
|
||||
super(LibItemNames.FLUGEL_EYE);
|
||||
}
|
||||
|
||||
|
||||
private static final String TAG_X = "x";
|
||||
private static final String TAG_Y = "y";
|
||||
private static final String TAG_Z = "z";
|
||||
@@ -46,7 +43,7 @@ public class ItemFlugelEye extends ItemRelic implements ICoordBoundItem, IManaUs
|
||||
player.swingItem();
|
||||
for(int i = 0; i < 10; i++) {
|
||||
float x1 = (float) (x + Math.random());
|
||||
float y1 = (float) (y + 1);
|
||||
float y1 = y + 1;
|
||||
float z1 = (float) (z + Math.random());
|
||||
Botania.proxy.wispFX(player.worldObj, x1, y1, z1, (float) Math.random(), (float) Math.random(), (float) Math.random(), (float) Math.random() * 0.5F, -0.05F + (float) Math.random() * 0.05F);
|
||||
}
|
||||
@@ -61,7 +58,7 @@ public class ItemFlugelEye extends ItemRelic implements ICoordBoundItem, IManaUs
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
float x = (float) (player.posX - Math.random() * player.width);
|
||||
@@ -82,16 +79,16 @@ public class ItemFlugelEye extends ItemRelic implements ICoordBoundItem, IManaUs
|
||||
int y = ItemNBTHelper.getInt(stack, TAG_Y, -1);
|
||||
int z = ItemNBTHelper.getInt(stack, TAG_Z, 0);
|
||||
int dim = ItemNBTHelper.getInt(stack, TAG_DIMENSION, 0);
|
||||
|
||||
|
||||
int cost = (int) (MathHelper.pointDistanceSpace(x + 0.5, y + 0.5, z + 0.5, player.posX, player.posY, player.posZ) * 10);
|
||||
|
||||
|
||||
if(y > -1 && dim == world.provider.dimensionId && ManaItemHandler.requestManaExact(stack, player, cost, true)) {
|
||||
moveParticlesAndSound(player);
|
||||
if(player instanceof EntityPlayerMP && !world.isRemote)
|
||||
((EntityPlayerMP) player).playerNetServerHandler.setPlayerLocation(x + 0.5, y + 1.6, z + 0.5, player.rotationYaw, player.rotationPitch);
|
||||
moveParticlesAndSound(player);
|
||||
}
|
||||
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@@ -131,7 +128,7 @@ public class ItemFlugelEye extends ItemRelic implements ICoordBoundItem, IManaUs
|
||||
|
||||
/*
|
||||
// Code from the older iteration of this item:
|
||||
|
||||
|
||||
private static final ResourceLocation glowTexture = new ResourceLocation(LibResources.MISC_GLOW_CYAN);
|
||||
|
||||
private static final int SEGMENTS = 12;
|
||||
@@ -437,6 +434,6 @@ public class ItemFlugelEye extends ItemRelic implements ICoordBoundItem, IManaUs
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
}
|
||||
@@ -34,15 +34,15 @@ public class ItemKingKey extends ItemRelic implements IManaUsingItem {
|
||||
|
||||
private static final int WEAPON_TYPES = 12;
|
||||
public static IIcon[] weaponIcons;
|
||||
|
||||
|
||||
public ItemKingKey() {
|
||||
super(LibItemNames.KING_KEY);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
super.registerIcons(par1IconRegister);
|
||||
|
||||
|
||||
weaponIcons = new IIcon[WEAPON_TYPES];
|
||||
for(int i = 0; i < WEAPON_TYPES; i++)
|
||||
weaponIcons[i] = IconHelper.forName(par1IconRegister, "gateWeapon" + i);
|
||||
@@ -54,7 +54,7 @@ public class ItemKingKey extends ItemRelic implements IManaUsingItem {
|
||||
setCharging(par1ItemStack, true);
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer player, int time) {
|
||||
int spawned = getWeaponsSpawned(stack);
|
||||
@@ -63,32 +63,32 @@ public class ItemKingKey extends ItemRelic implements IManaUsingItem {
|
||||
setWeaponsSpawned(stack, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
int spawned = getWeaponsSpawned(stack);
|
||||
|
||||
|
||||
if(count != getMaxItemUseDuration(stack) && spawned < 20 && !player.worldObj.isRemote && ManaItemHandler.requestManaExact(stack, player, 150, true)) {
|
||||
Vector3 look = new Vector3(player.getLookVec());
|
||||
look.y = 0;
|
||||
look.normalize().negate().multiply(2);
|
||||
int div = spawned / 5;
|
||||
int mod = spawned % 5;
|
||||
|
||||
Vector3 pl = look.copy().add(Vector3.fromEntityCenter(player)).add(0, 1.6, (double) div * 0.1);
|
||||
|
||||
|
||||
Vector3 pl = look.copy().add(Vector3.fromEntityCenter(player)).add(0, 1.6, div * 0.1);
|
||||
|
||||
Random rand = player.worldObj.rand;
|
||||
Vector3 axis = look.copy().normalize().crossProduct(new Vector3(-1, 0, -1)).normalize();
|
||||
Vector3 axis1 = axis.copy();
|
||||
|
||||
double rot = mod * Math.PI / 4 - Math.PI / 2;
|
||||
|
||||
|
||||
axis1.multiply(div * 3.5 + 5).rotate(rot, look);
|
||||
if(axis1.y < 0)
|
||||
axis1.y = -axis1.y;
|
||||
|
||||
|
||||
Vector3 end = pl.copy().add(axis1);
|
||||
|
||||
|
||||
EntityBabylonWeapon weapon = new EntityBabylonWeapon(player.worldObj, player);
|
||||
weapon.posX = end.x;
|
||||
weapon.posY = end.y;
|
||||
@@ -97,7 +97,7 @@ public class ItemKingKey extends ItemRelic implements IManaUsingItem {
|
||||
weapon.setVariety(rand.nextInt(WEAPON_TYPES));
|
||||
weapon.setDelay(spawned);
|
||||
weapon.setRotation(MathHelper.wrapAngleTo180_float(-player.rotationYaw + 180));
|
||||
|
||||
|
||||
player.worldObj.spawnEntityInWorld(weapon);
|
||||
player.worldObj.playSoundAtEntity(weapon, "botania:babylonSpawn", 1F, 1F + player.worldObj.rand.nextFloat() * 3F);
|
||||
setWeaponsSpawned(stack, spawned + 1);
|
||||
@@ -114,23 +114,23 @@ public class ItemKingKey extends ItemRelic implements IManaUsingItem {
|
||||
return 72000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static boolean isCharging(ItemStack stack) {
|
||||
return ItemNBTHelper.getBoolean(stack, TAG_CHARGING, false);
|
||||
}
|
||||
|
||||
|
||||
public static int getWeaponsSpawned(ItemStack stack) {
|
||||
return ItemNBTHelper.getInt(stack, TAG_WEAPONS_SPAWNED, 0);
|
||||
}
|
||||
|
||||
|
||||
public static void setCharging(ItemStack stack, boolean charging) {
|
||||
ItemNBTHelper.setBoolean(stack, TAG_CHARGING, charging);
|
||||
}
|
||||
|
||||
|
||||
public static void setWeaponsSpawned(ItemStack stack, int count) {
|
||||
ItemNBTHelper.setInt(stack, TAG_WEAPONS_SPAWNED, count);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFull3D() {
|
||||
return true;
|
||||
@@ -140,5 +140,5 @@ public class ItemKingKey extends ItemRelic implements IManaUsingItem {
|
||||
public boolean usesMana(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -86,9 +86,9 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
MovingObjectPosition lookPos = ToolCommons.raytraceFromEntity(player.worldObj, player, true, 10F);
|
||||
List<ChunkCoordinates> cursors = getCursorList(lokiRing);
|
||||
int cursorCount = cursors.size();
|
||||
|
||||
int cost = Math.min(cursorCount, (int) (Math.pow(Math.E, (double) cursorCount * 0.25)));
|
||||
|
||||
|
||||
int cost = Math.min(cursorCount, (int) Math.pow(Math.E, cursorCount * 0.25));
|
||||
|
||||
if(heldItemStack == null && event.action == Action.RIGHT_CLICK_BLOCK && player.isSneaking()) {
|
||||
if(originCoords.posY == -1 && lookPos != null) {
|
||||
setOriginPos(lokiRing, lookPos.blockX, lookPos.blockY, lookPos.blockZ);
|
||||
@@ -102,23 +102,23 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player);
|
||||
} else {
|
||||
addCursor : {
|
||||
int relX = lookPos.blockX - originCoords.posX;
|
||||
int relY = lookPos.blockY - originCoords.posY;
|
||||
int relZ = lookPos.blockZ - originCoords.posZ;
|
||||
int relX = lookPos.blockX - originCoords.posX;
|
||||
int relY = lookPos.blockY - originCoords.posY;
|
||||
int relZ = lookPos.blockZ - originCoords.posZ;
|
||||
|
||||
for(ChunkCoordinates cursor : cursors)
|
||||
if(cursor.posX == relX && cursor.posY == relY && cursor.posZ == relZ) {
|
||||
cursors.remove(cursor);
|
||||
setCursorList(lokiRing, cursors);
|
||||
if(player instanceof EntityPlayerMP)
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player);
|
||||
break addCursor;
|
||||
}
|
||||
for(ChunkCoordinates cursor : cursors)
|
||||
if(cursor.posX == relX && cursor.posY == relY && cursor.posZ == relZ) {
|
||||
cursors.remove(cursor);
|
||||
setCursorList(lokiRing, cursors);
|
||||
if(player instanceof EntityPlayerMP)
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player);
|
||||
break addCursor;
|
||||
}
|
||||
|
||||
addCursor(lokiRing, relX, relY, relZ);
|
||||
if(player instanceof EntityPlayerMP)
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player);
|
||||
}
|
||||
addCursor(lokiRing, relX, relY, relZ);
|
||||
if(player instanceof EntityPlayerMP)
|
||||
PacketHandler.INSTANCE.sendTo(new PacketSyncBauble(player, slot), (EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if(heldItemStack != null && event.action == Action.RIGHT_CLICK_BLOCK && lookPos != null && player.isSneaking()) {
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ItemOdinRing extends ItemRelicBauble {
|
||||
@Override
|
||||
public void onValidPlayerWornTick(ItemStack stack, EntityPlayer player) {
|
||||
//if(player.ticksExisted % 30 == 0)
|
||||
//player.heal(1);
|
||||
//player.heal(1);
|
||||
if(player.isBurning())
|
||||
player.extinguish();
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ public class ItemRelic extends ItemMod implements IRelic {
|
||||
}
|
||||
} else addStringToTooltip(StatCollector.translateToLocal("botaniamisc.shiftinfo"), list);
|
||||
}
|
||||
|
||||
|
||||
public boolean shouldDamageWrongPlayer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -254,7 +254,7 @@ public final class LexiconData {
|
||||
public static LexiconEntry thorRing;
|
||||
public static LexiconEntry lokiRing;
|
||||
public static LexiconEntry odinRing;
|
||||
|
||||
|
||||
public static LexiconEntry unstableBlocks;
|
||||
public static LexiconEntry decorativeBlocks;
|
||||
public static LexiconEntry dispenserTweaks;
|
||||
@@ -342,7 +342,7 @@ public final class LexiconData {
|
||||
gardenOfGlass.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeRootToSapling), new PageCraftingRecipe("4", ModCraftingRecipes.recipeRootToFertilizer), new PageCraftingRecipe("5", ModCraftingRecipes.recipePebbleCobblestone), new PageText("6"), new PageManaInfusionRecipe("7", ModManaInfusionRecipes.sugarCaneRecipe), new PageCraftingRecipe("8", ModCraftingRecipes.recipeMagmaToSlimeball), new PageText("9"), new PageCraftingRecipe("10", ModCraftingRecipes.recipeFelPumpkin), new PageText("11"), new PageCraftingRecipe("12", ModCraftingRecipes.recipeEndPortal));
|
||||
gardenOfGlass.setPriority().setIcon(new ItemStack(ModItems.manaResource, 1, 20));
|
||||
}
|
||||
|
||||
|
||||
if(Botania.thaumcraftLoaded)
|
||||
new CLexiconEntry("wrap", categoryBasics, "Thaumcraft").setLexiconPages(new PageText("0")); // lel
|
||||
|
||||
@@ -634,7 +634,7 @@ public final class LexiconData {
|
||||
|
||||
manaBomb = new ALexiconEntry(LibLexicon.DEVICE_MANA_BOMB, categoryDevices);
|
||||
manaBomb.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeManaBomb));
|
||||
|
||||
|
||||
// TOOLS ENTRIES
|
||||
manaBlaster = new BLexiconEntry(LibLexicon.TOOL_MANA_BLASTER, categoryTools);
|
||||
manaBlaster.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeManaBlaster));
|
||||
@@ -750,10 +750,10 @@ public final class LexiconData {
|
||||
|
||||
obedienceStick = new BLexiconEntry(LibLexicon.TOOL_OBEDIENCE_STICK, categoryTools);
|
||||
obedienceStick.setPriority().setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeObedienceStick));
|
||||
|
||||
|
||||
slimeBottle = new ALexiconEntry(LibLexicon.TOOL_SLIME_BOTTLE, categoryTools);
|
||||
slimeBottle.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeSlimeBottle));
|
||||
|
||||
|
||||
// ENDER ENTRIES
|
||||
enderAir = new BLexiconEntry(LibLexicon.ENDER_AIR, categoryEnder);
|
||||
enderAir.setPriority().setLexiconPages(new PageText("0"));
|
||||
@@ -803,7 +803,7 @@ public final class LexiconData {
|
||||
spawnerMover = new ALexiconEntry(LibLexicon.ENDER_SPAWNER_MOVER, categoryEnder);
|
||||
spawnerMover.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeSpawnerMover));
|
||||
|
||||
keepIvy = new ALexiconEntry(LibLexicon.ENDER_KEEP_IVY, categoryEnder);
|
||||
keepIvy = new ALexiconEntry(LibLexicon.ENDER_KEEP_IVY, categoryEnder);
|
||||
keepIvy.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeKeepIvy));
|
||||
|
||||
blackHoleTalisman = new ALexiconEntry(LibLexicon.ENDER_BLACK_HOLE_TALISMAN, categoryEnder);
|
||||
@@ -814,10 +814,10 @@ public final class LexiconData {
|
||||
|
||||
luminizerTransport = new ALexiconEntry(LibLexicon.ENDER_LUMINIZER_TRANSPORT, categoryEnder);
|
||||
luminizerTransport.setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCraftingRecipes.recipeLuminizer), new PageText("3"), new PageCraftingRecipe("4", ModCraftingRecipes.recipeDetectorLuminizer), new PageText("5"), new PageCraftingRecipe("6", ModCraftingRecipes.recipeLuminizerLauncher));
|
||||
|
||||
|
||||
starSword = new ALexiconEntry(LibLexicon.ENDER_STAR_SWORD, categoryEnder);
|
||||
starSword.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeStarSword));
|
||||
|
||||
|
||||
// BAUBLES ENTRIES
|
||||
baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles);
|
||||
baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2"));
|
||||
@@ -919,25 +919,25 @@ public final class LexiconData {
|
||||
if(ConfigHandler.relicsEnabled) {
|
||||
relics = new ALexiconEntry(LibLexicon.ALF_RELICS, categoryAlfhomancy);
|
||||
relics.setLexiconPages(new PageText("0")).setIcon(new ItemStack(ModItems.dice));
|
||||
|
||||
|
||||
relicInfo = new RLexiconEntry(LibLexicon.ALF_RELIC_INFO, categoryAlfhomancy, null);
|
||||
relicInfo.setLexiconPages(new PageText("0"), new PageText("1")).setIcon(new ItemStack(ModItems.dice));
|
||||
|
||||
|
||||
infiniteFruit = new RLexiconEntry(LibLexicon.ALF_INFINITE_FRUIT, categoryAlfhomancy, ModAchievements.relicInfiniteFruit);
|
||||
infiniteFruit.setLexiconPages(new PageText("0"));
|
||||
|
||||
|
||||
kingKey = new RLexiconEntry(LibLexicon.ALF_KING_KEY, categoryAlfhomancy, ModAchievements.relicKingKey);
|
||||
kingKey.setLexiconPages(new PageText("0"));
|
||||
|
||||
|
||||
flugelEye = new RLexiconEntry(LibLexicon.ALF_FLUGEL_EYE, categoryAlfhomancy, ModAchievements.relicFlugelEye);
|
||||
flugelEye.setLexiconPages(new PageText("0"), new PageText("1"));
|
||||
|
||||
|
||||
thorRing = new RLexiconEntry(LibLexicon.ALF_THOR_RING, categoryAlfhomancy, ModAchievements.relicThorRing);
|
||||
thorRing.setLexiconPages(new PageText("0"));
|
||||
|
||||
|
||||
lokiRing = new RLexiconEntry(LibLexicon.ALF_LOKI_RING, categoryAlfhomancy, ModAchievements.relicLokiRing);
|
||||
lokiRing.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"));
|
||||
|
||||
|
||||
odinRing = new RLexiconEntry(LibLexicon.ALF_ODIN_RING, categoryAlfhomancy, ModAchievements.relicOdinRing);
|
||||
odinRing.setLexiconPages(new PageText("0"));
|
||||
}
|
||||
@@ -1001,7 +1001,7 @@ public final class LexiconData {
|
||||
|
||||
cacophonium = new BLexiconEntry(LibLexicon.MISC_CACOPHONIUM, categoryMisc);
|
||||
cacophonium.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeCacophonium));
|
||||
|
||||
|
||||
if(Botania.bcTriggersLoaded) {
|
||||
bcIntegration = new CLexiconEntry(LibLexicon.MISC_BC_INTEGRATION, categoryMisc, "BuildCraft");
|
||||
bcIntegration.setLexiconPages(new PageText("0")).setIcon(new ItemStack(Items.redstone));
|
||||
|
||||
Loaded 100 of 105 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user