mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 03:15:07 +00:00
Lots of find replaces and random fixes
This commit is contained in:
1 parent
e85cd75a57
commit
5c145362d8
93 files changed
+307
-345
No files matched your search
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.api;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
@@ -654,20 +655,24 @@ public final class BotaniaAPI {
|
||||
* Gets the last recipe to have been added to the recipe list.
|
||||
*/
|
||||
public static IRecipe getLatestAddedRecipe() {
|
||||
List<IRecipe> list = CraftingManager.getInstance().getRecipeList();
|
||||
return list.get(list.size() - 1);
|
||||
// todo 1.12 change this hack to just look all the recipes up by id
|
||||
return null;
|
||||
/*List<IRecipe> list = CraftingManager.getInstance().getRecipeList();
|
||||
return list.get(list.size() - 1);*/
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the last x recipes added to the recipe list.
|
||||
*/
|
||||
public static List<IRecipe> getLatestAddedRecipes(int x) {
|
||||
List<IRecipe> list = CraftingManager.getInstance().getRecipeList();
|
||||
// todo 1.12 change this hack to just look all the recipes up by id
|
||||
return Collections.emptyList();
|
||||
/*List<IRecipe> list = CraftingManager.getInstance().getRecipeList();
|
||||
List<IRecipe> newList = new ArrayList<>();
|
||||
for(int i = x - 1; i >= 0; i--)
|
||||
newList.add(list.get(list.size() - 1 - i));
|
||||
|
||||
return newList;
|
||||
return newList;*/
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
@@ -97,7 +97,7 @@ public final class TooltipAdditionDisplayHandler {
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
VertexBuffer buf = Tessellator.getInstance().getBuffer();
|
||||
BufferBuilder buf = Tessellator.getInstance().getBuffer();
|
||||
buf.begin(GL11.GL_TRIANGLE_FAN, DefaultVertexFormats.POSITION_COLOR);
|
||||
|
||||
float a = 0.5F + 0.2F * ((float) Math.cos((double) (ClientTickHandler.ticksInGame + ClientTickHandler.partialTicks) / 10) * 0.5F + 0.5F);
|
||||
|
||||
@@ -13,7 +13,7 @@ package vazkii.botania.client.core.helper;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
@@ -35,7 +35,7 @@ public final class IconHelper {
|
||||
* Adapted from ItemRenderer.renderItemIn2D, 1.7.10
|
||||
*/
|
||||
public static void renderIconIn3D(Tessellator tess, float p_78439_1_, float p_78439_2_, float p_78439_3_, float p_78439_4_, int width, int height, float thickness) {
|
||||
VertexBuffer wr = tess.getBuffer();
|
||||
BufferBuilder wr = tess.getBuffer();
|
||||
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_NORMAL);
|
||||
wr.pos(0.0D, 0.0D, 0.0D).tex(p_78439_1_, p_78439_4_).normal(0, 0, 1).endVertex();
|
||||
wr.pos(1.0D, 0.0D, 0.0D).tex(p_78439_3_, p_78439_4_).normal(0, 0, 1).endVertex();
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -222,7 +222,7 @@ public final class RenderHelper {
|
||||
GL11.glStencilMask(0x00);
|
||||
GL11.glStencilFunc(GL11.GL_EQUAL, 1, 0xFF);
|
||||
|
||||
VertexBuffer buf = Tessellator.getInstance().getBuffer();
|
||||
BufferBuilder buf = Tessellator.getInstance().getBuffer();
|
||||
buf.begin(GL11.GL_TRIANGLE_FAN, DefaultVertexFormats.POSITION_COLOR);
|
||||
buf.pos(centerX, centerY, 0).color(0, 0.5F, 0.5F, a).endVertex();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.World;
|
||||
@@ -59,13 +59,13 @@ public class FXLightning extends Particle {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(VertexBuffer wr, Entity entity, float partialTicks, float rotX, float rotZ, float rotYZ, float rotXY, float rotXZ) {
|
||||
public void renderParticle(BufferBuilder wr, Entity entity, float partialTicks, float rotX, float rotZ, float rotYZ, float rotXY, float rotXZ) {
|
||||
LightningHandler.queuedLightningBolts.offer(this);
|
||||
}
|
||||
|
||||
public void renderBolt(int pass, boolean inner) {
|
||||
ParticleRenderDispatcher.lightningCount++;
|
||||
VertexBuffer wr = Tessellator.getInstance().getBuffer();
|
||||
BufferBuilder wr = Tessellator.getInstance().getBuffer();
|
||||
|
||||
float boltAge = particleAge < 0 ? 0 : (float) particleAge / (float) particleMaxAge;
|
||||
float mainAlpha;
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
@@ -117,7 +117,7 @@ public class FXSparkle extends Particle {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(VertexBuffer worldRendererIn, Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
public void renderParticle(BufferBuilder worldRendererIn, Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.f = f;
|
||||
this.f1 = f1;
|
||||
this.f2 = f2;
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -127,7 +127,7 @@ public class FXWisp extends Particle {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(VertexBuffer wr, Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
public void renderParticle(BufferBuilder wr, Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
this.f = f;
|
||||
this.f1 = f1;
|
||||
this.f2 = f2;
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Apr 3, 2015, 5:55:36 PM (GMT)]
|
||||
*/
|
||||
package vazkii.botania.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.achievement.GuiAchievements;
|
||||
import net.minecraft.stats.StatisticsManager;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
|
||||
public class GuiAchievementsHacky extends GuiAchievements {
|
||||
|
||||
public GuiAchievementsHacky(GuiScreen screen, StatisticsManager stats) {
|
||||
super(screen, stats);
|
||||
ReflectionHelper.setPrivateValue(GuiAchievements.class, this, ModAchievements.pageIndex, "currentPage");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
buttonList.get(1).displayString = ModAchievements.botaniaPage.getName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import mezz.jei.api.IModRegistry;
|
||||
import mezz.jei.api.ISubtypeRegistry;
|
||||
import mezz.jei.api.JEIPlugin;
|
||||
import mezz.jei.api.ingredients.IModIngredientRegistration;
|
||||
import mezz.jei.api.recipe.IRecipeCategoryRegistration;
|
||||
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -52,6 +53,11 @@ public class JEIBotaniaPlugin implements IModPlugin {
|
||||
@Override
|
||||
public void registerIngredients(@Nonnull IModIngredientRegistration registry) {}
|
||||
|
||||
@Override
|
||||
public void registerCategories(IRecipeCategoryRegistration registry) {
|
||||
// todo 1.12
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(@Nonnull IModRegistry registry) {
|
||||
IJeiHelpers jeiHelpers = registry.getJeiHelpers();
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
public class BreweryRecipeCategory implements IRecipeCategory {
|
||||
|
||||
@@ -51,6 +52,12 @@ public class BreweryRecipeCategory implements IRecipeCategory {
|
||||
return localizedName;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getModName() {
|
||||
return LibMisc.MOD_NAME;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public IDrawable getBackground() {
|
||||
|
||||
+9
-2
@@ -26,7 +26,7 @@ import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
@@ -34,6 +34,7 @@ import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.client.core.handler.MiscellaneousIcons;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
public class ElvenTradeRecipeCategory implements IRecipeCategory {
|
||||
|
||||
@@ -83,7 +84,7 @@ public class ElvenTradeRecipeCategory implements IRecipeCategory {
|
||||
minecraft.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
TextureAtlasSprite sprite = MiscellaneousIcons.INSTANCE.alfPortalTex;
|
||||
Tessellator tess = Tessellator.getInstance();
|
||||
VertexBuffer wr = tess.getBuffer();
|
||||
BufferBuilder wr = tess.getBuffer();
|
||||
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
|
||||
int startX = 22;
|
||||
int startY = 25;
|
||||
@@ -120,5 +121,11 @@ public class ElvenTradeRecipeCategory implements IRecipeCategory {
|
||||
public List getTooltipStrings(int mouseX, int mouseY) {
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getModName() {
|
||||
return LibMisc.MOD_NAME;
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -27,6 +27,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
public class ManaPoolRecipeCategory implements IRecipeCategory {
|
||||
|
||||
@@ -109,4 +110,10 @@ public class ManaPoolRecipeCategory implements IRecipeCategory {
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getModName() {
|
||||
return LibMisc.MOD_NAME;
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -29,6 +29,7 @@ import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
public class PetalApothecaryRecipeCategory implements IRecipeCategory {
|
||||
|
||||
@@ -111,5 +112,11 @@ public class PetalApothecaryRecipeCategory implements IRecipeCategory {
|
||||
public List getTooltipStrings(int mouseX, int mouseY) {
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getModName() {
|
||||
return LibMisc.MOD_NAME;
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -29,6 +29,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
public class PureDaisyRecipeCategory implements IRecipeCategory {
|
||||
|
||||
@@ -109,5 +110,11 @@ public class PureDaisyRecipeCategory implements IRecipeCategory {
|
||||
public List getTooltipStrings(int mouseX, int mouseY) {
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getModName() {
|
||||
return LibMisc.MOD_NAME;
|
||||
}
|
||||
|
||||
}
|
||||
+7
@@ -28,6 +28,7 @@ import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
public class RunicAltarRecipeCategory implements IRecipeCategory {
|
||||
|
||||
@@ -112,5 +113,11 @@ public class RunicAltarRecipeCategory implements IRecipeCategory {
|
||||
public List getTooltipStrings(int mouseX, int mouseY) {
|
||||
return new ArrayList();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getModName() {
|
||||
return LibMisc.MOD_NAME;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -21,7 +21,7 @@ import com.google.common.collect.ImmutableMap;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
@@ -135,7 +135,7 @@ public class ModelPylon implements IPylonModel {
|
||||
|
||||
private void renderModel(IBakedModel model) {
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer worldrenderer = tessellator.getBuffer();
|
||||
BufferBuilder worldrenderer = tessellator.getBuffer();
|
||||
worldrenderer.begin(GL11.GL_QUADS, DefaultVertexFormats.ITEM);
|
||||
|
||||
for(BakedQuad bakedquad : model.getQuads(null, null, 0))
|
||||
|
||||
@@ -37,7 +37,7 @@ public class RenderCorporeaSpark extends RenderSparkBase<EntityCorporeaSpark> {
|
||||
|
||||
@Override
|
||||
public void colorSpinningIcon(EntityCorporeaSpark entity, float a) {
|
||||
int hex = entity.getNetwork().getMapColor().colorValue;
|
||||
int hex = entity.getNetwork().getColorValue();
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = hex & 0xFF;
|
||||
|
||||
@@ -32,7 +32,7 @@ public class RenderPoolMinecart extends RenderMinecart<EntityPoolMinecart> {
|
||||
protected void renderCartContents(EntityPoolMinecart poolCart, float partialTicks, @Nonnull IBlockState state) {
|
||||
RenderTilePool.forceVariant = PoolVariant.DEFAULT;
|
||||
RenderTilePool.forceManaNumber = poolCart.getMana();
|
||||
TileEntityRendererDispatcher.instance.getSpecialRendererByClass(TilePool.class).renderTileEntityAt(null, poolCart.posX, poolCart.posY, poolCart.posZ, ClientTickHandler.partialTicks, -1);
|
||||
TileEntityRendererDispatcher.instance.getSpecialRendererByClass(TilePool.class).renderTileEntityAt(null, poolCart.posX, poolCart.posY, poolCart.posZ, ClientTickHandler.partialTicks, -1, 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import net.minecraft.client.renderer.BlockRendererDispatcher;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.entity.RenderEntityItem;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
@@ -69,7 +69,7 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer<Til
|
||||
} catch (Throwable ignored) {}
|
||||
|
||||
stack = cube.getRequestTarget();
|
||||
entity.setEntityItemStack(stack);
|
||||
entity.setItem(stack);
|
||||
}
|
||||
|
||||
double time = ClientTickHandler.ticksInGame + f;
|
||||
@@ -143,7 +143,7 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer<Til
|
||||
private void renderAnimatedModel(TileCorporeaCrystalCube te, double x, double y, double z, float partialTick) {
|
||||
// From FastTESR.renderTileEntityAt
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer worldRenderer = tessellator.getBuffer();
|
||||
BufferBuilder worldRenderer = tessellator.getBuffer();
|
||||
bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -98,8 +98,8 @@ public class RenderTileStarfield extends TileEntitySpecialRenderer<TileStarfield
|
||||
GlStateManager.multMatrix(PROJECTION);
|
||||
GlStateManager.multMatrix(MODELVIEW);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
BufferBuilder vertexbuffer = tessellator.getBuffer();
|
||||
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
BufferBuilder BufferBuilder = tessellator.getBuffer();
|
||||
BufferBuilder.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
float f3 = (RANDOM.nextFloat() * 0.5F + 0.1F) * f1;
|
||||
float f4 = (RANDOM.nextFloat() * 0.5F + 0.4F) * f1;
|
||||
float f5 = (RANDOM.nextFloat() * 0.5F + 0.5F) * f1;
|
||||
@@ -115,50 +115,50 @@ public class RenderTileStarfield extends TileEntitySpecialRenderer<TileStarfield
|
||||
/* Botania - don't render other faces
|
||||
if (te.shouldRenderFace(EnumFacing.SOUTH))
|
||||
{
|
||||
vertexbuffer.pos(x, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y + 1.0D, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x, y + 1.0D, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y + 1.0D, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y + 1.0D, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
}
|
||||
|
||||
if (te.shouldRenderFace(EnumFacing.NORTH))
|
||||
{
|
||||
vertexbuffer.pos(x, y + 1.0D, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y + 1.0D, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y + 1.0D, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y + 1.0D, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
}
|
||||
|
||||
if (te.shouldRenderFace(EnumFacing.EAST))
|
||||
{
|
||||
vertexbuffer.pos(x + 1.0D, y + 1.0D, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y + 1.0D, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y + 1.0D, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y + 1.0D, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
}
|
||||
|
||||
if (te.shouldRenderFace(EnumFacing.WEST))
|
||||
{
|
||||
vertexbuffer.pos(x, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x, y + 1.0D, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x, y + 1.0D, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y + 1.0D, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y + 1.0D, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
}
|
||||
|
||||
if (te.shouldRenderFace(EnumFacing.DOWN))
|
||||
{
|
||||
vertexbuffer.pos(x, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
}*/
|
||||
|
||||
// Botania - always render up face if (te.shouldRenderFace(EnumFacing.UP))
|
||||
{
|
||||
vertexbuffer.pos(x, y + (double)f, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y + (double)f, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x + 1.0D, y + (double)f, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
vertexbuffer.pos(x, y + (double)f, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y + (double)f, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y + (double)f, z + 1.0D).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x + 1.0D, y + (double)f, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
BufferBuilder.pos(x, y + (double)f, z).color(f3, f4, f5, 1.0F).endVertex();
|
||||
}
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
|
||||
@@ -20,7 +20,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
@@ -60,9 +60,9 @@ public class SkyblockSkyRenderer extends IRenderHandler {
|
||||
// Begin
|
||||
GlStateManager.disableTexture2D();
|
||||
Vec3d vec3d = world.getSkyColor(mc.getRenderViewEntity(), partialTicks);
|
||||
float f = (float)vec3d.xCoord;
|
||||
float f1 = (float)vec3d.yCoord;
|
||||
float f2 = (float)vec3d.zCoord;
|
||||
float f = (float)vec3d.x;
|
||||
float f1 = (float)vec3d.y;
|
||||
float f2 = (float)vec3d.z;
|
||||
|
||||
// Botania - darken when in void
|
||||
float insideVoid = 0;
|
||||
@@ -85,7 +85,7 @@ public class SkyblockSkyRenderer extends IRenderHandler {
|
||||
|
||||
GlStateManager.color(f, f1, f2);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer vertexbuffer = tessellator.getBuffer();
|
||||
BufferBuilder BufferBuilder = tessellator.getBuffer();
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.enableFog();
|
||||
GlStateManager.color(f, f1, f2);
|
||||
@@ -133,14 +133,14 @@ public class SkyblockSkyRenderer extends IRenderHandler {
|
||||
f8 = f11;
|
||||
}*/
|
||||
|
||||
vertexbuffer.begin(6, DefaultVertexFormats.POSITION_COLOR);
|
||||
vertexbuffer.pos(0.0D, 100.0D, 0.0D).color(f6, f7, f8, afloat[3] * (1F - insideVoid)).endVertex(); // Botania - darken in void
|
||||
BufferBuilder.begin(6, DefaultVertexFormats.POSITION_COLOR);
|
||||
BufferBuilder.pos(0.0D, 100.0D, 0.0D).color(f6, f7, f8, afloat[3] * (1F - insideVoid)).endVertex(); // Botania - darken in void
|
||||
for (int l = 0; l <= 16; ++l)
|
||||
{
|
||||
float f21 = l * ((float)Math.PI * 2F) / 16.0F;
|
||||
float f12 = MathHelper.sin(f21);
|
||||
float f13 = MathHelper.cos(f21);
|
||||
vertexbuffer.pos(f12 * 120.0F, f13 * 120.0F, -f13 * 40.0F * afloat[3]).color(afloat[0], afloat[1], afloat[2], 0.0F).endVertex();
|
||||
BufferBuilder.pos(f12 * 120.0F, f13 * 120.0F, -f13 * 40.0F * afloat[3]).color(afloat[0], afloat[1], afloat[2], 0.0F).endVertex();
|
||||
}
|
||||
|
||||
tessellator.draw();
|
||||
@@ -319,11 +319,11 @@ public class SkyblockSkyRenderer extends IRenderHandler {
|
||||
GlStateManager.rotate(world.getCelestialAngle(partialTicks) * 360.0F, 1.0F, 0.0F, 0.0F);
|
||||
/*float*/ f17 = 60.0F; // Botania - 30 -> 60 and move declaration above "extra stuff"
|
||||
mc.renderEngine.bindTexture(SUN_TEXTURES);
|
||||
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
vertexbuffer.pos(-f17, 100.0D, -f17).tex(0.0D, 0.0D).endVertex();
|
||||
vertexbuffer.pos(f17, 100.0D, -f17).tex(1.0D, 0.0D).endVertex();
|
||||
vertexbuffer.pos(f17, 100.0D, f17).tex(1.0D, 1.0D).endVertex();
|
||||
vertexbuffer.pos(-f17, 100.0D, f17).tex(0.0D, 1.0D).endVertex();
|
||||
BufferBuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
BufferBuilder.pos(-f17, 100.0D, -f17).tex(0.0D, 0.0D).endVertex();
|
||||
BufferBuilder.pos(f17, 100.0D, -f17).tex(1.0D, 0.0D).endVertex();
|
||||
BufferBuilder.pos(f17, 100.0D, f17).tex(1.0D, 1.0D).endVertex();
|
||||
BufferBuilder.pos(-f17, 100.0D, f17).tex(0.0D, 1.0D).endVertex();
|
||||
tessellator.draw();
|
||||
f17 = 60.0F; // Botania - 20 -> 60
|
||||
mc.renderEngine.bindTexture(MOON_PHASES_TEXTURES);
|
||||
@@ -334,11 +334,11 @@ public class SkyblockSkyRenderer extends IRenderHandler {
|
||||
float f23 = (i1 + 0) / 2.0F;
|
||||
float f24 = (k + 1) / 4.0F;
|
||||
float f14 = (i1 + 1) / 2.0F;
|
||||
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
vertexbuffer.pos(-f17, -100.0D, f17).tex(f24, f14).endVertex();
|
||||
vertexbuffer.pos(f17, -100.0D, f17).tex(f22, f14).endVertex();
|
||||
vertexbuffer.pos(f17, -100.0D, -f17).tex(f22, f23).endVertex();
|
||||
vertexbuffer.pos(-f17, -100.0D, -f17).tex(f24, f23).endVertex();
|
||||
BufferBuilder.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
BufferBuilder.pos(-f17, -100.0D, f17).tex(f24, f14).endVertex();
|
||||
BufferBuilder.pos(f17, -100.0D, f17).tex(f22, f14).endVertex();
|
||||
BufferBuilder.pos(f17, -100.0D, -f17).tex(f22, f23).endVertex();
|
||||
BufferBuilder.pos(-f17, -100.0D, -f17).tex(f24, f23).endVertex();
|
||||
tessellator.draw();
|
||||
GlStateManager.disableTexture2D();
|
||||
// Botania - Custom star rendering
|
||||
@@ -375,7 +375,7 @@ public class SkyblockSkyRenderer extends IRenderHandler {
|
||||
// Botania - no horizon rendering
|
||||
/* GlStateManager.disableTexture2D();
|
||||
GlStateManager.color(0.0F, 0.0F, 0.0F);
|
||||
double d0 = this.mc.player.getPositionEyes(partialTicks).yCoord - this.world.getHorizon();
|
||||
double d0 = this.mc.player.getPositionEyes(partialTicks).y - this.world.getHorizon();
|
||||
|
||||
if (d0 < 0.0D)
|
||||
{
|
||||
@@ -400,27 +400,27 @@ public class SkyblockSkyRenderer extends IRenderHandler {
|
||||
float f18 = 1.0F;
|
||||
float f19 = -((float)(d0 + 65.0D));
|
||||
float f20 = -1.0F;
|
||||
vertexbuffer.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
vertexbuffer.pos(-1.0D, (double)f19, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, (double)f19, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, (double)f19, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, (double)f19, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, (double)f19, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, (double)f19, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, (double)f19, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, (double)f19, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
vertexbuffer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.begin(7, DefaultVertexFormats.POSITION_COLOR);
|
||||
BufferBuilder.pos(-1.0D, (double)f19, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, (double)f19, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, (double)f19, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, (double)f19, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, (double)f19, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, (double)f19, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, (double)f19, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, (double)f19, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex();
|
||||
BufferBuilder.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex();
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.common;
|
||||
|
||||
import net.minecraft.entity.MultiPartEntityPart;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -134,7 +135,6 @@ public class Botania {
|
||||
ModPotions.init();
|
||||
ModBrews.init();
|
||||
|
||||
ModAchievements.init();
|
||||
ModMultiblocks.init();
|
||||
ModBanners.init();
|
||||
|
||||
@@ -251,7 +251,7 @@ public class Botania {
|
||||
private void registerDefaultEntityBlacklist() {
|
||||
// Vanilla
|
||||
BotaniaAPI.blacklistEntityFromGravityRod(EntityDragon.class);
|
||||
BotaniaAPI.blacklistEntityFromGravityRod(EntityDragonPart.class);
|
||||
BotaniaAPI.blacklistEntityFromGravityRod(MultiPartEntityPart.class);
|
||||
BotaniaAPI.blacklistEntityFromGravityRod(EntityWither.class);
|
||||
BotaniaAPI.blacklistEntityFromGravityRod(EntityItemFrame.class);
|
||||
BotaniaAPI.blacklistEntityFromGravityRod(EntityEnderCrystal.class);
|
||||
|
||||
@@ -101,9 +101,9 @@ public class BlockFelPumpkin extends BlockMod implements ILexiconable {
|
||||
if(event.getDrops().isEmpty())
|
||||
event.getDrops().add(new EntityItem(event.getEntityLiving().world, event.getEntityLiving().posX, event.getEntityLiving().posY, event.getEntityLiving().posZ, new ItemStack(Items.BLAZE_POWDER, 6)));
|
||||
else for(EntityItem item : event.getDrops()) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(stack.getItem() == Items.BLAZE_ROD)
|
||||
item.setEntityItemStack(new ItemStack(Items.BLAZE_POWDER, stack.getCount() * 10));
|
||||
item.setItem(new ItemStack(Items.BLAZE_POWDER, stack.getCount() * 10));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class BlockTeruTeruBozu extends BlockMod implements ILexiconable {
|
||||
public void onEntityCollidedWithBlock(World world, BlockPos pos, IBlockState state, Entity e) {
|
||||
if(!world.isRemote && e instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) e;
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(isSunflower(stack) && removeRain(world) || isBlueOrchid(stack) && startRain(world)) {
|
||||
stack.shrink(1);
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@ public class BlockForestDrum extends BlockMod implements IManaTrigger, ILexicona
|
||||
} else if(entity instanceof EntityCow) {
|
||||
List<EntityItem> items = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(entity.posX, entity.posY, entity.posZ, entity.posX + entity.width, entity.posY + entity.height, entity.posZ + entity.width));
|
||||
for(EntityItem item : items) {
|
||||
ItemStack itemstack = item.getEntityItem();
|
||||
ItemStack itemstack = item.getItem();
|
||||
if(!itemstack.isEmpty() && itemstack.getItem() == Items.BUCKET && !world.isRemote) {
|
||||
while(itemstack.getCount() > 0) {
|
||||
EntityItem ent = entity.entityDropItem(new ItemStack(Items.MILK_BUCKET), 1.0F);
|
||||
|
||||
@@ -77,10 +77,10 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(age < 60 + slowdown || age >= 105 && age < 110 || item.isDead || item.getEntityItem().isEmpty())
|
||||
if(age < 60 + slowdown || age >= 105 && age < 110 || item.isDead || item.getItem().isEmpty())
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
IItemHandler invToPutItemIn = null;
|
||||
boolean priorityInv = false;
|
||||
int amountToPutIn = 0;
|
||||
@@ -116,7 +116,7 @@ public class SubTileHopperhock extends SubTileFunctional {
|
||||
if(invToPutItemIn != null && !item.isDead) {
|
||||
SubTileSpectranthemum.spawnExplosionParticles(item, 3);
|
||||
ItemHandlerHelper.insertItem(invToPutItemIn, stack.splitStack(amountToPutIn), false);
|
||||
item.setEntityItemStack(stack); // Just in case someone subclasses EntityItem and changes something important.
|
||||
item.setItem(stack); // Just in case someone subclasses EntityItem and changes something important.
|
||||
pulledAny = true;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class SubTilePollidisiac extends SubTileFunctional {
|
||||
if(age < 60 + slowdown || item.isDead)
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(!stack.isEmpty() && animal.isBreedingItem(stack)) {
|
||||
stack.shrink(1);
|
||||
|
||||
|
||||
+2
-2
@@ -88,10 +88,10 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(age < 60 + slowdown || item.isDead || item.getEntityItem().isEmpty())
|
||||
if(age < 60 + slowdown || item.isDead || item.getItem().isEmpty())
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
Item stackItem = stack.getItem();
|
||||
if(stackItem instanceof ItemBlock || stackItem instanceof ItemBlockSpecial || stackItem instanceof ItemRedstone || stackItem instanceof IFlowerPlaceable) {
|
||||
if(!scanned) {
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ public class SubTileSpectranthemum extends SubTileFunctional {
|
||||
if(age < 60 + slowdown || item.isDead || item.getEntityData().getBoolean(TAG_TELEPORTED))
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(!stack.isEmpty()) {
|
||||
Item sitem = stack.getItem();
|
||||
if(sitem instanceof IManaItem)
|
||||
|
||||
@@ -57,7 +57,7 @@ public class SubTileEndoflame extends SubTileGenerating {
|
||||
}
|
||||
|
||||
if(age >= 59 + slowdown && !item.isDead) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(stack.isEmpty() || stack.getItem().hasContainerItem(stack))
|
||||
continue;
|
||||
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public class SubTileGourmaryllis extends SubTileGenerating {
|
||||
List<EntityItem> items = supertile.getWorld().getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(supertile.getPos().add(-RANGE, -RANGE, -RANGE), supertile.getPos().add(RANGE + 1, RANGE + 1, RANGE + 1)));
|
||||
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
|
||||
int age;
|
||||
try {
|
||||
|
||||
@@ -56,7 +56,7 @@ public class SubTileSpectrolus extends SubTileGenerating {
|
||||
int slowdown = getSlowdownFactor();
|
||||
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
|
||||
int age;
|
||||
try {
|
||||
|
||||
@@ -127,7 +127,7 @@ public class TileAlfPortal extends TileMod {
|
||||
if(item.isDead)
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
boolean consume;
|
||||
if (item.getEntityData().hasKey(TAG_PORTAL_FLAG)) {
|
||||
consume = false;
|
||||
|
||||
@@ -77,7 +77,7 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary {
|
||||
int recipeKeepTicks = 0;
|
||||
|
||||
public boolean collideEntityItem(EntityItem item) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(world.isRemote || stack.isEmpty() || item.isDead)
|
||||
return false;
|
||||
|
||||
@@ -103,13 +103,13 @@ public class TileAltar extends TileSimpleInventory implements IPetalApothecary {
|
||||
setWater(true);
|
||||
world.updateComparatorOutputLevel(pos, world.getBlockState(pos).getBlock());
|
||||
fluidHandler.drain(new FluidStack(FluidRegistry.WATER, Fluid.BUCKET_VOLUME), true);
|
||||
item.setEntityItemStack(fluidHandler.getContainer());
|
||||
item.setItem(fluidHandler.getContainer());
|
||||
return true;
|
||||
} else if(drainLava != null && drainLava.getFluid() == FluidRegistry.LAVA && drainLava.amount == Fluid.BUCKET_VOLUME) {
|
||||
setLava(true);
|
||||
world.updateComparatorOutputLevel(pos, world.getBlockState(pos).getBlock());
|
||||
fluidHandler.drain(new FluidStack(FluidRegistry.LAVA, Fluid.BUCKET_VOLUME), true);
|
||||
item.setEntityItemStack(fluidHandler.getContainer());
|
||||
item.setItem(fluidHandler.getContainer());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ public class TileBrewery extends TileSimpleInventory implements IManaReceiver {
|
||||
if(!world.isRemote && recipe == null) {
|
||||
List<EntityItem> items = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1));
|
||||
for(EntityItem item : items)
|
||||
if(!item.isDead && !item.getEntityItem().isEmpty()) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(!item.isDead && !item.getItem().isEmpty()) {
|
||||
ItemStack stack = item.getItem();
|
||||
addItem(null, stack, null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public class TileEnchanter extends TileMod implements ISparkAttachable {
|
||||
|
||||
if(count > 0 && !world.isRemote) {
|
||||
for(EntityItem entity : items) {
|
||||
ItemStack item = entity.getEntityItem();
|
||||
ItemStack item = entity.getItem();
|
||||
if(item.getItem() == Items.ENCHANTED_BOOK) {
|
||||
NBTTagList enchants = Items.ENCHANTED_BOOK.getEnchantments(item);
|
||||
if(enchants != null && enchants.tagCount() > 0) {
|
||||
@@ -174,7 +174,7 @@ public class TileEnchanter extends TileMod implements ISparkAttachable {
|
||||
|
||||
if(count > 0 && !world.isRemote) {
|
||||
for(EntityItem entity : items) {
|
||||
ItemStack item = entity.getEntityItem();
|
||||
ItemStack item = entity.getItem();
|
||||
if(item.getItem() == Items.ENCHANTED_BOOK) {
|
||||
NBTTagList enchants = Items.ENCHANTED_BOOK.getEnchantments(item);
|
||||
if(enchants != null && enchants.tagCount() > 0) {
|
||||
|
||||
@@ -121,8 +121,8 @@ public class TileRuneAltar extends TileSimpleInventory implements IManaReceiver
|
||||
if(manaToGet == 0) {
|
||||
List<EntityItem> items = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)));
|
||||
for(EntityItem item : items)
|
||||
if(!item.isDead && !item.getEntityItem().isEmpty() && item.getEntityItem().getItem() != Item.getItemFromBlock(ModBlocks.livingrock)) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
if(!item.isDead && !item.getItem().isEmpty() && item.getItem().getItem() != Item.getItemFromBlock(ModBlocks.livingrock)) {
|
||||
ItemStack stack = item.getItem();
|
||||
addItem(null, stack, null);
|
||||
}
|
||||
}
|
||||
@@ -227,7 +227,7 @@ public class TileRuneAltar extends TileSimpleInventory implements IManaReceiver
|
||||
List<EntityItem> items = world.getEntitiesWithinAABB(EntityItem.class, new AxisAlignedBB(pos, pos.add(1, 1, 1)));
|
||||
EntityItem livingrock = null;
|
||||
for(EntityItem item : items)
|
||||
if(!item.isDead && !item.getEntityItem().isEmpty() && item.getEntityItem().getItem() == Item.getItemFromBlock(ModBlocks.livingrock)) {
|
||||
if(!item.isDead && !item.getItem().isEmpty() && item.getItem().getItem() == Item.getItemFromBlock(ModBlocks.livingrock)) {
|
||||
livingrock = item;
|
||||
break;
|
||||
}
|
||||
@@ -254,7 +254,7 @@ public class TileRuneAltar extends TileSimpleInventory implements IManaReceiver
|
||||
}
|
||||
}
|
||||
|
||||
livingrock.getEntityItem().shrink(1);
|
||||
livingrock.getItem().shrink(1);
|
||||
|
||||
craftingFanciness();
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ public class TileTerraPlate extends TileMod implements ISparkAttachable {
|
||||
for(EntityItem otherItem : items)
|
||||
if(otherItem != item)
|
||||
otherItem.setDead();
|
||||
else item.setEntityItemStack(new ItemStack(ModItems.manaResource, 1, 4));
|
||||
else item.setItem(new ItemStack(ModItems.manaResource, 1, 4));
|
||||
world.playSound(null, item.posX, item.posY, item.posZ, BotaniaSoundEvents.terrasteelCraft, SoundCategory.BLOCKS, 1, 1);
|
||||
mana = 0;
|
||||
world.updateComparatorOutputLevel(pos, world.getBlockState(pos).getBlock());
|
||||
@@ -129,7 +129,7 @@ public class TileTerraPlate extends TileMod implements ISparkAttachable {
|
||||
ItemStack pearl = ItemStack.EMPTY;
|
||||
ItemStack diamond = ItemStack.EMPTY;
|
||||
for(EntityItem item : items) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(stack.getItem() != ModItems.manaResource || stack.getCount() != 1)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -161,10 +161,10 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
}
|
||||
|
||||
public boolean collideEntityItem(EntityItem item) {
|
||||
if(world.isRemote || item.isDead || item.getEntityItem().isEmpty())
|
||||
if(world.isRemote || item.isDead || item.getItem().isEmpty())
|
||||
return false;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
|
||||
if(stack.getItem() instanceof IManaDissolvable) {
|
||||
((IManaDissolvable) stack.getItem()).onDissolveTick(this, stack, item);
|
||||
@@ -244,7 +244,7 @@ public class TilePool extends TileMod implements IManaPool, IKeyLocked, ISparkAt
|
||||
if(item.isDead)
|
||||
continue;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(!stack.isEmpty() && stack.getItem() instanceof IManaItem) {
|
||||
IManaItem mana = (IManaItem) stack.getItem();
|
||||
if(outputting && mana.canReceiveManaFromPool(stack, this) || !outputting && mana.canExportManaToPool(stack, this)) {
|
||||
|
||||
@@ -395,9 +395,9 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
|
||||
} else {
|
||||
RayTraceResult pos = raytraceFromEntity(world, player, true, 5);
|
||||
if(pos != null && pos.hitVec != null && !world.isRemote) {
|
||||
double x = pos.hitVec.xCoord - getPos().getX() - 0.5;
|
||||
double y = pos.hitVec.yCoord - getPos().getY() - 0.5;
|
||||
double z = pos.hitVec.zCoord - getPos().getZ() - 0.5;
|
||||
double x = pos.hitVec.x - getPos().getX() - 0.5;
|
||||
double y = pos.hitVec.y - getPos().getY() - 0.5;
|
||||
double z = pos.hitVec.z - getPos().getZ() - 0.5;
|
||||
|
||||
if(pos.sideHit != EnumFacing.DOWN && pos.sideHit != EnumFacing.UP) {
|
||||
Vector3 clickVector = new Vector3(x, 0, z);
|
||||
|
||||
@@ -35,7 +35,7 @@ public class PotionBloodthirst extends PotionMod {
|
||||
if(event.getResult() != Result.ALLOW && event.getEntityLiving() instanceof IMob) {
|
||||
AxisAlignedBB aabb = new AxisAlignedBB(event.getX() - RANGE, event.getY() - RANGE, event.getZ() - RANGE, event.getX() + RANGE, event.getY() + RANGE, event.getZ() + RANGE);
|
||||
for(EntityPlayer player : event.getWorld().playerEntities) {
|
||||
if(hasEffect(player) && !hasEffect(player, ModPotions.emptiness) && player.getEntityBoundingBox().intersectsWith(aabb)) {
|
||||
if(hasEffect(player) && !hasEffect(player, ModPotions.emptiness) && player.getEntityBoundingBox().intersects(aabb)) {
|
||||
event.setResult(Result.ALLOW);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class PotionEmptiness extends PotionMod {
|
||||
if(event.getResult() != Result.ALLOW && event.getEntityLiving() instanceof IMob) {
|
||||
AxisAlignedBB aabb = new AxisAlignedBB(event.getX() - RANGE, event.getY() - RANGE, event.getZ() - RANGE, event.getX() + RANGE, event.getY() + RANGE, event.getZ() + RANGE);
|
||||
for(EntityPlayer player : event.getWorld().playerEntities) {
|
||||
if(hasEffect(player) && player.getEntityBoundingBox().intersectsWith(aabb)) {
|
||||
if(hasEffect(player) && player.getEntityBoundingBox().intersects(aabb)) {
|
||||
event.setResult(Result.DENY);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ package vazkii.botania.common.brew.potion;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.potion.Potion;
|
||||
@@ -61,7 +61,7 @@ public class PotionMod extends Potion {
|
||||
private void render(int x, int y, float alpha) {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(resource);
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer buf = tessellator.getBuffer();
|
||||
BufferBuilder buf = tessellator.getBuffer();
|
||||
buf.begin(7, DefaultVertexFormats.POSITION_TEX);
|
||||
GlStateManager.color(1, 1, 1, alpha);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class PotionSoulCross extends PotionMod {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityKill(LivingDeathEvent event) {
|
||||
Entity killer = event.getSource().getEntity();
|
||||
Entity killer = event.getSource().getTrueSource();
|
||||
if(killer != null && killer instanceof EntityLivingBase) {
|
||||
EntityLivingBase living = (EntityLivingBase) killer;
|
||||
if(hasEffect(living))
|
||||
|
||||
@@ -372,12 +372,12 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
}
|
||||
|
||||
private void addItem(Item item) {
|
||||
item.getSubItems(item, this, list);
|
||||
item.getSubItems(this, list);
|
||||
}
|
||||
|
||||
private void addBlock(Block block) {
|
||||
ItemStack stack = new ItemStack(block);
|
||||
block.getSubBlocks(stack.getItem(), this, list);
|
||||
block.getSubBlocks(this, list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public final class BiomeDecorationHandler {
|
||||
int y1 = y + event.getRand().nextInt(4) - event.getRand().nextInt(4);
|
||||
int z1 = z + event.getRand().nextInt(dist * 2) - dist;
|
||||
BlockPos pos2 = new BlockPos(x1, y1, z1);
|
||||
if(event.getWorld().isAirBlock(pos2) && (!event.getWorld().provider.hasNoSky() || y1 < 127) && ModBlocks.flower.canPlaceBlockAt(event.getWorld(), pos2)) {
|
||||
if(event.getWorld().isAirBlock(pos2) && (!event.getWorld().provider.isNether() || y1 < 127) && ModBlocks.flower.canPlaceBlockAt(event.getWorld(), pos2)) {
|
||||
event.getWorld().setBlockState(pos2, ModBlocks.flower.getDefaultState().withProperty(BotaniaStateProps.COLOR, color), 2);
|
||||
if(event.getRand().nextDouble() < ConfigHandler.flowerTallChance && ((BlockModFlower) ModBlocks.flower).canGrow(event.getWorld(), pos2, event.getWorld().getBlockState(pos2), false))
|
||||
BlockModFlower.placeDoubleFlower(event.getWorld(), pos2, color, 0);
|
||||
|
||||
@@ -30,7 +30,7 @@ public final class PixieHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public static void onDamageTaken(LivingHurtEvent event) {
|
||||
if(!event.getEntityLiving().world.isRemote && event.getEntityLiving() instanceof EntityPlayer && event.getSource().getEntity() != null && event.getSource().getEntity() instanceof EntityLivingBase) {
|
||||
if(!event.getEntityLiving().world.isRemote && event.getEntityLiving() instanceof EntityPlayer && event.getSource().getTrueSource() instanceof EntityLivingBase) {
|
||||
EntityPlayer player = (EntityPlayer) event.getEntityLiving();
|
||||
ItemStack stack = PlayerHelper.getFirstHeldItemClass(player, IPixieSpawner.class);
|
||||
|
||||
@@ -54,7 +54,7 @@ public final class PixieHandler {
|
||||
if(!stack.isEmpty() && stack.getItem() == ModItems.elementiumSword)
|
||||
dmg += 2;
|
||||
|
||||
pixie.setProps((EntityLivingBase) event.getSource().getEntity(), player, 0, dmg);
|
||||
pixie.setProps((EntityLivingBase) event.getSource().getTrueSource(), player, 0, dmg);
|
||||
pixie.onInitialSpawn(player.world.getDifficultyForLocation(new BlockPos(pixie)), null);
|
||||
player.world.spawnEntity(pixie);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class Vector3
|
||||
}
|
||||
|
||||
public Vector3(Vec3d vec) {
|
||||
this(vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
this(vec.x, vec.y, vec.z);
|
||||
}
|
||||
|
||||
public static Vector3 fromBlockPos(BlockPos pos) {
|
||||
|
||||
@@ -186,7 +186,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
|
||||
if (raytraceresult != null)
|
||||
{
|
||||
vec3d1 = new Vec3d(raytraceresult.hitVec.xCoord, raytraceresult.hitVec.yCoord, raytraceresult.hitVec.zCoord);
|
||||
vec3d1 = new Vec3d(raytraceresult.hitVec.x, raytraceresult.hitVec.y, raytraceresult.hitVec.z);
|
||||
}
|
||||
|
||||
if(!world.isRemote) { // Botania - only do entity colliding on server
|
||||
|
||||
@@ -204,7 +204,7 @@ public abstract class EntityThrowableCopy extends Entity implements IProjectile
|
||||
|
||||
if (raytraceresult != null)
|
||||
{
|
||||
vec3d1 = new Vec3d(raytraceresult.hitVec.xCoord, raytraceresult.hitVec.yCoord, raytraceresult.hitVec.zCoord);
|
||||
vec3d1 = new Vec3d(raytraceresult.hitVec.x, raytraceresult.hitVec.y, raytraceresult.hitVec.z);
|
||||
}
|
||||
|
||||
Entity entity = null;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class EntityThrownItem extends EntityItem {
|
||||
|
||||
public EntityThrownItem(World world, double x,
|
||||
double y, double z, EntityItem item) {
|
||||
super(world, x, y, z, item.getEntityItem());
|
||||
super(world, x, y, z, item.getItem());
|
||||
|
||||
int pickupDelay = 0;
|
||||
try {
|
||||
@@ -108,9 +108,9 @@ public class EntityThrownItem extends EntityItem {
|
||||
if (RayTraceResult.entityHit != null) {
|
||||
RayTraceResult.entityHit.attackEntityFrom(DamageSource.MAGIC, 2.0F);
|
||||
if (!world.isRemote) {
|
||||
Entity item = getEntityItem().getItem().createEntity(world, this, getEntityItem());
|
||||
Entity item = getItem().getItem().createEntity(world, this, getItem());
|
||||
if (item == null) {
|
||||
item = new EntityItem(world, posX, posY, posZ, getEntityItem());
|
||||
item = new EntityItem(world, posX, posY, posZ, getItem());
|
||||
world.spawnEntity(item);
|
||||
item.motionX = motionX*0.25F;
|
||||
item.motionY = motionY*0.25F;
|
||||
@@ -133,9 +133,9 @@ public class EntityThrownItem extends EntityItem {
|
||||
Vector3 vec3m = new Vector3(motionX, motionY, motionZ);
|
||||
if (vec3m.mag() < 1.0F) {
|
||||
if (!world.isRemote) {
|
||||
Entity item = getEntityItem().getItem().createEntity(world, this, getEntityItem());
|
||||
Entity item = getItem().getItem().createEntity(world, this, getItem());
|
||||
if (item == null) {
|
||||
item = new EntityItem(world, posX, posY, posZ, getEntityItem());
|
||||
item = new EntityItem(world, posX, posY, posZ, getItem());
|
||||
world.spawnEntity(item);
|
||||
item.motionX = motionX;
|
||||
item.motionY = motionY;
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ItemAncientWill extends ItemMod {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> list, boolean adv) {
|
||||
addStringToTooltip(I18n.format("botaniamisc.craftToAddWill"), list);
|
||||
addStringToTooltip(I18n.format("botania.armorset.will" + stack.getItemDamage() + ".shortDesc"), list);
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import javax.annotation.Nullable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -231,7 +232,7 @@ public class ItemBlackHoleTalisman extends ItemMod implements IBlockProvider {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
Block block = getBlock(par1ItemStack);
|
||||
if(block != null) {
|
||||
int count = getBlockCount(par1ItemStack);
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -22,6 +23,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
@@ -81,7 +83,7 @@ public class ItemBlackLotus extends ItemMod implements IManaDissolvable {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
list.add(I18n.format("botaniamisc.lotusDesc"));
|
||||
}
|
||||
|
||||
|
||||
@@ -212,7 +212,7 @@ public class ItemBottledMana extends ItemMod {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
stacks.add(I18n.format("botaniamisc.bottleTooltip"));
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ public class ItemCacophonium extends ItemMod implements ICraftAchievement {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
if(isDOIT(stack))
|
||||
list.add(I18n.format("botaniamisc.justDoIt"));
|
||||
else if(getSound(stack) != null)
|
||||
|
||||
@@ -192,7 +192,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
return;
|
||||
|
||||
Vec3d lookVec3 = player.getLookVec();
|
||||
Vector3 centerVector = Vector3.fromEntityCenter(player).add(lookVec3.xCoord * 3, 1.3, lookVec3.zCoord * 3);
|
||||
Vector3 centerVector = Vector3.fromEntityCenter(player).add(lookVec3.x * 3, 1.3, lookVec3.z * 3);
|
||||
float m = 0.1F;
|
||||
for(int i = 0; i < 4; i++)
|
||||
Botania.proxy.wispFX(centerVector.x, centerVector.y, centerVector.z, 1F, 0F, 1F, 0.2F + 0.2F * (float) Math.random(), ((float) Math.random() - 0.5F) * m, ((float) Math.random() - 0.5F) * m, ((float) Math.random() - 0.5F) * m);
|
||||
|
||||
@@ -120,7 +120,7 @@ public class ItemFlowerBag extends ItemMod {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onPickupItem(EntityItemPickupEvent event) {
|
||||
ItemStack entityStack = event.getItem().getEntityItem();
|
||||
ItemStack entityStack = event.getItem().getItem();
|
||||
if(entityStack.getItem() == Item.getItemFromBlock(ModBlocks.flower) && entityStack.getCount() > 0) {
|
||||
int color = entityStack.getItemDamage();
|
||||
if(color > 15)
|
||||
@@ -137,7 +137,7 @@ public class ItemFlowerBag extends ItemMod {
|
||||
ItemStack result = bagInv.insertItem(color, entityStack, false);
|
||||
int numPickedUp = entityStack.getCount() - result.getCount();
|
||||
|
||||
event.getItem().setEntityItemStack(result);
|
||||
event.getItem().setItem(result);
|
||||
|
||||
if(numPickedUp > 0) {
|
||||
event.setCanceled(true);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ItemKeepIvy extends ItemMod {
|
||||
public static void onPlayerDrops(PlayerDropsEvent event) {
|
||||
List<EntityItem> keeps = new ArrayList<>();
|
||||
for(EntityItem item : event.getDrops()) {
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(!stack.isEmpty() && stack.hasTagCompound() && ItemNBTHelper.getBoolean(stack, TAG_KEEP, false))
|
||||
keeps.add(item);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ public class ItemKeepIvy extends ItemMod {
|
||||
|
||||
int i = 0;
|
||||
for(EntityItem keep : keeps) {
|
||||
ItemStack stack = keep.getEntityItem();
|
||||
ItemStack stack = keep.getItem();
|
||||
NBTTagCompound cmp1 = stack.writeToNBT(new NBTTagCompound());
|
||||
cmp.setTag(TAG_DROP_PREFIX + i, cmp1);
|
||||
i++;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
list.add(I18n.format("botaniamisc.shardLevel", I18n.format("botania.roman" + (stack.getItemDamage() + 1))));
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.block.model.ModelBakery;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -100,9 +101,9 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
list.add(new ItemStack(item));
|
||||
ItemStack creative = new ItemStack(item);
|
||||
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> list) {
|
||||
list.add(new ItemStack(this));
|
||||
ItemStack creative = new ItemStack(this);
|
||||
for(String s : BotaniaAPI.knowledgeTypes.keySet()) {
|
||||
KnowledgeType type = BotaniaAPI.knowledgeTypes.get(s);
|
||||
unlockKnowledge(creative, type);
|
||||
@@ -112,7 +113,7 @@ public class ItemLexicon extends ItemMod implements ILexicon, IElvenItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
if(GuiScreen.isShiftKeyDown()) {
|
||||
String edition = TextFormatting.GOLD + I18n.format("botaniamisc.edition", getEdition());
|
||||
if(!edition.isEmpty())
|
||||
|
||||
@@ -179,7 +179,7 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
boolean clip = hasClip(par1ItemStack);
|
||||
if(clip && !GuiScreen.isShiftKeyDown()) {
|
||||
addStringToTooltip(I18n.format("botaniamisc.shiftinfo"), stacks);
|
||||
|
||||
@@ -129,7 +129,7 @@ public class ItemManaMirror extends ItemMod implements IManaItem, ICoordBoundIte
|
||||
if(pool != null) {
|
||||
pool.recieveMana(mana);
|
||||
TileEntity tile = (TileEntity) pool;
|
||||
tile.getWorld().func_147453_f(tile.xCoord, tile.yCoord, tile.zCoord, tile.getWorld().getBlock(tile.xCoord, tile.yCoord, tile.zCoord));
|
||||
tile.getWorld().func_147453_f(tile.x, tile.y, tile.z, tile.getWorld().getBlock(tile.x, tile.y, tile.z));
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -74,7 +75,7 @@ public class ItemManaTablet extends ItemMod implements IManaItem, ICreativeManaP
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
if(isStackCreative(par1ItemStack))
|
||||
stacks.add(I18n.format("botaniamisc.creative"));
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class ItemPinkinator extends ItemMod {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flags) {
|
||||
tooltip.add(I18n.format("botaniamisc.pinkinatorDesc"));
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class ItemSpawnerMover extends ItemMod {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> infoList, boolean advancedTooltips) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> infoList, ITooltipFlag flags) {
|
||||
String id = getEntityId(stack);
|
||||
if (id != null)
|
||||
infoList.add(I18n.format("entity." + id + ".name"));
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ItemTemperanceStone extends ItemMod {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
if(par1ItemStack.getItemDamage() == 1)
|
||||
addStringToTooltip(I18n.format("botaniamisc.active"), stacks);
|
||||
else addStringToTooltip(I18n.format("botaniamisc.inactive"), stacks);
|
||||
|
||||
@@ -243,7 +243,7 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer p, List<String> list, boolean adv) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
list.add(I18n.format(getModeString(stack)));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.achievement.ICraftAchievement;
|
||||
import vazkii.botania.common.achievement.IPickupAchievement;
|
||||
|
||||
public class ItemBlockMod extends ItemBlock implements IPickupAchievement, ICraftAchievement {
|
||||
public class ItemBlockMod extends ItemBlock {
|
||||
|
||||
public ItemBlockMod(Block block) {
|
||||
super(block);
|
||||
@@ -38,15 +35,4 @@ public class ItemBlockMod extends ItemBlock implements IPickupAchievement, ICraf
|
||||
public String getUnlocalizedNameInefficiently_(ItemStack stack) {
|
||||
return super.getUnlocalizedNameInefficiently(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix) {
|
||||
return block instanceof ICraftAchievement ? ((ICraftAchievement) block).getAchievementOnCraft(stack, player, matrix) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
|
||||
return block instanceof IPickupAchievement ? ((IPickupAchievement) block).getAchievementOnPickup(stack, player, item) : null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -16,9 +16,11 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.state.enums.PoolVariant;
|
||||
@@ -36,7 +38,7 @@ public class ItemBlockPool extends ItemBlockWithMetadataAndName {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(@Nonnull ItemStack par1ItemStack, @Nonnull EntityPlayer player, @Nonnull List<String> stacks, boolean par4) {
|
||||
public void addInformation(@Nonnull ItemStack par1ItemStack, World world, @Nonnull List<String> stacks, @Nonnull ITooltipFlag flag) {
|
||||
if(par1ItemStack.getItemDamage() == 1)
|
||||
for(int i = 0; i < 2; i++)
|
||||
stacks.add(I18n.format("botaniamisc.creativePool" + i));
|
||||
|
||||
@@ -17,6 +17,7 @@ import javax.annotation.Nonnull;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -82,7 +83,7 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(@Nonnull ItemStack par1ItemStack, @Nonnull EntityPlayer player, @Nonnull List<String> stacks, boolean par4) {
|
||||
public void addInformation(@Nonnull ItemStack par1ItemStack, World world, @Nonnull List<String> stacks, @Nonnull ITooltipFlag flag) {
|
||||
String type = getType(par1ItemStack);
|
||||
SubTileSignature sig = BotaniaAPI.getSignatureForName(type);
|
||||
|
||||
@@ -118,31 +119,4 @@ public class ItemBlockSpecialFlower extends ItemBlockMod implements IRecipeKeyPr
|
||||
return "flower." + getType(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
|
||||
String type = getType(stack);
|
||||
switch (type) {
|
||||
case LibBlockNames.SUBTILE_KEKIMURUS:
|
||||
return ModAchievements.kekimurusPickup;
|
||||
case LibBlockNames.SUBTILE_HEISEI_DREAM:
|
||||
return ModAchievements.heiseiDreamPickup;
|
||||
case LibBlockNames.SUBTILE_POLLIDISIAC:
|
||||
return ModAchievements.pollidisiacPickup;
|
||||
case LibBlockNames.SUBTILE_BUBBELL:
|
||||
return ModAchievements.bubbellPickup;
|
||||
case LibBlockNames.SUBTILE_DANDELIFEON:
|
||||
return ModAchievements.dandelifeonPickup;
|
||||
case "":
|
||||
return ModAchievements.nullFlower;
|
||||
default:
|
||||
Class<? extends SubTileEntity> clazz = BotaniaAPI.getSubTileMapping(type);
|
||||
if(SubTileGenerating.class.isAssignableFrom(clazz))
|
||||
return ModAchievements.daybloomPickup;
|
||||
else if(SubTileFunctional.class.isAssignableFrom(clazz))
|
||||
return ModAchievements.endoflamePickup;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,12 +18,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.achievement.ICraftAchievement;
|
||||
import vazkii.botania.common.achievement.IPickupAchievement;
|
||||
|
||||
public class ItemBlockWithMetadataAndName extends ItemBlock implements IPickupAchievement, ICraftAchievement {
|
||||
public class ItemBlockWithMetadataAndName extends ItemBlock {
|
||||
|
||||
public ItemBlockWithMetadataAndName(Block par2Block) {
|
||||
super(par2Block);
|
||||
@@ -42,16 +39,6 @@ public class ItemBlockWithMetadataAndName extends ItemBlock implements IPickupAc
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix) {
|
||||
return block instanceof ICraftAchievement ? ((ICraftAchievement) block).getAchievementOnCraft(stack, player, matrix) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
|
||||
return block instanceof IPickupAchievement ? ((IPickupAchievement) block).getAchievementOnPickup(stack, player, item) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata(int damage)
|
||||
{
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
@@ -25,7 +26,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
@@ -39,13 +39,11 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.brew.Brew;
|
||||
import vazkii.botania.api.brew.IBrewItem;
|
||||
import vazkii.botania.common.achievement.IPickupAchievement;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.item.ItemMod;
|
||||
import vazkii.botania.common.lib.LibMisc;
|
||||
|
||||
public abstract class ItemBrewBase extends ItemMod implements IBrewItem, IPickupAchievement {
|
||||
public abstract class ItemBrewBase extends ItemMod implements IBrewItem {
|
||||
|
||||
private static final String TAG_BREW_KEY = "brewKey";
|
||||
private static final String TAG_SWIGS_LEFT = "swigsLeft";
|
||||
@@ -115,9 +113,9 @@ public abstract class ItemBrewBase extends ItemMod implements IBrewItem, IPickup
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
for(String s : BotaniaAPI.brewMap.keySet()) {
|
||||
ItemStack stack = new ItemStack(item);
|
||||
ItemStack stack = new ItemStack(this);
|
||||
setBrew(stack, s);
|
||||
list.add(stack);
|
||||
}
|
||||
@@ -131,7 +129,7 @@ public abstract class ItemBrewBase extends ItemMod implements IBrewItem, IPickup
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
Brew brew = getBrew(stack);
|
||||
for(PotionEffect effect : brew.getPotionEffects(stack)) {
|
||||
TextFormatting format = effect.getPotion().isBadEffect() ? TextFormatting.RED : TextFormatting.GRAY;
|
||||
@@ -160,10 +158,4 @@ public abstract class ItemBrewBase extends ItemMod implements IBrewItem, IPickup
|
||||
public void setSwigsLeft(ItemStack stack, int swigs) {
|
||||
ItemNBTHelper.setInt(stack, TAG_SWIGS_LEFT, swigs);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
|
||||
return ModAchievements.brewPickup;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -23,6 +24,7 @@ import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
@@ -45,8 +47,8 @@ public class ItemIncenseStick extends ItemMod implements IBrewItem, IBrewContain
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
super.getSubItems(item, tab, list);
|
||||
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> list) {
|
||||
super.getSubItems(tab, list);
|
||||
for(String s : BotaniaAPI.brewMap.keySet()) {
|
||||
ItemStack brewStack = getItemForBrew(BotaniaAPI.brewMap.get(s), new ItemStack(this));
|
||||
if(!brewStack.isEmpty())
|
||||
@@ -56,7 +58,7 @@ public class ItemIncenseStick extends ItemMod implements IBrewItem, IBrewContain
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
Brew brew = getBrew(stack);
|
||||
if(brew == BotaniaAPI.fallbackBrew) {
|
||||
addStringToTooltip(TextFormatting.LIGHT_PURPLE + I18n.format("botaniamisc.notInfused"), list);
|
||||
|
||||
@@ -41,9 +41,9 @@ public class ItemVial extends ItemMod implements IBrewContainer {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
for(int i = 0; i < 2; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
list.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
|
||||
+6
-3
@@ -16,10 +16,12 @@ import java.util.Map;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -161,14 +163,15 @@ public class ItemManasteelArmor extends ItemArmor implements ISpecialArmor, IMan
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
if(GuiScreen.isShiftKeyDown())
|
||||
addInformationAfterShift(stack, player, list, adv);
|
||||
addInformationAfterShift(stack, world, list, flags);
|
||||
else addStringToTooltip(I18n.format("botaniamisc.shiftinfo"), list);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformationAfterShift(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformationAfterShift(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().player;
|
||||
addStringToTooltip(getArmorSetTitle(player), list);
|
||||
addArmorSetDescription(stack, list);
|
||||
ItemStack[] stacks = getArmorSetStacks();
|
||||
|
||||
+5
-12
@@ -16,25 +16,24 @@ import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.client.core.proxy.ClientProxy;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.client.model.armor.ModelArmorManaweave;
|
||||
import vazkii.botania.common.achievement.ICraftAchievement;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.armor.manasteel.ItemManasteelArmor;
|
||||
|
||||
public class ItemManaweaveArmor extends ItemManasteelArmor implements ICraftAchievement {
|
||||
public class ItemManaweaveArmor extends ItemManasteelArmor {
|
||||
|
||||
public ItemManaweaveArmor(EntityEquipmentSlot type, String name) {
|
||||
super(type, name, BotaniaAPI.manaweaveArmorMaterial);
|
||||
@@ -107,13 +106,13 @@ public class ItemManaweaveArmor extends ItemManasteelArmor implements ICraftAchi
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformationAfterShift(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
public void addInformationAfterShift(ItemStack stack, World world, List<String> list, ITooltipFlag flags) {
|
||||
if(ClientProxy.jingleTheBells) {
|
||||
addStringToTooltip(I18n.format("botaniamisc.santaweaveInfo"), list);
|
||||
addStringToTooltip("", list);
|
||||
}
|
||||
|
||||
super.addInformationAfterShift(stack, player, list, adv);
|
||||
super.addInformationAfterShift(stack, world, list, flags);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -122,10 +121,4 @@ public class ItemManaweaveArmor extends ItemManasteelArmor implements ICraftAchi
|
||||
addStringToTooltip(I18n.format("botania.armorset.manaweave.desc0"), list);
|
||||
addStringToTooltip(I18n.format("botania.armorset.manaweave.desc1"), list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix) {
|
||||
return ModAchievements.manaweaveArmorCraft;
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -122,7 +122,7 @@ public class ItemTerrasteelHelm extends ItemTerrasteelArmor implements IManaDisc
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityAttacked(LivingHurtEvent event) {
|
||||
Entity attacker = event.getSource().getEntity();
|
||||
Entity attacker = event.getSource().getImmediateSource();
|
||||
if(attacker instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) attacker;
|
||||
if(hasArmorSet(player)) {
|
||||
|
||||
@@ -15,15 +15,14 @@ import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
import baubles.api.BaublesApi;
|
||||
import baubles.api.IBauble;
|
||||
import baubles.api.cap.IBaublesItemHandler;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ActionResult;
|
||||
@@ -34,14 +33,11 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.Optional;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
import thaumcraft.api.items.IRunicArmor;
|
||||
import vazkii.botania.api.item.ICosmeticAttachable;
|
||||
import vazkii.botania.api.item.IPhantomInkable;
|
||||
import vazkii.botania.api.sound.BotaniaSoundEvents;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.entity.EntityDoppleganger;
|
||||
import vazkii.botania.common.item.ItemMod;
|
||||
@@ -103,14 +99,14 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
if(GuiScreen.isShiftKeyDown())
|
||||
addHiddenTooltip(par1ItemStack, player, stacks, par4);
|
||||
addHiddenTooltip(par1ItemStack, world, stacks, flags);
|
||||
else addStringToTooltip(I18n.format("botaniamisc.shiftinfo"), stacks);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
String key = vazkii.botania.client.core.helper.RenderHelper.getKeyDisplayString("Baubles Inventory");
|
||||
|
||||
if(key != null)
|
||||
@@ -152,8 +148,7 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
if(!player.world.isRemote)
|
||||
player.world.playSound(null, player.posX, player.posY, player.posZ, BotaniaSoundEvents.equipBauble, SoundCategory.PLAYERS, 0.1F, 1.3F);
|
||||
|
||||
if(player instanceof EntityPlayer)
|
||||
((EntityPlayer) player).addStat(ModAchievements.baubleWear, 1);
|
||||
// todo 1.12 advancement trigger for baubles (ideally baubles adds one, not us..)
|
||||
|
||||
onEquippedOrLoadedIntoWorld(stack, player);
|
||||
setLastPlayerHashcode(stack, player.hashCode());
|
||||
|
||||
@@ -14,7 +14,10 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.renderer.BufferBuilder;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
@@ -22,7 +25,6 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.EntityRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
@@ -75,9 +77,9 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> list) {
|
||||
for(int i = 0; i < SUBTYPES; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
list.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@@ -88,9 +90,9 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
addStringToTooltip(I18n.format("botaniamisc.cosmeticBauble"), stacks);
|
||||
super.addHiddenTooltip(par1ItemStack, player, stacks, par4);
|
||||
super.addHiddenTooltip(par1ItemStack, world, stacks, flags);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -346,7 +348,7 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
|
||||
// Adapted from RenderItem.renderModel(model, stack), added extra color param
|
||||
private void renderModel(IBakedModel model, ItemStack stack, int color) {
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer worldrenderer = tessellator.getBuffer();
|
||||
BufferBuilder worldrenderer = tessellator.getBuffer();
|
||||
worldrenderer.begin(7, DefaultVertexFormats.ITEM);
|
||||
|
||||
for (EnumFacing enumfacing : EnumFacing.values())
|
||||
@@ -359,7 +361,7 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
|
||||
}
|
||||
|
||||
// Copy of RenderItem.renderQuads
|
||||
private void renderQuads(VertexBuffer renderer, List<BakedQuad> quads, int color, ItemStack stack)
|
||||
private void renderQuads(BufferBuilder renderer, List<BakedQuad> quads, int color, ItemStack stack)
|
||||
{
|
||||
boolean flag = color == -1 && !stack.isEmpty();
|
||||
int i = 0;
|
||||
|
||||
@@ -15,7 +15,9 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
@@ -60,8 +62,8 @@ public class ItemBloodPendant extends ItemBauble implements IBrewContainer, IBre
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
super.getSubItems(item, tab, list);
|
||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
super.getSubItems(tab, list);
|
||||
for(String s : BotaniaAPI.brewMap.keySet()) {
|
||||
ItemStack brewStack = getItemForBrew(BotaniaAPI.brewMap.get(s), new ItemStack(this));
|
||||
if(!brewStack.isEmpty())
|
||||
@@ -71,8 +73,8 @@ public class ItemBloodPendant extends ItemBauble implements IBrewContainer, IBre
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addHiddenTooltip(ItemStack stack, EntityPlayer player, List<String> list, boolean adv) {
|
||||
super.addHiddenTooltip(stack, player, list, adv);
|
||||
public void addHiddenTooltip(ItemStack stack, World world, List<String> list, ITooltipFlag adv) {
|
||||
super.addHiddenTooltip(stack, world, list, adv);
|
||||
|
||||
Brew brew = getBrew(stack);
|
||||
if(brew == BotaniaAPI.fallbackBrew) {
|
||||
|
||||
@@ -52,8 +52,8 @@ public class ItemDivaCharm extends ItemBauble implements IManaUsingItem, IBauble
|
||||
|
||||
@SubscribeEvent
|
||||
public void onEntityDamaged(LivingHurtEvent event) {
|
||||
if(event.getSource().getEntity() instanceof EntityPlayer && event.getEntityLiving() instanceof EntityLiving && !event.getEntityLiving().world.isRemote && Math.random() < 0.6F) {
|
||||
EntityPlayer player = (EntityPlayer) event.getSource().getEntity();
|
||||
if(event.getSource().getImmediateSource() instanceof EntityPlayer && event.getEntityLiving() instanceof EntityLiving && !event.getEntityLiving().world.isRemote && Math.random() < 0.6F) {
|
||||
EntityPlayer player = (EntityPlayer) event.getSource().getImmediateSource();
|
||||
ItemStack amulet = BaublesApi.getBaublesHandler(player).getStackInSlot(6);
|
||||
if(!amulet.isEmpty() && amulet.getItem() == this) {
|
||||
final int cost = 250;
|
||||
|
||||
@@ -15,7 +15,9 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import baubles.api.BaubleType;
|
||||
@@ -67,7 +69,7 @@ import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaubleRender, ICraftAchievement {
|
||||
public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaubleRender {
|
||||
|
||||
private static final ResourceLocation textureHud = new ResourceLocation(LibResources.GUI_HUD_ICONS);
|
||||
private static final ResourceLocation textureHalo = new ResourceLocation(LibResources.MISC_HALO);
|
||||
@@ -101,15 +103,15 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(@Nonnull Item item, CreativeTabs tab, NonNullList<ItemStack> list) {
|
||||
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> list) {
|
||||
for(int i = 0; i < SUBTYPES + 1; i++)
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
list.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
super.addHiddenTooltip(par1ItemStack, player, stacks, par4);
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
super.addHiddenTooltip(par1ItemStack, world, stacks, flags);
|
||||
stacks.add(I18n.format("botania.wings" + par1ItemStack.getItemDamage()));
|
||||
}
|
||||
|
||||
@@ -517,11 +519,6 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
mc.renderEngine.bindTexture(Gui.ICONS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix) {
|
||||
return stack.getItemDamage() == 1 ? ModAchievements.tiaraWings : null;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerModels() {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ItemGoddessCharm extends ItemBauble implements IManaUsingItem, IBau
|
||||
public static void onExplosion(ExplosionEvent.Detonate event) {
|
||||
Explosion e = event.getExplosion();
|
||||
Vec3d vec = e.getPosition();
|
||||
List<EntityPlayer> players = event.getWorld().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(vec.xCoord, vec.yCoord, vec.zCoord, vec.xCoord, vec.yCoord, vec.zCoord).expand(8, 8, 8));
|
||||
List<EntityPlayer> players = event.getWorld().getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(vec.x, vec.y, vec.z, vec.x, vec.y, vec.z).expand(8, 8, 8));
|
||||
|
||||
for(EntityPlayer player : players) {
|
||||
ItemStack charm = BaublesApi.getBaublesHandler(player).getStackInSlot(6);
|
||||
|
||||
@@ -131,7 +131,7 @@ public class ItemItemFinder extends ItemBauble implements IBaubleRender {
|
||||
|
||||
} else if(e instanceof EntityItem) {
|
||||
EntityItem item = (EntityItem) e;
|
||||
ItemStack istack = item.getEntityItem();
|
||||
ItemStack istack = item.getItem();
|
||||
if(player.isSneaking() || istack.isItemEqual(pstack) && ItemStack.areItemStackTagsEqual(istack, pstack))
|
||||
entIdBuilder.add(item.getEntityId());
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
if(item.isDead || SubTileSolegnolia.hasSolegnoliaAround(item))
|
||||
return false;
|
||||
|
||||
ItemStack stack = item.getEntityItem();
|
||||
ItemStack stack = item.getItem();
|
||||
if(stack.isEmpty() || stack.getItem() instanceof IManaItem || stack.getItem() instanceof IRelic || BLACKLIST.contains(Item.REGISTRY.getNameForObject(stack.getItem())) || BotaniaAPI.isItemBlacklistedFromMagnet(stack))
|
||||
return false;
|
||||
|
||||
|
||||
+1
-1
@@ -97,7 +97,7 @@ public class ItemTerraPick extends ItemManasteelPick implements IManaItem, ISequ
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
String rank = I18n.format("botania.rank" + getLevel(par1ItemStack));
|
||||
String rankFormat = I18n.format("botaniamisc.toolRank", rank);
|
||||
stacks.add(rankFormat.replaceAll("&", "\u00a7"));
|
||||
|
||||
@@ -171,7 +171,7 @@ public class ItemLens extends ItemMod implements ILensControl, ICompositableLens
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
public void addInformation(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
int storedColor = getStoredColor(par1ItemStack);
|
||||
if(storedColor != -1)
|
||||
stacks.add(I18n.format("botaniamisc.color", I18n.format("botania.color" + storedColor)));
|
||||
|
||||
@@ -54,19 +54,19 @@ public class ItemAesirRing extends ItemRelicBauble implements IWireframeCoordina
|
||||
|
||||
@SubscribeEvent
|
||||
public void onDropped(ItemTossEvent event) {
|
||||
if(event.getEntityItem() != null && !event.getEntityItem().getEntityItem().isEmpty() && !event.getEntityItem().world.isRemote) {
|
||||
ItemStack stack = event.getEntityItem().getEntityItem();
|
||||
if(event.getItem() != null && !event.getItem().getItem().isEmpty() && !event.getItem().world.isRemote) {
|
||||
ItemStack stack = event.getItem().getItem();
|
||||
if(stack.getItem() == this) {
|
||||
event.getEntityItem().setDead();
|
||||
event.getItem().setDead();
|
||||
|
||||
UUID user = getSoulbindUUID(stack);
|
||||
for(Item item : new Item[] { ModItems.thorRing, ModItems.lokiRing, ModItems.odinRing }) {
|
||||
ItemStack stack1 = new ItemStack(item);
|
||||
bindToUUID(user, stack1);
|
||||
EntityItem entity = new EntityItem(event.getEntityItem().world, event.getEntityItem().posX, event.getEntityItem().posY, event.getEntityItem().posZ, stack1);
|
||||
entity.motionX = event.getEntityItem().motionX;
|
||||
entity.motionY = event.getEntityItem().motionY;
|
||||
entity.motionZ = event.getEntityItem().motionZ;
|
||||
EntityItem entity = new EntityItem(event.getItem().world, event.getItem().posX, event.getItem().posY, event.getItem().posZ, stack1);
|
||||
entity.motionX = event.getItem().motionX;
|
||||
entity.motionY = event.getItem().motionY;
|
||||
entity.motionZ = event.getItem().motionZ;
|
||||
|
||||
try {
|
||||
MethodHandles.itemAge_setter.invokeExact(entity, MethodHandles.itemAge_getter.invokeExact(entity));
|
||||
@@ -74,7 +74,7 @@ public class ItemAesirRing extends ItemRelicBauble implements IWireframeCoordina
|
||||
|
||||
int pickupDelay = 0;
|
||||
try {
|
||||
pickupDelay = (int) MethodHandles.pickupDelay_getter.invokeExact(event.getEntityItem());
|
||||
pickupDelay = (int) MethodHandles.pickupDelay_getter.invokeExact(event.getItem());
|
||||
} catch (Throwable ignored) {}
|
||||
entity.setPickupDelay(pickupDelay);
|
||||
|
||||
|
||||
@@ -131,7 +131,7 @@ public class ItemLokiRing extends ItemRelicBauble implements IWireframeCoordinat
|
||||
Item item = heldItemStack.getItem();
|
||||
if(player.world.isAirBlock(pos) && ManaItemHandler.requestManaExact(lokiRing, player, cost, true)) {
|
||||
ItemStack saveHeld = heldItemStack.copy();
|
||||
item.onItemUse(player, player.world, pos, event.getHand(), lookPos.sideHit, (float) lookPos.hitVec.xCoord - pos.getX(), (float) lookPos.hitVec.yCoord - pos.getY(), (float) lookPos.hitVec.zCoord - pos.getZ());
|
||||
item.onItemUse(player, player.world, pos, event.getHand(), lookPos.sideHit, (float) lookPos.hitVec.x - pos.getX(), (float) lookPos.hitVec.y - pos.getY(), (float) lookPos.hitVec.z - pos.getZ());
|
||||
if (player.isCreative())
|
||||
player.setHeldItem(event.getHand(), saveHeld);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ItemRelic extends ItemMod implements IRelic {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flags) {
|
||||
addBindInfo(tooltip, stack, player);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -60,9 +61,9 @@ public abstract class ItemRelicBauble extends ItemBauble implements IRelic {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, EntityPlayer player, List<String> stacks, boolean par4) {
|
||||
super.addHiddenTooltip(par1ItemStack, player, stacks, par4);
|
||||
dummy.addBindInfo(stacks, par1ItemStack, player);
|
||||
public void addHiddenTooltip(ItemStack par1ItemStack, World world, List<String> stacks, ITooltipFlag flags) {
|
||||
super.addHiddenTooltip(par1ItemStack, world, stacks, flags);
|
||||
dummy.addBindInfo(stacks, par1ItemStack, world);
|
||||
}
|
||||
|
||||
public void onValidPlayerWornTick(ItemStack stack, EntityPlayer player) {}
|
||||
|
||||
Reference in new issue
Block a user