Cleanup and Build 5.

This commit is contained in:
Vasco Lavos committed 2014-02-16 16:48:50 +00:00
1 parent ae7362742e
commit e818762ae7
10 files changed
+36 -37

No files matched your search

@@ -38,7 +38,7 @@ public final class HUDHandler {
private static final ResourceLocation manaBar = new ResourceLocation(LibResources.GUI_MANA_HUD);
private static final RenderItem itemRender = new RenderItem();
@ForgeSubscribe
public void onDrawScreen(RenderGameOverlayEvent.Post event) {
if(event.type == ElementType.ALL) {
@@ -49,7 +49,7 @@ public final class HUDHandler {
if(Block.blocksList[id] != null && Block.blocksList[id] instanceof IWandHUD)
((IWandHUD) Block.blocksList[id]).renderHUD(mc, event.resolution, mc.theWorld, pos.blockX, pos.blockY, pos.blockZ);
}
else if(pos != null && mc.thePlayer.getCurrentEquippedItem() != null && mc.thePlayer.getCurrentEquippedItem().itemID == ModItems.lexicon.itemID) {
int id = mc.theWorld.getBlockId(pos.blockX, pos.blockY, pos.blockZ);
if(Block.blocksList[id] != null && Block.blocksList[id] instanceof ILexiconable) {
@@ -60,16 +60,16 @@ public final class HUDHandler {
}
}
}
private void drawLexiconGUI(LexiconEntry entry, ScaledResolution res) {
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
Minecraft mc = Minecraft.getMinecraft();
int x = res.getScaledWidth() / 2 + 8;
int y = res.getScaledHeight() / 2 - 4;
int color = 0x2200FF00;
mc.fontRenderer.drawStringWithShadow(StatCollector.translateToLocal(entry.getUnlocalizedName()), x + 18, y, color);
mc.fontRenderer.drawStringWithShadow(StatCollector.translateToLocal("botaniamisc.shiftToRead"), x + 18, y + 11, color);
itemRender.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, new ItemStack(ModItems.lexicon), x, y);
@@ -29,7 +29,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Icon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.ColorizerFoliage;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import vazkii.botania.api.ILexiconable;
@@ -59,12 +59,12 @@ public class SubTileHeiseiDream extends SubTileFunctional {
messWithGetTargetAI((EntityAINearestAttackableTarget) entry.action);
else if(entry.action instanceof EntityAIAttackOnCollide)
messWithAttackOnCollideAI((EntityAIAttackOnCollide) entry.action);
mana -= cost;
PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId);
break;
}
}
}
}
}
}
@@ -72,7 +72,7 @@ public class SubTileHeiseiDream extends SubTileFunctional {
private void messWithGetTargetAI(EntityAINearestAttackableTarget aiEntry) {
ReflectionHelper.setPrivateValue(EntityAINearestAttackableTarget.class, aiEntry, IMob.class, LibObfuscation.TARGET_CLASS);
}
private void messWithAttackOnCollideAI(EntityAIAttackOnCollide aiEntry) {
ReflectionHelper.setPrivateValue(EntityAIAttackOnCollide.class, aiEntry, IMob.class, LibObfuscation.CLASS_TARGET);
}
@@ -86,7 +86,7 @@ public class SubTileHeiseiDream extends SubTileFunctional {
public int getMaxMana() {
return 1000;
}
@Override
public LexiconEntry getEntry() {
return LexiconData.heiseiDream;
@@ -39,9 +39,9 @@ public class SubTileTigerseye extends SubTileFunctional {
final int range = 10;
final int rangeY = 4;
final int cost = 70;
boolean shouldAfffect = mana >= cost;
List<EntityLiving> entities = supertile.worldObj.getEntitiesWithinAABB(EntityLiving.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - rangeY, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + rangeY, supertile.zCoord + range));
for(EntityLiving entity : entities) {
@@ -53,16 +53,16 @@ public class SubTileTigerseye extends SubTileFunctional {
for(EntityAITaskEntry entry : entries) {
if(entry.action instanceof EntityAIAvoidEntity)
avoidsOcelots = messWithRunAwayAI((EntityAIAvoidEntity) entry.action) || avoidsOcelots;
if(entry.action instanceof EntityAINearestAttackableTarget)
messWithGetTargetAI((EntityAINearestAttackableTarget) entry.action);
}
if(entity instanceof EntityCreeper) {
ReflectionHelper.setPrivateValue(EntityCreeper.class, (EntityCreeper) entity, 2, LibObfuscation.TIME_SINCE_IGNITED);
entity.setAttackTarget(null);
}
if(avoidsOcelots) {
mana -= cost;
PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId);
@@ -94,9 +94,9 @@ public class SubTileTigerseye extends SubTileFunctional {
return 1000;
}
@Override
public LexiconEntry getEntry() {
return LexiconData.tigerseye;
}
@Override
public LexiconEntry getEntry() {
return LexiconData.tigerseye;
}
}
@@ -13,7 +13,6 @@ package vazkii.botania.common.block.subtile.generating;
import java.util.List;
import cpw.mods.fml.common.network.PacketDispatcher;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -23,6 +22,7 @@ import vazkii.botania.api.lexicon.LexiconEntry;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.subtile.SubTileGenerating;
import vazkii.botania.common.lexicon.LexiconData;
import cpw.mods.fml.common.network.PacketDispatcher;
public class SubTileEndoflame extends SubTileGenerating {
@@ -37,34 +37,34 @@ public class SubTileEndoflame extends SubTileGenerating {
if(mana < getMaxMana() && !supertile.worldObj.isRemote) {
final int range = 3;
boolean didSomething = false;
List<EntityItem> items = supertile.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - range, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + range, supertile.zCoord + range));
for(EntityItem item : items) {
if(item.delayBeforeCanPickup == 0 && !item.isDead) {
ItemStack stack = item.getEntityItem();
int burnTime = TileEntityFurnace.getItemBurnTime(stack);
int burnTime = TileEntityFurnace.getItemBurnTime(stack);
if(burnTime > 0 && stack.stackSize > 0) {
this.burnTime = burnTime / 2;
stack.stackSize--;
if(stack.stackSize == 0)
item.setDead();
didSomething = true;
break;
}
}
}
if(didSomething)
PacketDispatcher.sendPacketToAllInDimension(supertile.getDescriptionPacket(), supertile.worldObj.provider.dimensionId);
}
} else {
Botania.proxy.wispFX(supertile.worldObj, (float) supertile.xCoord + 0.8, (float) supertile.yCoord + 0.5, (float) supertile.zCoord + 0.8, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
Botania.proxy.wispFX(supertile.worldObj, (float) supertile.xCoord + 0.8, (float) supertile.yCoord + 0.5, (float) supertile.zCoord + 0.2, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
Botania.proxy.wispFX(supertile.worldObj, (float) supertile.xCoord + 0.2, (float) supertile.yCoord + 0.5, (float) supertile.zCoord + 0.2, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
Botania.proxy.wispFX(supertile.worldObj, (float) supertile.xCoord + 0.2, (float) supertile.yCoord + 0.5, (float) supertile.zCoord + 0.8, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.8, supertile.yCoord + 0.5, supertile.zCoord + 0.8, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.8, supertile.yCoord + 0.5, supertile.zCoord + 0.2, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.2, supertile.yCoord + 0.5, supertile.zCoord + 0.2, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
Botania.proxy.wispFX(supertile.worldObj, supertile.xCoord + 0.2, supertile.yCoord + 0.5, supertile.zCoord + 0.8, 0.7F, 0.05F, 0.05F, (float) Math.random() / 6, (float) -Math.random() / 60);
burnTime--;
}
@@ -74,7 +74,7 @@ public class TileRuneAltar extends TileSimpleInventory implements ISidedInventor
updateRotationAngles();
firstTick = false;
}
for(int i = 0; i < angles.length; i++)
angles[i]++;
@@ -37,7 +37,7 @@ public final class ModPetalRecipes {
daybloomRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_DAYBLOOM), yellow, yellow, orange, orange, lightBlue);
endoflameRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_ENDOFLAME), brown, red, redMana, brownMana, lightGray);
bellethorneRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_BELLETHORN), redMana, redMana, cyan, cyan, red);
heiseiDreamRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_HEISEI_DREAM), purpleMana, pinkMana, magentaMana, purple, pink, magenta, runeWrath);
tigerseyeRecipe = BotaniaAPI.registerPetalRecipe(ItemBlockSpecialFlower.ofType(LibBlockNames.SUBTILE_TIGERSEYE), yellow, brownMana, orangeMana, lime, runeAutumn);
@@ -140,10 +140,10 @@ public final class LexiconData {
heiseiDream = new BLexiconEntry(LibLexicon.FFLOWER_HEISEI_DREAM, categoryFunctionalFlowers);
heiseiDream.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.heiseiDreamRecipe));
tigerseye = new BLexiconEntry(LibLexicon.FFLOWER_TIGERSEYE, categoryFunctionalFlowers);
tigerseye.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.tigerseyeRecipe));
// GENERATING FLOWERS ENTRIES
generatingIntro = new BLexiconEntry(LibLexicon.GFLOWER_INTRO, categoryGenerationFlowers);
generatingIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageText("2"));
@@ -153,7 +153,7 @@ public final class LexiconData {
endoflame = new BLexiconEntry(LibLexicon.GFLOWER_ENDOFLAME, categoryGenerationFlowers);
endoflame.setLexiconPages(new PageText("0"), new PagePetalRecipe("1", ModPetalRecipes.endoflameRecipe));
// MISCLENAEOUS ENTRIES
unstableBlocks = new BLexiconEntry(LibLexicon.MISC_UNSTABLE_BLOCKS, categoryMisc);
unstableBlocks.setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_UNSTABLE_BLOCK), new PageCraftingRecipe("2", ModCrafingRecipes.recipesUnstableBlocks));
@@ -18,10 +18,10 @@ public final class LibObfuscation {
// EntityAINearestAttackableTarget
public static final String[] TARGET_CLASS = new String[] { "targetClass", "field_75307_b", "a" };
// EntityAIAttackOnCollide
public static final String[] CLASS_TARGET = new String[] { "classTarget", "field_75444_h", "g" };
// EntityAIAvoidEntity
public static final String[] TARGET_ENTITY_CLASS = new String[] { "targetEntityClass", "field_75381_h", "i" };
+2 -2
View File
@@ -1,6 +1,6 @@
#Sat, 15 Feb 2014 18:44:14 +0000
#Sun, 16 Feb 2014 16:41:26 +0000
version=beta
build_number=5
build_number=6
mc_version=1.6.4
mod_name=Botania
dir.repo=./