mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 19:59:36 +00:00
Cleanup~
This commit is contained in:
1 parent
d158340c35
commit
39750eaddc
24 files changed
+50
-55
No files matched your search
@@ -56,7 +56,7 @@ public interface IManaBurst {
|
||||
public void setSourceLens(ItemStack lens);
|
||||
|
||||
public boolean hasAlreadyCollidedAt(int x, int y, int z);
|
||||
|
||||
|
||||
public int getTicksExisted();
|
||||
|
||||
}
|
||||
@@ -20,5 +20,5 @@ import net.minecraft.item.ItemStack;
|
||||
public interface ITinyPlanetExcempt {
|
||||
|
||||
public boolean shouldPull(ItemStack stack);
|
||||
|
||||
|
||||
}
|
||||
@@ -11,17 +11,17 @@
|
||||
*/
|
||||
package vazkii.botania.client.core.handler;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class BotaniaPlayerController extends PlayerControllerMP {
|
||||
|
||||
public float distance = 0F;
|
||||
|
||||
|
||||
public BotaniaPlayerController(Minecraft p_i45062_1_, NetHandlerPlayClient p_i45062_2_) {
|
||||
super(p_i45062_1_, p_i45062_2_);
|
||||
}
|
||||
@@ -30,5 +30,5 @@ public class BotaniaPlayerController extends PlayerControllerMP {
|
||||
public float getBlockReachDistance() {
|
||||
return super.getBlockReachDistance() + distance;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -31,7 +31,7 @@ public final class IconHelper {
|
||||
public static IIcon forBlock(IIconRegister ir, Block block, int i) {
|
||||
return forBlock(ir, block, Integer.toString(i));
|
||||
}
|
||||
|
||||
|
||||
public static IIcon forBlock(IIconRegister ir, Block block, int i, String dir) {
|
||||
return forBlock(ir, block, Integer.toString(i), dir);
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public final class IconHelper {
|
||||
public static IIcon forBlock(IIconRegister ir, Block block, String s) {
|
||||
return forName(ir, block.getUnlocalizedName().replaceAll("tile.", "") + s);
|
||||
}
|
||||
|
||||
|
||||
public static IIcon forBlock(IIconRegister ir, Block block, String s, String dir) {
|
||||
return forName(ir, dir + "/" + block.getUnlocalizedName().replaceAll("tile.", "") + s);
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public class ClientProxy extends CommonProxy {
|
||||
public void setEntryToOpen(LexiconEntry entry) {
|
||||
GuiLexicon.currentOpenLexicon = new GuiLexiconEntry(entry, new GuiLexiconIndex(entry.category));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setExtraReach(EntityLivingBase entity, float reach) {
|
||||
super.setExtraReach(entity, reach);
|
||||
@@ -151,7 +151,7 @@ public class ClientProxy extends CommonProxy {
|
||||
controller.setGameType(type);
|
||||
mc.playerController = controller;
|
||||
}
|
||||
|
||||
|
||||
((BotaniaPlayerController) mc.playerController).distance = reach;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class BlockForestDrum extends BlockMod implements IManaTrigger, ILexicona
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return meta;
|
||||
|
||||
@@ -44,7 +44,7 @@ public class BlockModFlower extends BlockFlower implements ILexiconable {
|
||||
public static IIcon[] iconsAlt;
|
||||
|
||||
public static final String ALT_DIR = "alt";
|
||||
|
||||
|
||||
protected BlockModFlower() {
|
||||
this(LibBlockNames.FLOWER);
|
||||
}
|
||||
|
||||
@@ -84,10 +84,10 @@ public class BlockPlatform extends BlockCamo implements ILexiconable {
|
||||
@Override
|
||||
public void addCollisionBoxesToList(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) {
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
if(meta == 2 || (meta == 0 && par7Entity != null && par7Entity.posY > par3 + (par7Entity instanceof EntityPlayer ? 2 : 0) && (!(par7Entity instanceof EntityPlayer) || !par7Entity.isSneaking())))
|
||||
if(meta == 2 || meta == 0 && par7Entity != null && par7Entity.posY > par3 + (par7Entity instanceof EntityPlayer ? 2 : 0) && (!(par7Entity instanceof EntityPlayer) || !par7Entity.isSneaking()))
|
||||
super.addCollisionBoxesToList(par1World, par2, par3, par4, par5AxisAlignedBB, par6List, par7Entity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getBlockHardness(World par1World, int par2, int par3, int par4) {
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
|
||||
@@ -16,7 +16,6 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
|
||||
@@ -110,10 +110,10 @@ public final class ConfigHandler {
|
||||
|
||||
desc = "Set to true to use alternate flower textures by Futureazoo, not all flowers are textured. http://redd.it/2b3o3f";
|
||||
altFlowerTextures = loadPropBool("flowerTextures.alt", desc, altFlowerTextures);
|
||||
|
||||
|
||||
desc = "Set to true if you are the chosen one. For lovers of glitch art and just general mad people.";
|
||||
matrixMode = loadPropBool("matrixMode.enabled", desc, matrixMode);
|
||||
|
||||
|
||||
desc = "Set to false to disable the references in flower tooltips. (You monster D:)";
|
||||
referencesEnabled = loadPropBool("references.enabled", desc, referencesEnabled);
|
||||
|
||||
|
||||
@@ -105,12 +105,12 @@ public class CommonProxy {
|
||||
public void setEntryToOpen(LexiconEntry entry) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
|
||||
public void setExtraReach(EntityLivingBase entity, float reach) {
|
||||
if(entity instanceof EntityPlayerMP)
|
||||
((EntityPlayerMP) entity).theItemInWorldManager.setBlockReachDistance(5.0 + reach);
|
||||
}
|
||||
|
||||
|
||||
public long getWorldElapsedTicks() {
|
||||
return MinecraftServer.getServer().worldServers[0].getTotalWorldTime();
|
||||
}
|
||||
|
||||
@@ -1018,16 +1018,16 @@ public final class ModCrafingRecipes {
|
||||
recipeVirusSkeleton = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
// Ring of Far Reach Recipe
|
||||
addOreDictRecipe(new ItemStack(ModItems.reachRing),
|
||||
addOreDictRecipe(new ItemStack(ModItems.reachRing),
|
||||
"RE ", "E E", " E ",
|
||||
'R', LibOreDict.RUNE[15],
|
||||
'E', LibOreDict.ELEMENTIUM);
|
||||
recipeReachRing = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Rod of the Highlands Recipe
|
||||
addShapelessOreDictRecipe(new ItemStack(ModItems.skyDirtRod), new ItemStack(ModItems.dirtRod), LibOreDict.PIXIE_DUST, LibOreDict.RUNE[3]);
|
||||
recipeSkyDirtRod = BotaniaAPI.getLatestAddedRecipe();
|
||||
|
||||
|
||||
// Mana and Terrasteel Block Recipes
|
||||
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
|
||||
"III", "III", "III",
|
||||
|
||||
@@ -267,7 +267,7 @@ public class EntityDoppleganger extends EntityCreature implements IBossDisplayDa
|
||||
tries++;
|
||||
if(tries >= 50)
|
||||
teleportTo(source.posX + 0.5, source.posY + 1.6, source.posZ + 0.5);
|
||||
|
||||
|
||||
if(spawnLandmines && !worldObj.isRemote)
|
||||
for(int i = 0; i < 6; i++) {
|
||||
int x = source.posX - 10 + rand.nextInt(20);
|
||||
|
||||
@@ -47,7 +47,7 @@ import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.item.equipment.bauble.ItemTinyPlanet;
|
||||
|
||||
public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
|
||||
|
||||
private static final String TAG_TICKS_EXISTED = "ticksExisted";
|
||||
private static final String TAG_COLOR = "color";
|
||||
private static final String TAG_MANA = "mana";
|
||||
@@ -346,7 +346,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
public void onUpdate() {
|
||||
setTicksExisted(getTicksExisted() + 1);
|
||||
superUpdate();
|
||||
|
||||
|
||||
if(!fake && !isDead) {
|
||||
ChunkCoordinates coords = getBurstSourceChunkCoordinates();
|
||||
TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
|
||||
@@ -423,7 +423,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
if(stack != null)
|
||||
stack.writeToNBT(lensCmp);
|
||||
par1nbtTagCompound.setTag(TAG_LENS_STACK, lensCmp);
|
||||
|
||||
|
||||
ChunkCoordinates coords = getBurstSourceChunkCoordinates();
|
||||
par1nbtTagCompound.setInteger(TAG_SPREADER_X, coords.posX);
|
||||
par1nbtTagCompound.setInteger(TAG_SPREADER_Y, coords.posY);
|
||||
@@ -450,7 +450,7 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
if(stack != null)
|
||||
setSourceLens(stack);
|
||||
else setSourceLens(new ItemStack(Blocks.stone, 0, 0));
|
||||
|
||||
|
||||
int x = par1nbtTagCompound.getInteger(TAG_SPREADER_X);
|
||||
int y = par1nbtTagCompound.getInteger(TAG_SPREADER_Y);
|
||||
int z = par1nbtTagCompound.getInteger(TAG_SPREADER_Z);
|
||||
@@ -712,12 +712,12 @@ public class EntityManaBurst extends EntityThrowable implements IManaBurst {
|
||||
public void setSourceLens(ItemStack lens) {
|
||||
dataWatcher.updateObject(dataWatcherStart + 9, lens == null ? new ItemStack(Blocks.stone, 0, 0) : lens);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getTicksExisted() {
|
||||
return _ticksExisted;
|
||||
}
|
||||
|
||||
|
||||
public void setTicksExisted(int ticks) {
|
||||
_ticksExisted = ticks;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ItemDirtRod extends ItemMod implements IManaUsingItem {
|
||||
setMaxStackSize(1);
|
||||
setUnlocalizedName(name);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
|
||||
if(ManaItemHandler.requestManaExact(par1ItemStack, par2EntityPlayer, COST, false)) {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet
|
||||
|
||||
if(MathHelper.pointDistanceSpace(x, y, z, srcx, srcy, srcz) < range) {
|
||||
Block block = world.getBlock(x, y, z);
|
||||
if(!block.isAir(world, x, y, z) && !block.isReplaceable(world, x, y, z) && !(block instanceof BlockFalling) && block.getBlockHardness(world, x, y, z) != -1) {
|
||||
if(!block.isAir(world, x, y, z) && !block.isReplaceable(world, x, y, z) && !(block instanceof BlockFalling) && block.getBlockHardness(world, x, y, z) != -1) {
|
||||
int id = Block.getIdFromBlock(block);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
TileEntity tile = world.getTileEntity(x, y, z);
|
||||
@@ -147,9 +147,9 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet
|
||||
if(y != -1)
|
||||
spawnBurst(entity.worldObj, x, y, z);
|
||||
} else if(burst.getTicksExisted() == placeTicks) {
|
||||
int x = (int) net.minecraft.util.MathHelper.floor_double(entity.posX);
|
||||
int y = (int) net.minecraft.util.MathHelper.floor_double(entity.posY);
|
||||
int z = (int) net.minecraft.util.MathHelper.floor_double(entity.posZ);
|
||||
int x = net.minecraft.util.MathHelper.floor_double(entity.posX);
|
||||
int y = net.minecraft.util.MathHelper.floor_double(entity.posY);
|
||||
int z = net.minecraft.util.MathHelper.floor_double(entity.posZ);
|
||||
|
||||
if(entity.worldObj.isAirBlock(x, y, z)) {
|
||||
int id = ItemNBTHelper.getInt(lens, TAG_BLOCK, 0);
|
||||
@@ -170,7 +170,7 @@ public class ItemLaputaShard extends ItemMod implements ILensEffect, ITinyPlanet
|
||||
entity.worldObj.setTileEntity(x, y, z, tile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
entity.setDead();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,6 @@ import vazkii.botania.common.core.helper.ItemNBTHelper;
|
||||
import vazkii.botania.common.core.helper.MathHelper;
|
||||
import vazkii.botania.common.core.helper.Vector3;
|
||||
import vazkii.botania.common.crafting.recipe.CompositeLensRecipe;
|
||||
import vazkii.botania.common.entity.EntityManaBurst;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
|
||||
@@ -28,17 +28,17 @@ public class ItemSkyDirtRod extends ItemDirtRod {
|
||||
public ItemSkyDirtRod() {
|
||||
super(LibItemNames.SKY_DIRT_ROD);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if(!world.isRemote && ManaItemHandler.requestManaExact(stack, player, COST * 2, false)) {
|
||||
Vector3 playerVec = Vector3.fromEntityCenter(player);
|
||||
Vector3 lookVec = new Vector3(player.getLookVec()).multiply(3);
|
||||
Vector3 placeVec = playerVec.copy().add(lookVec);
|
||||
|
||||
int x = (int) MathHelper.floor_double(placeVec.x);
|
||||
int y = (int) MathHelper.floor_double(placeVec.y) + 1;
|
||||
int z = (int) MathHelper.floor_double(placeVec.z);
|
||||
|
||||
int x = MathHelper.floor_double(placeVec.x);
|
||||
int y = MathHelper.floor_double(placeVec.y) + 1;
|
||||
int z = MathHelper.floor_double(placeVec.z);
|
||||
|
||||
int entities = world.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 1, z + 1)).size();
|
||||
|
||||
@@ -55,8 +55,8 @@ public class ItemSkyDirtRod extends ItemDirtRod {
|
||||
}
|
||||
if(world.isRemote)
|
||||
player.swingItem();
|
||||
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -213,7 +213,7 @@ public final class ModItems {
|
||||
virus = new ItemVirus();
|
||||
reachRing = new ItemReachRing();
|
||||
skyDirtRod = new ItemSkyDirtRod();
|
||||
|
||||
|
||||
OreDictionary.registerOre(LibOreDict.LEXICON, lexicon);
|
||||
for(int i = 0; i < 16; i++) {
|
||||
OreDictionary.registerOre(LibOreDict.PETAL[i], new ItemStack(petal, 1, i));
|
||||
|
||||
@@ -12,12 +12,10 @@
|
||||
package vazkii.botania.common.item.equipment.bauble;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import baubles.api.BaubleType;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.common.Botania;
|
||||
import vazkii.botania.common.lib.LibItemNames;
|
||||
import baubles.api.BaubleType;
|
||||
|
||||
public class ItemReachRing extends ItemBauble {
|
||||
|
||||
@@ -29,12 +27,12 @@ public class ItemReachRing extends ItemBauble {
|
||||
public void onEquippedOrLoadedIntoWorld(ItemStack stack, EntityLivingBase player) {
|
||||
Botania.proxy.setExtraReach(player, 3.5F);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onUnequipped(ItemStack stack, EntityLivingBase player) {
|
||||
Botania.proxy.setExtraReach(player, 0F);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BaubleType getBaubleType(ItemStack arg0) {
|
||||
return BaubleType.RING;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ItemTinyPlanet extends ItemBauble {
|
||||
ItemStack lens = burst.getSourceLens();
|
||||
if(lens != null && lens.getItem() instanceof ITinyPlanetExcempt && !((ITinyPlanetExcempt) lens.getItem()).shouldPull(lens))
|
||||
continue;
|
||||
|
||||
|
||||
int orbitTime = getEntityOrbitTime(entity);
|
||||
if(orbitTime == 0)
|
||||
burst.setMinManaLoss(burst.getMinManaLoss() * 3);
|
||||
|
||||
@@ -465,7 +465,7 @@ public final class LexiconData {
|
||||
|
||||
skyDirtRod = new ALexiconEntry(LibLexicon.TOOL_SKY_DIRT_ROD, categoryTools);
|
||||
skyDirtRod.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeSkyDirtRod));
|
||||
|
||||
|
||||
// BAUBLES ENTRIES
|
||||
baublesIntro = new BLexiconEntry(LibLexicon.BAUBLE_INTRO, categoryBaubles);
|
||||
baublesIntro.setPriority().setLexiconPages(new PageText("0"), new PageImage("1", LibResources.ENTRY_BAUBLES), new PageText("2"));
|
||||
@@ -517,7 +517,7 @@ public final class LexiconData {
|
||||
|
||||
reachRing = new ALexiconEntry(LibLexicon.BAUBLE_REACH_RING, categoryBaubles);
|
||||
reachRing.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCrafingRecipes.recipeReachRing));
|
||||
|
||||
|
||||
// ALFHOMANCY ENTRIES
|
||||
alfhomancyIntro = new BLexiconEntry(LibLexicon.ALF_INTRO, categoryAlfhomancy);
|
||||
alfhomancyIntro.setPriority().setLexiconPages(new PageText("0"), new PageText("1"), new PageCraftingRecipe("2", ModCrafingRecipes.recipeAlfPortal), new PageCraftingRecipe("3", ModCrafingRecipes.recipeNaturaPylon),
|
||||
|
||||
@@ -50,10 +50,10 @@ public final class LibObfuscation {
|
||||
|
||||
// EntityHorse
|
||||
public static final String[] HORSE_JUMP_STRENGTH = new String[] { "horseJumpStrength", "field_110271_bv", "bv" };
|
||||
|
||||
|
||||
// PlayerControllerMP
|
||||
public static final String[] NET_CLIENT_HANDLER = new String[] { "netClientHandler", "field_78774_b", "b" };
|
||||
public static final String[] CURRENT_GAME_TYPE = new String[] { "currentGameType", "field_78779_k", "k" };
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user