mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-23 13:40:11 +00:00
More IIcon exorcisms, various compilation fixes now that we know states
This commit is contained in:
1 parent
f58440b79a
commit
d0a14a451b
82 files changed
+426
-490
No files matched your search
@@ -10,6 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.api.item;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
@@ -20,6 +21,6 @@ import net.minecraft.world.World;
|
||||
@Deprecated
|
||||
public interface IGrassHornExcempt {
|
||||
|
||||
public boolean canUproot(World world, int x, int y, int z);
|
||||
public boolean canUproot(World world, BlockPos pos);
|
||||
|
||||
}
|
||||
@@ -109,6 +109,9 @@ public class BotaniaStateProps {
|
||||
// BlockPlatform
|
||||
public static final PropertyEnum PLATFORM_VARIANT = PropertyEnum.create("variant", PlatformVariant.class);
|
||||
|
||||
// BlockPool
|
||||
public static final PropertyEnum POOL_VARIANT = PropertyEnum.create("variant", PoolVariant.class);
|
||||
|
||||
// BlockPrism
|
||||
public static final PropertyBool HAS_LENS = PropertyBool.create("has_lens");
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package vazkii.botania.api.state.enums;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public enum PoolVariant implements IStringSerializable {
|
||||
DEFAULT,
|
||||
CREATIVE,
|
||||
DILUTED;
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name().toLowerCase(Locale.ROOT);
|
||||
}
|
||||
}
|
||||
@@ -263,8 +263,8 @@ public class ClientProxy extends CommonProxy {
|
||||
// RenderingRegistry.registerBlockHandler(new RenderTeruTeruBozu());
|
||||
// RenderingRegistry.registerBlockHandler(new RenderAvatar());
|
||||
|
||||
IMultiblockRenderHook.renderHooks.put(ModBlocks.flower, specialFlowerRender);
|
||||
IMultiblockRenderHook.renderHooks.put(ModBlocks.shinyFlower, specialFlowerRender);
|
||||
// IMultiblockRenderHook.renderHooks.put(ModBlocks.flower, specialFlowerRender);
|
||||
// IMultiblockRenderHook.renderHooks.put(ModBlocks.shinyFlower, specialFlowerRender);
|
||||
|
||||
RenderTransparentItem renderTransparentItem = new RenderTransparentItem();
|
||||
RenderFloatingFlowerItem renderFloatingFlower = new RenderFloatingFlowerItem();
|
||||
@@ -314,15 +314,15 @@ public class ClientProxy extends CommonProxy {
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPixie.class, new RenderPixie());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityVineBall.class, new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), ModItems.vineBall, Minecraft.getMinecraft().getRenderItem()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDoppleganger.class, new RenderDoppleganger());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDoppleganger.class, new RenderDoppleganger(Minecraft.getMinecraft().getRenderManager()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntitySpark.class, new RenderSpark());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityThornChakram.class, new RenderThornChakram());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityThornChakram.class, new RenderThornChakram(Minecraft.getMinecraft().getRenderManager()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityCorporeaSpark.class, new RenderCorporeaSpark());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityEnderAirBottle.class, new RenderSnowball(Minecraft.getMinecraft().getRenderManager(), ModItems.manaResource, Minecraft.getMinecraft().getRenderItem()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPoolMinecart.class, new RenderPoolMinecart());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPinkWither.class, new RenderPinkWither());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityManaStorm.class, new RenderManaStorm());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBabylonWeapon.class, new RenderBabylonWeapon());
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPoolMinecart.class, new RenderPoolMinecart(Minecraft.getMinecraft().getRenderManager()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityPinkWither.class, new RenderPinkWither(Minecraft.getMinecraft().getRenderManager()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityManaStorm.class, new RenderManaStorm(Minecraft.getMinecraft().getRenderManager()));
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityBabylonWeapon.class, new RenderBabylonWeapon(Minecraft.getMinecraft().getRenderManager()));
|
||||
|
||||
ShaderHelper.initShaders();
|
||||
}
|
||||
@@ -417,7 +417,7 @@ public class ClientProxy extends CommonProxy {
|
||||
int xp = x + i - iradius;
|
||||
int zp = z + j - iradius;
|
||||
if((int) Math.floor(MathHelper.pointDistancePlane(xp, zp, x, z)) == (iradius - 1))
|
||||
mb.addComponent(new AnyComponent(new BlockPos(xp - x, 1, zp - z), block, 0));
|
||||
mb.addComponent(new AnyComponent(new BlockPos(xp - x, 1, zp - z), block.getDefaultState()));
|
||||
}
|
||||
|
||||
MultiblockRenderHandler.setMultiblock(mb.makeSet());
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.client.gui.bag;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.client.gui.box;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.InventoryEffectRenderer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
@@ -35,7 +36,7 @@ public class GuiBaubleBox extends InventoryEffectRenderer {
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.getTextureManager().bindTexture(texture);
|
||||
int k = (width - xSize) / 2;
|
||||
int l = (height - ySize) / 2;
|
||||
@@ -47,7 +48,7 @@ public class GuiBaubleBox extends InventoryEffectRenderer {
|
||||
drawTexturedModalRect(k+slot.xDisplayPosition, l+slot.yDisplayPosition, 200, 0, 16, 16);
|
||||
}
|
||||
|
||||
GuiInventory.func_147046_a(this.guiLeft + 43, this.guiTop + 61, 20, (float)(this.guiLeft + 43 - p_146976_2_), (float)(this.guiTop + 45 - 30 - p_146976_3_), this.mc.thePlayer);
|
||||
GuiInventory.drawEntityOnScreen(this.guiLeft + 43, this.guiTop + 61, 20, (float)(this.guiLeft + 43 - p_146976_2_), (float)(this.guiTop + 45 - 30 - p_146976_3_), this.mc.thePlayer);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,10 +13,14 @@ package vazkii.botania.client.gui.box;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import vazkii.botania.common.item.ItemBaubleBox;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public class InventoryBaubleBox implements IInventory {
|
||||
|
||||
private static final ItemStack[] FALLBACK_INVENTORY = new ItemStack[16];
|
||||
@@ -133,22 +137,46 @@ public class InventoryBaubleBox implements IInventory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
public int getField(int id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setField(int id, int value) {}
|
||||
|
||||
@Override
|
||||
public int getFieldCount() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() {
|
||||
if (stacks != null)
|
||||
Arrays.fill(stacks, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory() {
|
||||
public IChatComponent getDisplayName() {
|
||||
return new ChatComponentText(getCommandSenderName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openInventory(EntityPlayer player) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
public void closeInventory(EntityPlayer player) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInventoryName() {
|
||||
public String getCommandSenderName() {
|
||||
return LibItemNames.BAUBLE_BOX;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.client.gui.crafting;
|
||||
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -27,6 +27,7 @@ import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.ChatAllowedCharacters;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.client.gui.lexicon;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -85,7 +86,7 @@ public class GuiLexiconChallenge extends GuiLexicon implements IParented {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char par1, int par2) {
|
||||
protected void keyTyped(char par1, int par2) throws IOException {
|
||||
if(par2 == 14 && !notesEnabled) // Backspace
|
||||
back();
|
||||
else if(par2 == 199) { // Home
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
package vazkii.botania.client.gui.lexicon.button;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.init.Items;
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.client.gui.lexicon.button;
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.client.model;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ModelBellows extends ModelBase {
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.client.model;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.render.tile.RenderTileBrewery;
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.client.model;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -29,7 +29,7 @@ import vazkii.botania.common.item.ModItems;
|
||||
// Basically a bit of an extension of RenderSnowball
|
||||
public class RenderThornChakram extends Render {
|
||||
|
||||
protected RenderThornChakram(RenderManager renderManager) {
|
||||
public RenderThornChakram(RenderManager renderManager) {
|
||||
super(renderManager);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -32,7 +31,6 @@ import vazkii.botania.client.core.handler.ClientTickHandler;
|
||||
import vazkii.botania.client.core.proxy.ClientProxy;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.client.model.ModelSpreader;
|
||||
import vazkii.botania.client.render.item.RenderLens;
|
||||
import vazkii.botania.common.block.tile.mana.TileSpreader;
|
||||
|
||||
public class RenderTileSpreader extends TileEntitySpecialRenderer {
|
||||
|
||||
@@ -14,7 +14,6 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
@@ -23,7 +22,6 @@ import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
@@ -190,11 +190,6 @@ public class BlockAltar extends BlockModContainer implements ILexiconable {
|
||||
return FluidContainerRegistry.drainFluidContainer(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int par1, int par2) {
|
||||
return par2 == 0 ? Blocks.cobblestone.getIcon(par1, par2) : ModFluffBlocks.biomeStoneA.getIcon(par1, par2 + 7);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
|
||||
@@ -135,11 +135,6 @@ public class BlockAvatar extends BlockModContainer implements ILexiconable {
|
||||
p_149689_1_.setBlockState(pos, state.withProperty(BotaniaStateProps.CARDINALS, p_149689_5_.getHorizontalFacing().getOpposite()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return ModBlocks.livingwood.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
|
||||
@@ -21,6 +21,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -71,12 +72,12 @@ public class BlockBifrost extends BlockModContainer implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, BlockPos pos, EnumFacing side) {
|
||||
return shouldSideBeRendered1(p_149646_1_, pos, 1 - p_149646_5_); //todo 1.8 wtf
|
||||
return shouldSideBeRendered1(p_149646_1_, pos, side.getOpposite()); //todo 1.8 verify
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass() {
|
||||
return 1;
|
||||
public EnumWorldBlockLayer getBlockLayer() {
|
||||
return EnumWorldBlockLayer.CUTOUT_MIPPED; // todo 1.8
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -84,16 +85,6 @@ public class BlockBifrost extends BlockModContainer implements ILexiconable {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void loadTextures(TextureStitchEvent.Pre event) {
|
||||
if(event.map.getTextureType() == 0) {
|
||||
TextureAtlasSprite icon = new TextureAtlasSprite("botania:bifrost");
|
||||
if(event.map.setTextureEntry("botania:bifrost", icon))
|
||||
blockIcon = icon;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileBifrost();
|
||||
|
||||
@@ -15,12 +15,11 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.EnumWorldBlockLayer;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
@@ -54,7 +53,7 @@ public class BlockBifrostPerm extends BlockMod implements ILexiconable {
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess p_149646_1_, BlockPos pos, EnumFacing side) {
|
||||
return shouldSideBeRendered1(p_149646_1_, pos, 1 - p_149646_5_); //todo 1.8 wtf
|
||||
return shouldSideBeRendered1(p_149646_1_, pos, side.getOpposite()); //todo 1.8 verify
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -64,8 +63,8 @@ public class BlockBifrostPerm extends BlockMod implements ILexiconable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass() {
|
||||
return 1;
|
||||
public EnumWorldBlockLayer getBlockLayer() {
|
||||
return EnumWorldBlockLayer.CUTOUT_MIPPED; // todo 1.8 verify
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -112,21 +112,21 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World par1World, int par2, int par3, int par4, int par5, EntityPlayer par6EntityPlayer) {
|
||||
public void onBlockHarvested(World par1World, BlockPos pos, IBlockState state, EntityPlayer par6EntityPlayer) {
|
||||
if(!par6EntityPlayer.capabilities.isCreativeMode) {
|
||||
dropBlockAsItem(par1World, par2, par3, par4, par5, 0);
|
||||
((TileSpecialFlower) par1World.getTileEntity(par2, par3, par4)).onBlockHarvested(par1World, par2, par3, par4, par5, par6EntityPlayer);
|
||||
dropBlockAsItem(par1World, pos, state, 0);
|
||||
((TileSpecialFlower) par1World.getTileEntity(pos)).onBlockHarvested(par1World, pos, state, par6EntityPlayer);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||
ArrayList<ItemStack> list = new ArrayList();
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
if(tile != null) {
|
||||
String name = ((TileSpecialFlower) tile).subTileName;
|
||||
list.add(ItemBlockSpecialFlower.ofType(new ItemStack(world.getBlock(x, y, z)), name));
|
||||
list.add(ItemBlockSpecialFlower.ofType(new ItemStack(state.getBlock()), name));
|
||||
((TileSpecialFlower) tile).getDrops(list);
|
||||
}
|
||||
|
||||
@@ -134,30 +134,30 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockEventReceived(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
super.onBlockEventReceived(par1World, par2, par3, par4, par5, par6);
|
||||
TileEntity tileentity = par1World.getTileEntity(par2, par3, par4);
|
||||
return tileentity != null ? tileentity.receiveClientEvent(par5, par6) : false;
|
||||
public boolean onBlockEventReceived(World par1World, BlockPos pos, IBlockState state, int eventID, int value) {
|
||||
super.onBlockEventReceived(par1World, pos, state, eventID, value);
|
||||
TileEntity tileentity = par1World.getTileEntity(pos);
|
||||
return tileentity != null ? tileentity.receiveClientEvent(eventID, value) : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onUsedByWand(EntityPlayer player, ItemStack stack, World world, BlockPos pos, EnumFacing side) {
|
||||
return ((TileSpecialFlower) world.getTileEntity(x, y, z)).onWanded(stack, player);
|
||||
return ((TileSpecialFlower) world.getTileEntity(pos)).onWanded(stack, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
||||
((TileSpecialFlower) world.getTileEntity(x, y, z)).onBlockPlacedBy(world, x, y, z, entity, stack);
|
||||
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase entity, ItemStack stack) {
|
||||
((TileSpecialFlower) world.getTileEntity(pos)).onBlockPlacedBy(world, pos, state, entity, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
return ((TileSpecialFlower) world.getTileEntity(x, y, z)).onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ) || super.onBlockActivated(world, x, y, z, player, side, hitX, hitY, hitZ);
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
return ((TileSpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, side, hitX, hitY, hitZ) || super.onBlockActivated(world, pos, state, player, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World world, BlockPos pos, IBlockState state) {
|
||||
((TileSpecialFlower) world.getTileEntity(pos)).onBlockAdded(world, pos);
|
||||
((TileSpecialFlower) world.getTileEntity(pos)).onBlockAdded(world, pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -17,7 +17,6 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -25,16 +24,18 @@ import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.Botania;
|
||||
@@ -84,48 +85,55 @@ public class BlockModDoubleFlower extends BlockDoublePlant implements ILexiconab
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World p_149689_1_, int p_149689_2_, int p_149689_3_, int p_149689_4_, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
p_149689_1_.setBlock(p_149689_2_, p_149689_3_ + 1, p_149689_4_, this, p_149689_6_.getItemDamage() | 8, 2);
|
||||
public void onBlockPlacedBy(World p_149689_1_, BlockPos pos, IBlockState state, EntityLivingBase p_149689_5_, ItemStack p_149689_6_) {
|
||||
p_149689_1_.setBlockState(pos.up(), this, p_149689_6_.getItemDamage() | 8, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_149851_a(World world, int x, int y, int z, boolean fuckifiknow) {
|
||||
public boolean canGrow(World world, BlockPos pos, IBlockState state, boolean fuckifiknow) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_) {
|
||||
public void harvestBlock(World p_149636_1_, EntityPlayer p_149636_2_, BlockPos pos, IBlockState state, TileEntity te) {
|
||||
if(p_149636_1_.isRemote || p_149636_2_.getCurrentEquippedItem() == null || p_149636_2_.getCurrentEquippedItem().getItem() != Items.shears || func_149887_c(p_149636_6_))
|
||||
harvestBlockCopy(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
|
||||
harvestBlockCopy(p_149636_1_, p_149636_2_, pos, state);
|
||||
}
|
||||
|
||||
// This is how I get around encapsulation
|
||||
public void harvestBlockCopy(World p_149636_1_, EntityPlayer p_149636_2_, int p_149636_3_, int p_149636_4_, int p_149636_5_, int p_149636_6_) {
|
||||
p_149636_2_.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
|
||||
p_149636_2_.addExhaustion(0.025F);
|
||||
public void harvestBlockCopy(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state) {
|
||||
player.triggerAchievement(StatList.mineBlockStatArray[getIdFromBlock(this)]);
|
||||
player.addExhaustion(0.025F);
|
||||
|
||||
if(this.canSilkHarvest(p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_) && EnchantmentHelper.getSilkTouchModifier(p_149636_2_)) {
|
||||
ArrayList<ItemStack> items = new ArrayList<ItemStack>();
|
||||
ItemStack itemstack = createStackedBlock(p_149636_6_);
|
||||
if (this.canSilkHarvest(worldIn, pos, worldIn.getBlockState(pos), player) && EnchantmentHelper.getSilkTouchModifier(player))
|
||||
{
|
||||
java.util.ArrayList<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
||||
ItemStack itemstack = this.createStackedBlock(state);
|
||||
|
||||
if(itemstack != null)
|
||||
if (itemstack != null)
|
||||
{
|
||||
items.add(itemstack);
|
||||
}
|
||||
|
||||
ForgeEventFactory.fireBlockHarvesting(items, p_149636_1_, this, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, 0, 1.0f, true, p_149636_2_);
|
||||
for(ItemStack is : items)
|
||||
this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, is);
|
||||
} else {
|
||||
harvesters.set(p_149636_2_);
|
||||
int i1 = EnchantmentHelper.getFortuneModifier(p_149636_2_);
|
||||
this.dropBlockAsItem(p_149636_1_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_, i1);
|
||||
net.minecraftforge.event.ForgeEventFactory.fireBlockHarvesting(items, worldIn, pos, worldIn.getBlockState(pos), 0, 1.0f, true, player);
|
||||
for (ItemStack stack : items)
|
||||
{
|
||||
spawnAsEntity(worldIn, pos, stack);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
harvesters.set(player);
|
||||
int i = EnchantmentHelper.getFortuneModifier(player);
|
||||
this.dropBlockAsItem(worldIn, pos, state, i);
|
||||
harvesters.set(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_) {
|
||||
public void onBlockHarvested(World p_149681_1_, BlockPos pos, IBlockState state, EntityPlayer p_149681_6_) {
|
||||
if(func_149887_c(p_149681_5_)) {
|
||||
if(p_149681_1_.getBlock(p_149681_2_, p_149681_3_ - 1, p_149681_4_) == this) {
|
||||
if(p_149681_1_.getBlockState(pos.down()).getBlock() == this) {
|
||||
if(!p_149681_6_.capabilities.isCreativeMode) {
|
||||
int i1 = p_149681_1_.getBlockMetadata(p_149681_2_, p_149681_3_ - 1, p_149681_4_);
|
||||
int j1 = func_149890_d(i1);
|
||||
@@ -138,12 +146,12 @@ public class BlockModDoubleFlower extends BlockDoublePlant implements ILexiconab
|
||||
this.func_149886_b(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, i1, p_149681_6_);
|
||||
}*/
|
||||
|
||||
p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_ - 1, p_149681_4_);
|
||||
p_149681_1_.setBlockToAir(pos.down());
|
||||
}
|
||||
} else p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_ - 1, p_149681_4_);
|
||||
} else p_149681_1_.setBlockToAir(pos.down());
|
||||
}
|
||||
} else if(p_149681_6_.capabilities.isCreativeMode && p_149681_1_.getBlock(p_149681_2_, p_149681_3_ + 1, p_149681_4_) == this)
|
||||
p_149681_1_.setBlock(p_149681_2_, p_149681_3_ + 1, p_149681_4_, Blocks.air, 0, 2);
|
||||
} else if(p_149681_6_.capabilities.isCreativeMode && p_149681_1_.getBlockState(pos.up()).getBlock() == this)
|
||||
p_149681_1_.setBlockState(pos.up(), Blocks.air.getDefaultState(), 2);
|
||||
|
||||
//super.onBlockHarvested(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, p_149681_6_);
|
||||
}
|
||||
@@ -183,11 +191,14 @@ public class BlockModDoubleFlower extends BlockDoublePlant implements ILexiconab
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(World par1World, BlockPos pos, IBlockState state, Random par5Random) {
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
float[] color = EntitySheep.fleeceColorTable[offset(meta & 7)];
|
||||
int hex = ((EnumDyeColor) state.getValue(BotaniaStateProps.COLOR)).getMapColor().colorValue;
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
if(par5Random.nextDouble() < ConfigHandler.flowerParticleFrequency)
|
||||
Botania.proxy.sparkleFX(par1World, par2 + 0.3 + par5Random.nextFloat() * 0.5, par3 + 0.5 + par5Random.nextFloat() * 0.5, par4 + 0.3 + par5Random.nextFloat() * 0.5, color[0], color[1], color[2], par5Random.nextFloat(), 5);
|
||||
Botania.proxy.sparkleFX(par1World, pos.getX() + 0.3 + par5Random.nextFloat() * 0.5, pos.getY() + 0.5 + par5Random.nextFloat() * 0.5, pos.getZ() + 0.3 + par5Random.nextFloat() * 0.5, r, g, b, par5Random.nextFloat(), 5);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.IGrowable;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
@@ -147,15 +148,14 @@ public class BlockModFlower extends BlockFlower implements ILexiconable, IPickup
|
||||
|
||||
@Override
|
||||
public void grow(World world, Random rand, BlockPos pos, IBlockState state) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
placeDoubleFlower(world, x, y, z, meta, 1 | 2);
|
||||
placeDoubleFlower(world, pos, ((EnumDyeColor) state.getValue(BotaniaStateProps.COLOR)), 1 | 2);
|
||||
}
|
||||
|
||||
public static void placeDoubleFlower(World world, BlockPos pos, EnumDyeColor color, int flags) {
|
||||
Block flower = meta >= 8 ? ModBlocks.doubleFlower2 : ModBlocks.doubleFlower1;
|
||||
Block flower = color.getMetadata() >= 8 ? ModBlocks.doubleFlower2 : ModBlocks.doubleFlower1;
|
||||
int placeMeta = meta & 7;
|
||||
world.setBlock(x, y, z, flower, placeMeta, flags);
|
||||
world.setBlock(x, y + 1, z, flower, placeMeta | 8, flags);
|
||||
world.setBlockState(pos, flower.getDefaultState().withProperty(BotaniaStateProps.COLOR, color).withProperty(BlockDoublePlant.HALF, BlockDoublePlant.EnumBlockHalf.LOWER), flags);
|
||||
world.setBlockState(pos.up(), flower.getDefaultState().withProperty(BotaniaStateProps.COLOR, color).withProperty(BlockDoublePlant.HALF, BlockDoublePlant.EnumBlockHalf.UPPER), flags);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,15 +11,16 @@
|
||||
package vazkii.botania.common.block.decor;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.BlockModContainer;
|
||||
import vazkii.botania.common.block.tile.TileStarfield;
|
||||
@@ -34,10 +35,25 @@ public class BlockStarfield extends BlockModContainer implements ILexiconable {
|
||||
setResistance(2000F);
|
||||
setStepSound(soundTypeMetal);
|
||||
setUnlocalizedName(LibBlockNames.STARFIELD);
|
||||
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.POWERED, false));
|
||||
setBlockBounds(0F, 0F, 0F, 1F, 0.25F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState() {
|
||||
return new BlockState(this, BotaniaStateProps.POWERED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return ((Boolean) state.getValue(BotaniaStateProps.POWERED)) ? 1 : 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
return getDefaultState().withProperty(BotaniaStateProps.POWERED, meta == 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube() {
|
||||
return false;
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
@@ -40,6 +41,8 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.state.enums.PoolVariant;
|
||||
import vazkii.botania.api.wand.IWandHUD;
|
||||
import vazkii.botania.api.wand.IWandable;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
@@ -68,6 +71,25 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable,
|
||||
setUnlocalizedName(LibBlockNames.POOL);
|
||||
setBlockBounds(0F, 0F, 0F, 1F, 0.5F, 1F);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.POOL_VARIANT, PoolVariant.DEFAULT));
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState createBlockState() {
|
||||
return new BlockState(this, BotaniaStateProps.POOL_VARIANT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
return ((PoolVariant) state.getValue(BotaniaStateProps.POOL_VARIANT)).ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
if (meta > PoolVariant.values().length) {
|
||||
meta = 0;
|
||||
}
|
||||
return getDefaultState().withProperty(BotaniaStateProps.POOL_VARIANT, PoolVariant.values()[meta]);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -108,15 +108,15 @@ public class TileAlfPortal extends TileMod implements IUpdatePlayerListBox {
|
||||
Multiblock mb = new Multiblock();
|
||||
|
||||
for(BlockPos l : LIVINGWOOD_POSITIONS)
|
||||
mb.addComponent(l.up(), ModBlocks.livingwood, 0);
|
||||
mb.addComponent(l.up(), ModBlocks.livingwood.getDefaultState());
|
||||
for(BlockPos g : GLIMMERING_LIVINGWOOD_POSITIONS)
|
||||
mb.addComponent(g.up(), ModBlocks.livingwood, 5);
|
||||
mb.addComponent(g.up(), ModBlocks.livingwood.getDefaultState().withProperty(BotaniaStateProps.LIVINGWOOD_VARIANT, LivingWoodVariant.GLIMMERING));
|
||||
for(BlockPos p : PYLON_POSITIONS)
|
||||
mb.addComponent(new BlockPos(-p.getX(), p.getY() + 1, -p.getZ()), ModBlocks.pylon, 1);
|
||||
mb.addComponent(new BlockPos(-p.getX(), p.getY() + 1, -p.getZ()), ModBlocks.pylon.getDefaultState().withProperty(BotaniaStateProps.PYLON_VARIANT, PylonVariant.NATURA));
|
||||
for(BlockPos p : POOL_POSITIONS)
|
||||
mb.addComponent(new BlockPos(-p.getX(), p.getY() + 1, -p.getZ()), ModBlocks.pool, 0);
|
||||
mb.addComponent(new BlockPos(-p.getX(), p.getY() + 1, -p.getZ()), ModBlocks.pool.getDefaultState());
|
||||
|
||||
mb.addComponent(new BlockPos(0, 1, 0), ModBlocks.alfPortal, 0);
|
||||
mb.addComponent(new BlockPos(0, 1, 0), ModBlocks.alfPortal.getDefaultState());
|
||||
mb.setRenderOffset(new BlockPos(0, -1, 0));
|
||||
|
||||
return mb.makeSet();
|
||||
|
||||
@@ -29,8 +29,10 @@ import vazkii.botania.api.brew.IBrewItem;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.api.mana.IManaReceiver;
|
||||
import vazkii.botania.api.recipe.RecipeBrew;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.client.core.helper.RenderHelper;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
// This is mostly copypasta from TileRuneAltar
|
||||
@@ -70,7 +72,7 @@ public class TileBrewery extends TileSimpleInventory implements ISidedInventory,
|
||||
for(RecipeBrew recipe : BotaniaAPI.brewRecipes)
|
||||
if(recipe.matches(this) && recipe.getOutput(getStackInSlot(0)) != null) {
|
||||
this.recipe = recipe;
|
||||
worldObj.setBlockMetadataWithNotify(pos.getX(), pos.getY(), pos.getZ(), 1, 1 | 2);
|
||||
worldObj.setBlockState(pos, ModBlocks.brewery.getDefaultState().withProperty(BotaniaStateProps.POWERED, true), 1 | 2);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +86,7 @@ public class TileBrewery extends TileSimpleInventory implements ISidedInventory,
|
||||
for(RecipeBrew recipe : BotaniaAPI.brewRecipes)
|
||||
if(recipe.matches(this)) {
|
||||
this.recipe = recipe;
|
||||
worldObj.setBlockMetadataWithNotify(pos.getX(), pos.getY(), pos.getZ(), 1, 1 | 2);
|
||||
worldObj.setBlockState(pos, ModBlocks.brewery.getDefaultState().withProperty(BotaniaStateProps.POWERED, true), 1 | 2);
|
||||
}
|
||||
|
||||
if(recipe == null)
|
||||
@@ -107,7 +109,7 @@ public class TileBrewery extends TileSimpleInventory implements ISidedInventory,
|
||||
if(recipe != null) {
|
||||
if(!recipe.matches(this)) {
|
||||
recipe = null;
|
||||
worldObj.setBlockMetadataWithNotify(pos.getX(), pos.getY(), pos.getZ(), 0, 1 | 2);
|
||||
worldObj.setBlockState(pos, ModBlocks.brewery.getDefaultState(), 1 | 2);
|
||||
}
|
||||
|
||||
if(recipe != null) {
|
||||
|
||||
@@ -94,15 +94,15 @@ public class TileEnchanter extends TileMod implements ISparkAttachable, IUpdateP
|
||||
Multiblock mb = new Multiblock();
|
||||
|
||||
for(BlockPos o : OBSIDIAN_LOCATIONS)
|
||||
mb.addComponent(o.up(), Blocks.obsidian, 0);
|
||||
mb.addComponent(o.up(), Blocks.obsidian.getDefaultState());
|
||||
for(BlockPos p : PYLON_LOCATIONS.get(EnumFacing.Axis.X)) {
|
||||
mb.addComponent(p.up(), ModBlocks.pylon, 0);
|
||||
mb.addComponent(p.up(), ModBlocks.pylon.getDefaultState());
|
||||
mb.addComponent(new FlowerComponent(p, ModBlocks.flower));
|
||||
}
|
||||
for(BlockPos f : FLOWER_LOCATIONS)
|
||||
mb.addComponent(new FlowerComponent(f.up(), ModBlocks.flower));
|
||||
|
||||
mb.addComponent(BlockPos.ORIGIN, Blocks.lapis_block, 0);
|
||||
mb.addComponent(BlockPos.ORIGIN, Blocks.lapis_block.getDefaultState());
|
||||
|
||||
return mb.makeSet();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ package vazkii.botania.common.block.tile;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -26,6 +27,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class TileHourglass extends TileSimpleInventory implements IUpdatePlayerListBox {
|
||||
@@ -55,7 +57,7 @@ public class TileHourglass extends TileSimpleInventory implements IUpdatePlayerL
|
||||
time = 0;
|
||||
flip = !flip;
|
||||
flipTicks = 4;
|
||||
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 1 | 2);
|
||||
worldObj.setBlockState(getPos(), worldObj.getBlockState(getPos()).withProperty(BotaniaStateProps.POWERED, true), 1 | 2);
|
||||
worldObj.scheduleUpdate(pos, getBlockType(), getBlockType().tickRate(worldObj));
|
||||
}
|
||||
timeFraction = (float) time / (float) totalTime;
|
||||
|
||||
@@ -16,7 +16,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.gui.IUpdatePlayerListBox;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class TileOpenCrate extends TileSimpleInventory implements IUpdatePlayerListBox {
|
||||
|
||||
@@ -60,7 +62,7 @@ public class TileOpenCrate extends TileSimpleInventory implements IUpdatePlayerL
|
||||
item.motionZ = 0;
|
||||
|
||||
if(redstone)
|
||||
item.age = -200;
|
||||
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, item, -200, LibObfuscation.AGE);
|
||||
|
||||
setInventorySlotContents(0, null);
|
||||
if(!worldObj.isRemote)
|
||||
|
||||
@@ -14,9 +14,12 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.server.gui.IUpdatePlayerListBox;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.state.enums.PylonVariant;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
@@ -33,17 +36,17 @@ public class TilePylon extends TileEntity implements IUpdatePlayerListBox {
|
||||
@Override
|
||||
public void update() {
|
||||
++ticks;
|
||||
int meta = getBlockMetadata();
|
||||
PylonVariant variant = ((PylonVariant) worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.PYLON_VARIANT));
|
||||
|
||||
if(activated && worldObj.isRemote) {
|
||||
if(worldObj.getBlockState(centerPos).getBlock() != getBlockForMeta() || meta != 0 && worldObj.getBlockMetadata(centerX, centerY, centerZ) == 0) {
|
||||
if(worldObj.getBlockState(centerPos).getBlock() != getBlockForMeta() || variant != PylonVariant.MANA && worldObj.getBlockState(centerPos).getBlock().getMetaFromState(worldObj.getBlockState(centerPos)) == 0) { // todo 1.8 clarify
|
||||
activated = false;
|
||||
return;
|
||||
}
|
||||
|
||||
Vector3 centerBlock = new Vector3(centerPos.getX() + 0.5, centerPos.getY() + 0.75 + (Math.random() - 0.5 * 0.25), centerPos.getZ() + 0.5);
|
||||
|
||||
if(meta == 1) {
|
||||
if(variant == PylonVariant.NATURA) {
|
||||
if(ConfigHandler.elfPortalParticlesEnabled) {
|
||||
double worldTime = ticks;
|
||||
worldTime += new Random(pos.hashCode()).nextInt(1000);
|
||||
@@ -67,25 +70,27 @@ public class TilePylon extends TileEntity implements IUpdatePlayerListBox {
|
||||
|
||||
Block block = worldObj.getBlockState(pos.down()).getBlock();
|
||||
if(block == ModBlocks.flower || block == ModBlocks.shinyFlower) {
|
||||
int fmeta = worldObj.getBlockMetadata(xCoord, yCoord - 1, zCoord);
|
||||
float[] color = EntitySheep.fleeceColorTable[fmeta];
|
||||
int hex = ((EnumDyeColor) worldObj.getBlockState(pos.down()).getValue(BotaniaStateProps.COLOR)).getMapColor().colorValue;
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = (hex & 0xFF);
|
||||
|
||||
if(worldObj.rand.nextInt(4) == 0)
|
||||
Botania.proxy.sparkleFX(worldObj, centerBlock.x + (Math.random() - 0.5) * 0.5, centerBlock.y, centerBlock.z + (Math.random() - 0.5) * 0.5, color[0], color[1], color[2], (float) Math.random(), 8);
|
||||
Botania.proxy.sparkleFX(worldObj, centerBlock.x + (Math.random() - 0.5) * 0.5, centerBlock.y, centerBlock.z + (Math.random() - 0.5) * 0.5, r, g, b, (float) Math.random(), 8);
|
||||
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.25, pos.getY() - 0.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.25, color[0], color[1], color[2], (float) Math.random() / 3F, -0.04F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.125, pos.getY() + 1.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.125, color[0], color[1], color[2], (float) Math.random() / 5F, -0.001F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.25, pos.getY() + 1.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.25, color[0], color[1], color[2], (float) Math.random() / 8F, (float) movementVector.x, (float) movementVector.y, (float) movementVector.z);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.25, pos.getY() - 0.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.25, r, g, b, (float) Math.random() / 3F, -0.04F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.125, pos.getY() + 1.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.125, r, g, b, (float) Math.random() / 5F, -0.001F);
|
||||
Botania.proxy.wispFX(worldObj, pos.getX() + 0.5 + (Math.random() - 0.5) * 0.25, pos.getY() + 1.5, pos.getZ() + 0.5 + (Math.random() - 0.5) * 0.25, r, g, b, (float) Math.random() / 8F, (float) movementVector.x, (float) movementVector.y, (float) movementVector.z);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(worldObj.rand.nextBoolean() && worldObj.isRemote)
|
||||
Botania.proxy.sparkleFX(worldObj, pos.getX() + Math.random(), pos.getY() + Math.random() * 1.5, pos.getZ() + Math.random(), meta == 2 ? 1F : 0.5F, meta == 1 ? 1F : 0.5F, meta == 1 ? 0.5F : 1F, (float) Math.random(), 2);
|
||||
Botania.proxy.sparkleFX(worldObj, pos.getX() + Math.random(), pos.getY() + Math.random() * 1.5, pos.getZ() + Math.random(), variant == PylonVariant.GAIA ? 1F : 0.5F, variant == PylonVariant.NATURA ? 1F : 0.5F, variant == PylonVariant.NATURA ? 0.5F : 1F, (float) Math.random(), 2);
|
||||
}
|
||||
|
||||
private Block getBlockForMeta() {
|
||||
return getBlockMetadata() == 0 ? ModBlocks.enchanter : ModBlocks.alfPortal;
|
||||
return worldObj.getBlockState(pos).getValue(BotaniaStateProps.PYLON_VARIANT) == PylonVariant.MANA ? ModBlocks.enchanter : ModBlocks.alfPortal;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,22 +11,23 @@
|
||||
package vazkii.botania.common.block.tile;
|
||||
|
||||
import net.minecraft.server.gui.IUpdatePlayerListBox;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.common.Botania;
|
||||
|
||||
public class TileStarfield extends TileMod implements IUpdatePlayerListBox {
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
int meta = getBlockMetadata();
|
||||
boolean state = ((Boolean) worldObj.getBlockState(getPos()).getValue(BotaniaStateProps.POWERED));
|
||||
if(!worldObj.isRemote) {
|
||||
int newMeta = worldObj.isDaytime() ? 0 : 1;
|
||||
if(newMeta != meta) {
|
||||
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, newMeta, 1 | 2);
|
||||
meta = newMeta;
|
||||
boolean newState = !worldObj.isDaytime();
|
||||
if(newState != state) {
|
||||
worldObj.setBlockState(getPos(), worldObj.getBlockState(getPos()).withProperty(BotaniaStateProps.POWERED, newState), 1 | 2);
|
||||
state = newState;
|
||||
}
|
||||
}
|
||||
|
||||
if(meta == 1) {
|
||||
if(state) {
|
||||
double radius = 512;
|
||||
int iter = 2;
|
||||
for(int i = 0; i < iter; i++) {
|
||||
|
||||
@@ -56,11 +56,11 @@ public class TileTerraPlate extends TileMod implements ISparkAttachable, IUpdate
|
||||
Multiblock mb = new Multiblock();
|
||||
|
||||
for(BlockPos relativePos : LAPIS_BLOCKS)
|
||||
mb.addComponent(relativePos, Blocks.lapis_block, 0);
|
||||
mb.addComponent(relativePos, Blocks.lapis_block.getDefaultState());
|
||||
for(BlockPos relativePos : LIVINGROCK_BLOCKS)
|
||||
mb.addComponent(relativePos, ModBlocks.livingrock, 0);
|
||||
mb.addComponent(relativePos, ModBlocks.livingrock.getDefaultState());
|
||||
|
||||
mb.addComponent(new BlockPos(0, 1, 0), ModBlocks.terraPlate, 0);
|
||||
mb.addComponent(new BlockPos(0, 1, 0), ModBlocks.terraPlate.getDefaultState());
|
||||
mb.setRenderOffset(new BlockPos(0, 1, 0));
|
||||
|
||||
return mb.makeSet();
|
||||
|
||||
@@ -113,7 +113,7 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
public EntityDoppleganger(World par1World) {
|
||||
super(par1World);
|
||||
setSize(0.6F, 1.8F);
|
||||
getNavigator().setCanSwim(true);
|
||||
//todo 1.8 new AI getNavigator().setCanSwim(true);
|
||||
tasks.addTask(0, new EntityAISwimming(this));
|
||||
tasks.addTask(1, new EntityAIWatchClosest(this, EntityPlayer.class, Float.MAX_VALUE));
|
||||
isImmuneToFire = true;
|
||||
@@ -124,13 +124,13 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
Multiblock mb = new Multiblock();
|
||||
|
||||
for(BlockPos p : PYLON_LOCATIONS)
|
||||
mb.addComponent(p.up(), ModBlocks.pylon, 2);
|
||||
mb.addComponent(p.up(), ModBlocks.pylon.getDefaultState().withProperty(BotaniaStateProps.PYLON_VARIANT, PylonVariant.GAIA));
|
||||
|
||||
for(int i = 0; i < 3; i++)
|
||||
for(int j = 0; j < 3; j++)
|
||||
mb.addComponent(new BeaconComponent(new BlockPos(i - 1, 0, j - 1)));
|
||||
|
||||
mb.addComponent(new BlockPos(0, 1, 0), Blocks.beacon, 0);
|
||||
mb.addComponent(new BlockPos(0, 1, 0), Blocks.beacon.getDefaultState());
|
||||
mb.setRenderOffset(new BlockPos(0, -1, 0));
|
||||
|
||||
return mb.makeSet();
|
||||
@@ -237,10 +237,10 @@ public class EntityDoppleganger extends EntityCreature implements IBotaniaBossWi
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isAIEnabled() {
|
||||
return true;
|
||||
}
|
||||
// @Override todo 1.8 new AI
|
||||
// protected boolean isAIEnabled() {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
|
||||
@@ -42,10 +42,10 @@ public class EntityPinkWither extends EntityWither {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void attackEntity(Entity p_70785_1_, float p_70785_2_) {
|
||||
// NO-OP
|
||||
}
|
||||
// @Override todo 1.8 mtd no longer exists?
|
||||
// protected void attackEntity(Entity p_70785_1_, float p_70785_2_) {
|
||||
// // NO-OP
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean attackEntityAsMob(Entity p_70652_1_) {
|
||||
@@ -61,10 +61,10 @@ public class EntityPinkWither extends EntityWither {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isAIEnabled() {
|
||||
return false;
|
||||
}
|
||||
// @Override todo 1.8 new AI
|
||||
// protected boolean isAIEnabled() {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void dropFewItems(boolean p_70628_1_, int p_70628_2_) {
|
||||
|
||||
@@ -60,39 +60,39 @@ public class EntityPixie extends EntityFlyingCreature {
|
||||
this.effect = effect;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateEntityActionState() {
|
||||
EntityLivingBase target = getAttackTarget();
|
||||
if(target != null) {
|
||||
double d0 = target.posX + target.width / 2 - posX;
|
||||
double d1 = target.posY + target.height / 2 - posY;
|
||||
double d2 = target.posZ + target.width / 2 - posZ;
|
||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||
|
||||
float mod = 0.45F;
|
||||
if(getType() == 1)
|
||||
mod = 0.1F;
|
||||
|
||||
motionX += d0 / d3 * mod;
|
||||
motionY += d1 / d3 * mod;
|
||||
motionZ += d2 / d3 * mod;
|
||||
|
||||
if(Math.sqrt(d3) < 1F) {
|
||||
if(summoner != null) {
|
||||
if(summoner instanceof EntityPlayer)
|
||||
target.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) summoner), damage);
|
||||
else {
|
||||
target.attackEntityFrom(DamageSource.causeMobDamage(summoner), damage);
|
||||
}
|
||||
} else target.attackEntityFrom(DamageSource.causeMobDamage(this), damage);
|
||||
if(effect != null && !(target instanceof EntityPlayer))
|
||||
target.addPotionEffect(effect);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
renderYawOffset = rotationYaw = -((float)Math.atan2(motionX, motionZ)) * 180.0F / (float)Math.PI;
|
||||
}
|
||||
// @Override todo 1.8 uh oh ... we can't override this anymore
|
||||
// protected void updateEntityActionState() {
|
||||
// EntityLivingBase target = getAttackTarget();
|
||||
// if(target != null) {
|
||||
// double d0 = target.posX + target.width / 2 - posX;
|
||||
// double d1 = target.posY + target.height / 2 - posY;
|
||||
// double d2 = target.posZ + target.width / 2 - posZ;
|
||||
// double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||
//
|
||||
// float mod = 0.45F;
|
||||
// if(getType() == 1)
|
||||
// mod = 0.1F;
|
||||
//
|
||||
// motionX += d0 / d3 * mod;
|
||||
// motionY += d1 / d3 * mod;
|
||||
// motionZ += d2 / d3 * mod;
|
||||
//
|
||||
// if(Math.sqrt(d3) < 1F) {
|
||||
// if(summoner != null) {
|
||||
// if(summoner instanceof EntityPlayer)
|
||||
// target.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) summoner), damage);
|
||||
// else {
|
||||
// target.attackEntityFrom(DamageSource.causeMobDamage(summoner), damage);
|
||||
// }
|
||||
// } else target.attackEntityFrom(DamageSource.causeMobDamage(this), damage);
|
||||
// if(effect != null && !(target instanceof EntityPlayer))
|
||||
// target.addPotionEffect(effect);
|
||||
// die();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// renderYawOffset = rotationYaw = -((float)Math.atan2(motionX, motionZ)) * 180.0F / (float)Math.PI;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) {
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
package vazkii.botania.common.entity;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockVine;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.util.BlockPos;
|
||||
@@ -36,19 +38,19 @@ public class EntityVineBall extends EntityThrowable {
|
||||
@Override
|
||||
protected void onImpact(MovingObjectPosition var1) {
|
||||
if(var1 != null) {
|
||||
int meta = var1.sideHit.getIndex();
|
||||
EnumFacing dir = var1.sideHit;
|
||||
int[] metaPlace = new int[] {
|
||||
1, 4, 8, 2
|
||||
};
|
||||
|
||||
if(meta > 1 && meta < 6) {
|
||||
EnumFacing dir = EnumFacing.getFront(meta);
|
||||
if(dir.getAxis() != EnumFacing.Axis.Y) {
|
||||
BlockPos pos = var1.getBlockPos().offset(dir);
|
||||
while(pos.getY() > 0) {
|
||||
Block block = worldObj.getBlockState(pos).getBlock();
|
||||
if(block.isAir(worldObj, pos)) {
|
||||
worldObj.setBlockState(pos, ModBlocks.solidVines, metaPlace[meta - 2], 1 | 2);
|
||||
worldObj.playAuxSFX(2001, pos, Block.getIdFromBlock(ModBlocks.solidVines) + (metaPlace[meta - 2] << 12)); // todo 1.8 to state id?
|
||||
IBlockState state = ModBlocks.solidVines.getDefaultState().withProperty(BlockVine.ALL_FACES[dir.getIndex() + 1], true);
|
||||
worldObj.setBlockState(pos, state, 1 | 2);
|
||||
worldObj.playAuxSFX(2001, pos, Block.getStateId(state)); // todo 1.8 verify
|
||||
pos = pos.down();
|
||||
} else break;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
@@ -28,7 +27,7 @@ import vazkii.botania.common.core.helper.InventoryHelper;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.lib.LibGuiIDs;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
public class ItemBaubleBox extends ItemMod {
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ package vazkii.botania.common.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
@@ -21,7 +20,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.corporea.CorporeaHelper;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
@@ -59,23 +57,18 @@ public class ItemCorporeaSpark extends ItemMod {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
invIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
worldIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
invIconMaster = IconHelper.forItem(par1IconRegister, this, 2);
|
||||
worldIconMaster = IconHelper.forItem(par1IconRegister, this, 3);
|
||||
iconColorStar = IconHelper.forItem(par1IconRegister, this, "Star");
|
||||
}
|
||||
// @Override todo 1.8
|
||||
// public void registerIcons(IIconRegister par1IconRegister) {
|
||||
// invIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
// worldIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
// invIconMaster = IconHelper.forItem(par1IconRegister, this, 2);
|
||||
// worldIconMaster = IconHelper.forItem(par1IconRegister, this, 3);
|
||||
// iconColorStar = IconHelper.forItem(par1IconRegister, this, "Star");
|
||||
// }
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
return super.getUnlocalizedName(par1ItemStack) + par1ItemStack.getItemDamage();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
return meta == 0 ? invIcon : invIconMaster;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
@@ -35,16 +34,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
@@ -141,7 +134,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
}
|
||||
|
||||
private static ItemStack[] validateRecipe(EntityPlayer player, ItemStack stack, ItemStack[] recipe, int slot) {
|
||||
InventoryCrafting fakeInv = new InventoryCrafting(new ContainerWorkbench(player.inventory, player.worldObj, 0, 0, 0), 3, 3);
|
||||
InventoryCrafting fakeInv = new InventoryCrafting(new ContainerWorkbench(player.inventory, player.worldObj, BlockPos.ORIGIN), 3, 3);
|
||||
for(int i = 0; i < 9; i++)
|
||||
fakeInv.setInventorySlotContents(i, recipe[i]);
|
||||
|
||||
@@ -163,7 +156,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
if(recipe == null)
|
||||
return false;
|
||||
|
||||
if(recipe[9].stackSize != InventoryHelper.testInventoryInsertion(inv, recipe[9], ForgeDirection.UNKNOWN))
|
||||
if(recipe[9].stackSize != InventoryHelper.testInventoryInsertion(inv, recipe[9], null))
|
||||
return false;
|
||||
|
||||
return consumeRecipeIngredients(recipe, inv, null);
|
||||
|
||||
@@ -14,10 +14,12 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
@@ -39,7 +41,7 @@ public class ItemFertilizer extends ItemMod {
|
||||
for(int j = -range - 1; j < range; j++) {
|
||||
for(int k = 2; k >= -2; k--) {
|
||||
BlockPos pos_ = pos.add(i + 1, k + 1, j + 1);
|
||||
if(par3World.isAirBlock(pos_) && (!par3World.provider.getHasNoSky() || pos_.getY() < 255) && ModBlocks.flower.canBlockStay(par3World, pos_))
|
||||
if(par3World.isAirBlock(pos_) && (!par3World.provider.getHasNoSky() || pos_.getY() < 255) && ModBlocks.flower.canPlaceBlockAt(par3World, pos_))
|
||||
validCoords.add(pos_);
|
||||
}
|
||||
}
|
||||
@@ -48,7 +50,7 @@ public class ItemFertilizer extends ItemMod {
|
||||
for(int i = 0; i < flowerCount; i++) {
|
||||
BlockPos coords = validCoords.get(par3World.rand.nextInt(validCoords.size()));
|
||||
validCoords.remove(coords);
|
||||
par3World.setBlockState(coords, ModBlocks.flower, par3World.rand.nextInt(16), 1 | 2);
|
||||
par3World.setBlockState(coords, ModBlocks.flower.getDefaultState().withProperty(BotaniaStateProps.COLOR, EnumDyeColor.byMetadata(par3World.rand.nextInt(16))), 1 | 2);
|
||||
}
|
||||
par1ItemStack.stackSize--;
|
||||
} else {
|
||||
|
||||
@@ -52,10 +52,7 @@ public class ItemGrassHorn extends ItemMod {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
return par1ItemStack.getDisplayName().toLowerCase().contains("vuvuzela") ? vuvuzelaIcon : super.getIconIndex(par1ItemStack);
|
||||
}
|
||||
// todo 1.8 return par1ItemStack.getDisplayName().toLowerCase().contains("vuvuzela") ? vuvuzelaIcon : super.getIconIndex(par1ItemStack);
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack par1ItemStack) {
|
||||
@@ -85,7 +82,7 @@ public class ItemGrassHorn extends ItemMod {
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int time) {
|
||||
if(time != getMaxItemUseDuration(stack) && time % 5 == 0)
|
||||
breakGrass(player.worldObj, stack, stack.getItemDamage(), (int) player.posX, (int) player.posY, (int) player.posZ);
|
||||
breakGrass(player.worldObj, stack, stack.getItemDamage(), new BlockPos(player));
|
||||
|
||||
if(!player.worldObj.isRemote)
|
||||
player.worldObj.playSoundAtEntity(player, "note.bassattack", 1F, 0.001F);
|
||||
@@ -103,7 +100,7 @@ public class ItemGrassHorn extends ItemMod {
|
||||
for(int k = -rangeY; k < rangeY + 1; k++) {
|
||||
BlockPos pos = srcPos.add(i, k, j);
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
if(block instanceof IHornHarvestable ? ((IHornHarvestable) block).canHornHarvest(world, pos, stack, type) : stackDmg == 0 && block instanceof BlockBush && !(block instanceof ISpecialFlower) && (!(block instanceof IGrassHornExcempt) || ((IGrassHornExcempt) block).canUproot(world, x, y, z)) || stackDmg == 1 && block.isLeaves(world, pos) || stackDmg == 2 && block == Blocks.snow_layer)
|
||||
if(block instanceof IHornHarvestable ? ((IHornHarvestable) block).canHornHarvest(world, pos, stack, type) : stackDmg == 0 && block instanceof BlockBush && !(block instanceof ISpecialFlower) && (!(block instanceof IGrassHornExcempt) || ((IGrassHornExcempt) block).canUproot(world, pos)) || stackDmg == 1 && block.isLeaves(world, pos) || stackDmg == 2 && block == Blocks.snow_layer)
|
||||
coords.add(pos);
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.Random;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDirt;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
@@ -27,8 +26,9 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.state.enums.AltGrassVariant;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
@@ -75,7 +75,7 @@ public class ItemGrassSeeds extends ItemMod {
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, BlockPos pos, EnumFacing side, float par8, float par9, float par10) {
|
||||
IBlockState state = par3World.getBlockState(pos);
|
||||
|
||||
if((state.getBlock() == Blocks.dirt || (state.getBlock() == Blocks.grass && par1ItemStack.getItemDamage() != 0)) && bmeta == 0) {
|
||||
if((state.getBlock() == Blocks.dirt && state.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT) || (state.getBlock() == Blocks.grass && par1ItemStack.getItemDamage() != 0)) {
|
||||
int meta = par1ItemStack.getItemDamage();
|
||||
|
||||
BlockSwapper swapper = addBlockSwapper(par3World, pos, meta);
|
||||
@@ -179,12 +179,12 @@ public class ItemGrassSeeds extends ItemMod {
|
||||
switch(meta) {
|
||||
case 1 : return new BlockSwapper(world, pos, Blocks.dirt.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL));
|
||||
case 2 : return new BlockSwapper(world, pos, Blocks.mycelium.getDefaultState());
|
||||
case 3 : return new BlockSwapper(world, pos, ModBlocks.altGrass, 0);
|
||||
case 4 : return new BlockSwapper(world, pos, ModBlocks.altGrass, 1);
|
||||
case 5 : return new BlockSwapper(world, pos, ModBlocks.altGrass, 2);
|
||||
case 6 : return new BlockSwapper(world, pos, ModBlocks.altGrass, 3);
|
||||
case 7 : return new BlockSwapper(world, pos, ModBlocks.altGrass, 4);
|
||||
case 8 : return new BlockSwapper(world, pos, ModBlocks.altGrass, 5);
|
||||
case 3 : return new BlockSwapper(world, pos, ModBlocks.altGrass.getDefaultState().withProperty(BotaniaStateProps.ALTGRASS_VARIANT, AltGrassVariant.DRY));
|
||||
case 4 : return new BlockSwapper(world, pos, ModBlocks.altGrass.getDefaultState().withProperty(BotaniaStateProps.ALTGRASS_VARIANT, AltGrassVariant.GOLDEN));
|
||||
case 5 : return new BlockSwapper(world, pos, ModBlocks.altGrass.getDefaultState().withProperty(BotaniaStateProps.ALTGRASS_VARIANT, AltGrassVariant.VIVID));
|
||||
case 6 : return new BlockSwapper(world, pos, ModBlocks.altGrass.getDefaultState().withProperty(BotaniaStateProps.ALTGRASS_VARIANT, AltGrassVariant.SCORCHED));
|
||||
case 7 : return new BlockSwapper(world, pos, ModBlocks.altGrass.getDefaultState().withProperty(BotaniaStateProps.ALTGRASS_VARIANT, AltGrassVariant.INFUSED));
|
||||
case 8 : return new BlockSwapper(world, pos, ModBlocks.altGrass.getDefaultState().withProperty(BotaniaStateProps.ALTGRASS_VARIANT, AltGrassVariant.MUTATED));
|
||||
default : return new BlockSwapper(world, pos, Blocks.grass.getDefaultState());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,12 +159,12 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet
|
||||
}
|
||||
}
|
||||
|
||||
private boolean inRange(int x, int y, int z, int srcx, int srcy, int srcz, int range, double heightscale, boolean pointy) {
|
||||
if(y >= srcy)
|
||||
return MathHelper.pointDistanceSpace(x, 0, z, srcx, 0, srcz) < range;
|
||||
private boolean inRange(BlockPos pos, BlockPos srcPos, int range, double heightscale, boolean pointy) {
|
||||
if(pos.getY() >= srcPos.getY())
|
||||
return MathHelper.pointDistanceSpace(pos.getX(), 0, pos.getZ(), srcPos.getX(), 0, srcPos.getZ()) < range;
|
||||
else if(!pointy)
|
||||
return MathHelper.pointDistanceSpace(x, y / heightscale, z, srcx, srcy / heightscale, srcz) < range;
|
||||
else return MathHelper.pointDistanceSpace(x, 0, z, srcx, 0, srcz) < range - (srcy - y) / heightscale;
|
||||
return MathHelper.pointDistanceSpace(pos.getX(), pos.getY() / heightscale, pos.getZ(), srcPos.getX(), srcPos.getY() / heightscale, srcPos.getZ()) < range;
|
||||
else return MathHelper.pointDistanceSpace(pos.getX(), 0, pos.getZ(), srcPos.getX(), 0, srcPos.getZ()) < range - (srcPos.getY() - pos.getY()) / heightscale;
|
||||
}
|
||||
|
||||
public EntityManaBurst getBurst(World world, BlockPos pos, ItemStack stack) {
|
||||
|
||||
@@ -51,9 +51,6 @@ public class ItemManaCookie extends ItemFood {
|
||||
return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("item.", "item." + LibResources.PREFIX_MOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
return stack.getDisplayName().toLowerCase().equals("totalbiscuit") ? totalBiscuitIcon : super.getIconIndex(stack);
|
||||
}
|
||||
// todo 1.8 return stack.getDisplayName().toLowerCase().equals("totalbiscuit") ? totalBiscuitIcon : super.getIconIndex(stack);
|
||||
|
||||
}
|
||||
@@ -10,6 +10,8 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -31,6 +33,9 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class ItemSextant extends ItemMod {
|
||||
|
||||
private static final String TAG_SOURCE_X = "sourceX";
|
||||
@@ -162,8 +167,13 @@ public class ItemSextant extends ItemMod {
|
||||
public static class MultiblockSextant extends Multiblock {
|
||||
|
||||
@Override
|
||||
public Multiblock[] createRotations() {
|
||||
return new Multiblock[] { this };
|
||||
public Map<EnumFacing, Multiblock> createRotations() {
|
||||
Map<EnumFacing, Multiblock> ret = new EnumMap<EnumFacing, Multiblock>(EnumFacing.class);
|
||||
for (EnumFacing e : EnumFacing.HORIZONTALS) {
|
||||
ret.put(e, this);
|
||||
}
|
||||
return ret;
|
||||
// return new Multiblock[] { this }; todo 1.8 verify, this was only the first direction
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,10 +10,8 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
@@ -22,7 +20,7 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemSlimeBottle extends ItemMod {
|
||||
|
||||
IIcon activeIcon;
|
||||
// todo 1.8 smart model?
|
||||
|
||||
public ItemSlimeBottle() {
|
||||
setUnlocalizedName(LibItemNames.SLIME_BOTTLE);
|
||||
@@ -30,17 +28,6 @@ public class ItemSlimeBottle extends ItemMod {
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
activeIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int dmg) {
|
||||
return dmg == 0 ? itemIcon : activeIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int something, boolean somethingelse) {
|
||||
if(!world.isRemote) {
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
@@ -28,10 +27,9 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
import vazkii.botania.api.state.BotaniaStateProps;
|
||||
import vazkii.botania.api.wand.ICoordBoundItem;
|
||||
import vazkii.botania.api.wand.ITileBound;
|
||||
import vazkii.botania.api.wand.IWandBindable;
|
||||
@@ -88,14 +86,14 @@ public class ItemTwigWand extends Item16Colors implements ICoordBoundItem {
|
||||
}
|
||||
|
||||
if(block == Blocks.lapis_block && ConfigHandler.enchanterEnabled) {
|
||||
int meta = -1;
|
||||
if(TileEnchanter.canEnchanterExist(par3World, pos, 0))
|
||||
meta = 0;
|
||||
else if(TileEnchanter.canEnchanterExist(par3World, pos, 1))
|
||||
meta = 1;
|
||||
EnumFacing.Axis axis = null;
|
||||
if(TileEnchanter.canEnchanterExist(par3World, pos, EnumFacing.Axis.X))
|
||||
axis = EnumFacing.Axis.X;
|
||||
else if(TileEnchanter.canEnchanterExist(par3World, pos, EnumFacing.Axis.Z))
|
||||
axis = EnumFacing.Axis.Z;
|
||||
|
||||
if(meta != -1 && !par3World.isRemote) {
|
||||
par3World.setBlockState(pos, ModBlocks.enchanter, meta, 1 | 2);
|
||||
if(axis != null && !par3World.isRemote) {
|
||||
par3World.setBlockState(pos, ModBlocks.enchanter.getDefaultState().withProperty(BotaniaStateProps.ENCHANTER_DIRECTION, axis), 1 | 2);
|
||||
par2EntityPlayer.addStat(ModAchievements.enchanterMake, 1);
|
||||
par3World.playSoundEffect(pos.getX(), pos.getY(), pos.getZ(), "botania:enchanterBlock", 0.5F, 0.6F);
|
||||
for(int i = 0; i < 50; i++) {
|
||||
|
||||
+7
-5
@@ -17,6 +17,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -27,6 +28,7 @@ import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||
|
||||
@@ -45,6 +47,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
public class ItemTerrasteelHelm extends ItemTerrasteelArmor implements IManaDiscountArmor, IAncientWillContainer {
|
||||
|
||||
private static final String TAG_ANCIENT_WILL = "AncientWill";
|
||||
static TextureAtlasSprite willIcon;
|
||||
|
||||
public ItemTerrasteelHelm() {
|
||||
this(LibItemNames.TERRASTEEL_HELM);
|
||||
@@ -55,11 +58,10 @@ public class ItemTerrasteelHelm extends ItemTerrasteelArmor implements IManaDisc
|
||||
super(0, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
super.registerIcons(par1IconRegister);
|
||||
willIcon = IconHelper.forName(par1IconRegister, "willFlame");
|
||||
public void onTextureStitch(TextureStitchEvent evt) {
|
||||
willIcon = IconHelper.forName(evt.map, "willFlame");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -117,7 +119,7 @@ public class ItemTerrasteelHelm extends ItemTerrasteelArmor implements IManaDisc
|
||||
float f2 = willIcon.getMinV();
|
||||
float f3 = willIcon.getMaxV();
|
||||
Helper.translateToHeadLevel(event.entityPlayer);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-0.26F, 0.15F, -0.39F);
|
||||
|
||||
@@ -41,7 +41,6 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
|
||||
|
||||
private static final int SUBTYPES = 32;
|
||||
IIcon[] icons;
|
||||
|
||||
public ItemBaubleCosmetic() {
|
||||
super(LibItemNames.COSMETIC);
|
||||
@@ -53,13 +52,6 @@ public class ItemBaubleCosmetic extends ItemBauble implements ICosmeticBauble {
|
||||
RecipeSorter.register("botania:cosmeticRemove", CosmeticRemoveRecipe.class, Category.SHAPELESS, "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
icons = new IIcon[SUBTYPES];
|
||||
for(int i = 0; i < SUBTYPES; i++)
|
||||
icons[i] = IconHelper.forItem(par1IconRegister, this, i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 0; i < SUBTYPES; i++)
|
||||
|
||||
@@ -14,10 +14,10 @@ import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -27,7 +27,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
|
||||
@@ -50,8 +49,6 @@ public class ItemBloodPendant extends ItemBauble implements IBrewContainer, IBre
|
||||
|
||||
private static final String TAG_BREW_KEY = "brewKey";
|
||||
|
||||
IIcon[] icons;
|
||||
|
||||
public ItemBloodPendant() {
|
||||
super(LibItemNames.BLOOD_PENDANT);
|
||||
setMaxStackSize(1);
|
||||
@@ -67,18 +64,6 @@ public class ItemBloodPendant extends ItemBauble implements IBrewContainer, IBre
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
icons = new IIcon[4];
|
||||
for(int i = 0; i < 4; i++)
|
||||
icons[i] = IconHelper.forItem(par1IconRegister, this, i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return icons[pass];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack stack, int pass) {
|
||||
if(pass == 0)
|
||||
|
||||
@@ -13,6 +13,7 @@ package vazkii.botania.common.item.equipment.bauble;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
@@ -104,7 +105,7 @@ public class ItemDivaCharm extends ItemBauble implements IManaUsingItem, IBauble
|
||||
float f3 = itemIcon.getMaxV();
|
||||
boolean armor = event.entityPlayer.getCurrentArmor(3) != null;
|
||||
Helper.translateToHeadLevel(event.entityPlayer);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationItemsTexture);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GlStateManager.rotate(90F, 0F, 1F, 0F);
|
||||
GlStateManager.rotate(180F, 1F, 0F, 0F);
|
||||
GlStateManager.translate(-0.4F, 0.1F, armor ? -0.35F : -0.3F);
|
||||
|
||||
@@ -25,7 +25,6 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
@@ -35,7 +34,6 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
@@ -99,15 +97,6 @@ public class ItemFlightTiara extends ItemBauble implements IManaUsingItem, IBaub
|
||||
return BaubleType.AMULET;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
wingIcons = new IIcon[WING_TYPES];
|
||||
for(int i = 0; i < WING_TYPES; i++)
|
||||
wingIcons[i] = IconHelper.forItem(par1IconRegister, this, i + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list) {
|
||||
for(int i = 0; i < SUBTYPES + 1; i++)
|
||||
|
||||
@@ -12,7 +12,6 @@ package vazkii.botania.common.item.equipment.tool;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.EntityEnderman;
|
||||
@@ -20,7 +19,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
@@ -29,25 +27,12 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
public class ItemEnderDagger extends ItemManasteelSword {
|
||||
|
||||
IIcon iconFront, iconOverlay;
|
||||
|
||||
public ItemEnderDagger() {
|
||||
super(BotaniaAPI.manasteelToolMaterial, LibItemNames.ENDER_DAGGER);
|
||||
setMaxDamage(69); // What you looking at?
|
||||
setNoRepair();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
iconFront = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
iconOverlay = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return pass == 0 ? iconFront : iconOverlay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack par1ItemStack, int par2) {
|
||||
if(par2 == 0)
|
||||
|
||||
+16
-27
@@ -10,7 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.item.equipment.tool.bow;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -20,7 +19,6 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBow;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
|
||||
@@ -40,7 +38,6 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
public class ItemLivingwoodBow extends ItemBow implements IManaUsingItem {
|
||||
|
||||
public static final int MANA_PER_DAMAGE = 40;
|
||||
IIcon[] pullIcons = new IIcon[3];
|
||||
|
||||
public ItemLivingwoodBow() {
|
||||
this(LibItemNames.LIVINGWOOD_BOW);
|
||||
@@ -151,14 +148,6 @@ public class ItemLivingwoodBow extends ItemBow implements IManaUsingItem {
|
||||
else p_77615_3_.inventory.consumeInventoryItem(Items.arrow);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
for(int i = 0; i < 3; i++)
|
||||
pullIcons[i] = IconHelper.forItem(par1IconRegister, this, i + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity player, int par4, boolean par5) {
|
||||
if(!world.isRemote && player instanceof EntityPlayer && stack.getItemDamage() > 0 && ManaItemHandler.requestManaExactForTool(stack, (EntityPlayer) player, MANA_PER_DAMAGE * 2, true))
|
||||
@@ -175,21 +164,21 @@ public class ItemLivingwoodBow extends ItemBow implements IManaUsingItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
if(stack != usingItem)
|
||||
return itemIcon;
|
||||
|
||||
int j = (int) ((getMaxItemUseDuration(stack) - useRemaining) * chargeVelocityMultiplier());
|
||||
|
||||
if(j >= 18)
|
||||
return pullIcons[2];
|
||||
if(j > 13)
|
||||
return pullIcons[1];
|
||||
if(j > 0)
|
||||
return pullIcons[0];
|
||||
|
||||
return itemIcon;
|
||||
}
|
||||
// @Override todo 1.8
|
||||
// public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
// if(stack != usingItem)
|
||||
// return itemIcon;
|
||||
//
|
||||
// int j = (int) ((getMaxItemUseDuration(stack) - useRemaining) * chargeVelocityMultiplier());
|
||||
//
|
||||
// if(j >= 18)
|
||||
// return pullIcons[2];
|
||||
// if(j > 13)
|
||||
// return pullIcons[1];
|
||||
// if(j > 0)
|
||||
// return pullIcons[0];
|
||||
//
|
||||
// return itemIcon;
|
||||
// }
|
||||
|
||||
}
|
||||
+3
-1
@@ -14,6 +14,7 @@ import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.entity.EntityDoppleganger;
|
||||
@@ -21,6 +22,7 @@ import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelAxe;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class ItemElementiumAxe extends ItemManasteelAxe {
|
||||
|
||||
@@ -58,7 +60,7 @@ public class ItemElementiumAxe extends ItemManasteelAxe {
|
||||
|
||||
private void addDrop(LivingDropsEvent event, ItemStack drop) {
|
||||
EntityItem entityitem = new EntityItem(event.entityLiving.worldObj, event.entityLiving.posX, event.entityLiving.posY, event.entityLiving.posZ, drop);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, entityitem, 10, LibObfuscation.PICKUP_DELAY);
|
||||
event.drops.add(entityitem);
|
||||
}
|
||||
|
||||
|
||||
+4
-15
@@ -4,7 +4,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -14,7 +13,6 @@ import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
@@ -26,8 +24,6 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemElementiumShears extends ItemManasteelShears {
|
||||
|
||||
IIcon dammitReddit;
|
||||
|
||||
public ItemElementiumShears() {
|
||||
super(LibItemNames.ELEMENTIUM_SHEARS);
|
||||
}
|
||||
@@ -48,17 +44,10 @@ public class ItemElementiumShears extends ItemManasteelShears {
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
super.registerIcons(par1IconRegister);
|
||||
dammitReddit = IconHelper.forName(par1IconRegister, "dammitReddit");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
return par1ItemStack.getDisplayName().equalsIgnoreCase("dammit reddit") ? dammitReddit : super.getIconIndex(par1ItemStack);
|
||||
}
|
||||
// @Override todo 1.8
|
||||
// public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
// return par1ItemStack.getDisplayName().equalsIgnoreCase("dammit reddit") ? dammitReddit : super.getIconIndex(par1ItemStack);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void onUsingTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
|
||||
+1
-2
@@ -9,7 +9,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelShovel;
|
||||
@@ -39,7 +38,7 @@ public class ItemElementiumShovel extends ItemManasteelShovel {
|
||||
|
||||
Block blk = world.getBlockState(pos).getBlock();
|
||||
if(blk instanceof BlockFalling)
|
||||
ToolCommons.removeBlocksInIteration(player, stack, world, x, y, z, 0, -12, 0, 1, 12, 1, blk, materialsShovel, silk, fortune, false);
|
||||
ToolCommons.removeBlocksInIteration(player, stack, world, pos, new BlockPos(0, -12, 0), new BlockPos(1, 12, 1), blk, materialsShovel, silk, fortune, false);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
-7
@@ -13,7 +13,6 @@ package vazkii.botania.common.item.equipment.tool.manasteel;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -66,12 +65,6 @@ public class ItemManasteelAxe extends ItemAxe implements IManaUsingItem, ISortab
|
||||
return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("item.", "item." + LibResources.PREFIX_MOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) {
|
||||
ToolCommons.damageItem(par1ItemStack, 1, par3EntityLivingBase, getManaPerDamage());
|
||||
|
||||
-7
@@ -13,7 +13,6 @@ package vazkii.botania.common.item.equipment.tool.manasteel;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -66,12 +65,6 @@ public class ItemManasteelPick extends ItemPickaxe implements IManaUsingItem, IS
|
||||
return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("item.", "item." + LibResources.PREFIX_MOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) {
|
||||
ToolCommons.damageItem(par1ItemStack, 1, par3EntityLivingBase, getManaPerDmg());
|
||||
|
||||
+4
-8
@@ -15,7 +15,6 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -29,17 +28,20 @@ import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.core.helper.ObfuscationHelper;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.tool.ToolCommons;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class ItemManasteelShears extends ItemShears implements IManaUsingItem {
|
||||
|
||||
@@ -65,12 +67,6 @@ public class ItemManasteelShears extends ItemShears implements IManaUsingItem {
|
||||
return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("item.", "item." + LibResources.PREFIX_MOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean itemInteractionForEntity(ItemStack itemstack, EntityPlayer player, EntityLivingBase entity) {
|
||||
if(entity.worldObj.isRemote)
|
||||
@@ -117,7 +113,7 @@ public class ItemManasteelShears extends ItemShears implements IManaUsingItem {
|
||||
double d2 = rand.nextFloat() * f + (1D - f) * 0.5;
|
||||
|
||||
EntityItem entityitem = new EntityItem(player.worldObj, pos.getX() + d, pos.getY() + d1, pos.getZ() + d2, stack);
|
||||
entityitem.delayBeforeCanPickup = 10;
|
||||
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, entityitem, 10, LibObfuscation.PICKUP_DELAY);
|
||||
player.worldObj.spawnEntityInWorld(entityitem);
|
||||
}
|
||||
|
||||
|
||||
-7
@@ -11,7 +11,6 @@
|
||||
package vazkii.botania.common.item.equipment.tool.manasteel;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -64,12 +63,6 @@ public class ItemManasteelShovel extends ItemSpade implements IManaUsingItem, IS
|
||||
return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("item.", "item." + LibResources.PREFIX_MOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) {
|
||||
ToolCommons.damageItem(par1ItemStack, 1, par3EntityLivingBase, MANA_PER_DAMAGE);
|
||||
|
||||
+5
-21
@@ -11,7 +11,6 @@
|
||||
package vazkii.botania.common.item.equipment.tool.manasteel;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -19,7 +18,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemSword;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
@@ -38,8 +36,6 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem {
|
||||
|
||||
public static final int MANA_PER_DAMAGE = 60;
|
||||
|
||||
public static IIcon elucidatorIcon;
|
||||
|
||||
public ItemManasteelSword() {
|
||||
this(BotaniaAPI.manasteelToolMaterial, LibItemNames.MANASTEEL_SWORD);
|
||||
}
|
||||
@@ -61,13 +57,6 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem {
|
||||
return super.getUnlocalizedNameInefficiently(par1ItemStack).replaceAll("item.", "item." + LibResources.PREFIX_MOD);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
elucidatorIcon = IconHelper.forName(par1IconRegister, "elucidator");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase) {
|
||||
if(usesMana(par1ItemStack))
|
||||
@@ -75,16 +64,11 @@ public class ItemManasteelSword extends ItemSword implements IManaUsingItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
String name = par1ItemStack.getDisplayName().toLowerCase().trim();
|
||||
return name.equals("the elucidator") ? elucidatorIcon : super.getIconIndex(par1ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return getIconIndex(stack);
|
||||
}
|
||||
// @Override todo 1.8
|
||||
// public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
// String name = par1ItemStack.getDisplayName().toLowerCase().trim();
|
||||
// return name.equals("the elucidator") ? elucidatorIcon : super.getIconIndex(par1ItemStack);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, BlockPos pos, EntityLivingBase entity) {
|
||||
|
||||
@@ -16,14 +16,12 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
@@ -46,30 +44,11 @@ public class ItemTerraAxe extends ItemManasteelAxe implements ISequentialBreaker
|
||||
private static final int MANA_PER_DAMAGE = 100;
|
||||
private static Map<Integer, List<BlockSwapper>> blockSwappers = new HashMap();
|
||||
|
||||
IIcon iconOn, iconOff;
|
||||
|
||||
public ItemTerraAxe() {
|
||||
super(BotaniaAPI.terrasteelToolMaterial, LibItemNames.TERRA_AXE);
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
iconOn = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
iconOff = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int p_77617_1_) {
|
||||
return iconOn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int renderPass, EntityPlayer player, ItemStack usingItem, int useRemaining) {
|
||||
return shouldBreak(player) ? iconOn : iconOff;
|
||||
}
|
||||
|
||||
public boolean shouldBreak(EntityPlayer player) {
|
||||
return !player.isSneaking() && !ItemTemperanceStone.hasTemperanceActive(player);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -23,9 +22,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.*;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.oredict.RecipeSorter;
|
||||
import net.minecraftforge.oredict.RecipeSorter.Category;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
@@ -68,8 +65,6 @@ public class ItemTerraPick extends ItemManasteelPick implements IManaItem, ISequ
|
||||
10000 - 1, 1000000 - 1, 10000000 - 1, 100000000 - 1, 1000000000 - 1, MAX_MANA - 1
|
||||
};
|
||||
|
||||
IIcon iconTool, iconOverlay, iconTipped;
|
||||
|
||||
public ItemTerraPick() {
|
||||
super(BotaniaAPI.terrasteelToolMaterial, LibItemNames.TERRA_PICK);
|
||||
GameRegistry.addRecipe(new TerraPickTippingRecipe());
|
||||
@@ -184,18 +179,6 @@ public class ItemTerraPick extends ItemManasteelPick implements IManaItem, ISequ
|
||||
return Integer.MAX_VALUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
iconTool = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
iconOverlay = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
iconTipped = IconHelper.forItem(par1IconRegister, this, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(ItemStack stack, int pass) {
|
||||
return pass == 1 && isEnabled(stack) ? iconOverlay : isTipped(stack) ? iconTipped : iconTool;
|
||||
}
|
||||
|
||||
public static boolean isTipped(ItemStack stack) {
|
||||
return ItemNBTHelper.getBoolean(stack, TAG_TIPPED, false);
|
||||
}
|
||||
|
||||
@@ -13,7 +13,6 @@ package vazkii.botania.common.item.lens;
|
||||
import java.awt.Color;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -22,7 +21,6 @@ import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraftforge.oredict.RecipeSorter;
|
||||
@@ -148,14 +146,14 @@ public class ItemLens extends ItemMod implements ILensControl, ICompositableLens
|
||||
RecipeSorter.register("botania:lensDying", LensDyeingRecipe.class, Category.SHAPELESS, "");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
iconGlass = IconHelper.forName(par1IconRegister, "lensInside");
|
||||
|
||||
ringIcons = new IIcon[SUBTYPES];
|
||||
for(int i = 0; i < ringIcons.length; i++)
|
||||
ringIcons[i] = IconHelper.forName(par1IconRegister, LibItemNames.LENS_NAMES[i]);
|
||||
}
|
||||
// @Override todo 1.8
|
||||
// public void registerIcons(IIconRegister par1IconRegister) {
|
||||
// iconGlass = IconHelper.forName(par1IconRegister, "lensInside");
|
||||
//
|
||||
// ringIcons = new IIcon[SUBTYPES];
|
||||
// for(int i = 0; i < ringIcons.length; i++)
|
||||
// ringIcons[i] = IconHelper.forName(par1IconRegister, LibItemNames.LENS_NAMES[i]);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
@@ -163,10 +161,10 @@ public class ItemLens extends ItemMod implements ILensControl, ICompositableLens
|
||||
par3List.add(new ItemStack(par1, 1, i));
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamageForRenderPass(int par1, int par2) {
|
||||
return par2 == 1 ? ringIcons[Math.min(SUBTYPES - 1, par1)] : iconGlass;
|
||||
}
|
||||
// @Override todo 1.8
|
||||
// public IIcon getIconFromDamageForRenderPass(int par1, int par2) {
|
||||
// return par2 == 1 ? ringIcons[Math.min(SUBTYPES - 1, par1)] : iconGlass;
|
||||
// }
|
||||
|
||||
@Override
|
||||
public int getColorFromItemStack(ItemStack par1ItemStack, int par2) {
|
||||
|
||||
@@ -60,10 +60,10 @@ public class ItemInfiniteFruit extends ItemRelic implements IManaUsingItem {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
return isBoot(par1ItemStack) ? dasBootIcon : super.getIconIndex(par1ItemStack);
|
||||
}
|
||||
// @Override todo 1.8
|
||||
// public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
// return isBoot(par1ItemStack) ? dasBootIcon : super.getIconIndex(par1ItemStack);
|
||||
// }
|
||||
|
||||
private boolean isBoot(ItemStack par1ItemStack) {
|
||||
String name = par1ItemStack.getDisplayName().toLowerCase().trim();
|
||||
|
||||
@@ -12,11 +12,9 @@ package vazkii.botania.common.item.relic;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
@@ -33,20 +31,20 @@ public class ItemKingKey extends ItemRelic implements IManaUsingItem {
|
||||
private static final String TAG_CHARGING = "charging";
|
||||
|
||||
private static final int WEAPON_TYPES = 12;
|
||||
public static IIcon[] weaponIcons;
|
||||
// public static IIcon[] weaponIcons;
|
||||
|
||||
public ItemKingKey() {
|
||||
super(LibItemNames.KING_KEY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister par1IconRegister) {
|
||||
super.registerIcons(par1IconRegister);
|
||||
|
||||
weaponIcons = new IIcon[WEAPON_TYPES];
|
||||
for(int i = 0; i < WEAPON_TYPES; i++)
|
||||
weaponIcons[i] = IconHelper.forName(par1IconRegister, "gateWeapon" + i);
|
||||
}
|
||||
// @Override
|
||||
// public void registerIcons(IIconRegister par1IconRegister) {
|
||||
// super.registerIcons(par1IconRegister);
|
||||
//
|
||||
// weaponIcons = new IIcon[WEAPON_TYPES];
|
||||
// for(int i = 0; i < WEAPON_TYPES; i++)
|
||||
// weaponIcons[i] = IconHelper.forName(par1IconRegister, "gateWeapon" + i);
|
||||
// } todo 1.8
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
|
||||
@@ -22,6 +22,7 @@ import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;
|
||||
import vazkii.botania.api.item.IManaProficiencyArmor;
|
||||
import vazkii.botania.api.mana.IManaUsingItem;
|
||||
import vazkii.botania.api.mana.ManaItemHandler;
|
||||
@@ -32,6 +33,7 @@ import vazkii.botania.common.entity.EntityThrownItem;
|
||||
import vazkii.botania.common.item.ItemMod;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
|
||||
public class ItemGravityRod extends ItemMod implements IManaUsingItem {
|
||||
|
||||
@@ -125,7 +127,7 @@ public class ItemGravityRod extends ItemMod implements IManaUsingItem {
|
||||
|
||||
if(ManaItemHandler.requestManaExactForTool(stack, player, COST, true) && item != null) {
|
||||
if(item instanceof EntityItem)
|
||||
((EntityItem)item).delayBeforeCanPickup = 5;
|
||||
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, ((EntityItem) item), 5, LibObfuscation.PICKUP_DELAY);
|
||||
|
||||
if(item instanceof EntityLivingBase) {
|
||||
EntityLivingBase targetEntity = (EntityLivingBase)item;
|
||||
@@ -209,7 +211,7 @@ public class ItemGravityRod extends ItemMod implements IManaUsingItem {
|
||||
ItemNBTHelper.setDouble(stack, TAG_DIST, -1);
|
||||
Vector3 moveVector = new Vector3(player.getLookVec().normalize());
|
||||
if(item instanceof EntityItem) {
|
||||
((EntityItem)item).delayBeforeCanPickup = 20;
|
||||
ObfuscationReflectionHelper.setPrivateValue(EntityItem.class, ((EntityItem) item), 20, LibObfuscation.PICKUP_DELAY);
|
||||
float mot = IManaProficiencyArmor.Helper.hasProficiency(player) ? 2.25F : 1.5F;
|
||||
item.motionX = moveVector.x * mot;
|
||||
item.motionY = moveVector.y;
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -73,7 +74,7 @@ public class PageElvenRecipe extends PageRecipe {
|
||||
i++;
|
||||
}
|
||||
|
||||
IIcon portalIcon = BlockAlfPortal.portalTex;
|
||||
TextureAtlasSprite portalIcon = BlockAlfPortal.portalTex;
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
Minecraft.getMinecraft().getRenderItem().renderIcon(gui.getLeft() + 22, gui.getTop() + 36, portalIcon, 48, 48);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user