mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-13 16:54:06 +00:00
Cleanup!
This commit is contained in:
1 parent
32a98341e5
commit
9cf015ee97
85 files changed
+369
-447
No files matched your search
@@ -21,5 +21,5 @@ public interface ICorporeaRequestor {
|
||||
* Executes the passed in request.
|
||||
*/
|
||||
public void doCorporeaRequest(Object request, int count, ICorporeaSpark spark);
|
||||
|
||||
|
||||
}
|
||||
@@ -13,10 +13,10 @@ package vazkii.botania.api.lexicon.multiblock;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
|
||||
|
||||
/**
|
||||
* A hook for rendering blocks in the multiblock display.
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Multiblock {
|
||||
public List<ItemStack> materials = new ArrayList();
|
||||
|
||||
public int minX, minY, minZ, maxX, maxY, maxZ, offX, offY, offZ;
|
||||
|
||||
|
||||
public HashMap<List<Integer>, MultiblockComponent> locationCache = new HashMap<List<Integer>, MultiblockComponent>();
|
||||
|
||||
/**
|
||||
@@ -157,7 +157,7 @@ public class Multiblock {
|
||||
public int getZSize() {
|
||||
return Math.abs(minZ) + Math.abs(maxZ) + 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Rebuilds the location cache
|
||||
*/
|
||||
@@ -166,17 +166,17 @@ public class Multiblock {
|
||||
for(MultiblockComponent comp : components)
|
||||
addComponentToLocationCache(comp);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Adds a single component to the location cache
|
||||
*/
|
||||
private void addComponentToLocationCache(MultiblockComponent comp) {
|
||||
ChunkCoordinates pos = comp.getRelativePosition();
|
||||
locationCache.put(Arrays.asList(
|
||||
pos.posX,
|
||||
pos.posY,
|
||||
pos.posX,
|
||||
pos.posY,
|
||||
pos.posZ
|
||||
), comp);
|
||||
), comp);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+3
-3
@@ -10,13 +10,13 @@
|
||||
*/
|
||||
package vazkii.botania.api.lexicon.multiblock.component;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* A component of a multiblock, the normal one
|
||||
@@ -41,7 +41,7 @@ public class MultiblockComponent {
|
||||
public MultiblockComponent(ChunkCoordinates relPos, Block block, int meta, TileEntity tileEntity) {
|
||||
this(relPos, block, meta, block.hasTileEntity() == (tileEntity != null), tileEntity);
|
||||
}
|
||||
|
||||
|
||||
public MultiblockComponent(ChunkCoordinates relPos, Block block, int meta, boolean doFancyRender, TileEntity tileEntity) {
|
||||
this.relPos = relPos;
|
||||
this.block = block;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class SubTileEntity {
|
||||
protected TileEntity supertile;
|
||||
|
||||
public int ticksExisted = 0;
|
||||
|
||||
|
||||
/** true if this flower is working on Enchanted Soil **/
|
||||
public boolean overgrowth = false;
|
||||
/** true if this flower is working on Enchanted Soil and this is the second tick **/
|
||||
@@ -218,7 +218,7 @@ public class SubTileEntity {
|
||||
public int getPowerLevel(int side) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets if this SubTileEntity is affected by Enchanted Soil's speed boost.
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
private static final String TAG_PASSIVE_DECAY_TICKS = "passiveDecayTicks";
|
||||
|
||||
protected int mana;
|
||||
|
||||
|
||||
public int redstoneSignal = 0;
|
||||
|
||||
int sizeLastCheck = -1;
|
||||
@@ -64,7 +64,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
public boolean acceptsRedstone() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
@@ -88,14 +88,14 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
redstoneSignal = Math.max(redstoneSignal, redstoneSide);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(supertile.getWorldObj().isRemote) {
|
||||
double particleChance = 1F - (double) mana / (double) getMaxMana() / 3.5F;
|
||||
Color color = new Color(getColor());
|
||||
if(Math.random() > particleChance)
|
||||
BotaniaAPI.internalHandler.sparkleFX(supertile.getWorldObj(), supertile.xCoord + 0.3 + Math.random() * 0.5, supertile.yCoord + 0.5 + Math.random() * 0.5, supertile.zCoord + 0.3 + Math.random() * 0.5, color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, (float) Math.random(), 5);
|
||||
}
|
||||
|
||||
|
||||
boolean passive = isPassiveFlower();
|
||||
if(!supertile.getWorldObj().isRemote) {
|
||||
int muhBalance = BotaniaAPI.internalHandler.getPassiveFlowerDecay();
|
||||
@@ -107,7 +107,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
else supertile.getWorldObj().setBlockToAir(supertile.xCoord, supertile.yCoord, supertile.zCoord);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!overgrowth && passive)
|
||||
passiveDecayTicks++;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
public int getValueForPassiveGeneration() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(ArrayList<ItemStack> list) {
|
||||
ArrayList<ItemStack> drops = super.getDrops(list);
|
||||
@@ -235,7 +235,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
int x = cmp.getInteger(TAG_COLLECTOR_X);
|
||||
int y = cmp.getInteger(TAG_COLLECTOR_Y);
|
||||
int z = cmp.getInteger(TAG_COLLECTOR_Z);
|
||||
|
||||
|
||||
cachedCollectorCoordinates = y < 0 ? null : new ChunkCoordinates(x, y, z);
|
||||
}
|
||||
|
||||
@@ -244,7 +244,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
cmp.setInteger(TAG_MANA, mana);
|
||||
cmp.setInteger(TAG_TICKS_EXISTED, ticksExisted);
|
||||
cmp.setInteger(TAG_PASSIVE_DECAY_TICKS, passiveDecayTicks);
|
||||
|
||||
|
||||
if(cachedCollectorCoordinates != null) {
|
||||
cmp.setInteger(TAG_COLLECTOR_X, cachedCollectorCoordinates.posX);
|
||||
cmp.setInteger(TAG_COLLECTOR_Y, cachedCollectorCoordinates.posY);
|
||||
@@ -300,7 +300,7 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
int color = getColor();
|
||||
BotaniaAPI.internalHandler.drawComplexManaHUD(color, knownMana, getMaxMana(), name, res, BotaniaAPI.internalHandler.getBindDisplayForFlowerType(this), isValidBinding());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOvergrowthAffected() {
|
||||
return !isPassiveFlower();
|
||||
|
||||
@@ -145,7 +145,7 @@ public final class HUDHandler {
|
||||
ItemFlugelEye.renderHUD(event.resolution, mc.thePlayer, equippedStack);
|
||||
profiler.endSection();
|
||||
}*/
|
||||
|
||||
|
||||
if(Botania.proxy.isClientPlayerWearingMonocle()) {
|
||||
profiler.startSection("monocle");
|
||||
ItemMonocle.renderHUD(event.resolution, mc.thePlayer);
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
*/
|
||||
package vazkii.botania.client.core.handler;
|
||||
|
||||
import vazkii.botania.api.lexicon.multiblock.Multiblock;
|
||||
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.lexicon.multiblock.Multiblock;
|
||||
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
|
||||
|
||||
/**
|
||||
* This class acts as a wrapper around a block access to
|
||||
@@ -29,7 +29,7 @@ public class MultiblockBlockAccess implements IBlockAccess {
|
||||
protected boolean hasBlockAccess = false;
|
||||
protected Multiblock multiblock;
|
||||
protected int anchorX, anchorY, anchorZ;
|
||||
|
||||
|
||||
@Override
|
||||
public Block getBlock(int x, int y, int z) {
|
||||
MultiblockComponent comp=getComponent(x, y, z);
|
||||
@@ -114,14 +114,14 @@ public class MultiblockBlockAccess implements IBlockAccess {
|
||||
* Updates the block access to the new parameters
|
||||
*/
|
||||
public void update(IBlockAccess access, Multiblock mb, int anchorX, int anchorY, int anchorZ) {
|
||||
this.originalBlockAccess = access;
|
||||
this.multiblock = mb;
|
||||
originalBlockAccess = access;
|
||||
multiblock = mb;
|
||||
this.anchorX = anchorX;
|
||||
this.anchorY = anchorY;
|
||||
this.anchorZ = anchorZ;
|
||||
this.hasBlockAccess = access != null;
|
||||
hasBlockAccess = access != null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the multiblock component for the coordinates, adjusted based on the anchor
|
||||
*/
|
||||
|
||||
@@ -142,9 +142,9 @@ public final class MultiblockRenderHandler {
|
||||
else {
|
||||
if(comp.shouldDoFancyRender()) {
|
||||
int color = block.colorMultiplier(blockAccess, x, y, z);
|
||||
float red = (float)(color >> 16 & 255) / 255.0F;
|
||||
float green = (float)(color >> 8 & 255) / 255.0F;
|
||||
float blue = (float)(color & 255) / 255.0F;
|
||||
float red = (color >> 16 & 255) / 255.0F;
|
||||
float green = (color >> 8 & 255) / 255.0F;
|
||||
float blue = (color & 255) / 255.0F;
|
||||
GL11.glColor4f(red, green, blue, alpha);
|
||||
IBlockAccess oldBlockAccess = blockRender.blockAccess;
|
||||
blockRender.blockAccess = blockAccess;
|
||||
@@ -164,9 +164,9 @@ public final class MultiblockRenderHandler {
|
||||
}
|
||||
else {
|
||||
int color = block.getRenderColor(meta);
|
||||
float red = (float)(color >> 16 & 255) / 255.0F;
|
||||
float green = (float)(color >> 8 & 255) / 255.0F;
|
||||
float blue = (float)(color & 255) / 255.0F;
|
||||
float red = (color >> 16 & 255) / 255.0F;
|
||||
float green = (color >> 8 & 255) / 255.0F;
|
||||
float blue = (color & 255) / 255.0F;
|
||||
GL11.glColor4f(red, green, blue, alpha);
|
||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
||||
blockRender.renderBlockAsItem(block, meta, 1F);
|
||||
|
||||
@@ -44,7 +44,7 @@ public final class SubTileRadiusRenderHandler {
|
||||
int x = pos.blockX;
|
||||
int y = pos.blockY;
|
||||
int z = pos.blockZ;
|
||||
|
||||
|
||||
ItemStack stackHeld = mc.thePlayer.getCurrentEquippedItem();
|
||||
if(stackHeld != null && stackHeld.getItem() == ModItems.twigWand && ItemTwigWand.getBindMode(stackHeld)) {
|
||||
ChunkCoordinates coords = ItemTwigWand.getBoundTile(stackHeld);
|
||||
@@ -54,7 +54,7 @@ public final class SubTileRadiusRenderHandler {
|
||||
z = coords.posZ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
TileEntity tile = mc.theWorld.getTileEntity(x, y, z);
|
||||
if(tile == null || !(tile instanceof ISubTileContainer))
|
||||
return;
|
||||
|
||||
@@ -32,7 +32,6 @@ import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldSettings.GameType;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.botania.api.item.IBurstViewerBauble;
|
||||
import vazkii.botania.api.item.IExtendedPlayerController;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.lexicon.multiblock.IMultiblockRenderHook;
|
||||
@@ -163,8 +162,6 @@ import vazkii.botania.common.entity.EntityVineBall;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemMonocle;
|
||||
import vazkii.botania.common.lib.LibObfuscation;
|
||||
import baubles.common.container.InventoryBaubles;
|
||||
import baubles.common.lib.PlayerHandler;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ContainerFlowerBag extends Container {
|
||||
addSlotToContainer(new SlotLocked(playerInv, i, 8 + i * 18, 142));
|
||||
else addSlotToContainer(new Slot(playerInv, i, 8 + i * 18, 142));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,12 +20,12 @@ public class SlotLocked extends Slot {
|
||||
public SlotLocked(IInventory p_i1824_1_, int p_i1824_2_, int p_i1824_3_, int p_i1824_4_) {
|
||||
super(p_i1824_1_, p_i1824_2_, p_i1824_3_, p_i1824_4_);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canTakeStack(EntityPlayer p_82869_1_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack p_75214_1_) {
|
||||
return false;
|
||||
|
||||
@@ -13,47 +13,46 @@ 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.entity.Entity;
|
||||
|
||||
public class ModelTeruTeruBozu extends ModelBase {
|
||||
|
||||
public ModelRenderer thread;
|
||||
public ModelRenderer cloth;
|
||||
public ModelRenderer happyFace;
|
||||
public ModelRenderer sadFace;
|
||||
|
||||
public ModelTeruTeruBozu() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 32;
|
||||
this.sadFace = new ModelRenderer(this, 32, 0);
|
||||
this.sadFace.setRotationPoint(0.0F, 14.5F, 0.0F);
|
||||
this.sadFace.addBox(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
this.setRotateAngle(sadFace, 0.17453292519943295F, 0.0F, 0.0F);
|
||||
this.happyFace = new ModelRenderer(this, 0, 0);
|
||||
this.happyFace.setRotationPoint(0.0F, 14.5F, 0.0F);
|
||||
this.happyFace.addBox(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
this.setRotateAngle(happyFace, -0.17453292519943295F, 0.0F, 0.0F);
|
||||
this.thread = new ModelRenderer(this, 32, 16);
|
||||
this.thread.setRotationPoint(0.0F, 14.0F, 0.0F);
|
||||
this.thread.addBox(-3.0F, 2.0F, -3.0F, 6, 1, 6, 0.0F);
|
||||
this.cloth = new ModelRenderer(this, 0, 16);
|
||||
this.cloth.setRotationPoint(0.0F, 21.5F, -1.0F);
|
||||
this.cloth.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
this.setRotateAngle(cloth, 0.7853981633974483F, 2.2689280275926285F, 1.5707963267948966F);
|
||||
}
|
||||
public ModelRenderer thread;
|
||||
public ModelRenderer cloth;
|
||||
public ModelRenderer happyFace;
|
||||
public ModelRenderer sadFace;
|
||||
|
||||
public void render() {
|
||||
float f5 = 1F / 16F;
|
||||
if(Minecraft.getMinecraft().theWorld.isRaining())
|
||||
this.sadFace.render(f5);
|
||||
else this.happyFace.render(f5);
|
||||
this.thread.render(f5);
|
||||
this.cloth.render(f5);
|
||||
}
|
||||
public ModelTeruTeruBozu() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
sadFace = new ModelRenderer(this, 32, 0);
|
||||
sadFace.setRotationPoint(0.0F, 14.5F, 0.0F);
|
||||
sadFace.addBox(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
setRotateAngle(sadFace, 0.17453292519943295F, 0.0F, 0.0F);
|
||||
happyFace = new ModelRenderer(this, 0, 0);
|
||||
happyFace.setRotationPoint(0.0F, 14.5F, 0.0F);
|
||||
happyFace.addBox(-4.0F, -6.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
setRotateAngle(happyFace, -0.17453292519943295F, 0.0F, 0.0F);
|
||||
thread = new ModelRenderer(this, 32, 16);
|
||||
thread.setRotationPoint(0.0F, 14.0F, 0.0F);
|
||||
thread.addBox(-3.0F, 2.0F, -3.0F, 6, 1, 6, 0.0F);
|
||||
cloth = new ModelRenderer(this, 0, 16);
|
||||
cloth.setRotationPoint(0.0F, 21.5F, -1.0F);
|
||||
cloth.addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8, 0.0F);
|
||||
setRotateAngle(cloth, 0.7853981633974483F, 2.2689280275926285F, 1.5707963267948966F);
|
||||
}
|
||||
|
||||
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
public void render() {
|
||||
float f5 = 1F / 16F;
|
||||
if(Minecraft.getMinecraft().theWorld.isRaining())
|
||||
sadFace.render(f5);
|
||||
else happyFace.render(f5);
|
||||
thread.render(f5);
|
||||
cloth.render(f5);
|
||||
}
|
||||
|
||||
public void setRotateAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import net.minecraft.world.IBlockAccess;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.block.tile.TileHourglass;
|
||||
import vazkii.botania.common.block.tile.TileTeruTeruBozu;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ import vazkii.botania.common.entity.EntityDoppleganger;
|
||||
|
||||
public class RenderDoppleganger extends RenderBiped {
|
||||
|
||||
public static float DEFAULT_GRAIN_INTENSITY = 0.05F;
|
||||
public static float DEFAULT_DISFIGURATION = 0.025F;
|
||||
public static float DEFAULT_GRAIN_INTENSITY = 0.05F;
|
||||
public static float DEFAULT_DISFIGURATION = 0.025F;
|
||||
|
||||
public static float grainIntensity = DEFAULT_GRAIN_INTENSITY;
|
||||
public static float disfiguration = DEFAULT_DISFIGURATION;
|
||||
@@ -44,7 +44,7 @@ public class RenderDoppleganger extends RenderBiped {
|
||||
ARBShaderObjects.glUniform1fARB(grainIntensityUniform, grainIntensity);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
public static ShaderCallback defaultCallback = new ShaderCallback() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -82,10 +81,10 @@ public class RenderTileCorporeaCrystalCube extends TileEntitySpecialRenderer {
|
||||
String countStr = "" + count;
|
||||
int color = 0xFFFFFF;
|
||||
if(count > 9999) {
|
||||
countStr = (count / 1000) + "K";
|
||||
countStr = count / 1000 + "K";
|
||||
color = 0xFFFF00;
|
||||
if(count > 9999999) {
|
||||
countStr = (count / 10000000) + "M";
|
||||
countStr = count / 10000000 + "M";
|
||||
color = 0x00FF00;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
@@ -80,9 +80,9 @@ public class RenderTileSkullOverride extends TileEntitySkullRenderer {
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
if(gaia)
|
||||
ShaderHelper.useShader(ShaderHelper.doppleganger, RenderDoppleganger.defaultCallback);
|
||||
|
||||
|
||||
modelSkull.render(null, 0F, 0F, 0F, par5, 0F, 0.0625F);
|
||||
|
||||
|
||||
if(gaia)
|
||||
ShaderHelper.releaseShader();
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -12,20 +12,18 @@ package vazkii.botania.client.render.tile;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.client.model.ModelCocoon;
|
||||
import vazkii.botania.client.model.ModelTeruTeruBozu;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.tile.TileCocoon;
|
||||
import vazkii.botania.common.block.tile.TileTeruTeruBozu;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.client.model.ModelTeruTeruBozu;
|
||||
import vazkii.botania.common.Botania;
|
||||
|
||||
public class RenderTileTeruTeruBozu extends TileEntitySpecialRenderer {
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation(LibResources.MODEL_TERU_TERU_BOZU);
|
||||
@@ -33,8 +31,6 @@ public class RenderTileTeruTeruBozu extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) {
|
||||
TileTeruTeruBozu tile = (TileTeruTeruBozu) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
@@ -45,18 +41,18 @@ public class RenderTileTeruTeruBozu extends TileEntitySpecialRenderer {
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
GL11.glRotatef(180F, 1F, 0F, 0F);
|
||||
double time = Botania.proxy.getWorldElapsedTicks() + f;
|
||||
boolean hasWorld = tileentity.getWorldObj() != null;
|
||||
boolean hasWorld = tileentity.getWorldObj() != null;
|
||||
if(hasWorld)
|
||||
time += new Random(tileentity.xCoord ^ tileentity.yCoord ^ tileentity.zCoord).nextInt(1000);
|
||||
|
||||
GL11.glTranslatef(0.5F, -1.25F + (hasWorld ? ((float) Math.sin(time * 0.01F) * 0.05F) : 0F), -0.5F);
|
||||
|
||||
GL11.glTranslatef(0.5F, -1.25F + (hasWorld ? (float) Math.sin(time * 0.01F) * 0.05F : 0F), -0.5F);
|
||||
if(hasWorld) {
|
||||
GL11.glRotated(time * 0.3, 0F, 1F, 0F);
|
||||
GL11.glRotatef(4F * (float) Math.sin(time * 0.05F), 0F, 0F, 1F);
|
||||
float s = 0.75F;
|
||||
GL11.glScalef(s, s, s);
|
||||
GL11.glScalef(s, s, s);
|
||||
}
|
||||
|
||||
|
||||
model.render();
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
@@ -34,11 +34,9 @@ import vazkii.botania.client.core.handler.ContributorFancinessHandler;
|
||||
import vazkii.botania.client.core.helper.ShaderHelper;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.client.model.ModelTinyPotato;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.TileTinyPotato;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemFlightTiara;
|
||||
import vazkii.botania.common.item.equipment.tool.manasteel.ItemManasteelSword;
|
||||
import vazkii.botania.common.item.material.ItemManaResource;
|
||||
import vazkii.botania.common.item.relic.ItemInfiniteFruit;
|
||||
|
||||
@@ -59,7 +57,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
String name = potato.name.toLowerCase();
|
||||
|
||||
|
||||
boolean usedShader = false;
|
||||
if(name.startsWith("gaia ")) {
|
||||
ShaderHelper.useShader(ShaderHelper.doppleganger);
|
||||
@@ -81,7 +79,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
ShaderHelper.useShader(ShaderHelper.terraPlateRune);
|
||||
name = name.substring(6);
|
||||
usedShader = true;
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glTranslatef(0.5F, 1.5F, 0.5F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
@@ -110,7 +108,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
GL11.glTranslatef(0F, -2.625F, 0F);
|
||||
} else if(name.equals("aureylian"))
|
||||
GL11.glColor3f(1F, 0.5F, 1F);
|
||||
|
||||
|
||||
|
||||
boolean render = !(name.equals("mami") || name.equals("soaryn") || name.equals("eloraam") && jump != 0);
|
||||
if(render)
|
||||
@@ -122,7 +120,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
|
||||
if(usedShader)
|
||||
ShaderHelper.releaseShader();
|
||||
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
if(!name.isEmpty()) {
|
||||
@@ -295,7 +293,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
renderIcon(ModItems.manaRing.getIconFromDamage(0));
|
||||
GL11.glTranslatef(0F, 0F, -4F);
|
||||
renderIcon(ModItems.manaRing.getIconFromDamage(0));
|
||||
|
||||
|
||||
mc.renderEngine.bindTexture(TextureMap.locationBlocksTexture);
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
GL11.glTranslatef(1.5F, -0.5F, 0.7F);
|
||||
@@ -327,7 +325,7 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer {
|
||||
}
|
||||
|
||||
MinecraftForge.EVENT_BUS.post(new TinyPotatoRenderEvent(potato, potato.name, d0, d1, d2, var8));
|
||||
|
||||
|
||||
GL11.glRotatef(-rotZ, 0F, 0F, 1F);
|
||||
GL11.glRotatef(-rotY, 0F, 1F, 0F);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
|
||||
@@ -73,7 +73,7 @@ public class Botania {
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.postInit(event);
|
||||
}
|
||||
|
||||
|
||||
@EventHandler
|
||||
public void serverStarting(FMLServerAboutToStartEvent event) {
|
||||
proxy.serverAboutToStart(event);
|
||||
|
||||
@@ -33,7 +33,7 @@ public final class ModAchievements {
|
||||
public static Achievement daybloomPickup;
|
||||
public static Achievement cacophoniumCraft;
|
||||
public static Achievement manaPoolPickup;
|
||||
|
||||
|
||||
public static Achievement endoflamePickup;
|
||||
public static Achievement tinyPotatoPet;
|
||||
public static Achievement sparkCraft;
|
||||
@@ -44,32 +44,32 @@ public final class ModAchievements {
|
||||
public static Achievement manaCartCraft;
|
||||
public static Achievement enchanterMake;
|
||||
public static Achievement runePickup;
|
||||
|
||||
|
||||
public static Achievement dirtRodCraft;
|
||||
public static Achievement terraformRodCraft;
|
||||
public static Achievement manaBlasterShoot;
|
||||
public static Achievement pollidisiacPickup;
|
||||
public static Achievement brewPickup;
|
||||
public static Achievement terrasteelPickup;
|
||||
|
||||
|
||||
public static Achievement terrasteelWeaponCraft;
|
||||
public static Achievement elfPortalOpen;
|
||||
|
||||
|
||||
public static Achievement kekimurusPickup;
|
||||
public static Achievement heiseiDreamPickup;
|
||||
public static Achievement bubbellPickup;
|
||||
public static Achievement luminizerRide;
|
||||
|
||||
|
||||
public static Achievement enderAirMake;
|
||||
public static Achievement corporeaCraft;
|
||||
|
||||
|
||||
public static Achievement gaiaGuardianKill;
|
||||
|
||||
|
||||
public static Achievement spawnerMoverUse;
|
||||
public static Achievement tiaraWings;
|
||||
public static Achievement manaBombIgnite;
|
||||
public static Achievement dandelifeonPickup;
|
||||
|
||||
|
||||
public static Achievement signalFlareStun;
|
||||
public static Achievement l20ShardUse;
|
||||
public static Achievement gaiaGuardianNoArmor;
|
||||
@@ -129,7 +129,7 @@ public final class ModAchievements {
|
||||
tiaraWings = new AchievementMod(LibAchievementNames.TIARA_WINGS, -1, 8, ModItems.flightTiara, gaiaGuardianKill);
|
||||
manaBombIgnite = new AchievementMod(LibAchievementNames.MANA_BOMB_IGNITE, 0, 11, ModBlocks.manaBomb, gaiaGuardianKill);
|
||||
dandelifeonPickup = new AchievementMod(LibAchievementNames.DANDELIFEON_PICKUP, 0, 7, ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DANDELIFEON), gaiaGuardianKill);
|
||||
|
||||
|
||||
signalFlareStun = new AchievementMod(LibAchievementNames.SIGNAL_FLARE_STUN, -3, 1, ModItems.signalFlare, null).setSpecial();
|
||||
l20ShardUse = new AchievementMod(LibAchievementNames.L20_SHARD_USE, -5, 3, ModItems.laputaShard, null).setSpecial();
|
||||
gaiaGuardianNoArmor = new AchievementMod(LibAchievementNames.GAIA_GUARDIAN_NO_ARMOR, -5, 1, new ItemStack(Items.skull, 1, 3), null).setSpecial();
|
||||
|
||||
@@ -30,7 +30,7 @@ public class BlockCell extends BlockModContainer implements ILexiconable {
|
||||
setBlockName(LibBlockNames.CELL_BLOCK);
|
||||
setStepSound(soundTypeCloth);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList();
|
||||
|
||||
@@ -12,9 +12,6 @@ package vazkii.botania.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
@@ -32,10 +29,12 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.render.block.InterpolatedIcon;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockEnchantedSoil extends BlockMod implements ILexiconable {
|
||||
|
||||
@@ -59,7 +58,7 @@ public class BlockEnchantedSoil extends BlockMod implements ILexiconable {
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void loadTextures(TextureStitchEvent.Pre event) {
|
||||
@@ -67,7 +66,7 @@ public class BlockEnchantedSoil extends BlockMod implements ILexiconable {
|
||||
TextureAtlasSprite icon = new InterpolatedIcon("botania:enchantedSoil0");
|
||||
if(event.map.setTextureEntry("botania:enchantedSoil0", icon))
|
||||
blockIcon = icon;
|
||||
|
||||
|
||||
icon = new InterpolatedIcon("botania:enchantedSoil1");
|
||||
if(event.map.setTextureEntry("botania:enchantedSoil1", icon))
|
||||
iconSide = icon;
|
||||
|
||||
@@ -15,10 +15,8 @@ import net.minecraft.block.BlockSkull;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntitySkull;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.common.block.tile.TileGaiaHead;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.item.ModItems;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
@@ -31,37 +29,37 @@ public class BlockGaiaHead extends BlockSkull {
|
||||
public BlockGaiaHead() {
|
||||
setBlockName(LibBlockNames.GAIA_HEAD);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Block setBlockName(String par1Str) {
|
||||
GameRegistry.registerBlock(this, ItemBlockMod.class, par1Str);
|
||||
return super.setBlockName(par1Str);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) {
|
||||
return ModItems.gaiaHead;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World p_149643_1_, int p_149643_2_, int p_149643_3_, int p_149643_4_) {
|
||||
return 0;
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getItem(World p_149694_1_, int p_149694_2_, int p_149694_3_, int p_149694_4_) {
|
||||
return ModItems.gaiaHead;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister p_149651_1_) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDamageValue(World p_149643_1_, int p_149643_2_, int p_149643_3_, int p_149643_4_) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int p_149692_1_) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileGaiaHead();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int p_149692_1_) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileGaiaHead();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -85,7 +85,7 @@ public class BlockLightLauncher extends BlockMod implements ILexiconable {
|
||||
AxisAlignedBB aabb = AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1);
|
||||
List<Entity> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, aabb);
|
||||
entities.addAll(world.getEntitiesWithinAABB(EntityItem.class, aabb));
|
||||
|
||||
|
||||
if(!entities.isEmpty()) {
|
||||
for(Entity entity : entities) {
|
||||
TileLightRelay relay = relays.get(world.rand.nextInt(relays.size()));
|
||||
|
||||
@@ -152,12 +152,12 @@ public class BlockSparkChanger extends BlockModContainer implements ILexiconable
|
||||
|
||||
super.breakBlock(par1World, par2, par3, par4, par5, par6);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int s) {
|
||||
TileSparkChanger changer = (TileSparkChanger) world.getTileEntity(x, y, z);
|
||||
@@ -166,7 +166,7 @@ public class BlockSparkChanger extends BlockModContainer implements ILexiconable
|
||||
return 0;
|
||||
return stack.getItemDamage() + 1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileSparkChanger();
|
||||
|
||||
@@ -36,7 +36,7 @@ public class BlockTeruTeruBozu extends BlockModContainer implements ILexiconable
|
||||
float f = 0.25F;
|
||||
setBlockBounds(f, 0.01F, f, 1F - f, 0.99F, 1F - f);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity e) {
|
||||
if(!world.isRemote && e instanceof EntityItem) {
|
||||
@@ -49,7 +49,7 @@ public class BlockTeruTeruBozu extends BlockModContainer implements ILexiconable
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int s, float xs, float ys, float zs) {
|
||||
ItemStack stack = player.getCurrentEquippedItem();
|
||||
@@ -60,11 +60,11 @@ public class BlockTeruTeruBozu extends BlockModContainer implements ILexiconable
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean isSunflower(ItemStack stack) {
|
||||
return stack.getItem() == Item.getItemFromBlock(Blocks.double_plant) && stack.getItemDamage() == 0;
|
||||
}
|
||||
|
||||
|
||||
public boolean removeRain(World world) {
|
||||
if(world.isRaining()) {
|
||||
world.getWorldInfo().setRaining(false);
|
||||
@@ -72,37 +72,37 @@ public class BlockTeruTeruBozu extends BlockModContainer implements ILexiconable
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int s) {
|
||||
return world.isRaining() ? 15 : 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return Blocks.wool.getIcon(0, 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idTeruTeruBozu;
|
||||
|
||||
@@ -348,7 +348,7 @@ public final class ModBlocks {
|
||||
gaiaHead = new BlockGaiaHead();
|
||||
corporeaRetainer = new BlockCorporeaRetainer();
|
||||
teruTeruBozu = new BlockTeruTeruBozu();
|
||||
|
||||
|
||||
ModFluffBlocks.init();
|
||||
|
||||
for(int i = 0; i < 16; i++)
|
||||
@@ -493,7 +493,7 @@ public final class ModBlocks {
|
||||
registerSubTileWithMini(LibBlockNames.SUBTILE_BUBBELL, SubTileBubbell.class);
|
||||
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_SOLEGNOLIA, SubTileSolegnolia.class);
|
||||
}
|
||||
|
||||
|
||||
public static void registerMultiparts() {
|
||||
if(Loader.isModLoaded("ForgeMultipart")) {
|
||||
try {
|
||||
@@ -510,12 +510,12 @@ public final class ModBlocks {
|
||||
if(innerClazz.getSimpleName().equals("Mini"))
|
||||
BotaniaAPI.registerMiniSubTile(key + "Chibi", innerClazz, key);
|
||||
}
|
||||
|
||||
|
||||
private static void registerSubTileWithDecor(String key, Class<? extends SubTileEntity> clazz, Class<? extends SubTileEntity> decor) {
|
||||
BotaniaAPI.registerSubTile(key, clazz);
|
||||
BotaniaAPI.registerMiniSubTile(key + "Decor", decor, key);
|
||||
}
|
||||
|
||||
|
||||
private static void registerTile(Class<? extends TileEntity> clazz, String key) {
|
||||
GameRegistry.registerTileEntity(clazz, LibResources.PREFIX_MOD + key);
|
||||
}
|
||||
|
||||
@@ -179,14 +179,14 @@ public final class ModFluffBlocks {
|
||||
public static Block[] pavementStairs = new Block[BlockPavement.TYPES];
|
||||
public static Block[] pavementSlabs = new Block[BlockPavement.TYPES];
|
||||
public static Block[] pavementFullSlabs = new Block[BlockPavement.TYPES];
|
||||
|
||||
|
||||
public static Block endStoneSlab;
|
||||
public static Block endStoneSlabFull;
|
||||
public static Block endStoneStairs;
|
||||
public static Block enderBrickSlab;
|
||||
public static Block enderBrickSlabFull;
|
||||
public static Block enderBrickStairs;
|
||||
|
||||
|
||||
public static Block managlassPane;
|
||||
public static Block alfglassPane;
|
||||
public static Block bifrostPane;
|
||||
@@ -250,7 +250,7 @@ public final class ModFluffBlocks {
|
||||
biomeStoneB = new BlockBiomeStoneB();
|
||||
stone = new Block18Stone();
|
||||
pavement = new BlockPavement();
|
||||
|
||||
|
||||
if(ConfigHandler.darkQuartzEnabled) {
|
||||
darkQuartz = new BlockSpecialQuartz(LibBlockNames.QUARTZ_DARK);
|
||||
darkQuartzSlab = new BlockSpecialQuartzSlab(darkQuartz, false);
|
||||
@@ -308,7 +308,7 @@ public final class ModFluffBlocks {
|
||||
pavementSlabs[i] = new BlockPavementSlab(false, i, i);
|
||||
pavementFullSlabs[i] = new BlockPavementSlab(true, i, i);
|
||||
}
|
||||
|
||||
|
||||
endStoneSlab = new BlockEndStoneSlab(false);
|
||||
endStoneSlabFull = new BlockEndStoneSlab(true);
|
||||
endStoneStairs = new BlockEndStoneStairs();
|
||||
@@ -319,7 +319,7 @@ public final class ModFluffBlocks {
|
||||
managlassPane = new BlockManaglassPane();
|
||||
alfglassPane = new BlockAlfglassPane();
|
||||
bifrostPane = new BlockBifrostPane();
|
||||
|
||||
|
||||
if(ConfigHandler.darkQuartzEnabled) {
|
||||
((BlockModSlab) darkQuartzSlab).register();
|
||||
((BlockModSlab) darkQuartzSlabFull).register();
|
||||
@@ -388,7 +388,7 @@ public final class ModFluffBlocks {
|
||||
((BlockModSlab) stoneSlabs[i]).register();
|
||||
((BlockModSlab) stoneFullSlabs[i]).register();
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i < pavementSlabs.length; i++) {
|
||||
((BlockModSlab) pavementSlabs[i]).register();
|
||||
((BlockModSlab) pavementFullSlabs[i]).register();
|
||||
|
||||
@@ -89,12 +89,12 @@ public class BlockCorporeaCrystalCube extends BlockCorporeaBase implements ILexi
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.corporeaCrystalCube;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int s) {
|
||||
return ((TileCorporeaCrystalCube) world.getTileEntity(x, y, z)).compValue;
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BlockCorporeaRetainer extends BlockModContainer implements ILexicon
|
||||
setStepSound(soundTypeMetal);
|
||||
setBlockName(LibBlockNames.CORPOREA_RETAINER);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
boolean power = world.isBlockIndirectlyGettingPowered(x, y, z) || world.isBlockIndirectlyGettingPowered(x, y + 1, z);
|
||||
@@ -53,17 +53,17 @@ public class BlockCorporeaRetainer extends BlockModContainer implements ILexicon
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, int x, int y, int z, int s) {
|
||||
return ((TileCorporeaRetainer) world.getTileEntity(x, y, z)).hasPendingRequest() ? 15 : 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileCorporeaRetainer();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Achievement getAchievementOnCraft(ItemStack stack, EntityPlayer player, IInventory matrix) {
|
||||
return ModAchievements.corporeaCraft;
|
||||
|
||||
@@ -15,25 +15,16 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.client.render.block.InterpolatedIcon;
|
||||
import vazkii.botania.common.block.BlockMod;
|
||||
import vazkii.botania.common.item.block.ItemBlockWithMetadataAndName;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
package vazkii.botania.common.block.decor.panes;
|
||||
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class BlockAlfglassPane extends BlockModPane {
|
||||
|
||||
|
||||
@@ -10,16 +10,15 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.panes;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import vazkii.botania.client.render.block.InterpolatedIcon;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.botania.client.render.block.InterpolatedIcon;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockBifrostPane extends BlockModPane {
|
||||
|
||||
@@ -27,7 +26,7 @@ public class BlockBifrostPane extends BlockModPane {
|
||||
super(ModBlocks.bifrostPerm);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void loadTextures(TextureStitchEvent.Pre event) {
|
||||
@@ -37,7 +36,7 @@ public class BlockBifrostPane extends BlockModPane {
|
||||
iconTop = icon;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
package vazkii.botania.common.block.decor.panes;
|
||||
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public class BlockManaglassPane extends BlockModPane {
|
||||
|
||||
|
||||
@@ -10,31 +10,26 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.decor.panes;
|
||||
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockPane;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.core.BotaniaCreativeTab;
|
||||
import vazkii.botania.common.item.block.ItemBlockMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockModPane extends BlockPane {
|
||||
|
||||
Block source;
|
||||
public IIcon iconTop;
|
||||
|
||||
|
||||
public BlockModPane(Block source) {
|
||||
super("", "", Material.glass, false);
|
||||
this.source = source;
|
||||
@@ -49,41 +44,44 @@ public class BlockModPane extends BlockPane {
|
||||
GameRegistry.registerBlock(this, ItemBlockMod.class, par1Str);
|
||||
return super.setBlockName(par1Str);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
iconTop = IconHelper.forBlock(reg, this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 18;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderBlockPass() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_150097_e() {
|
||||
return source.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return side >= 2 ? iconTop : source.getIcon(side, meta);
|
||||
}
|
||||
|
||||
public boolean canPaneConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
return block == ModBlocks.elfGlass || block == ModBlocks.manaGlass || block == ModBlocks.bifrostPerm || super.canPaneConnectTo(world, x, y, z, dir);
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon func_150097_e() {
|
||||
return source.getIcon(0, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return side >= 2 ? iconTop : source.getIcon(side, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPaneConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
return block == ModBlocks.elfGlass || block == ModBlocks.manaGlass || block == ModBlocks.bifrostPerm || super.canPaneConnectTo(world, x, y, z, dir);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -50,7 +50,7 @@ public class BlockPool extends BlockModContainer implements IWandHUD, IWandable,
|
||||
boolean lastFragile = false;
|
||||
|
||||
public static IIcon manaIcon;
|
||||
|
||||
|
||||
public BlockPool() {
|
||||
super(Material.rock);
|
||||
setHardness(2.0F);
|
||||
|
||||
@@ -23,7 +23,6 @@ import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.BlockModContainer;
|
||||
import vazkii.botania.common.block.tile.TileTerraPlate;
|
||||
import vazkii.botania.common.block.tile.mana.TilePool;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
@@ -78,7 +77,7 @@ public class BlockTerraPlate extends BlockModContainer implements ILexiconable {
|
||||
public LexiconEntry getEntry(World world, int x, int y, int z, EntityPlayer player, ItemStack lexicon) {
|
||||
return LexiconData.terrasteel;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
return true;
|
||||
|
||||
@@ -10,8 +10,6 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.string;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockPistonBase;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -26,6 +24,8 @@ import vazkii.botania.client.core.helper.IconHelper;
|
||||
import vazkii.botania.common.block.BlockModContainer;
|
||||
import vazkii.botania.common.block.tile.string.TileRedString;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class BlockRedString extends BlockModContainer<TileRedString> implements ILexiconable {
|
||||
|
||||
|
||||
@@ -44,17 +44,17 @@ public class BlockRedStringInterceptor extends BlockRedString {
|
||||
public int isProvidingWeakPower(IBlockAccess world, int x, int y, int z, int side) {
|
||||
return (world.getBlockMetadata(x, y, z) & 8) == 0 ? 0 : 15;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random update) {
|
||||
world.setBlockMetadataWithNotify(x, y, z, world.getBlockMetadata(x, y, z) & -9, 1 | 2);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int tickRate(World p_149738_1_) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileRedString createNewTileEntity(World world, int meta) {
|
||||
return new TileRedStringInterceptor();
|
||||
|
||||
@@ -18,9 +18,9 @@ public class SubTileDecor extends SubTileEntity {
|
||||
public boolean canUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static class Daybloom extends SubTileDecor { }
|
||||
public static class Nightshade extends SubTileDecor { }
|
||||
public static class Hydroangeas extends SubTileDecor { }
|
||||
|
||||
|
||||
}
|
||||
@@ -12,7 +12,6 @@ package vazkii.botania.common.block.subtile.functional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class SubTileExoflame extends SubTileFunctional {
|
||||
|
||||
boolean did = false;
|
||||
int cost = 300;
|
||||
|
||||
|
||||
fireFurnaces : {
|
||||
for(int i = -RANGE; i < RANGE + 1; i++)
|
||||
for(int j = -RANGE_Y; j < RANGE_Y + 1; j++)
|
||||
@@ -70,7 +70,7 @@ public class SubTileExoflame extends SubTileFunctional {
|
||||
if(heatable.canSmelt() && mana > 2) {
|
||||
if(heatable.getBurnTime() == 0)
|
||||
heatable.boostBurnTime();
|
||||
mana = Math.max(0, mana - cost);
|
||||
mana = Math.max(0, mana - cost);
|
||||
if(ticksExisted % 2 == 0)
|
||||
heatable.boostCookTime();
|
||||
|
||||
|
||||
+2
-4
@@ -32,9 +32,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.subtile.ISpecialFlower;
|
||||
import vazkii.botania.api.subtile.ISubTileContainer;
|
||||
import vazkii.botania.api.subtile.RadiusDescriptor;
|
||||
import vazkii.botania.api.subtile.SubTileEntity;
|
||||
@@ -111,7 +109,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
blockToPlace = ReflectionHelper.getPrivateValue(ItemReed.class, (ItemReed) stackItem, LibObfuscation.REED_ITEM);
|
||||
else if(stackItem instanceof ItemRedstone)
|
||||
blockToPlace = Blocks.redstone_wire;
|
||||
|
||||
|
||||
if(blockToPlace != null) {
|
||||
ChunkCoordinates coords = validPositions.get(supertile.getWorldObj().rand.nextInt(validPositions.size()));
|
||||
if(blockToPlace.canPlaceBlockAt(supertile.getWorldObj(), coords.posX, coords.posY, coords.posZ)) {
|
||||
@@ -119,7 +117,7 @@ public class SubTileRannuncarpus extends SubTileFunctional {
|
||||
if(ConfigHandler.blockBreakParticles)
|
||||
supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(blockToPlace) + (stack.getItemDamage() << 12));
|
||||
validPositions.remove(coords);
|
||||
|
||||
|
||||
TileEntity tile = supertile.getWorldObj().getTileEntity(coords.posX, coords.posY, coords.posZ);
|
||||
if(tile != null && tile instanceof ISubTileContainer) {
|
||||
ISubTileContainer container = (ISubTileContainer) tile;
|
||||
|
||||
+9
-10
@@ -22,7 +22,6 @@ import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.tile.TileCell;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
import vazkii.botania.common.lib.LibLexicon;
|
||||
|
||||
public class SubTileDandelifeon extends SubTileGenerating {
|
||||
|
||||
@@ -58,7 +57,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
for(int j = 0; j < table[0].length; j++) {
|
||||
int gen = table[i][j];
|
||||
int adj = getAdjCells(table, i, j);
|
||||
|
||||
|
||||
int newVal = gen;
|
||||
if(adj < 2 || adj > 3)
|
||||
newVal = -1;
|
||||
@@ -68,15 +67,15 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
else if(gen > -1)
|
||||
newVal = gen + 1;
|
||||
}
|
||||
|
||||
|
||||
int xdist = Math.abs(i - RANGE);
|
||||
int zdist = Math.abs(j - RANGE);
|
||||
int allowDist = (newVal == 1 && gen == 0) ? 3 : 1;
|
||||
int allowDist = newVal == 1 && gen == 0 ? 3 : 1;
|
||||
if(xdist <= allowDist && zdist <= allowDist && newVal > -1) {
|
||||
gen = newVal;
|
||||
newVal = gen == 1 ? -1 : -2;
|
||||
}
|
||||
|
||||
|
||||
if(newVal != gen)
|
||||
changes.add(new int[] { i, j, newVal, gen });
|
||||
}
|
||||
@@ -90,7 +89,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
int pz = z - RANGE + change[1];
|
||||
int val = change[2];
|
||||
int old = change[3];
|
||||
|
||||
|
||||
setBlockForGeneration(px, y, pz, val, old);
|
||||
}
|
||||
}
|
||||
@@ -107,7 +106,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
for(int j = 0; j < diam; j++) {
|
||||
int px = x - RANGE + i;
|
||||
int pz = z - RANGE + j;
|
||||
table[i][j] = getCellGeneration(px, y, pz);
|
||||
table[i][j] = getCellGeneration(px, y, pz);
|
||||
}
|
||||
|
||||
return table;
|
||||
@@ -132,7 +131,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -147,7 +146,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
max = gen;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return max == -1 ? -1 : max + 1;
|
||||
}
|
||||
|
||||
@@ -191,7 +190,7 @@ public class SubTileDandelifeon extends SubTileGenerating {
|
||||
public int getColor() {
|
||||
return 0x9c0a7e;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public LexiconEntry getEntry() {
|
||||
return LexiconData.dandelifeon;
|
||||
|
||||
@@ -18,7 +18,6 @@ import java.util.List;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
-8
@@ -10,15 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.subtile.generating;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.botania.api.subtile.SubTileGenerating;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
|
||||
public class SubTilePassiveGenerating extends SubTileGenerating {
|
||||
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
*/
|
||||
package vazkii.botania.common.block.subtile.generating;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.init.Blocks;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lexicon.LexiconData;
|
||||
@@ -48,7 +46,7 @@ public class SubTileThermalily extends SubTileHydroangeas {
|
||||
public Material getMaterialToSearchFor() {
|
||||
return Material.lava;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void playSound() {
|
||||
supertile.getWorldObj().playSoundEffect(supertile.xCoord, supertile.yCoord, supertile.zCoord, "botania:thermalily", 0.2F, 1F);
|
||||
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
public class TileCell extends TileMod {
|
||||
|
||||
|
||||
private static final String TAG_GENERATION = "generation";
|
||||
private static final String TAG_TICKED = "ticked";
|
||||
private static final String TAG_FLOWER_X = "flowerX";
|
||||
@@ -24,17 +24,17 @@ public class TileCell extends TileMod {
|
||||
private static final String TAG_VALID_X = "validX";
|
||||
private static final String TAG_VALID_Y = "validY";
|
||||
private static final String TAG_VALID_Z = "validZ";
|
||||
|
||||
|
||||
private int generation;
|
||||
private boolean ticked;
|
||||
private ChunkCoordinates flowerCoords = new ChunkCoordinates();
|
||||
private ChunkCoordinates validCoords = new ChunkCoordinates();
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public void setGeneration(TileEntity flower, int gen) {
|
||||
generation = gen;
|
||||
if(!ticked) {
|
||||
@@ -48,15 +48,15 @@ public class TileCell extends TileMod {
|
||||
} else if(!matchCoords(validCoords, this) || !matchCoords(flowerCoords, flower))
|
||||
worldObj.setBlockToAir(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
|
||||
private boolean matchCoords(ChunkCoordinates coords, TileEntity tile) {
|
||||
return coords.posX == tile.xCoord && coords.posY == tile.yCoord && coords.posZ == tile.zCoord;
|
||||
}
|
||||
|
||||
|
||||
public int getGeneration() {
|
||||
return generation;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
cmp.setInteger(TAG_GENERATION, generation);
|
||||
@@ -70,7 +70,7 @@ public class TileCell extends TileMod {
|
||||
cmp.setInteger(TAG_VALID_Z, validCoords.posZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
generation = cmp.getInteger(TAG_GENERATION);
|
||||
@@ -84,5 +84,5 @@ public class TileCell extends TileMod {
|
||||
validCoords.posZ = cmp.getInteger(TAG_VALID_Z);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -14,7 +14,6 @@ import java.awt.Color;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -165,11 +164,11 @@ public class TileLightRelay extends TileMod implements IWandBindable {
|
||||
setDead();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
boolean isItem = riddenByEntity instanceof EntityItem;
|
||||
if(!isItem && ticksExisted % 30 == 0)
|
||||
worldObj.playSoundAtEntity(this, "botania:lightRelay", 0.2F, (float) Math.random() * 0.3F + 0.7F);
|
||||
|
||||
|
||||
int exitX = getExitX();
|
||||
int exitY = getExitY();
|
||||
int exitZ = getExitZ();
|
||||
|
||||
@@ -89,12 +89,12 @@ public class TileSpecialFlower extends TileMod implements IWandBindable, ISubTil
|
||||
}
|
||||
}
|
||||
|
||||
boolean special = isOnSpecialSoil();
|
||||
boolean special = isOnSpecialSoil();
|
||||
if(special) {
|
||||
subTile.overgrowth = true;
|
||||
if(subTile.isOvergrowthAffected()) {
|
||||
subTile.onUpdate();
|
||||
subTile.overgrowthBoost = true;
|
||||
subTile.overgrowthBoost = true;
|
||||
}
|
||||
}
|
||||
subTile.onUpdate();
|
||||
|
||||
@@ -13,7 +13,7 @@ package vazkii.botania.common.block.tile;
|
||||
public class TileTeruTeruBozu extends TileMod {
|
||||
|
||||
public boolean wasRaining = false;
|
||||
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
boolean isRaining = worldObj.isRaining();
|
||||
@@ -24,5 +24,5 @@ public class TileTeruTeruBozu extends TileMod {
|
||||
worldObj.func_147453_f(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
wasRaining = isRaining;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+8
-9
@@ -16,7 +16,6 @@ import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import vazkii.botania.api.corporea.CorporeaHelper;
|
||||
import vazkii.botania.api.corporea.ICorporeaInterceptor;
|
||||
import vazkii.botania.api.corporea.ICorporeaRequestor;
|
||||
import vazkii.botania.api.corporea.ICorporeaSpark;
|
||||
import vazkii.botania.api.internal.VanillaPacketDispatcher;
|
||||
@@ -26,7 +25,7 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
|
||||
private static final String TAG_REQUEST_TARGET = "requestTarget";
|
||||
private static final String TAG_ITEM_COUNT = "itemCount";
|
||||
|
||||
|
||||
private static final double LOG_2 = Math.log(2);
|
||||
|
||||
ItemStack requestTarget;
|
||||
@@ -71,7 +70,7 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
doCorporeaRequest(requestTarget, count, spark);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void updateCount() {
|
||||
if(worldObj.isRemote)
|
||||
return;
|
||||
@@ -84,13 +83,13 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
for(ItemStack stack : stacks)
|
||||
itemCount += stack.stackSize;
|
||||
}
|
||||
|
||||
|
||||
if(itemCount != oldCount) {
|
||||
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
|
||||
onUpdateCount();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void onUpdateCount() {
|
||||
compValue = getComparatorValue();
|
||||
worldObj.func_147453_f(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
@@ -118,7 +117,7 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
public int getSizeInventory() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
public int getComparatorValue() {
|
||||
if(itemCount == 0)
|
||||
return 0;
|
||||
@@ -139,8 +138,8 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
public void doCorporeaRequest(Object request, int count, ICorporeaSpark spark) {
|
||||
if(!(request instanceof ItemStack))
|
||||
return;
|
||||
|
||||
List<ItemStack> stacks = CorporeaHelper.requestItem((ItemStack) request, count, spark, true, true);
|
||||
|
||||
List<ItemStack> stacks = CorporeaHelper.requestItem(request, count, spark, true, true);
|
||||
spark.onItemsRequested(stacks);
|
||||
boolean did = false;
|
||||
for(ItemStack reqStack : stacks)
|
||||
@@ -150,7 +149,7 @@ public class TileCorporeaCrystalCube extends TileCorporeaBase implements ICorpor
|
||||
itemCount -= reqStack.stackSize;
|
||||
did = true;
|
||||
}
|
||||
|
||||
|
||||
if(did) {
|
||||
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
|
||||
onUpdateCount();
|
||||
|
||||
@@ -20,7 +20,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import vazkii.botania.api.corporea.CorporeaHelper;
|
||||
import vazkii.botania.api.corporea.ICorporeaInterceptor;
|
||||
import vazkii.botania.api.corporea.ICorporeaRequestor;
|
||||
import vazkii.botania.api.corporea.ICorporeaSpark;
|
||||
import vazkii.botania.common.core.helper.InventoryHelper;
|
||||
@@ -89,12 +88,12 @@ public class TileCorporeaFunnel extends TileCorporeaBase implements ICorporeaReq
|
||||
public void doCorporeaRequest(Object request, int count, ICorporeaSpark spark) {
|
||||
if(!(request instanceof ItemStack))
|
||||
return;
|
||||
|
||||
|
||||
IInventory inv = InventoryHelper.getInventory(worldObj, xCoord, yCoord - 1, zCoord);
|
||||
if(inv == null)
|
||||
inv = InventoryHelper.getInventory(worldObj, xCoord, yCoord - 2, zCoord);
|
||||
|
||||
List<ItemStack> stacks = CorporeaHelper.requestItem((ItemStack) request, count, spark, true, true);
|
||||
List<ItemStack> stacks = CorporeaHelper.requestItem(request, count, spark, true, true);
|
||||
spark.onItemsRequested(stacks);
|
||||
for(ItemStack reqStack : stacks)
|
||||
if(request != null) {
|
||||
|
||||
@@ -24,7 +24,6 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.ChatStyle;
|
||||
@@ -35,7 +34,6 @@ import org.apache.commons.lang3.text.WordUtils;
|
||||
|
||||
import vazkii.botania.api.corporea.CorporeaHelper;
|
||||
import vazkii.botania.api.corporea.ICorporeaAutoCompleteController;
|
||||
import vazkii.botania.api.corporea.ICorporeaInterceptor;
|
||||
import vazkii.botania.api.corporea.ICorporeaRequestor;
|
||||
import vazkii.botania.api.corporea.ICorporeaSpark;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
@@ -202,12 +200,12 @@ public class TileCorporeaIndex extends TileCorporeaBase implements ICorporeaRequ
|
||||
public String getInventoryName() {
|
||||
return LibBlockNames.CORPOREA_INDEX;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void doCorporeaRequest(Object request, int count, ICorporeaSpark spark) {
|
||||
if(!(request instanceof String))
|
||||
return;
|
||||
|
||||
|
||||
List<ItemStack> stacks = CorporeaHelper.requestItem((String) request, count, spark, true);
|
||||
spark.onItemsRequested(stacks);
|
||||
for(ItemStack stack : stacks)
|
||||
|
||||
+2
-2
@@ -59,14 +59,14 @@ public class TileCorporeaInterceptor extends TileCorporeaBase implements ICorpor
|
||||
if(missing > 0 && getBlockMetadata() == 0) {
|
||||
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 1, 1 | 2);
|
||||
worldObj.scheduleBlockUpdate(xCoord, yCoord, zCoord, getBlockType(), 2);
|
||||
|
||||
|
||||
TileEntity requestor = (TileEntity) source.getInventory();
|
||||
for(ForgeDirection dir : LibMisc.CARDINAL_DIRECTIONS) {
|
||||
TileEntity tile = worldObj.getTileEntity(xCoord + dir.offsetX, yCoord, zCoord + dir.offsetZ);
|
||||
if(tile != null && tile instanceof TileCorporeaRetainer)
|
||||
((TileCorporeaRetainer) tile).setPendingRequest(requestor.xCoord, requestor.yCoord, requestor.zCoord, request, count);
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import vazkii.botania.api.corporea.CorporeaHelper;
|
||||
import vazkii.botania.api.corporea.ICorporeaRequestor;
|
||||
import vazkii.botania.api.corporea.ICorporeaSpark;
|
||||
import vazkii.botania.common.block.tile.TileMod;
|
||||
import vazkii.botania.common.lib.LibBlockNames;
|
||||
|
||||
public class TileCorporeaRetainer extends TileMod {
|
||||
|
||||
@@ -33,16 +32,16 @@ public class TileCorporeaRetainer extends TileMod {
|
||||
private static final int REQUEST_NULL = 0;
|
||||
private static final int REQUEST_ITEMSTACK = 1;
|
||||
private static final int REQUEST_STRING = 2;
|
||||
|
||||
|
||||
boolean pendingRequest = false;
|
||||
int requestX, requestY, requestZ;
|
||||
Object request;
|
||||
int requestCount;
|
||||
|
||||
|
||||
public void setPendingRequest(int x, int y, int z, Object request, int requestCount) {
|
||||
if(pendingRequest)
|
||||
return;
|
||||
|
||||
|
||||
requestX = x;
|
||||
requestY = y;
|
||||
requestZ = z;
|
||||
@@ -51,15 +50,15 @@ public class TileCorporeaRetainer extends TileMod {
|
||||
pendingRequest = true;
|
||||
worldObj.func_147453_f(xCoord, yCoord, zCoord, worldObj.getBlock(xCoord, yCoord, zCoord));
|
||||
}
|
||||
|
||||
|
||||
public boolean hasPendingRequest() {
|
||||
return pendingRequest;
|
||||
}
|
||||
|
||||
|
||||
public void fulfilRequest() {
|
||||
if(!hasPendingRequest())
|
||||
return;
|
||||
|
||||
|
||||
ICorporeaSpark spark = CorporeaHelper.getSparkForBlock(worldObj, requestX, requestY, requestZ);
|
||||
if(spark != null) {
|
||||
IInventory inv = spark.getInventory();
|
||||
@@ -71,11 +70,11 @@ public class TileCorporeaRetainer extends TileMod {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writeCustomNBT(NBTTagCompound cmp) {
|
||||
super.writeCustomNBT(cmp);
|
||||
|
||||
|
||||
cmp.setBoolean(TAG_PENDING_REQUEST, pendingRequest);
|
||||
cmp.setInteger(TAG_REQUEST_X, requestX);
|
||||
cmp.setInteger(TAG_REQUEST_Y, requestY);
|
||||
@@ -85,7 +84,7 @@ public class TileCorporeaRetainer extends TileMod {
|
||||
if(request != null)
|
||||
reqType = request instanceof String ? REQUEST_STRING : REQUEST_ITEMSTACK;
|
||||
cmp.setInteger(TAG_REQUEST_TYPE, reqType);
|
||||
|
||||
|
||||
switch (reqType) {
|
||||
case REQUEST_STRING:
|
||||
cmp.setString(TAG_REQUEST_CONTENTS, (String) request);
|
||||
@@ -99,16 +98,16 @@ public class TileCorporeaRetainer extends TileMod {
|
||||
}
|
||||
cmp.setInteger(TAG_REQUEST_COUNT, requestCount);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readCustomNBT(NBTTagCompound cmp) {
|
||||
super.readCustomNBT(cmp);
|
||||
|
||||
|
||||
pendingRequest = cmp.getBoolean(TAG_PENDING_REQUEST);
|
||||
requestX = cmp.getInteger(TAG_REQUEST_X);
|
||||
requestY = cmp.getInteger(TAG_REQUEST_Y);
|
||||
requestZ = cmp.getInteger(TAG_REQUEST_Z);
|
||||
|
||||
|
||||
int reqType = cmp.getInteger(TAG_REQUEST_TYPE);
|
||||
switch (reqType) {
|
||||
case REQUEST_STRING:
|
||||
@@ -122,5 +121,5 @@ public class TileCorporeaRetainer extends TileMod {
|
||||
}
|
||||
requestCount = cmp.getInteger(TAG_REQUEST_COUNT);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class TileRedStringContainer extends TileRedString implements ISidedInven
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side) {
|
||||
IInventory inv = getInventory();
|
||||
return inv instanceof ISidedInventory ? ((ISidedInventory) inv).getAccessibleSlotsFromSide(side) : inv instanceof IInventory ? InventoryHelper.buildSlotsForLinearInventory((IInventory) inv) : new int[0];
|
||||
return inv instanceof ISidedInventory ? ((ISidedInventory) inv).getAccessibleSlotsFromSide(side) : inv instanceof IInventory ? InventoryHelper.buildSlotsForLinearInventory(inv) : new int[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,7 +131,7 @@ public class TileRedStringContainer extends TileRedString implements ISidedInven
|
||||
TileEntity tile = getTileAtBinding();
|
||||
if(tile == null || !(tile instanceof IInventory))
|
||||
return null;
|
||||
|
||||
|
||||
return InventoryHelper.getInventory((IInventory) tile);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@ import net.minecraft.world.World;
|
||||
public class TileRedStringInterceptor extends TileRedString {
|
||||
|
||||
public static List<TileRedStringInterceptor> interceptors = new ArrayList();
|
||||
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
|
||||
|
||||
if(!interceptors.contains(this))
|
||||
interceptors.add(this);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean acceptBlock(int x, int y, int z) {
|
||||
return worldObj.getTileEntity(x, y, z) != null;
|
||||
@@ -38,17 +38,17 @@ public class TileRedStringInterceptor extends TileRedString {
|
||||
public boolean removeFromList() {
|
||||
return !tileEntityInvalid && worldObj.getTileEntity(xCoord, yCoord, zCoord) == this;
|
||||
}
|
||||
|
||||
|
||||
public static void onInteract(EntityPlayer player, World world, int x, int y, int z) {
|
||||
List<TileRedStringInterceptor> remove = new ArrayList();
|
||||
boolean did = false;
|
||||
|
||||
|
||||
for(TileRedStringInterceptor inter : interceptors) {
|
||||
if(!inter.removeFromList()) {
|
||||
remove.add(inter);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if(inter.worldObj == world) {
|
||||
ChunkCoordinates coords = inter.getBinding();
|
||||
if(coords != null && coords.posX == x && coords.posY == y && coords.posZ == z) {
|
||||
@@ -58,12 +58,12 @@ public class TileRedStringInterceptor extends TileRedString {
|
||||
world.setBlockMetadataWithNotify(inter.xCoord, inter.yCoord, inter.zCoord, meta | 8, 1 | 2);
|
||||
world.scheduleBlockUpdate(inter.xCoord, inter.yCoord, inter.zCoord, block, block.tickRate(world));
|
||||
}
|
||||
|
||||
|
||||
did = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
interceptors.removeAll(remove);
|
||||
if(did) {
|
||||
if(world.isRemote)
|
||||
|
||||
@@ -157,7 +157,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModFluffBlocks.managlassPane);
|
||||
addBlock(ModBlocks.elfGlass);
|
||||
addBlock(ModFluffBlocks.alfglassPane);
|
||||
|
||||
|
||||
addItem(ModItems.glassPick);
|
||||
addItem(ModItems.manasteelPick);
|
||||
addItem(ModItems.manasteelShovel);
|
||||
@@ -326,7 +326,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModFluffBlocks.snowBrickSlab);
|
||||
addBlock(ModFluffBlocks.tileStairs);
|
||||
addBlock(ModFluffBlocks.tileSlab);
|
||||
|
||||
|
||||
addBlock(ModFluffBlocks.livingwoodStairs);
|
||||
addBlock(ModFluffBlocks.livingwoodSlab);
|
||||
addBlock(ModFluffBlocks.livingwoodWall);
|
||||
@@ -377,7 +377,7 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
addBlock(ModFluffBlocks.stoneSlabs[i]);
|
||||
addBlock(ModFluffBlocks.stoneWall);
|
||||
}
|
||||
|
||||
|
||||
addBlock(ModFluffBlocks.biomeStoneA);
|
||||
addBlock(ModFluffBlocks.biomeStoneB);
|
||||
for(int i = 0; i < 24; i++)
|
||||
@@ -385,12 +385,12 @@ public final class BotaniaCreativeTab extends CreativeTabs {
|
||||
for(int i = 0; i < 24; i++)
|
||||
addBlock(ModFluffBlocks.biomeStoneSlabs[i]);
|
||||
addBlock(ModFluffBlocks.biomeStoneWall);
|
||||
|
||||
|
||||
addBlock(ModFluffBlocks.pavement);
|
||||
for(int i = 0; i < ModFluffBlocks.pavementStairs.length; i++)
|
||||
addBlock(ModFluffBlocks.pavementStairs[i]);
|
||||
for(int i = 0; i < ModFluffBlocks.pavementSlabs.length; i++)
|
||||
addBlock(ModFluffBlocks.pavementSlabs[i]);
|
||||
for (Block pavementStair : ModFluffBlocks.pavementStairs)
|
||||
addBlock(pavementStair);
|
||||
for (Block pavementSlab : ModFluffBlocks.pavementSlabs)
|
||||
addBlock(pavementSlab);
|
||||
|
||||
if(ConfigHandler.enderStuff19Enabled) {
|
||||
addBlock(ModBlocks.endStoneBrick);
|
||||
|
||||
@@ -33,7 +33,7 @@ public class BiomeDecorationHandler {
|
||||
|
||||
if(!flowers)
|
||||
return;
|
||||
|
||||
|
||||
int dist = Math.min(8, Math.max(1, ConfigHandler.flowerPatchSize));
|
||||
for(int i = 0; i < ConfigHandler.flowerQuantity; i++) {
|
||||
if(event.rand.nextInt(ConfigHandler.flowerPatchChance) == 0) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public final class ConfigHandler {
|
||||
private static final String CATEGORY_POTIONS = "potions";
|
||||
|
||||
public static final int hardcorePassiveGeneration = 72000;
|
||||
|
||||
|
||||
public static boolean useShaders = true;
|
||||
public static boolean lexiconRotatingItems = true;
|
||||
public static boolean lexiconJustifiedText = false;
|
||||
@@ -75,7 +75,7 @@ public final class ConfigHandler {
|
||||
|
||||
private static boolean verifiedPotionArray = false;
|
||||
private static int potionArrayLimit = 0;
|
||||
|
||||
|
||||
public static int potionIDSoulCross = 91;
|
||||
public static int potionIDFeatherfeet = 92;
|
||||
public static int potionIDEmptiness = 93;
|
||||
@@ -248,7 +248,7 @@ public final class ConfigHandler {
|
||||
public static int loadPropPotionId(String propName, int default_) {
|
||||
if(!verifiedPotionArray)
|
||||
verifyPotionArray();
|
||||
|
||||
|
||||
Property prop = config.get(CATEGORY_POTIONS, propName, default_);
|
||||
int val = prop.getInt(default_);
|
||||
if(val > potionArrayLimit) {
|
||||
@@ -258,7 +258,7 @@ public final class ConfigHandler {
|
||||
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
private static void verifyPotionArray() {
|
||||
if(Loader.isModLoaded("DragonAPI"))
|
||||
potionArrayLimit = Potion.potionTypes.length;
|
||||
|
||||
@@ -172,7 +172,7 @@ public class CommonProxy {
|
||||
FMLCommonHandler.instance().exitJava(1, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
event.registerServerCommand(new CommandDownloadLatest());
|
||||
event.registerServerCommand(new CommandShare());
|
||||
|
||||
@@ -14,8 +14,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -26,8 +24,10 @@ import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.client.lib.LibRenderIDs;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.block.ModFluffBlocks;
|
||||
@@ -298,7 +298,7 @@ public final class ModCraftingRecipes {
|
||||
public static IRecipe recipeCellBlock;
|
||||
public static IRecipe recipeCorporeaRetainer;
|
||||
public static IRecipe recipeTeruTeruBozu;
|
||||
|
||||
|
||||
// Garden of Glass
|
||||
public static IRecipe recipeRootToSapling;
|
||||
public static IRecipe recipeRootToFertilizer;
|
||||
@@ -309,7 +309,7 @@ public final class ModCraftingRecipes {
|
||||
|
||||
public static void init() {
|
||||
int recipeListSize = CraftingManager.getInstance().getRecipeList().size();
|
||||
|
||||
|
||||
// Lexicon Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.lexicon), "treeSapling", Items.book);
|
||||
recipeLexicon = BotaniaAPI.getLatestAddedRecipe();
|
||||
@@ -1447,7 +1447,7 @@ public final class ModCraftingRecipes {
|
||||
'S', LibOreDict.RED_STRING,
|
||||
'M', new ItemStack(ModBlocks.spreader));
|
||||
recipeRedStringRelay = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Red String Interceptor Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.redStringInterceptor),
|
||||
"RRR", "RMS", "RRR",
|
||||
@@ -1991,7 +1991,7 @@ public final class ModCraftingRecipes {
|
||||
// Manufactory Halo Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.autocraftingHalo), new ItemStack(ModItems.craftingHalo), LibOreDict.MANA_DIAMOND);
|
||||
recipeAutocraftingHalo = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Pavement Recipes
|
||||
addShapelessOreDictRecipe(new ItemStack(ModFluffBlocks.pavement, 3, 0), LibOreDict.LIVING_ROCK, "cobblestone", "gravel");
|
||||
addShapelessOreDictRecipe(new ItemStack(ModFluffBlocks.pavement, 3, 1), LibOreDict.LIVING_ROCK, "cobblestone", "gravel", new ItemStack(Items.coal));
|
||||
@@ -2000,22 +2000,22 @@ public final class ModCraftingRecipes {
|
||||
addShapelessOreDictRecipe(new ItemStack(ModFluffBlocks.pavement, 3, 4), LibOreDict.LIVING_ROCK, "cobblestone", "gravel", new ItemStack(Items.wheat));
|
||||
addShapelessOreDictRecipe(new ItemStack(ModFluffBlocks.pavement, 3, 5), LibOreDict.LIVING_ROCK, "cobblestone", "gravel", new ItemStack(Items.slime_ball));
|
||||
recipesPavement = BotaniaAPI.getLatestAddedRecipes(6);
|
||||
|
||||
|
||||
// Cellular Block Recipe
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(ModBlocks.cellBlock, 3), new ItemStack(Blocks.cactus), new ItemStack(Blocks.cactus), new ItemStack(Blocks.cactus), new ItemStack(Blocks.cactus), new ItemStack(Items.carrot), new ItemStack(Items.potato));
|
||||
recipeCellBlock = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Corporea Retainer Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModBlocks.corporeaRetainer), new ItemStack(Blocks.chest), new ItemStack(ModItems.corporeaSpark));
|
||||
recipeCorporeaRetainer = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Teru Teru Bozu Recipe
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.teruTeruBozu),
|
||||
"C", "C", "S",
|
||||
'C', LibOreDict.MANAWEAVE_CLOTH,
|
||||
'S', new ItemStack(Blocks.double_plant));
|
||||
recipeTeruTeruBozu = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Storage Block/Nugget Recipes
|
||||
@@ -2095,7 +2095,7 @@ public final class ModCraftingRecipes {
|
||||
addPane(ModBlocks.manaGlass, ModFluffBlocks.managlassPane);
|
||||
addPane(ModBlocks.elfGlass, ModFluffBlocks.alfglassPane);
|
||||
addPane(ModBlocks.bifrostPerm, ModFluffBlocks.bifrostPane);
|
||||
|
||||
|
||||
// Biome Stone Recipes
|
||||
for(int i = 0; i < 8; i++) {
|
||||
GameRegistry.addSmelting(new ItemStack(ModFluffBlocks.biomeStoneA, 1, i + 8), new ItemStack(ModFluffBlocks.biomeStoneA, 1, i), 0.1F);
|
||||
@@ -2115,14 +2115,14 @@ public final class ModCraftingRecipes {
|
||||
// Pavement Stairsm & Stairs
|
||||
for(int i = 0; i < ModFluffBlocks.pavementStairs.length; i++)
|
||||
addStairsAndSlabs(ModFluffBlocks.pavement, i, ModFluffBlocks.pavementStairs[i], ModFluffBlocks.pavementSlabs[i]);
|
||||
|
||||
|
||||
// Misc Recipes
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.reeds, 9, 0), new ItemStack(ModBlocks.reedBlock));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.wheat, 4, 0), new ItemStack(ModBlocks.thatch));
|
||||
|
||||
if(Botania.gardenOfGlassLoaded)
|
||||
initGardenOfGlass();
|
||||
|
||||
|
||||
int newRecipeListSize = CraftingManager.getInstance().getRecipeList().size();
|
||||
FMLLog.log(Level.INFO, "[Botania] Registered %d recipes.", newRecipeListSize - recipeListSize);
|
||||
}
|
||||
@@ -2182,7 +2182,7 @@ public final class ModCraftingRecipes {
|
||||
"BBB", "BBB",
|
||||
'B', new ItemStack(block, 1, blockMeta));
|
||||
}
|
||||
|
||||
|
||||
private static void addPane(Block block, Block pane) {
|
||||
GameRegistry.addRecipe(new ItemStack(pane, 16),
|
||||
"BBB", "BBB",
|
||||
|
||||
@@ -92,7 +92,7 @@ public final class ModPetalRecipes {
|
||||
narslimmusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_NARSLIMMUS), lime, limeMana, green, greenMana, black, runeSummer, runeWater);
|
||||
spectrolusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_SPECTROLUS), redMana, orangeMana, yellowMana, greenMana, blueMana, cyanMana, purpleMana, white, runeWinter, runeAir, pixieDust);
|
||||
dandelifeonRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DANDELIFEON), purpleMana, purpleMana, limeMana, greenMana, runeWater, runeFire, runeEarth, runeAir, gaiaSpirit);
|
||||
|
||||
|
||||
jadedAmaranthusRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_JADED_AMARANTHUS), purpleMana, purpleMana, lime, purple, green, runeSpring, redstoneRoot);
|
||||
bellethorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BELLETHORN), redMana, redMana, cyan, cyan, red, redstoneRoot);
|
||||
dreadthorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DREADTHORN), blackMana, purpleMana, cyan, cyan, black, purple, redstoneRoot);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class EntityPinkWither extends EntityWither {
|
||||
if(!player.isSneaking()) {
|
||||
player.mountEntity(this);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ import net.minecraft.entity.projectile.EntityThrowable;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
@@ -110,12 +109,12 @@ public class EntityThornChakram extends EntityThrowable {
|
||||
protected void onImpact(MovingObjectPosition pos) {
|
||||
if(noClip)
|
||||
return;
|
||||
|
||||
|
||||
Block block = worldObj.getBlock(pos.blockX, pos.blockY, pos.blockZ);
|
||||
TileEntity tile = worldObj.getTileEntity(pos.blockX, pos.blockY, pos.blockZ);
|
||||
worldObj.getTileEntity(pos.blockX, pos.blockY, pos.blockZ);
|
||||
if(block instanceof BlockBush || block instanceof BlockLeaves)
|
||||
return;
|
||||
|
||||
|
||||
boolean fire = isFire();
|
||||
EntityLivingBase thrower = getThrower();
|
||||
if(pos.entityHit != null && pos.entityHit instanceof EntityLivingBase && pos.entityHit != thrower) {
|
||||
|
||||
@@ -58,19 +58,14 @@ public class MultipartHandler {
|
||||
List<ItemStack> stacks = new ArrayList();
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
block.getSubBlocks(item, block.getCreativeTabToDisplayOn(), stacks);
|
||||
|
||||
for(ItemStack stack : stacks)
|
||||
|
||||
for(ItemStack stack : stacks)
|
||||
if(stack.getItem() == item)
|
||||
registerMultipart(block, stack.getItemDamage());
|
||||
}
|
||||
|
||||
private static void registerMultipartMetadataLine(Block block, int maxMeta) {
|
||||
for(int i = 0; i < maxMeta; i++)
|
||||
registerMultipart(block, i);
|
||||
}
|
||||
|
||||
private static void registerMultipart(Block block, int meta) {
|
||||
MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, meta), block.getUnlocalizedName() + (meta == 0 ? "" : "_" + meta));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -22,27 +22,27 @@ import vazkii.botania.common.lib.LibItemNames;
|
||||
public class ItemAutocraftingHalo extends ItemCraftingHalo {
|
||||
|
||||
private static final ResourceLocation glowTexture = new ResourceLocation(LibResources.MISC_GLOW_CYAN);
|
||||
|
||||
|
||||
public ItemAutocraftingHalo() {
|
||||
super(LibItemNames.AUTOCRAFTING_HALO);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int pos, boolean equipped) {
|
||||
super.onUpdate(stack, world, entity, pos, equipped);
|
||||
|
||||
|
||||
if(entity instanceof EntityPlayer && !equipped) {
|
||||
EntityPlayer player = (EntityPlayer) entity;
|
||||
IInventory inv = getFakeInv(player);
|
||||
|
||||
for(int i = 1; i < SEGMENTS; i++)
|
||||
tryCraft(player, stack, i, false, inv, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ResourceLocation getGlowResource() {
|
||||
return glowTexture;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -191,8 +191,8 @@ public class ItemBlackHoleTalisman extends ItemMod implements IBlockProvider {
|
||||
Block block = getBlock(par1ItemStack);
|
||||
int meta = getBlockMeta(par1ItemStack);
|
||||
ItemStack stack = new ItemStack(block, 1, meta);
|
||||
|
||||
return super.getItemStackDisplayName(par1ItemStack) + ((stack == null || stack.getItem() == null) ? "" : " (" + EnumChatFormatting.GREEN + stack.getDisplayName() + EnumChatFormatting.RESET + ")");
|
||||
|
||||
return super.getItemStackDisplayName(par1ItemStack) + (stack == null || stack.getItem() == null ? "" : " (" + EnumChatFormatting.GREEN + stack.getDisplayName() + EnumChatFormatting.RESET + ")");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ItemBottledMana extends ItemMod {
|
||||
player.addPotionEffect(new PotionEffect(Potion.resistance.id, 300, 5));
|
||||
player.motionY = 6;
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
case 5 : { // Randomly set HP
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
FMLCommonHandler.instance().bus().register(this);
|
||||
}
|
||||
|
||||
|
||||
public ItemCraftingHalo(String name) {
|
||||
setUnlocalizedName(name);
|
||||
setMaxStackSize(1);
|
||||
@@ -105,7 +105,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
||||
public static IInventory getFakeInv(EntityPlayer player) {
|
||||
GenericInventory tempInv = new GenericInventory("temp", false, player.inventory.getSizeInventory() - 4);
|
||||
tempInv.copyFrom(player.inventory);
|
||||
@@ -130,7 +130,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
ItemStack itemForPos = getItemForSlot(stack, slot);
|
||||
if(itemForPos == null)
|
||||
return;
|
||||
|
||||
|
||||
ItemStack[] recipe = getCraftingItems(stack, slot);
|
||||
if(validate)
|
||||
recipe = validateRecipe(player, stack, recipe, slot);
|
||||
@@ -164,7 +164,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
|
||||
if(recipe[9].stackSize != InventoryHelper.testInventoryInsertion(inv, recipe[9], ForgeDirection.UNKNOWN))
|
||||
return false;
|
||||
|
||||
|
||||
return consumeRecipeIngredients(recipe, inv, null);
|
||||
}
|
||||
|
||||
@@ -173,9 +173,9 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
if(!player.inventory.addItemStackToInventory(recipe[9]))
|
||||
player.dropPlayerItemWithRandomChoice(recipe[9], false);
|
||||
|
||||
if(!particles)
|
||||
if(!particles)
|
||||
return;
|
||||
|
||||
|
||||
Vec3 lookVec3 = player.getLookVec();
|
||||
Vector3 centerVector = Vector3.fromEntityCenter(player).add(lookVec3.xCoord * 3, 1.3, lookVec3.zCoord * 3);
|
||||
float m = 0.1F;
|
||||
@@ -517,7 +517,7 @@ public class ItemCraftingHalo extends ItemMod implements ICraftAchievement {
|
||||
public ResourceLocation getGlowResource() {
|
||||
return glowTexture;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void renderHUD(ScaledResolution resolution, EntityPlayer player, ItemStack stack) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
@@ -10,21 +10,14 @@
|
||||
*/
|
||||
package vazkii.botania.common.item;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import net.minecraft.block.BlockSkull;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntitySkull;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import vazkii.botania.common.block.ModBlocks;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
|
||||
@@ -90,7 +83,7 @@ public class ItemGaiaHead extends ItemMod {
|
||||
|
||||
if (p_77648_7_ == 1)
|
||||
{
|
||||
i1 = MathHelper.floor_double((double)(p_77648_2_.rotationYaw * 16.0F / 360.0F) + 0.5D) & 15;
|
||||
i1 = MathHelper.floor_double(p_77648_2_.rotationYaw * 16.0F / 360.0F + 0.5D) & 15;
|
||||
}
|
||||
|
||||
TileEntity tileentity = p_77648_3_.getTileEntity(p_77648_4_, p_77648_5_, p_77648_6_);
|
||||
|
||||
@@ -78,7 +78,7 @@ public class ItemManaGun extends ItemMod implements IManaUsingItem {
|
||||
PotionEffect effect = par3EntityPlayer.getActivePotionEffect(Potion.digSpeed);
|
||||
if(effect != null)
|
||||
effCd -= (effect.getAmplifier() + 1) * 8;
|
||||
|
||||
|
||||
if(par3EntityPlayer.isSneaking() && hasClip(par1ItemStack)) {
|
||||
rotatePos(par1ItemStack);
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.click", 0.6F, (1.0F + (par2World.rand.nextFloat() - par2World.rand.nextFloat()) * 0.2F) * 0.7F);
|
||||
|
||||
@@ -412,7 +412,7 @@ public final class ModItems {
|
||||
manaweaveBoots = new ItemManaweaveBoots();
|
||||
autocraftingHalo = new ItemAutocraftingHalo();
|
||||
gaiaHead = new ItemGaiaHead();
|
||||
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal, 1, i));
|
||||
|
||||
@@ -193,5 +193,5 @@ public abstract class ItemBrewBase extends ItemMod implements IBrewItem, IPickup
|
||||
public Achievement getAchievementOnPickup(ItemStack stack, EntityPlayer player, EntityItem item) {
|
||||
return ModAchievements.brewPickup;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class ItemMagnetRing extends ItemBauble {
|
||||
if(canPullItem(item)) {
|
||||
if(pulled > 200)
|
||||
break;
|
||||
|
||||
|
||||
MathHelper.setEntityMotionFromVector(item, new Vector3(x, y, z), 0.45F);
|
||||
if(player.worldObj.isRemote) {
|
||||
boolean red = player.worldObj.rand.nextBoolean();
|
||||
|
||||
@@ -22,7 +22,6 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
@@ -40,11 +39,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosmeticBauble {
|
||||
|
||||
private static final String[] NOTES = new String[] {
|
||||
"F#", "G", "G#", "A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#",
|
||||
"F#", "G", "G#", "A", "A#", "B", "C", "C#", "D", "D#", "E", "F", "F#"
|
||||
};
|
||||
|
||||
public ItemMonocle() {
|
||||
super(LibItemNames.MONOCLE);
|
||||
}
|
||||
@@ -71,7 +65,7 @@ public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosm
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, itemIcon.getIconWidth(), itemIcon.getIconHeight(), 1F / 16F);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void renderHUD(ScaledResolution resolution, EntityPlayer player) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
@@ -80,11 +74,11 @@ public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosm
|
||||
return;
|
||||
Block block = player.worldObj.getBlock(pos.blockX, pos.blockY, pos.blockZ);
|
||||
int meta = player.worldObj.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ);
|
||||
TileEntity tile = player.worldObj.getTileEntity(pos.blockX, pos.blockY, pos.blockZ);
|
||||
|
||||
player.worldObj.getTileEntity(pos.blockX, pos.blockY, pos.blockZ);
|
||||
|
||||
ItemStack dispStack = null;
|
||||
String text = "";
|
||||
|
||||
|
||||
if(block == Blocks.redstone_wire) {
|
||||
dispStack = new ItemStack(Items.redstone);
|
||||
text = EnumChatFormatting.RED + "" + meta;
|
||||
@@ -93,22 +87,22 @@ public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosm
|
||||
text = "" + (((meta & 12) >> 2) + 1);
|
||||
} else if(block == Blocks.unpowered_comparator || block == Blocks.powered_comparator) {
|
||||
dispStack = new ItemStack(Items.comparator);
|
||||
text = ((meta & 4) == 4) ? "-" : "+";
|
||||
text = (meta & 4) == 4 ? "-" : "+";
|
||||
}
|
||||
|
||||
|
||||
if(dispStack == null)
|
||||
return;
|
||||
|
||||
|
||||
int x = resolution.getScaledWidth() / 2 + 15;
|
||||
int y = resolution.getScaledHeight() / 2 - 8;
|
||||
|
||||
|
||||
net.minecraft.client.renderer.RenderHelper.enableGUIStandardItemLighting();
|
||||
RenderItem.getInstance().renderItemAndEffectIntoGUI(mc.fontRenderer, mc.renderEngine, dispStack, x, y);
|
||||
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
|
||||
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(text, x + 20, y + 4, 0xFFFFFF);
|
||||
}
|
||||
|
||||
|
||||
public static boolean hasMonocle(EntityPlayer player) {
|
||||
for(int i = 0; i < 4; i++) {
|
||||
ItemStack stack = PlayerHandler.getPlayerBaubles(player).getStackInSlot(i);
|
||||
@@ -116,7 +110,7 @@ public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosm
|
||||
Item item = stack.getItem();
|
||||
if(item instanceof IBurstViewerBauble)
|
||||
return true;
|
||||
|
||||
|
||||
if(item instanceof ICosmeticAttachable) {
|
||||
ICosmeticAttachable attach = (ICosmeticAttachable) item;
|
||||
ItemStack cosmetic = attach.getCosmeticItem(stack);
|
||||
@@ -125,7 +119,7 @@ public class ItemMonocle extends ItemBauble implements IBurstViewerBauble, ICosm
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
public class ItemInfiniteFruit extends ItemRelic implements IManaUsingItem {
|
||||
|
||||
public static IIcon dasBootIcon;
|
||||
|
||||
|
||||
public ItemInfiniteFruit() {
|
||||
super(LibItemNames.INFINITE_FRUIT);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class ItemInfiniteFruit extends ItemRelic implements IManaUsingItem {
|
||||
ReflectionHelper.setPrivateValue(EntityPlayer.class, player, 20, LibObfuscation.ITEM_IN_USE_COUNT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -76,7 +76,7 @@ public class ItemInfiniteFruit extends ItemRelic implements IManaUsingItem {
|
||||
public IIcon getIconIndex(ItemStack par1ItemStack) {
|
||||
return isBoot(par1ItemStack) ? dasBootIcon : super.getIconIndex(par1ItemStack);
|
||||
}
|
||||
|
||||
|
||||
private boolean isBoot(ItemStack par1ItemStack) {
|
||||
String name = par1ItemStack.getDisplayName().toLowerCase().trim();
|
||||
return name.equals("das boot");
|
||||
|
||||
@@ -22,7 +22,6 @@ import vazkii.botania.api.lexicon.LexiconCategory;
|
||||
import vazkii.botania.api.lexicon.LexiconEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconPage;
|
||||
import vazkii.botania.api.lexicon.LexiconRecipeMappings;
|
||||
import vazkii.botania.api.lexicon.multiblock.Multiblock;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.achievement.ModAchievements;
|
||||
@@ -534,7 +533,7 @@ public final class LexiconData {
|
||||
|
||||
passiveGen = new BLexiconEntry(LibLexicon.GFLOWER_PASSIVE_GENERATION, categoryGenerationFlowers);
|
||||
passiveGen.setPriority().setLexiconPages(new PageText("0"), new PageText("1")).setIcon(new ItemStack(Blocks.deadbush));
|
||||
|
||||
|
||||
daybloom = new BLexiconEntry(LibLexicon.GFLOWER_DAYBLOOM, categoryGenerationFlowers);
|
||||
daybloom.setPriority().setLexiconPages(new PageText("0"), new PageText(ConfigHandler.hardcorePassiveGeneration > 0 ? "1a" : "1"), new PageImage("3", LibResources.ENTRY_DIMINISHING_RETURNS), new PagePetalRecipe("2", ModPetalRecipes.daybloomRecipe), new PageText("4"), new PageText("5"));
|
||||
|
||||
@@ -573,7 +572,7 @@ public final class LexiconData {
|
||||
|
||||
dandelifeon = new ALexiconEntry(LibLexicon.GFLOWER_DANDELIFEON, categoryGenerationFlowers);
|
||||
dandelifeon.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageText("3"), new PageText("4"), new PageText("5"), new PageText("6"), new PageText("10"), new PageText("7"), new PagePetalRecipe("8", ModPetalRecipes.dandelifeonRecipe), new PageCraftingRecipe("9", ModCraftingRecipes.recipeCellBlock));
|
||||
|
||||
|
||||
// DEVICES ENTRIES
|
||||
pylon = new BLexiconEntry(LibLexicon.DEVICE_PYLON, categoryDevices);
|
||||
pylon.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipePylon));
|
||||
@@ -661,7 +660,7 @@ public final class LexiconData {
|
||||
|
||||
teruTeruBozu = new BLexiconEntry(LibLexicon.DEVICE_TERU_TERU_BOZU, categoryDevices);
|
||||
teruTeruBozu.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeTeruTeruBozu));
|
||||
|
||||
|
||||
// TOOLS ENTRIES
|
||||
manaBlaster = new BLexiconEntry(LibLexicon.TOOL_MANA_BLASTER, categoryTools);
|
||||
manaBlaster.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeManaBlaster));
|
||||
@@ -792,7 +791,7 @@ public final class LexiconData {
|
||||
|
||||
autocraftingHalo = new BLexiconEntry(LibLexicon.TOOL_AUTOCRAFTING_HALO, categoryTools);
|
||||
autocraftingHalo.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeAutocraftingHalo));
|
||||
|
||||
|
||||
// ENDER ENTRIES
|
||||
enderAir = new BLexiconEntry(LibLexicon.ENDER_AIR, categoryEnder);
|
||||
enderAir.setPriority().setLexiconPages(new PageText("0"));
|
||||
@@ -865,7 +864,7 @@ public final class LexiconData {
|
||||
|
||||
corporeaRetainer = new ALexiconEntry(LibLexicon.ENDER_CORPOREA_RETAINER, categoryEnder);
|
||||
corporeaRetainer.setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"), new PageCraftingRecipe("3", ModCraftingRecipes.recipeCorporeaRetainer));
|
||||
|
||||
|
||||
// BAUBLES ENTRIES
|
||||
baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles);
|
||||
baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2"));
|
||||
@@ -1052,7 +1051,7 @@ public final class LexiconData {
|
||||
|
||||
pavement = new BLexiconEntry(LibLexicon.MISC_PAVEMENT, categoryMisc);
|
||||
pavement.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipesPavement));
|
||||
|
||||
|
||||
if(Botania.bcTriggersLoaded) {
|
||||
bcIntegration = new CLexiconEntry(LibLexicon.MISC_BC_INTEGRATION, categoryMisc, "BuildCraft");
|
||||
bcIntegration.setLexiconPages(new PageText("0")).setIcon(new ItemStack(Items.redstone));
|
||||
|
||||
@@ -13,19 +13,15 @@ package vazkii.botania.common.lexicon.page;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
@@ -35,10 +31,8 @@ import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.botania.api.internal.IGuiLexiconEntry;
|
||||
import vazkii.botania.api.lexicon.LexiconPage;
|
||||
import vazkii.botania.api.lexicon.multiblock.IMultiblockRenderHook;
|
||||
import vazkii.botania.api.lexicon.multiblock.Multiblock;
|
||||
import vazkii.botania.api.lexicon.multiblock.MultiblockSet;
|
||||
import vazkii.botania.api.lexicon.multiblock.component.MultiblockComponent;
|
||||
import vazkii.botania.client.core.handler.MultiblockRenderHandler;
|
||||
import vazkii.botania.client.lib.LibResources;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -86,7 +80,7 @@ public class PageMultiblock extends LexiconPage {
|
||||
|
||||
GL11.glRotatef(-20F, 1, 0, 0);
|
||||
GL11.glRotatef(gui.getElapsedTicks(), 0, 1, 0);
|
||||
|
||||
|
||||
MultiblockRenderHandler.renderMultiblockOnPage(mb);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -46,7 +46,7 @@ public final class LibAchievementNames {
|
||||
public static final String LUMINIZER_RIDE = "luminizerRide";
|
||||
public static final String MANA_BOMB_IGNITE = "manaBombIgnite";
|
||||
public static final String DANDELIFEON_PICKUP = "dandelifeonPickup";
|
||||
|
||||
|
||||
public static final String SIGNAL_FLARE_STUN = "signalFlareStun";
|
||||
public static final String L20_SHARD_USE = "l20ShardUse";
|
||||
public static final String GAIA_GUARDIAN_NO_ARMOR = "gaiaGuardianNoArmor";
|
||||
|
||||
@@ -252,7 +252,7 @@ public final class LibLexicon {
|
||||
public static final String MISC_CHALLENGES = "challenges";
|
||||
public static final String MISC_CACOPHONIUM = "cacophonium";
|
||||
public static final String MISC_PAVEMENT = "pavement";
|
||||
|
||||
|
||||
public static final String MISC_TC_INTEGRATION = "tcIntegration";
|
||||
public static final String MISC_BC_INTEGRATION = "bcIntegration";
|
||||
public static final String MISC_BANNERS = "banners";
|
||||
|
||||
Reference in new issue
Block a user