mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-10-26 14:24:14 +00:00
BrandonCore deprecation (#86)
Co-authored-by: Connor Colenso <colen@CONNORSPC> Co-authored-by: Martin Robertz <dream-master@gmx.net> Co-authored-by: Ruling-0 <47913168+Ruling-0@users.noreply.github.com>
This commit is contained in:
192 files changed
+4029
-1474
No files matched your search
+7
-8
@@ -1,17 +1,16 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:BrandonsCore:1.2.0-GTNH:dev")
|
|
||||||
api("curse.maven:cofh-lib-220333:2388748")
|
api("curse.maven:cofh-lib-220333:2388748")
|
||||||
|
api("com.github.GTNewHorizons:GTNHLib:0.9.6:dev")
|
||||||
|
|
||||||
compileOnly("com.github.GTNewHorizons:ForestryMC:4.11.2:api") {transitive = false}
|
compileOnly("com.github.GTNewHorizons:ForestryMC:4.11.4:api") {transitive = false}
|
||||||
compileOnly("com.github.GTNewHorizons:OpenComputers:1.12.4-GTNH:api") {transitive = false}
|
compileOnly("com.github.GTNewHorizons:OpenComputers:1.12.12-GTNH:api") {transitive = false}
|
||||||
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.39-GTNH:dev") {transitive = false}
|
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.8.55-GTNH:dev") {transitive = false}
|
||||||
compileOnly("com.github.GTNewHorizons:CodeChickenCore:1.4.8:dev") {transitive = false}
|
compileOnly("com.github.GTNewHorizons:CodeChickenCore:1.4.10:dev") {transitive = false}
|
||||||
compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.7.1:dev") {transitive = false}
|
compileOnly("com.github.GTNewHorizons:inventory-tweaks:1.7.1:dev") {transitive = false}
|
||||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.2-GTNH:dev') {transitive = false}
|
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.6-GTNH:dev') {transitive = false}
|
||||||
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.117:dev") {transitive = false}
|
compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.225:dev") {transitive = false}
|
||||||
compileOnly("com.github.GTNewHorizons:GTNHLib:0.8.9:dev") {transitive = false}
|
|
||||||
|
|
||||||
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {transitive = false}
|
compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") {transitive = false}
|
||||||
compileOnly("curse.maven:computercraft-67504:2269339") {transitive = false}
|
compileOnly("curse.maven:computercraft-67504:2269339") {transitive = false}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import com.brandon3055.draconicevolution.client.creativetab.DETab;
|
|||||||
import com.brandon3055.draconicevolution.common.CommonProxy;
|
import com.brandon3055.draconicevolution.common.CommonProxy;
|
||||||
import com.brandon3055.draconicevolution.common.lib.OreDoublingRegistry;
|
import com.brandon3055.draconicevolution.common.lib.OreDoublingRegistry;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
@@ -23,15 +23,14 @@ import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
|||||||
version = References.VERSION,
|
version = References.VERSION,
|
||||||
canBeDeactivated = false,
|
canBeDeactivated = false,
|
||||||
guiFactory = References.GUIFACTORY,
|
guiFactory = References.GUIFACTORY,
|
||||||
dependencies = "after:NotEnoughItems;" + "after:ThermalExpansion;"
|
dependencies = "after:NotEnoughItems;" + "after:ThermalExpansion;" + "after:ThermalFoundation;")
|
||||||
+ "after:ThermalFoundation;"
|
|
||||||
+ "required-after:BrandonsCore@[1.0.0.11,);")
|
|
||||||
public class DraconicEvolution {
|
public class DraconicEvolution {
|
||||||
|
|
||||||
@Mod.Instance(References.MODID)
|
@Mod.Instance(References.MODID)
|
||||||
public static DraconicEvolution instance;
|
public static DraconicEvolution instance;
|
||||||
|
@SidedProxy(
|
||||||
@SidedProxy(clientSide = References.CLIENTPROXYLOCATION, serverSide = References.SERVERPROXYLOCATION)
|
clientSide = "com.brandon3055.draconicevolution.client.ClientProxy",
|
||||||
|
serverSide = "com.brandon3055.draconicevolution.common.CommonProxy")
|
||||||
public static CommonProxy proxy;
|
public static CommonProxy proxy;
|
||||||
|
|
||||||
public static CreativeTabs tabToolsWeapons = new DETab(
|
public static CreativeTabs tabToolsWeapons = new DETab(
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import java.util.Random;
|
|||||||
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.DataUtills;
|
import com.brandon3055.draconicevolution.common.utils.DataUtils;
|
||||||
import com.brandon3055.draconicevolution.common.world.ChaosWorldGenHandler;
|
import com.brandon3055.draconicevolution.common.world.ChaosWorldGenHandler;
|
||||||
import com.brandon3055.draconicevolution.common.world.DraconicWorldGenerator;
|
import com.brandon3055.draconicevolution.common.world.DraconicWorldGenerator;
|
||||||
import com.brandon3055.draconicevolution.common.world.WorldGenEnderComet;
|
import com.brandon3055.draconicevolution.common.world.WorldGenEnderComet;
|
||||||
@@ -43,12 +43,8 @@ public class GeneratorOverride {
|
|||||||
*/
|
*/
|
||||||
public static void generateChaosChunk(World world, int chunkX, int chunkZ, int centerX, int centerZ,
|
public static void generateChaosChunk(World world, int chunkX, int chunkZ, int centerX, int centerZ,
|
||||||
Random random) {
|
Random random) {
|
||||||
ChaosWorldGenHandler.generateChunk(
|
ChaosWorldGenHandler
|
||||||
world,
|
.generateChunk(world, chunkX, chunkZ, new DataUtils.XZPair<Integer, Integer>(centerX, centerZ), random);
|
||||||
chunkX,
|
|
||||||
chunkZ,
|
|
||||||
new DataUtills.XZPair<Integer, Integer>(centerX, centerZ),
|
|
||||||
random);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,7 +5,9 @@ import static com.brandon3055.draconicevolution.integration.nei.IMCForNEI.IMCSen
|
|||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.audio.ISound;
|
import net.minecraft.client.audio.ISound;
|
||||||
import net.minecraft.client.particle.EntityFX;
|
import net.minecraft.client.particle.EntityFX;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.client.MinecraftForgeClient;
|
import net.minecraftforge.client.MinecraftForgeClient;
|
||||||
@@ -114,54 +116,6 @@ public class ClientProxy extends CommonProxy {
|
|||||||
super.preInit(event);
|
super.preInit(event);
|
||||||
|
|
||||||
ResourceHandler.init(event);
|
ResourceHandler.init(event);
|
||||||
|
|
||||||
// downloadLocation = event.getModConfigurationDirectory().getParentFile().getAbsolutePath() +
|
|
||||||
// "/mods/derspack";
|
|
||||||
// downloadLocation = downloadLocation.replaceAll("\\\\", "/");
|
|
||||||
//
|
|
||||||
// File rescourcePack = new File(event.getModConfigurationDirectory().getParentFile(), "/mods/derspack");
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// //File file = new File(downloadLocation);
|
|
||||||
// if (!rescourcePack.exists()) rescourcePack.mkdir();
|
|
||||||
//
|
|
||||||
// LogHelper.info("Downloading Images");
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// URL url = new URL("http://i.imgur.com/oHRx1yQ.jpg");
|
|
||||||
// String fileName = url.getFile();
|
|
||||||
// //String destName = downloadLocation + fileName.substring(fileName.lastIndexOf("/"));
|
|
||||||
// File dll = new File(rescourcePack, fileName.substring(fileName.lastIndexOf("/")));
|
|
||||||
//
|
|
||||||
// InputStream is = url.openStream();
|
|
||||||
// OutputStream os = new FileOutputStream(dll);
|
|
||||||
//
|
|
||||||
// ByteStreams.copy(is, os);
|
|
||||||
//
|
|
||||||
// is.close();
|
|
||||||
// os.close();
|
|
||||||
// }catch (IOException e){
|
|
||||||
// LogHelper.info(e);
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// List defaultResourcePacks = Lists.newArrayList();
|
|
||||||
// Field f = ReflectionHelper.findField(Minecraft.class, "defaultResourcePacks", "field_110449_ao");
|
|
||||||
// f.setAccessible(true);
|
|
||||||
// try {
|
|
||||||
// defaultResourcePacks = (List)f.get(Minecraft.getMinecraft());
|
|
||||||
// defaultResourcePacks.add(new FolderResourcePack(rescourcePack));
|
|
||||||
// for (Object o : defaultResourcePacks){
|
|
||||||
// if (o instanceof FolderResourcePack) LogHelper.info(((FolderResourcePack) o).getPackName());
|
|
||||||
// if (o instanceof FileResourcePack) LogHelper.info(((FileResourcePack)o).getPackName());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// f.set(Minecraft.getMinecraft(), defaultResourcePacks);
|
|
||||||
// }
|
|
||||||
// catch (IllegalAccessException e) {
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -390,10 +344,6 @@ public class ClientProxy extends CommonProxy {
|
|||||||
return beam;
|
return beam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOp(String paramString) {
|
|
||||||
return Minecraft.getMinecraft().theWorld.getWorldInfo().getGameType().isCreative();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void spawnParticle(Object particle, int range) {
|
public void spawnParticle(Object particle, int range) {
|
||||||
if (particle instanceof EntityFX && ((EntityFX) particle).worldObj.isRemote)
|
if (particle instanceof EntityFX && ((EntityFX) particle).worldObj.isRemote)
|
||||||
@@ -405,4 +355,39 @@ public class ClientProxy extends CommonProxy {
|
|||||||
FMLClientHandler.instance().getClient().getSoundHandler().playSound(sound);
|
FMLClientHandler.instance().getClient().getSoundHandler().playSound(sound);
|
||||||
return sound;
|
return sound;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isDedicatedServer() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public MinecraftServer getMCServer() {
|
||||||
|
return super.getMCServer();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public World getClientWorld() {
|
||||||
|
return Minecraft.getMinecraft().theWorld;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSpaceDown() {
|
||||||
|
return Minecraft.getMinecraft().gameSettings.keyBindJump.getIsKeyPressed();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isShiftDown() {
|
||||||
|
return Minecraft.getMinecraft().gameSettings.keyBindSneak.getIsKeyPressed();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCtrlDown() {
|
||||||
|
return Minecraft.getMinecraft().gameSettings.keyBindSprint.getIsKeyPressed();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EntityPlayer getClientPlayer() {
|
||||||
|
return Minecraft.getMinecraft().thePlayer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -5,9 +5,9 @@ import net.minecraft.init.Items;
|
|||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
package com.brandon3055.draconicevolution.client.gui;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.gui.GuiButton;
|
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerTemplate;
|
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileContainerTemplate;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public class GUIContainerTemplate extends GuiContainer {
|
|
||||||
|
|
||||||
public EntityPlayer player;
|
|
||||||
private TileContainerTemplate tile;
|
|
||||||
|
|
||||||
public GUIContainerTemplate(InventoryPlayer invPlayer, TileContainerTemplate tile) {
|
|
||||||
super(new ContainerTemplate(invPlayer, tile));
|
|
||||||
|
|
||||||
xSize = 176;
|
|
||||||
ySize = 140;
|
|
||||||
|
|
||||||
this.tile = tile;
|
|
||||||
this.player = invPlayer.player;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final ResourceLocation texture = new ResourceLocation(
|
|
||||||
References.MODID.toLowerCase(),
|
|
||||||
"textures/gui/.png");
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerBackgroundLayer(float f, int x, int y) {
|
|
||||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
|
||||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
|
||||||
drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerForegroundLayer(int x, int y) {
|
|
||||||
fontRendererObj.drawStringWithShadow("Energy Infuser", 49, -9, 0x00FFFF);
|
|
||||||
// bindTexture(texture);
|
|
||||||
|
|
||||||
// fontRendererObj.drawString("Charges: " + charges, 90, 25, 0x000000);
|
|
||||||
// drawCenteredString(fontRendererObj, "Charges: " + charges, 117, 25, 0x000000);
|
|
||||||
// drawCenteredString(fontRendererObj, "Weather Controller", xSize/2, -15, 0x2a4ed0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void initGui() {
|
|
||||||
super.initGui();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void actionPerformed(GuiButton button) {}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateScreen() {
|
|
||||||
super.updateScreen();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -17,9 +17,9 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerDraconiumChest;
|
import com.brandon3055.draconicevolution.common.container.ContainerDraconiumChest;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.network.ButtonPacket;
|
import com.brandon3055.draconicevolution.common.network.ButtonPacket;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.client.gui;
|
package com.brandon3055.draconicevolution.client.gui;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@@ -14,7 +16,7 @@ import net.minecraft.util.StatCollector;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerEnergyInfuser;
|
import com.brandon3055.draconicevolution.common.container.ContainerEnergyInfuser;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileEnergyInfuser;
|
import com.brandon3055.draconicevolution.common.tileentities.TileEnergyInfuser;
|
||||||
@@ -118,10 +120,9 @@ public class GUIEnergyInfuser extends GuiContainer {
|
|||||||
ArrayList<String> internal = new ArrayList<String>();
|
ArrayList<String> internal = new ArrayList<String>();
|
||||||
internal.add(StatCollector.translateToLocal("gui.de.internalStorage.txt"));
|
internal.add(StatCollector.translateToLocal("gui.de.internalStorage.txt"));
|
||||||
internal.add(
|
internal.add(
|
||||||
"" + EnumChatFormatting.DARK_BLUE
|
EnumChatFormatting.DARK_BLUE + formatNumber(tile.energy.getEnergyStored())
|
||||||
+ tile.energy.getEnergyStored()
|
|
||||||
+ "/"
|
+ "/"
|
||||||
+ tile.energy.getMaxEnergyStored());
|
+ formatNumber(tile.energy.getMaxEnergyStored()));
|
||||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||||
drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj);
|
drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj);
|
||||||
GL11.glPopAttrib();
|
GL11.glPopAttrib();
|
||||||
@@ -134,10 +135,9 @@ public class GUIEnergyInfuser extends GuiContainer {
|
|||||||
ArrayList<String> internal = new ArrayList<String>();
|
ArrayList<String> internal = new ArrayList<String>();
|
||||||
internal.add(StatCollector.translateToLocal("gui.de.itemStorage.txt"));
|
internal.add(StatCollector.translateToLocal("gui.de.itemStorage.txt"));
|
||||||
internal.add(
|
internal.add(
|
||||||
"" + EnumChatFormatting.DARK_BLUE
|
EnumChatFormatting.DARK_BLUE + formatNumber(item.getEnergyStored(tile.getStackInSlot(0)))
|
||||||
+ item.getEnergyStored(tile.getStackInSlot(0))
|
|
||||||
+ "/"
|
+ "/"
|
||||||
+ item.getMaxEnergyStored(tile.getStackInSlot(0)));
|
+ formatNumber(item.getMaxEnergyStored(tile.getStackInSlot(0))));
|
||||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||||
drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj);
|
drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj);
|
||||||
GL11.glPopAttrib();
|
GL11.glPopAttrib();
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.client.gui;
|
package com.brandon3055.draconicevolution.client.gui;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -10,9 +12,8 @@ import net.minecraft.util.StatCollector;
|
|||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.gates.TileGate;
|
import com.brandon3055.draconicevolution.common.tileentities.gates.TileGate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -87,7 +88,7 @@ public class GUIFlowGate extends GuiScreen {
|
|||||||
0x00FF00);
|
0x00FF00);
|
||||||
|
|
||||||
String flow = StatCollector.translateToLocal("gui.de.flowGateCurrentFlow.name") + ": "
|
String flow = StatCollector.translateToLocal("gui.de.flowGateCurrentFlow.name") + ": "
|
||||||
+ Utills.addCommas(tile.getActualFlow());
|
+ formatNumber(tile.getActualFlow());
|
||||||
fontRendererObj.drawString(flow, guiCrt - (fontRendererObj.getStringWidth(flow) / 2), guiTop + 76, 0x2c2c2c);
|
fontRendererObj.drawString(flow, guiCrt - (fontRendererObj.getStringWidth(flow) / 2), guiTop + 76, 0x2c2c2c);
|
||||||
|
|
||||||
if (!tile.flowOverridden) {
|
if (!tile.flowOverridden) {
|
||||||
|
|||||||
@@ -1,19 +1,21 @@
|
|||||||
package com.brandon3055.draconicevolution.client.gui;
|
package com.brandon3055.draconicevolution.client.gui;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerGenerator;
|
import com.brandon3055.draconicevolution.common.container.ContainerGenerator;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileGenerator;
|
import com.brandon3055.draconicevolution.common.tileentities.TileGenerator;
|
||||||
@@ -73,46 +75,30 @@ public class GUIGenerator extends GuiContainer {
|
|||||||
18,
|
18,
|
||||||
18 - (int) (fuel * 13)); // Power bar
|
18 - (int) (fuel * 13)); // Power bar
|
||||||
|
|
||||||
fontRendererObj.drawStringWithShadow("Generator", guiLeft + 64, guiTop + 0, 0x00FFFF);
|
fontRendererObj.drawStringWithShadow(
|
||||||
|
StatCollector.translateToLocal("tile.draconicevolution:generator.name"),
|
||||||
|
guiLeft + 64,
|
||||||
|
guiTop,
|
||||||
|
0x00FFFF);
|
||||||
|
|
||||||
int x = X - guiLeft;
|
int x = X - guiLeft;
|
||||||
int y = Y - guiTop;
|
int y = Y - guiTop;
|
||||||
if (GuiHelper.isInRect(83, 10, 12, 40, x, y)) {
|
if (GuiHelper.isInRect(83, 10, 12, 40, x, y)) {
|
||||||
ArrayList<String> internal = new ArrayList<String>();
|
ArrayList<String> internal = new ArrayList<String>();
|
||||||
internal.add("Internal Storage");
|
internal.add(StatCollector.translateToLocal("gui.de.internalStorage.txt"));
|
||||||
internal.add(
|
internal.add(
|
||||||
"" + EnumChatFormatting.DARK_BLUE
|
EnumChatFormatting.DARK_BLUE + formatNumber(tile.getEnergyStored(ForgeDirection.UP))
|
||||||
+ tile.getEnergyStored(ForgeDirection.UP)
|
|
||||||
+ "/"
|
+ "/"
|
||||||
+ tile.getMaxEnergyStored(ForgeDirection.UP));
|
+ formatNumber(tile.getMaxEnergyStored(ForgeDirection.UP)));
|
||||||
drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj);
|
drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerForegroundLayer(int X, int Y) {
|
|
||||||
|
|
||||||
int x = X - guiLeft;
|
|
||||||
int y = Y - guiTop;
|
|
||||||
/*
|
|
||||||
* if (GuiHelper.isInRect(83, 10, 95, 50, x, y)) { ArrayList<String> internal = new ArrayList<String>();
|
|
||||||
* internal.add("Internal Storage"); internal.add("" + EnumChatFormatting.DARK_BLUE +
|
|
||||||
* tile.getEnergyStored(ForgeDirection.UP) + "/" + tile.getMaxEnergyStored(ForgeDirection.UP));
|
|
||||||
* drawHoveringText(internal, x, y, fontRendererObj); }
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
super.initGui();
|
super.initGui();
|
||||||
|
|
||||||
// ID
|
|
||||||
// buttonList.add(new GuiButton(0, guiLeft + 85, guiTop , 85, 20, text));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void actionPerformed(GuiButton button) {}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateScreen() {
|
public void updateScreen() {
|
||||||
guiUpdateTick++;
|
guiUpdateTick++;
|
||||||
@@ -123,6 +109,4 @@ public class GUIGenerator extends GuiContainer {
|
|||||||
super.updateScreen();
|
super.updateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ####Draw at############ read from size
|
|
||||||
// drawTexturedModalRect(guiLeft + 37, guiTop + 4, 0, 143, 37, 38);
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
package com.brandon3055.draconicevolution.client.gui;
|
package com.brandon3055.draconicevolution.client.gui;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiButton;
|
|
||||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
@@ -13,7 +14,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerGrinder;
|
import com.brandon3055.draconicevolution.common.container.ContainerGrinder;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileGrinder;
|
import com.brandon3055.draconicevolution.common.tileentities.TileGrinder;
|
||||||
@@ -69,7 +70,7 @@ public class GUIGrinder extends GuiContainer {
|
|||||||
guiLeft + 83,
|
guiLeft + 83,
|
||||||
guiTop + 11 + (int) (power * 40),
|
guiTop + 11 + (int) (power * 40),
|
||||||
xSize,
|
xSize,
|
||||||
0 + (int) (power * 40),
|
(int) (power * 40),
|
||||||
12,
|
12,
|
||||||
40 - (int) (power * 40)); // Power bar
|
40 - (int) (power * 40)); // Power bar
|
||||||
drawTexturedModalRect(
|
drawTexturedModalRect(
|
||||||
@@ -81,7 +82,7 @@ public class GUIGrinder extends GuiContainer {
|
|||||||
18 - (int) (fuel * 13)); // Power bar
|
18 - (int) (fuel * 13)); // Power bar
|
||||||
if (tile.isExternallyPowered()) drawTexturedModalRect(guiLeft + 100, guiTop + 37, xSize, 66, 13, 13);
|
if (tile.isExternallyPowered()) drawTexturedModalRect(guiLeft + 100, guiTop + 37, xSize, 66, 13, 13);
|
||||||
|
|
||||||
fontRendererObj.drawStringWithShadow("Grinder", guiLeft + 71, guiTop + 0, 0x00FFFF);
|
fontRendererObj.drawStringWithShadow("Grinder", guiLeft + 71, guiTop, 0x00FFFF);
|
||||||
|
|
||||||
int x = X - guiLeft;
|
int x = X - guiLeft;
|
||||||
int y = Y - guiTop;
|
int y = Y - guiTop;
|
||||||
@@ -91,39 +92,25 @@ public class GUIGrinder extends GuiContainer {
|
|||||||
if (tile.isExternallyPowered()) {
|
if (tile.isExternallyPowered()) {
|
||||||
internal.add(
|
internal.add(
|
||||||
"" + EnumChatFormatting.DARK_BLUE
|
"" + EnumChatFormatting.DARK_BLUE
|
||||||
+ tile.getEnergyStored(ForgeDirection.UP)
|
+ formatNumber(tile.getEnergyStored(ForgeDirection.UP))
|
||||||
+ "/"
|
+ "/"
|
||||||
+ tile.getMaxEnergyStored(ForgeDirection.UP));
|
+ formatNumber(tile.getMaxEnergyStored(ForgeDirection.UP)));
|
||||||
} else {
|
} else {
|
||||||
internal.add(
|
internal.add(
|
||||||
"" + EnumChatFormatting.DARK_BLUE
|
"" + EnumChatFormatting.DARK_BLUE
|
||||||
+ tile.getInternalBuffer().getEnergyStored()
|
+ formatNumber(tile.getInternalBuffer().getEnergyStored())
|
||||||
+ "/"
|
+ "/"
|
||||||
+ tile.getInternalBuffer().getMaxEnergyStored());
|
+ formatNumber(tile.getInternalBuffer().getMaxEnergyStored()));
|
||||||
}
|
}
|
||||||
drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj);
|
drawHoveringText(internal, x + guiLeft, y + guiTop, fontRendererObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) {
|
|
||||||
// fontRendererObj.drawString("Charges: " + charges, 90, 25, 0x000000);
|
|
||||||
// drawCenteredString(fontRendererObj, "Charges: " + charges, 117, 25, 0x000000);
|
|
||||||
// drawCenteredString(fontRendererObj, "Weather Controller", xSize/2, -15, 0x2a4ed0);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initGui() {
|
public void initGui() {
|
||||||
super.initGui();
|
super.initGui();
|
||||||
|
|
||||||
// ID
|
|
||||||
// buttonList.add(new GuiButton(0, guiLeft + 85, guiTop , 85, 20, text));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void actionPerformed(GuiButton button) {}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateScreen() {
|
public void updateScreen() {
|
||||||
guiUpdateTick++;
|
guiUpdateTick++;
|
||||||
@@ -134,6 +121,4 @@ public class GUIGrinder extends GuiContainer {
|
|||||||
super.updateScreen();
|
super.updateScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ####Draw at############ read from size
|
|
||||||
// drawTexturedModalRect(guiLeft + 37, guiTop + 4, 0, 143, 37, 38);
|
|
||||||
}
|
}
|
||||||
@@ -20,14 +20,14 @@ import net.minecraft.util.StatCollector;
|
|||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Teleporter.TeleportLocation;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
|
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Teleporter;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@@ -43,7 +43,7 @@ public class GUITeleporter extends GuiScreen {
|
|||||||
References.MODID.toLowerCase(),
|
References.MODID.toLowerCase(),
|
||||||
"textures/gui/TeleporterMKII.png");
|
"textures/gui/TeleporterMKII.png");
|
||||||
private ItemStack teleporterItem;
|
private ItemStack teleporterItem;
|
||||||
protected List<TeleportLocation> locations = new ArrayList<TeleportLocation>(0);
|
protected List<Teleporter.TeleportLocation> locations = new ArrayList<>(0);
|
||||||
|
|
||||||
private int selected = 0;
|
private int selected = 0;
|
||||||
private int selectionOffset = 0;
|
private int selectionOffset = 0;
|
||||||
@@ -446,7 +446,7 @@ public class GUITeleporter extends GuiScreen {
|
|||||||
} else {
|
} else {
|
||||||
if (!textBeingEdited.getText().isEmpty()) {
|
if (!textBeingEdited.getText().isEmpty()) {
|
||||||
getLocationSafely(selected + selectionOffset).setName(textBeingEdited.getText());
|
getLocationSafely(selected + selectionOffset).setName(textBeingEdited.getText());
|
||||||
TeleportLocation location = new TeleportLocation();
|
Teleporter.TeleportLocation location = new Teleporter.TeleportLocation();
|
||||||
location.setName(textBeingEdited.getText());
|
location.setName(textBeingEdited.getText());
|
||||||
DraconicEvolution.network.sendToServer(
|
DraconicEvolution.network.sendToServer(
|
||||||
new TeleporterPacket(location, TeleporterPacket.UPDATENAME, selected + selectionOffset));
|
new TeleporterPacket(location, TeleporterPacket.UPDATENAME, selected + selectionOffset));
|
||||||
@@ -460,7 +460,7 @@ public class GUITeleporter extends GuiScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (button.id == 1) {
|
if (button.id == 1) {
|
||||||
TeleportLocation location = new TeleportLocation(
|
Teleporter.TeleportLocation location = new Teleporter.TeleportLocation(
|
||||||
player.posX,
|
player.posX,
|
||||||
player.posY - 1.62,
|
player.posY - 1.62,
|
||||||
player.posZ,
|
player.posZ,
|
||||||
@@ -484,14 +484,14 @@ public class GUITeleporter extends GuiScreen {
|
|||||||
if (button.id == 3 || button.id == 7) {
|
if (button.id == 3 || button.id == 7) {
|
||||||
if (button.id == 3) {
|
if (button.id == 3) {
|
||||||
if (selected > 0) {
|
if (selected > 0) {
|
||||||
TeleportLocation temp = getLocationSafely(selected + selectionOffset);
|
Teleporter.TeleportLocation temp = getLocationSafely(selected + selectionOffset);
|
||||||
locations.set(selected + selectionOffset, getLocationSafely(selected + selectionOffset - 1));
|
locations.set(selected + selectionOffset, getLocationSafely(selected + selectionOffset - 1));
|
||||||
locations.set(selected + selectionOffset - 1, temp);
|
locations.set(selected + selectionOffset - 1, temp);
|
||||||
selected--;
|
selected--;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (selected < Math.min(11, locations.size() - 1)) {
|
if (selected < Math.min(11, locations.size() - 1)) {
|
||||||
TeleportLocation temp = getLocationSafely(selected + selectionOffset);
|
Teleporter.TeleportLocation temp = getLocationSafely(selected + selectionOffset);
|
||||||
locations.set(selected + selectionOffset, getLocationSafely(selected + selectionOffset + 1));
|
locations.set(selected + selectionOffset, getLocationSafely(selected + selectionOffset + 1));
|
||||||
locations.set(selected + selectionOffset + 1, temp);
|
locations.set(selected + selectionOffset + 1, temp);
|
||||||
selected++;
|
selected++;
|
||||||
@@ -624,7 +624,7 @@ public class GUITeleporter extends GuiScreen {
|
|||||||
// TeleportLocation location = new TeleportLocation(tagLocation.getDouble("X"), tagLocation.getDouble("Y"),
|
// TeleportLocation location = new TeleportLocation(tagLocation.getDouble("X"), tagLocation.getDouble("Y"),
|
||||||
// tagLocation.getDouble("Z"), tagLocation.getInteger("Dimension"), tagLocation.getFloat("Pitch"),
|
// tagLocation.getDouble("Z"), tagLocation.getInteger("Dimension"), tagLocation.getFloat("Pitch"),
|
||||||
// tagLocation.getFloat("Yaw"), tagLocation.getString("Name"));
|
// tagLocation.getFloat("Yaw"), tagLocation.getString("Name"));
|
||||||
TeleportLocation location = new TeleportLocation();
|
Teleporter.TeleportLocation location = new Teleporter.TeleportLocation();
|
||||||
location.readFromNBT(tagLocation);
|
location.readFromNBT(tagLocation);
|
||||||
location.setWriteProtected(tagLocation.getBoolean("WP"));
|
location.setWriteProtected(tagLocation.getBoolean("WP"));
|
||||||
locations.add(location);
|
locations.add(location);
|
||||||
@@ -632,7 +632,7 @@ public class GUITeleporter extends GuiScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addCurrentLocationToList(String name) {
|
private void addCurrentLocationToList(String name) {
|
||||||
TeleportLocation currentLocation = new TeleportLocation(
|
Teleporter.TeleportLocation currentLocation = new Teleporter.TeleportLocation(
|
||||||
player.posX,
|
player.posX,
|
||||||
player.posY - 1.62,
|
player.posY - 1.62,
|
||||||
player.posZ,
|
player.posZ,
|
||||||
@@ -644,8 +644,8 @@ public class GUITeleporter extends GuiScreen {
|
|||||||
locations.add(currentLocation);
|
locations.add(currentLocation);
|
||||||
}
|
}
|
||||||
|
|
||||||
private TeleportLocation getLocationSafely(int index) {
|
private Teleporter.TeleportLocation getLocationSafely(int index) {
|
||||||
if (index < locations.size() && index >= 0) return locations.get(index);
|
if (index < locations.size() && index >= 0) return locations.get(index);
|
||||||
return new TeleportLocation(0, 0, 0, 0, 0, 0, EnumChatFormatting.DARK_RED + "[Index Error]");
|
return new Teleporter.TeleportLocation(0, 0, 0, 0, 0, 0, EnumChatFormatting.DARK_RED + "[Index Error]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -15,13 +15,13 @@ import net.minecraft.util.StatCollector;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerUpgradeModifier;
|
import com.brandon3055.draconicevolution.common.container.ContainerUpgradeModifier;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier;
|
import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem.EnumUpgrade;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem.EnumUpgrade;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import net.minecraft.util.StatCollector;
|
|||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.GUIBase;
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.GUIBase;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+10
-10
@@ -25,23 +25,23 @@ import org.apache.commons.io.IOUtils;
|
|||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentBase;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentButton;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentCollection;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentTextureButton;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentTexturedRect;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.GUIScrollingBase;
|
|
||||||
import com.brandon3055.brandonscore.client.utills.ClientUtills;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentContributorsPage;
|
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentContributorsPage;
|
||||||
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentIndexButton;
|
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentIndexButton;
|
||||||
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentManualPage;
|
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentManualPage;
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.ClientUtils;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentBase;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentButton;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentCollection;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentTextureButton;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentTexturedRect;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.GUIScrollingBase;
|
||||||
import com.brandon3055.draconicevolution.common.container.DummyContainer;
|
import com.brandon3055.draconicevolution.common.container.DummyContainer;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ContributorHandler;
|
import com.brandon3055.draconicevolution.common.handler.ContributorHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
import com.google.gson.stream.JsonReader;
|
import com.google.gson.stream.JsonReader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -547,7 +547,7 @@ public class GUIManual extends GUIScrollingBase implements GuiYesNoCallback {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void confirmClicked(boolean confirmed, int id) {
|
public void confirmClicked(boolean confirmed, int id) {
|
||||||
if (confirmed) ClientUtills.openLink("https://www.patreon.com/brandon3055");
|
if (confirmed) ClientUtils.openLink("https://www.patreon.com/brandon3055");
|
||||||
mc.displayGuiScreen(this);
|
mc.displayGuiScreen(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+21
-22
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.client.gui.componentguis;
|
package com.brandon3055.draconicevolution.client.gui.componentguis;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -11,18 +13,18 @@ import net.minecraft.util.StatCollector;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentButton;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentCollection;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentTextureButton;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentTexturedRect;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.GUIBase;
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentButton;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentCollection;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentTextureButton;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentTexturedRect;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.GUIBase;
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerReactor;
|
import com.brandon3055.draconicevolution.common.container.ContainerReactor;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore.ReactorState;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore.ReactorState;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by brandon3055 on 30/7/2015.
|
* Created by brandon3055 on 30/7/2015.
|
||||||
@@ -182,24 +184,24 @@ public class GUIReactor extends GUIBase {
|
|||||||
} else if (GuiHelper.isInRect(33, 4, 18, 114, mouseX - guiLeft, mouseY - guiTop)) {
|
} else if (GuiHelper.isInRect(33, 4, 18, 114, mouseX - guiLeft, mouseY - guiTop)) {
|
||||||
text.add(StatCollector.translateToLocal("gui.de.fieldStrength.txt"));
|
text.add(StatCollector.translateToLocal("gui.de.fieldStrength.txt"));
|
||||||
if (core.maxFieldCharge > 0) {
|
if (core.maxFieldCharge > 0) {
|
||||||
text.add(Utills.round(core.fieldCharge / core.maxFieldCharge * 100D, 100D) + "%");
|
text.add(Utils.round(core.fieldCharge / core.maxFieldCharge * 100D, 100D) + "%");
|
||||||
}
|
}
|
||||||
text.add(Utills.addCommas((int) core.fieldCharge) + " / " + Utills.addCommas((int) core.maxFieldCharge));
|
text.add(formatNumber((int) core.fieldCharge) + " / " + formatNumber((int) core.maxFieldCharge));
|
||||||
drawHoveringText(text, mouseX, mouseY, fontRendererObj);
|
drawHoveringText(text, mouseX, mouseY, fontRendererObj);
|
||||||
} else if (GuiHelper.isInRect(197, 4, 18, 114, mouseX - guiLeft, mouseY - guiTop)) {
|
} else if (GuiHelper.isInRect(197, 4, 18, 114, mouseX - guiLeft, mouseY - guiTop)) {
|
||||||
text.add(StatCollector.translateToLocal("gui.de.energySaturation.txt"));
|
text.add(StatCollector.translateToLocal("gui.de.energySaturation.txt"));
|
||||||
if (core.maxEnergySaturation > 0) {
|
if (core.maxEnergySaturation > 0) {
|
||||||
text.add(
|
text.add(
|
||||||
Utills.round((double) core.energySaturation / (double) core.maxEnergySaturation * 100D, 100D)
|
Utils.round((double) core.energySaturation / (double) core.maxEnergySaturation * 100D, 100D)
|
||||||
+ "%");
|
+ "%");
|
||||||
}
|
}
|
||||||
text.add(Utills.addCommas(core.energySaturation) + " / " + Utills.addCommas(core.maxEnergySaturation));
|
text.add(formatNumber(core.energySaturation) + " / " + formatNumber(core.maxEnergySaturation));
|
||||||
drawHoveringText(text, mouseX, mouseY, fontRendererObj);
|
drawHoveringText(text, mouseX, mouseY, fontRendererObj);
|
||||||
} else if (GuiHelper.isInRect(221, 4, 18, 114, mouseX - guiLeft, mouseY - guiTop)) {
|
} else if (GuiHelper.isInRect(221, 4, 18, 114, mouseX - guiLeft, mouseY - guiTop)) {
|
||||||
text.add(StatCollector.translateToLocal("gui.de.fuelConversion.txt"));
|
text.add(StatCollector.translateToLocal("gui.de.fuelConversion.txt"));
|
||||||
if (core.reactorFuel + core.convertedFuel > 0) {
|
if (core.reactorFuel + core.convertedFuel > 0) {
|
||||||
text.add(
|
text.add(
|
||||||
Utills.round(
|
Utils.round(
|
||||||
((double) core.convertedFuel + core.conversionUnit)
|
((double) core.convertedFuel + core.conversionUnit)
|
||||||
/ ((double) core.convertedFuel + (double) core.reactorFuel)
|
/ ((double) core.convertedFuel + (double) core.reactorFuel)
|
||||||
* 100D,
|
* 100D,
|
||||||
@@ -207,7 +209,7 @@ public class GUIReactor extends GUIBase {
|
|||||||
}
|
}
|
||||||
text.add(core.convertedFuel + " / " + (core.convertedFuel + core.reactorFuel));
|
text.add(core.convertedFuel + " / " + (core.convertedFuel + core.reactorFuel));
|
||||||
text.add(
|
text.add(
|
||||||
"Full: " + (Utills.round(
|
"Full: " + (Utils.round(
|
||||||
(float) (core.convertedFuel + core.reactorFuel) / ConfigHandler.reactorFuelStorage * 100,
|
(float) (core.convertedFuel + core.reactorFuel) / ConfigHandler.reactorFuelStorage * 100,
|
||||||
1000)) + "%");
|
1000)) + "%");
|
||||||
drawHoveringText(text, mouseX, mouseY, fontRendererObj);
|
drawHoveringText(text, mouseX, mouseY, fontRendererObj);
|
||||||
@@ -251,26 +253,23 @@ public class GUIReactor extends GUIBase {
|
|||||||
private void drawStatistics() {
|
private void drawStatistics() {
|
||||||
double inputRate = core.fieldDrain / (1D - (core.fieldCharge / core.maxFieldCharge));
|
double inputRate = core.fieldDrain / (1D - (core.fieldCharge / core.maxFieldCharge));
|
||||||
fontRendererObj.drawString(StatCollector.translateToLocal("gui.de.tempLoad.name"), 55, 16, 0x0000FF);
|
fontRendererObj.drawString(StatCollector.translateToLocal("gui.de.tempLoad.name"), 55, 16, 0x0000FF);
|
||||||
fontRendererObj.drawString(Utills.round(core.tempDrainFactor * 100D, 1D) + "%", 60, 2 + 24, 0);
|
fontRendererObj.drawString(Utils.round(core.tempDrainFactor * 100D, 1D) + "%", 60, 2 + 24, 0);
|
||||||
fontRendererObj.drawString(StatCollector.translateToLocal("gui.de.mass.name"), 55, 16 + 24, 0x0000FF);
|
fontRendererObj.drawString(StatCollector.translateToLocal("gui.de.mass.name"), 55, 16 + 24, 0x0000FF);
|
||||||
fontRendererObj.drawString(
|
fontRendererObj.drawString(
|
||||||
Utills.round((core.reactorFuel + core.convertedFuel) / 1296D, 100) + "m^3",
|
Utils.round((core.reactorFuel + core.convertedFuel) / 1296D, 100) + "m^3",
|
||||||
60,
|
60,
|
||||||
2 + 2 * 24,
|
2 + 2 * 24,
|
||||||
0);
|
0);
|
||||||
fontRendererObj.drawString(StatCollector.translateToLocal("gui.de.genRate.name"), 55, 16 + 2 * 24, 0x0000FF);
|
fontRendererObj.drawString(StatCollector.translateToLocal("gui.de.genRate.name"), 55, 16 + 2 * 24, 0x0000FF);
|
||||||
fontRendererObj.drawString(Utills.addCommas((int) core.generationRate) + "RF/t", 60, 2 + 3 * 24, 0);
|
fontRendererObj.drawString(formatNumber((int) core.generationRate) + "RF/t", 60, 2 + 3 * 24, 0);
|
||||||
fontRendererObj
|
fontRendererObj
|
||||||
.drawString(StatCollector.translateToLocal("gui.de.fieldInputRate.name"), 55, 16 + 3 * 24, 0x0000FF);
|
.drawString(StatCollector.translateToLocal("gui.de.fieldInputRate.name"), 55, 16 + 3 * 24, 0x0000FF);
|
||||||
fontRendererObj
|
fontRendererObj
|
||||||
.drawString(Utills.addCommas((int) Math.min(inputRate, Integer.MAX_VALUE)) + "RF/t", 60, 2 + 4 * 24, 0);
|
.drawString(formatNumber((int) Math.min(inputRate, Integer.MAX_VALUE)) + "RF/t", 60, 2 + 4 * 24, 0);
|
||||||
fontRendererObj
|
fontRendererObj
|
||||||
.drawString(StatCollector.translateToLocal("gui.de.fuelConversion.name"), 55, 16 + 4 * 24, 0x0000FF);
|
.drawString(StatCollector.translateToLocal("gui.de.fuelConversion.name"), 55, 16 + 4 * 24, 0x0000FF);
|
||||||
fontRendererObj.drawString(
|
fontRendererObj
|
||||||
Utills.addCommas((int) Math.round(core.fuelUseRate * 1000000D)) + "nb/t",
|
.drawString(formatNumber((int) Math.round(core.fuelUseRate * 1000000D)) + "nb/t", 60, 2 + 5 * 24, 0);
|
||||||
60,
|
|
||||||
2 + 5 * 24,
|
|
||||||
0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawStatus() {
|
private void drawStatus() {
|
||||||
|
|||||||
+14
-13
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.client.gui.componentguis;
|
package com.brandon3055.draconicevolution.client.gui.componentguis;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -11,29 +13,28 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.util.StringUtils;
|
import net.minecraft.util.StringUtils;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentBase;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentButton;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentCollection;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentItemRenderer;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentTextField;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentTexturedRect;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.GUIBase;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.gui.GuiHudConfig;
|
import com.brandon3055.draconicevolution.client.gui.GuiHudConfig;
|
||||||
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentConfigItemButton;
|
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentConfigItemButton;
|
||||||
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentFieldAdjuster;
|
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentFieldAdjuster;
|
||||||
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentFieldButton;
|
import com.brandon3055.draconicevolution.client.gui.guicomponents.ComponentFieldButton;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentBase;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentButton;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentCollection;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentItemRenderer;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentTextField;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentTexturedRect;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.GUIBase;
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerAdvTool;
|
import com.brandon3055.draconicevolution.common.container.ContainerAdvTool;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ContributorHandler;
|
import com.brandon3055.draconicevolution.common.handler.ContributorHandler;
|
||||||
import com.brandon3055.draconicevolution.common.items.weapons.BowHandler;
|
import com.brandon3055.draconicevolution.common.items.weapons.BowHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.network.ContributorPacket;
|
import com.brandon3055.draconicevolution.common.network.ContributorPacket;
|
||||||
import com.brandon3055.draconicevolution.common.network.ItemConfigPacket;
|
import com.brandon3055.draconicevolution.common.network.ItemConfigPacket;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
import com.brandon3055.draconicevolution.common.utils.IInventoryTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 26/12/2014.
|
* Created by Brandon on 26/12/2014.
|
||||||
@@ -325,7 +326,7 @@ public class GUIToolConfig extends GUIBase {
|
|||||||
List<String> list = new ArrayList<String>();
|
List<String> list = new ArrayList<String>();
|
||||||
list.add(
|
list.add(
|
||||||
StatCollector.translateToLocal("gui.de.rfPerShot.txt") + ": "
|
StatCollector.translateToLocal("gui.de.rfPerShot.txt") + ": "
|
||||||
+ Utills.addCommas(properties.calculateEnergyCost()));
|
+ formatNumber(properties.calculateEnergyCost()));
|
||||||
list.add(
|
list.add(
|
||||||
StatCollector.translateToLocal("gui.de.maxDamage.txt") + ": "
|
StatCollector.translateToLocal("gui.de.maxDamage.txt") + ": "
|
||||||
+ properties.arrowDamage * (properties.arrowSpeed * 3));
|
+ properties.arrowDamage * (properties.arrowSpeed * 3));
|
||||||
|
|||||||
+6
-6
@@ -6,12 +6,12 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentButton;
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentButton;
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentCollection;
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentCollection;
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentItemRenderer;
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentItemRenderer;
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentSlotBackground;
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentSlotBackground;
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentTexturedRect;
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentTexturedRect;
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.GUIBase;
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.GUIBase;
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerAdvTool;
|
import com.brandon3055.draconicevolution.common.container.ContainerAdvTool;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import net.minecraft.util.StatCollector;
|
|||||||
|
|
||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 7/03/2015.
|
* Created by Brandon on 7/03/2015.
|
||||||
|
|||||||
+4
-4
@@ -9,11 +9,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentBase;
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentBase;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
import com.brandon3055.draconicevolution.common.utils.IInventoryTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 29/12/2014.
|
* Created by Brandon on 29/12/2014.
|
||||||
|
|||||||
+5
-5
@@ -17,13 +17,13 @@ import net.minecraft.util.StringUtils;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentScrollingBase;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.GUIScrollingBase;
|
|
||||||
import com.brandon3055.brandonscore.client.utills.ClientUtills;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.ClientUtils;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentScrollingBase;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.GUIScrollingBase;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ContributorHandler;
|
import com.brandon3055.draconicevolution.common.handler.ContributorHandler;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ContributorHandler.Contributor;
|
import com.brandon3055.draconicevolution.common.handler.ContributorHandler.Contributor;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by brandon3055 on 5/11/2015.
|
* Created by brandon3055 on 5/11/2015.
|
||||||
@@ -188,7 +188,7 @@ public class ComponentContributorsPage extends ComponentScrollingBase implements
|
|||||||
@Override
|
@Override
|
||||||
public void confirmClicked(boolean confirmed, int button) {
|
public void confirmClicked(boolean confirmed, int button) {
|
||||||
mc.displayGuiScreen(this.gui);
|
mc.displayGuiScreen(this.gui);
|
||||||
if (confirmed) ClientUtills.openLink(lastClickURL);
|
if (confirmed) ClientUtils.openLink(lastClickURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ModelBiped modelBiped = new ModelBiped(0.0265F);
|
private static ModelBiped modelBiped = new ModelBiped(0.0265F);
|
||||||
|
|||||||
+6
-6
@@ -6,13 +6,13 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentBase;
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.DataUtills;
|
|
||||||
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIToolConfig;
|
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIToolConfig;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentBase;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.DataUtils;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 1/01/2015.
|
* Created by Brandon on 1/01/2015.
|
||||||
@@ -212,7 +212,7 @@ public class ComponentFieldAdjuster extends ComponentBase {
|
|||||||
.playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
.playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||||
ItemStack stack = gui.player.inventory.getStackInSlot(field.slot);
|
ItemStack stack = gui.player.inventory.getStackInSlot(field.slot);
|
||||||
if (stack != null && stack.getItem() instanceof IConfigurableItem) {
|
if (stack != null && stack.getItem() instanceof IConfigurableItem) {
|
||||||
DataUtills.writeObjectToCompound(
|
DataUtils.writeObjectToCompound(
|
||||||
IConfigurableItem.ProfileHelper.getProfileCompound(stack),
|
IConfigurableItem.ProfileHelper.getProfileCompound(stack),
|
||||||
field.value,
|
field.value,
|
||||||
field.datatype,
|
field.datatype,
|
||||||
|
|||||||
+5
-5
@@ -9,12 +9,12 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentBase;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.DataUtills;
|
|
||||||
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIToolConfig;
|
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIToolConfig;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentBase;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.DataUtils;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 31/12/2014.
|
* Created by Brandon on 31/12/2014.
|
||||||
@@ -96,7 +96,7 @@ public class ComponentFieldButton extends ComponentBase {
|
|||||||
field.sendChanges();
|
field.sendChanges();
|
||||||
ItemStack stack = gui.player.inventory.getStackInSlot(field.slot);
|
ItemStack stack = gui.player.inventory.getStackInSlot(field.slot);
|
||||||
if (stack != null && stack.getItem() instanceof IConfigurableItem) {
|
if (stack != null && stack.getItem() instanceof IConfigurableItem) {
|
||||||
DataUtills.writeObjectToCompound(
|
DataUtils.writeObjectToCompound(
|
||||||
IConfigurableItem.ProfileHelper.getProfileCompound(stack),
|
IConfigurableItem.ProfileHelper.getProfileCompound(stack),
|
||||||
field.value,
|
field.value,
|
||||||
field.datatype,
|
field.datatype,
|
||||||
|
|||||||
+4
-4
@@ -6,11 +6,11 @@ import net.minecraft.item.ItemStack;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentScrollingBase;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.GUIScrollingBase;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.gui.componentguis.ManualPage;
|
import com.brandon3055.draconicevolution.client.gui.componentguis.ManualPage;
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentScrollingBase;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.GUIScrollingBase;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 7/03/2015.
|
* Created by Brandon on 7/03/2015.
|
||||||
@@ -23,7 +23,7 @@ public class ComponentIndexButton extends ComponentScrollingBase {
|
|||||||
public ComponentIndexButton(int x, int y, GUIScrollingBase gui, ManualPage page) {
|
public ComponentIndexButton(int x, int y, GUIScrollingBase gui, ManualPage page) {
|
||||||
super(x, y, gui);
|
super(x, y, gui);
|
||||||
this.page = page;
|
this.page = page;
|
||||||
stack = Utills.getStackFromName(page.name, page.meta);
|
stack = Utils.getStackFromName(page.name, page.meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+8
-8
@@ -21,14 +21,14 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
|
|||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.ComponentScrollingBase;
|
|
||||||
import com.brandon3055.brandonscore.client.gui.guicomponents.GUIScrollingBase;
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.gui.componentguis.ManualPage;
|
import com.brandon3055.draconicevolution.client.gui.componentguis.ManualPage;
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
import com.brandon3055.draconicevolution.client.utill.CustomResourceLocation;
|
import com.brandon3055.draconicevolution.client.utils.CustomResourceLocation;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.ComponentScrollingBase;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.guicomponents.GUIScrollingBase;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 19/03/2015.
|
* Created by Brandon on 19/03/2015.
|
||||||
@@ -48,7 +48,7 @@ public class ComponentManualPage extends ComponentScrollingBase {
|
|||||||
super(x, y, gui);
|
super(x, y, gui);
|
||||||
this.page = page;
|
this.page = page;
|
||||||
pageLength = 25;
|
pageLength = 25;
|
||||||
stack = Utills.getStackFromName(page.name, page.meta);
|
stack = Utils.getStackFromName(page.name, page.meta);
|
||||||
ContentComponent title = new ContentComponent("title." + page.getLocalizedName(), pageLength, this);
|
ContentComponent title = new ContentComponent("title." + page.getLocalizedName(), pageLength, this);
|
||||||
pageLength += title.getHeight();
|
pageLength += title.getHeight();
|
||||||
contentList.add(title);
|
contentList.add(title);
|
||||||
@@ -157,7 +157,7 @@ public class ComponentManualPage extends ComponentScrollingBase {
|
|||||||
} else if (type == 2) {
|
} else if (type == 2) {
|
||||||
String s = content.substring(content.indexOf("[c]") + 3);
|
String s = content.substring(content.indexOf("[c]") + 3);
|
||||||
String name = s.substring(0, s.lastIndexOf(":"));
|
String name = s.substring(0, s.lastIndexOf(":"));
|
||||||
ItemStack stack = Utills.getStackFromName(name, Integer.parseInt(s.substring(s.lastIndexOf(":") + 1)));
|
ItemStack stack = Utils.getStackFromName(name, Integer.parseInt(s.substring(s.lastIndexOf(":") + 1)));
|
||||||
result = stack;
|
result = stack;
|
||||||
|
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
|
|||||||
+6
-6
@@ -20,7 +20,6 @@ import net.minecraftforge.client.model.IModelCustom;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.DataUtills.XZPair;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
@@ -32,7 +31,8 @@ import com.brandon3055.draconicevolution.common.items.weapons.BowHandler;
|
|||||||
import com.brandon3055.draconicevolution.common.items.weapons.DraconicBow;
|
import com.brandon3055.draconicevolution.common.items.weapons.DraconicBow;
|
||||||
import com.brandon3055.draconicevolution.common.items.weapons.WyvernBow;
|
import com.brandon3055.draconicevolution.common.items.weapons.WyvernBow;
|
||||||
import com.brandon3055.draconicevolution.common.network.MountUpdatePacket;
|
import com.brandon3055.draconicevolution.common.network.MountUpdatePacket;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.DataUtils;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
@@ -45,7 +45,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
*/
|
*/
|
||||||
public class ClientEventHandler {
|
public class ClientEventHandler {
|
||||||
|
|
||||||
public static Map<EntityPlayer, XZPair<Float, Integer>> playerShieldStatus = new HashMap<EntityPlayer, XZPair<Float, Integer>>();
|
public static Map<EntityPlayer, DataUtils.XZPair<Float, Integer>> playerShieldStatus = new HashMap<>();
|
||||||
|
|
||||||
public static int elapsedTicks;
|
public static int elapsedTicks;
|
||||||
private static float previousFOB = 0f;
|
private static float previousFOB = 0f;
|
||||||
@@ -72,9 +72,9 @@ public class ClientEventHandler {
|
|||||||
if (event.phase != TickEvent.Phase.START || event.type != TickEvent.Type.CLIENT || event.side != Side.CLIENT)
|
if (event.phase != TickEvent.Phase.START || event.type != TickEvent.Type.CLIENT || event.side != Side.CLIENT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (Iterator<Map.Entry<EntityPlayer, XZPair<Float, Integer>>> i = playerShieldStatus.entrySet().iterator(); i
|
for (Iterator<Map.Entry<EntityPlayer, DataUtils.XZPair<Float, Integer>>> i = playerShieldStatus.entrySet()
|
||||||
.hasNext();) {
|
.iterator(); i.hasNext();) {
|
||||||
Map.Entry<EntityPlayer, XZPair<Float, Integer>> entry = i.next();
|
Map.Entry<EntityPlayer, DataUtils.XZPair<Float, Integer>> entry = i.next();
|
||||||
if (elapsedTicks - entry.getValue().getValue() > 5) i.remove();
|
if (elapsedTicks - entry.getValue().getValue() > 5) i.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.client.handler;
|
package com.brandon3055.draconicevolution.client.handler;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -14,13 +16,12 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.client.utills.GuiHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.gui.GuiHudConfig;
|
import com.brandon3055.draconicevolution.client.gui.GuiHudConfig;
|
||||||
|
import com.brandon3055.draconicevolution.client.utils.GuiHelper;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.items.armor.CustomArmorHandler;
|
import com.brandon3055.draconicevolution.common.items.armor.CustomArmorHandler;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
|
import com.brandon3055.draconicevolution.common.utils.IHudDisplayBlock;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IHudDisplayItem;
|
import com.brandon3055.draconicevolution.common.utils.IHudDisplayItem;
|
||||||
|
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@@ -213,7 +214,7 @@ public class HudHandler {
|
|||||||
GL11.glTranslated(-x, -y, 0);
|
GL11.glTranslated(-x, -y, 0);
|
||||||
String shield = Math.round(shieldPoints) + "/" + (int) maxShieldPoints;
|
String shield = Math.round(shieldPoints) + "/" + (int) maxShieldPoints;
|
||||||
String entropy = "EN: " + (int) shieldEntropy + "%";
|
String entropy = "EN: " + (int) shieldEntropy + "%";
|
||||||
String energy = "RF: " + Utills.formatNumber(rfTotal);
|
String energy = "RF: " + formatNumber(rfTotal);
|
||||||
float fade = Math.min(armorStatsFadeOut, 1F);
|
float fade = Math.min(armorStatsFadeOut, 1F);
|
||||||
if (!rotated) {
|
if (!rotated) {
|
||||||
fontRenderer
|
fontRenderer
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import org.apache.commons.io.FilenameUtils;
|
import org.apache.commons.io.FilenameUtils;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIManual;
|
import com.brandon3055.draconicevolution.client.gui.componentguis.GUIManual;
|
||||||
import com.brandon3055.draconicevolution.client.utill.CustomResourceLocation;
|
import com.brandon3055.draconicevolution.client.utils.CustomResourceLocation;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
import com.google.common.io.ByteStreams;
|
import com.google.common.io.ByteStreams;
|
||||||
import com.google.gson.stream.JsonWriter;
|
import com.google.gson.stream.JsonWriter;
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -13,7 +13,6 @@ import net.minecraft.util.MovingObjectPosition;
|
|||||||
|
|
||||||
import org.lwjgl.input.Mouse;
|
import org.lwjgl.input.Mouse;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.items.tools.Magnet;
|
import com.brandon3055.draconicevolution.common.items.tools.Magnet;
|
||||||
@@ -23,8 +22,9 @@ import com.brandon3055.draconicevolution.common.network.MagnetTogglePacket;
|
|||||||
import com.brandon3055.draconicevolution.common.network.MagnetToggleSelfPickupPacket;
|
import com.brandon3055.draconicevolution.common.network.MagnetToggleSelfPickupPacket;
|
||||||
import com.brandon3055.draconicevolution.common.network.PlacedItemPacket;
|
import com.brandon3055.draconicevolution.common.network.PlacedItemPacket;
|
||||||
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
|
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.InventoryUtils;
|
import com.brandon3055.draconicevolution.common.utils.InventoryUtils;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ import net.minecraftforge.client.IItemRenderer;
|
|||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
|
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ICustomItemData;
|
import com.brandon3055.draconicevolution.common.utils.ICustomItemData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 16/11/2014.
|
* Created by Brandon on 16/11/2014.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import org.lwjgl.opengl.GL11;
|
|||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by brandon3055 on 17/8/2015.
|
* Created by brandon3055 on 17/8/2015.
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@ import net.minecraftforge.client.IItemRenderer;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
public class RenderMobSoul implements IItemRenderer {
|
public class RenderMobSoul implements IItemRenderer {
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -10,10 +10,10 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.handler.ClientEventHandler;
|
import com.brandon3055.draconicevolution.client.handler.ClientEventHandler;
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 8/02/2015.
|
* Created by Brandon on 8/02/2015.
|
||||||
@@ -83,14 +83,13 @@ public class ParticleEnergyBeam extends EntityFX {
|
|||||||
this.tZ = tZ;
|
this.tZ = tZ;
|
||||||
|
|
||||||
if (offsetMode > 0) {
|
if (offsetMode > 0) {
|
||||||
double dist = Utills.getDistanceAtoB(x, z, tX, tZ);
|
double dist = Utils.getDistanceAtoB(x, z, tX, tZ);
|
||||||
if (dist == 0) dist = 0.1;
|
if (dist == 0) dist = 0.1;
|
||||||
double xDist = x - tX;
|
double xDist = x - tX;
|
||||||
double zDist = z - tZ;
|
double zDist = z - tZ;
|
||||||
double xOff = xDist / dist;
|
double xOff = xDist / dist;
|
||||||
double zOff = zDist / dist;
|
double zOff = zDist / dist;
|
||||||
if (xOff == 0 && zOff == 0) xOff = 1;
|
if (xOff == 0 && zOff == 0) xOff = 1;
|
||||||
// LogHelper.info(xOff + " " + zOff);
|
|
||||||
double offM = 0.4D;
|
double offM = 0.4D;
|
||||||
|
|
||||||
if (offsetMode == 2 || offsetMode == 3) setPosition(posX - xOff * offM, posY, posZ - zOff * offM);
|
if (offsetMode == 2 || offsetMode == 3) setPosition(posX - xOff * offM, posY, posZ - zOff * offM);
|
||||||
|
|||||||
+9
-9
@@ -11,10 +11,10 @@ import net.minecraftforge.client.model.IModelCustom;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
import com.brandon3055.draconicevolution.common.entity.EntityDragonProjectile;
|
import com.brandon3055.draconicevolution.common.entity.EntityDragonProjectile;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -710,8 +710,8 @@ public class Particles {
|
|||||||
// super.onUpdate();
|
// super.onUpdate();
|
||||||
if (particleAge >= particleMaxAge || this.getDistanceSq(targetX, targetY, targetZ) < 0.05) setDead();
|
if (particleAge >= particleMaxAge || this.getDistanceSq(targetX, targetY, targetZ) < 0.05) setDead();
|
||||||
|
|
||||||
double d1 = Utills.getDistanceAtoB(startX, startY, startZ, targetX, targetY, targetZ);
|
double d1 = Utils.getDistanceAtoB(startX, startY, startZ, targetX, targetY, targetZ);
|
||||||
double d2 = Utills.getDistanceAtoB(posX, posY, posZ, targetX, targetY, targetZ);
|
double d2 = Utils.getDistanceAtoB(posX, posY, posZ, targetX, targetY, targetZ);
|
||||||
particleScale = ((float) (d2 / d1)) * baseScale;
|
particleScale = ((float) (d2 / d1)) * baseScale;
|
||||||
|
|
||||||
particleAge++;
|
particleAge++;
|
||||||
@@ -1198,16 +1198,16 @@ public class Particles {
|
|||||||
prevPosZ = posZ;
|
prevPosZ = posZ;
|
||||||
|
|
||||||
if (mode == 0) {
|
if (mode == 0) {
|
||||||
if (Utills.getDistanceAtoB(posX, posY, posZ, focalX, focalY, focalZ) < 0.2 && particleAge > 5) mode = 1;
|
if (Utils.getDistanceAtoB(posX, posY, posZ, focalX, focalY, focalZ) < 0.2 && particleAge > 5) mode = 1;
|
||||||
double d = Utills.getDistanceAtoB(focalX, focalY, focalZ, shardX, shardY, shardZ);
|
double d = Utils.getDistanceAtoB(focalX, focalY, focalZ, shardX, shardY, shardZ);
|
||||||
float motionMod = 0.1F;
|
float motionMod = 0.1F;
|
||||||
motionX += (focalX - posX) / d * motionMod;
|
motionX += (focalX - posX) / d * motionMod;
|
||||||
motionY += (focalY - posY) / d * motionMod;
|
motionY += (focalY - posY) / d * motionMod;
|
||||||
motionZ += (focalZ - posZ) / d * motionMod;
|
motionZ += (focalZ - posZ) / d * motionMod;
|
||||||
}
|
}
|
||||||
if (mode == 1) {
|
if (mode == 1) {
|
||||||
if (Utills.getDistanceAtoB(posX, posY, posZ, shardX, shardY, shardZ) < 1) setDead();
|
if (Utils.getDistanceAtoB(posX, posY, posZ, shardX, shardY, shardZ) < 1) setDead();
|
||||||
double d = Utills.getDistanceAtoB(focalX, focalY, focalZ, shardX, shardY, shardZ);
|
double d = Utils.getDistanceAtoB(focalX, focalY, focalZ, shardX, shardY, shardZ);
|
||||||
particleScale = 1F - (float) d * 0.01F;
|
particleScale = 1F - (float) d * 0.01F;
|
||||||
float motionMod = 1F;
|
float motionMod = 1F;
|
||||||
motionX = (shardX - focalX) / d * motionMod;
|
motionX = (shardX - focalX) / d * motionMod;
|
||||||
@@ -1216,8 +1216,8 @@ public class Particles {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mode == 10) {
|
if (mode == 10) {
|
||||||
if (Utills.getDistanceAtoB(posX, posY, posZ, shardX, shardY, shardZ) < 0.3) setDead();
|
if (Utils.getDistanceAtoB(posX, posY, posZ, shardX, shardY, shardZ) < 0.3) setDead();
|
||||||
double d = Utills.getDistanceAtoB(focalX, focalY, focalZ, shardX, shardY, shardZ);
|
double d = Utils.getDistanceAtoB(focalX, focalY, focalZ, shardX, shardY, shardZ);
|
||||||
float motionMod = 0.4F;
|
float motionMod = 0.4F;
|
||||||
motionX = (shardX - focalX) / d * motionMod;
|
motionX = (shardX - focalX) / d * motionMod;
|
||||||
motionY = (shardY - focalY) / d * motionMod;
|
motionY = (shardY - focalY) / d * motionMod;
|
||||||
|
|||||||
+3
-3
@@ -20,13 +20,13 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.model.ModelTeleporterStand;
|
import com.brandon3055.draconicevolution.client.model.ModelTeleporterStand;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.items.tools.TeleporterMKII;
|
import com.brandon3055.draconicevolution.common.items.tools.TeleporterMKII;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileTeleporterStand;
|
import com.brandon3055.draconicevolution.common.tileentities.TileTeleporterStand;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 25/10/2014.
|
* Created by Brandon on 25/10/2014.
|
||||||
@@ -136,7 +136,7 @@ public class RenderTileTeleporterStand extends TileEntitySpecialRenderer {
|
|||||||
double pitchAngle = Math.toDegrees(
|
double pitchAngle = Math.toDegrees(
|
||||||
Math.atan2(
|
Math.atan2(
|
||||||
yDiff,
|
yDiff,
|
||||||
Utills.getDistanceAtoB(
|
Utils.getDistanceAtoB(
|
||||||
player.posX,
|
player.posX,
|
||||||
player.posY,
|
player.posY,
|
||||||
player.posZ,
|
player.posZ,
|
||||||
|
|||||||
-72
@@ -1,72 +0,0 @@
|
|||||||
package com.brandon3055.draconicevolution.client.render.tile;
|
|
||||||
|
|
||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
|
||||||
import net.minecraftforge.client.model.AdvancedModelLoader;
|
|
||||||
import net.minecraftforge.client.model.IModelCustom;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileTestBlock;
|
|
||||||
|
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Brandon on 24/07/2014.
|
|
||||||
*/
|
|
||||||
public class RenderTileTestBlock extends TileEntitySpecialRenderer {
|
|
||||||
|
|
||||||
private static final ResourceLocation iner_model_texture = new ResourceLocation(
|
|
||||||
References.MODID.toLowerCase(),
|
|
||||||
"textures/models/power_sphere_layer_1.png");
|
|
||||||
private static final ResourceLocation outer_model_texture = new ResourceLocation(
|
|
||||||
References.MODID.toLowerCase(),
|
|
||||||
"textures/models/power_sphere_layer_2.png");
|
|
||||||
private IModelCustom iner_model;
|
|
||||||
private IModelCustom outer_model;
|
|
||||||
|
|
||||||
public RenderTileTestBlock() {
|
|
||||||
iner_model = AdvancedModelLoader
|
|
||||||
.loadModel(new ResourceLocation(References.MODID.toLowerCase(), "models/power_sphere_layer_1.obj"));
|
|
||||||
// outer_model = AdvancedModelLoader.loadModel(new ResourceLocation(References.MODID.toLowerCase(),
|
|
||||||
// "models/power_sphere_layer_2.obj"));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void renderTileEntityAt(TileEntity var1, double x, double y, double z, float var8) {
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
|
||||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float) 100, (float) 100);
|
|
||||||
|
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
|
||||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
|
||||||
// GL11.glDepthMask(false);
|
|
||||||
|
|
||||||
GL11.glTranslated(x + 0.5, y + 0.5, z + 0.5);
|
|
||||||
|
|
||||||
FMLClientHandler.instance().getClient().getTextureManager().bindTexture(iner_model_texture);
|
|
||||||
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glRotatef(((TileTestBlock) var1).modelRotation, 0F, 1F, 0.5F);
|
|
||||||
// GL11.glColor4f(2F, 2F, 2F, 1F);
|
|
||||||
iner_model.renderAll();
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
|
|
||||||
GL11.glScalef(1.1F, 1.1F, 1.1F);
|
|
||||||
GL11.glDepthMask(false);
|
|
||||||
FMLClientHandler.instance().getClient().getTextureManager().bindTexture(outer_model_texture);
|
|
||||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 200F, 200F);
|
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
|
||||||
GL11.glRotatef(((TileTestBlock) var1).modelRotation * 0.5F, 0F, -1F, -0.5F);
|
|
||||||
GL11.glColor4f(0.5F, 2F, 2F, 0.7F);
|
|
||||||
outer_model.renderAll();
|
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
|
||||||
GL11.glDepthMask(true);
|
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils;
|
||||||
|
|
||||||
|
import java.net.URI;
|
||||||
|
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by brandon3055 on 11/11/2015.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class ClientUtils {
|
||||||
|
|
||||||
|
public static void openLink(String url) {
|
||||||
|
try {
|
||||||
|
URI uri = new URI(url);
|
||||||
|
Class oclass = Class.forName("java.awt.Desktop");
|
||||||
|
Object object = oclass.getMethod("getDesktop", new Class[0]).invoke(null, new Object[0]);
|
||||||
|
oclass.getMethod("browse", new Class[] { URI.class }).invoke(object, new Object[] { uri });
|
||||||
|
} catch (Throwable throwable) {
|
||||||
|
LogHelper.error("Couldn\'t open link");
|
||||||
|
throwable.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package com.brandon3055.draconicevolution.client.utill;
|
package com.brandon3055.draconicevolution.client.utils;
|
||||||
|
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 28/06/2014.
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("unused")
|
||||||
|
public class GuiHelper {
|
||||||
|
|
||||||
|
public static final double PXL128 = 0.0078125;
|
||||||
|
public static final double PXL256 = 0.00390625;
|
||||||
|
|
||||||
|
public static boolean isInRect(int x, int y, int xSize, int ySize, int mouseX, int mouseY) {
|
||||||
|
return ((mouseX >= x && mouseX <= x + xSize) && (mouseY >= y && mouseY <= y + ySize));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void drawTexturedRect(int x, int y, int u, int v, int width, int height) {
|
||||||
|
drawTexturedRect(x, y, width, height, u, v, width, height, 0, PXL256);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void drawTexturedRect(double x, double y, double width, double height, int u, int v, int uSize,
|
||||||
|
int vSize, double zLevel, double pxl) {
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.addVertexWithUV(x, y + height, zLevel, u * pxl, (v + vSize) * pxl);
|
||||||
|
tessellator.addVertexWithUV(x + width, y + height, zLevel, (u + uSize) * pxl, (v + vSize) * pxl);
|
||||||
|
tessellator.addVertexWithUV(x + width, y, zLevel, (u + uSize) * pxl, v * pxl);
|
||||||
|
tessellator.addVertexWithUV(x, y, zLevel, u * pxl, v * pxl);
|
||||||
|
tessellator.draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void drawHoveringText(List list, int x, int y, FontRenderer font, float fade, double scale,
|
||||||
|
int guiWidth, int guiHeight) {
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||||
|
GL11.glScaled(scale, scale, 1);
|
||||||
|
x = (int) (x / scale);
|
||||||
|
y = (int) (y / scale);
|
||||||
|
|
||||||
|
int k = 0;
|
||||||
|
Iterator iterator = list.iterator();
|
||||||
|
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
String s = (String) iterator.next();
|
||||||
|
int l = font.getStringWidth(s);
|
||||||
|
|
||||||
|
if (l > k) {
|
||||||
|
k = l;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int adjX = x + 12;
|
||||||
|
int adjY = y - 12;
|
||||||
|
int i1 = 8;
|
||||||
|
|
||||||
|
if (list.size() > 1) {
|
||||||
|
i1 += 2 + (list.size() - 1) * 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adjX + k > (int) (guiWidth / scale)) {
|
||||||
|
adjX -= 28 + k;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adjY + i1 + 6 > (int) (guiHeight / scale)) {
|
||||||
|
adjY = (int) (guiHeight / scale) - i1 - 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
int j1 = -267386864;
|
||||||
|
drawGradientRect(adjX - 3, adjY - 4, adjX + k + 3, adjY - 3, j1, j1, fade, scale);
|
||||||
|
drawGradientRect(adjX - 3, adjY + i1 + 3, adjX + k + 3, adjY + i1 + 4, j1, j1, fade, scale);
|
||||||
|
drawGradientRect(adjX - 3, adjY - 3, adjX + k + 3, adjY + i1 + 3, j1, j1, fade, scale);
|
||||||
|
drawGradientRect(adjX - 4, adjY - 3, adjX - 3, adjY + i1 + 3, j1, j1, fade, scale);
|
||||||
|
drawGradientRect(adjX + k + 3, adjY - 3, adjX + k + 4, adjY + i1 + 3, j1, j1, fade, scale);
|
||||||
|
int k1 = 1347420415;
|
||||||
|
int l1 = (k1 & 16711422) >> 1 | k1 & -16777216;
|
||||||
|
drawGradientRect(adjX - 3, adjY - 3 + 1, adjX - 3 + 1, adjY + i1 + 3 - 1, k1, l1, fade, scale);
|
||||||
|
drawGradientRect(adjX + k + 2, adjY - 3 + 1, adjX + k + 3, adjY + i1 + 3 - 1, k1, l1, fade, scale);
|
||||||
|
drawGradientRect(adjX - 3, adjY - 3, adjX + k + 3, adjY - 3 + 1, k1, k1, fade, scale);
|
||||||
|
drawGradientRect(adjX - 3, adjY + i1 + 2, adjX + k + 3, adjY + i1 + 3, l1, l1, fade, scale);
|
||||||
|
|
||||||
|
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||||||
|
String s1 = (String) list.get(i2);
|
||||||
|
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||||
|
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||||
|
font.drawStringWithShadow(s1, adjX, adjY, ((int) (fade * 240F) + 0x10 << 24) | 0x00FFFFFF);
|
||||||
|
|
||||||
|
adjY += 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void drawGradientRect(int x1, int y1, int x2, int y2, int colour1, int colour2, float fade,
|
||||||
|
double scale) {
|
||||||
|
float f = ((colour1 >> 24 & 255) / 255.0F) * fade;
|
||||||
|
float f1 = (float) (colour1 >> 16 & 255) / 255.0F;
|
||||||
|
float f2 = (float) (colour1 >> 8 & 255) / 255.0F;
|
||||||
|
float f3 = (float) (colour1 & 255) / 255.0F;
|
||||||
|
float f4 = ((colour2 >> 24 & 255) / 255.0F) * fade;
|
||||||
|
float f5 = (float) (colour2 >> 16 & 255) / 255.0F;
|
||||||
|
float f6 = (float) (colour2 >> 8 & 255) / 255.0F;
|
||||||
|
float f7 = (float) (colour2 & 255) / 255.0F;
|
||||||
|
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||||
|
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||||
|
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.setColorRGBA_F(f1, f2, f3, f);
|
||||||
|
tessellator.addVertex((double) x2, (double) y1, 300D);
|
||||||
|
tessellator.addVertex((double) x1, (double) y1, 300D);
|
||||||
|
tessellator.setColorRGBA_F(f5, f6, f7, f4);
|
||||||
|
tessellator.addVertex((double) x1, (double) y2, 300D);
|
||||||
|
tessellator.addVertex((double) x2, (double) y2, 300D);
|
||||||
|
tessellator.draw();
|
||||||
|
GL11.glShadeModel(GL11.GL_FLAT);
|
||||||
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||||
|
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||||
|
}
|
||||||
|
}
|
||||||
+224
@@ -0,0 +1,224 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 25/12/2014. This gui system is based on open blocks gui system
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
|
import net.minecraft.client.gui.Gui;
|
||||||
|
import net.minecraft.client.renderer.entity.RenderItem;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.util.StatCollector;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
public abstract class ComponentBase extends Gui {
|
||||||
|
|
||||||
|
protected static RenderItem itemRender = new RenderItem();
|
||||||
|
protected int x;
|
||||||
|
protected int y;
|
||||||
|
protected boolean enabled = true;
|
||||||
|
public static Minecraft mc;
|
||||||
|
public FontRenderer fontRendererObj;
|
||||||
|
private String group = "";
|
||||||
|
/** The width of the screen object. */
|
||||||
|
public int width;
|
||||||
|
/** The height of the screen object. */
|
||||||
|
public int height;
|
||||||
|
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
public ComponentBase(int x, int y) {
|
||||||
|
this.x = x;
|
||||||
|
this.y = y;
|
||||||
|
mc = Minecraft.getMinecraft();
|
||||||
|
fontRendererObj = mc.fontRenderer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGroup() {
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentBase setGroup(String group) {
|
||||||
|
this.group = group;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentBase setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setX(int x) {
|
||||||
|
this.x = x;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setY(int y) {
|
||||||
|
this.y = y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getX() {
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getY() {
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract int getWidth();
|
||||||
|
|
||||||
|
public abstract int getHeight();
|
||||||
|
|
||||||
|
public void setEnabled(boolean enabled) {
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMouseOver(int mouseX, int mouseY) {
|
||||||
|
return mouseX >= x && mouseX < x + getWidth() && mouseY >= y && mouseY < y + getHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void renderBackground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY);
|
||||||
|
|
||||||
|
public abstract void renderForground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY);
|
||||||
|
|
||||||
|
public void renderFinal(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {}
|
||||||
|
|
||||||
|
protected void drawHoveringText(List list, int x, int y, FontRenderer font) {
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||||
|
// RenderHelper.disableStandardItemLighting();
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||||
|
int k = 0;
|
||||||
|
Iterator iterator = list.iterator();
|
||||||
|
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
String s = (String) iterator.next();
|
||||||
|
int l = font.getStringWidth(s);
|
||||||
|
|
||||||
|
if (l > k) {
|
||||||
|
k = l;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int adjX = x + 12;
|
||||||
|
int adjY = y - 12;
|
||||||
|
int i1 = 8;
|
||||||
|
|
||||||
|
if (list.size() > 1) {
|
||||||
|
i1 += 2 + (list.size() - 1) * 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adjX + k > width) {
|
||||||
|
adjX -= 28 + k;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adjY + i1 + 6 > height) {
|
||||||
|
adjY = height - i1 - 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.zLevel = 300.0F;
|
||||||
|
itemRender.zLevel = 300.0F;
|
||||||
|
int j1 = -267386864;
|
||||||
|
this.drawGradientRect(adjX - 3, adjY - 4, adjX + k + 3, adjY - 3, j1, j1);
|
||||||
|
this.drawGradientRect(adjX - 3, adjY + i1 + 3, adjX + k + 3, adjY + i1 + 4, j1, j1);
|
||||||
|
this.drawGradientRect(adjX - 3, adjY - 3, adjX + k + 3, adjY + i1 + 3, j1, j1);
|
||||||
|
this.drawGradientRect(adjX - 4, adjY - 3, adjX - 3, adjY + i1 + 3, j1, j1);
|
||||||
|
this.drawGradientRect(adjX + k + 3, adjY - 3, adjX + k + 4, adjY + i1 + 3, j1, j1);
|
||||||
|
int k1 = 1347420415;
|
||||||
|
int l1 = (k1 & 16711422) >> 1 | k1 & -16777216;
|
||||||
|
this.drawGradientRect(adjX - 3, adjY - 3 + 1, adjX - 3 + 1, adjY + i1 + 3 - 1, k1, l1);
|
||||||
|
this.drawGradientRect(adjX + k + 2, adjY - 3 + 1, adjX + k + 3, adjY + i1 + 3 - 1, k1, l1);
|
||||||
|
this.drawGradientRect(adjX - 3, adjY - 3, adjX + k + 3, adjY - 3 + 1, k1, k1);
|
||||||
|
this.drawGradientRect(adjX - 3, adjY + i1 + 2, adjX + k + 3, adjY + i1 + 3, l1, l1);
|
||||||
|
|
||||||
|
for (int i2 = 0; i2 < list.size(); ++i2) {
|
||||||
|
String s1 = (String) list.get(i2);
|
||||||
|
font.drawStringWithShadow(s1, adjX, adjY, -1);
|
||||||
|
|
||||||
|
if (i2 == 0) {
|
||||||
|
adjY += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
adjY += 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.zLevel = 0.0F;
|
||||||
|
itemRender.zLevel = 0.0F;
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
|
// RenderHelper.enableStandardItemLighting();
|
||||||
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawItemStack(ItemStack stack, int x, int y, String count) {
|
||||||
|
if (stack == null) return;
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
|
|
||||||
|
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||||
|
this.zLevel = 200.0F;
|
||||||
|
itemRender.zLevel = 200.0F;
|
||||||
|
FontRenderer font;
|
||||||
|
font = stack.getItem().getFontRenderer(stack);
|
||||||
|
if (font == null) font = fontRendererObj;
|
||||||
|
itemRender.renderItemAndEffectIntoGUI(font, mc.getTextureManager(), stack, x, y);
|
||||||
|
// itemRender.renderEffect(mc.getTextureManager(), x, y);
|
||||||
|
if (!count.equals("null"))
|
||||||
|
itemRender.renderItemOverlayIntoGUI(font, mc.getTextureManager(), stack, x, y, count);
|
||||||
|
this.zLevel = 0.0F;
|
||||||
|
itemRender.zLevel = 0.0F;
|
||||||
|
|
||||||
|
// GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
// GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
|
GL11.glPopAttrib();
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void renderToolTip(ItemStack stack, int x, int y) {
|
||||||
|
List list = stack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||||
|
|
||||||
|
for (int k = 0; k < list.size(); ++k) {
|
||||||
|
if (k == 0) {
|
||||||
|
list.set(k, stack.getRarity().rarityColor + (String) list.get(k));
|
||||||
|
} else {
|
||||||
|
list.set(k, EnumChatFormatting.GRAY + (String) list.get(k));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
FontRenderer font = stack.getItem().getFontRenderer(stack);
|
||||||
|
drawHoveringText(list, x, y, (font == null ? fontRendererObj : font));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void mouseClicked(int x, int y, int button) {}
|
||||||
|
|
||||||
|
public void setWorldAndResolution(Minecraft mc, int width, int height) {
|
||||||
|
|
||||||
|
this.mc = mc;
|
||||||
|
this.fontRendererObj = mc.fontRenderer;
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Translate To Local */
|
||||||
|
public String ttl(String unlocalizedName) {
|
||||||
|
return StatCollector.translateToLocal(unlocalizedName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateScreen() {}
|
||||||
|
|
||||||
|
protected void keyTyped(char par1, int par2) {}
|
||||||
|
}
|
||||||
+122
@@ -0,0 +1,122 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraft.util.StringUtils;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 1/01/2015.
|
||||||
|
*/
|
||||||
|
public class ComponentButton extends ComponentBase {
|
||||||
|
|
||||||
|
protected static final ResourceLocation buttonTextures = new ResourceLocation("textures/gui/widgets.png");
|
||||||
|
|
||||||
|
public int buttonId;
|
||||||
|
public GUIBase gui;
|
||||||
|
public int xSize;
|
||||||
|
public int ySize;
|
||||||
|
public int packedFGColour;
|
||||||
|
public String displayString;
|
||||||
|
public String hoverText;
|
||||||
|
|
||||||
|
public ComponentButton(int x, int y, int xSize, int ySize, int id, GUIBase gui, String displayString) {
|
||||||
|
super(x, y);
|
||||||
|
this.xSize = xSize;
|
||||||
|
this.ySize = ySize;
|
||||||
|
this.buttonId = id;
|
||||||
|
this.gui = gui;
|
||||||
|
this.displayString = displayString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentButton(int x, int y, int xSize, int ySize, int id, GUIBase gui, String displayString,
|
||||||
|
String hoverText) {
|
||||||
|
this(x, y, xSize, ySize, id, gui, displayString);
|
||||||
|
this.hoverText = hoverText;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
return xSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
return ySize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderBackground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderForground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||||
|
// FontRenderer fontrenderer = minecraft.fontRenderer;
|
||||||
|
minecraft.getTextureManager().bindTexture(buttonTextures);
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
int k = isMouseOver(mouseX, mouseY) ? 2 : 1;
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||||
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
this.drawTexturedModalRect(this.x, this.y, 0, 46 + k * 20, this.xSize / 2, this.ySize);
|
||||||
|
this.drawTexturedModalRect(
|
||||||
|
this.x + this.xSize / 2,
|
||||||
|
this.y,
|
||||||
|
200 - this.xSize / 2,
|
||||||
|
46 + k * 20,
|
||||||
|
this.xSize / 2,
|
||||||
|
this.ySize);
|
||||||
|
if (this.ySize < 20) {
|
||||||
|
|
||||||
|
this.drawTexturedModalRect(x, y + 3, 0, (46 + k * 20) + 20 - ySize + 3, xSize / 2, ySize - 3);
|
||||||
|
this.drawTexturedModalRect(
|
||||||
|
x + xSize / 2,
|
||||||
|
y + 3,
|
||||||
|
200 - xSize / 2,
|
||||||
|
(46 + k * 20) + 20 - ySize + 3,
|
||||||
|
xSize / 2,
|
||||||
|
ySize - 3);
|
||||||
|
}
|
||||||
|
// this.mouseDragged(minecraft, mouseX, mouseY);
|
||||||
|
int l = 14737632;
|
||||||
|
|
||||||
|
if (packedFGColour != 0) {
|
||||||
|
l = packedFGColour;
|
||||||
|
} else if (!this.enabled) {
|
||||||
|
l = 10526880;
|
||||||
|
} else if (isMouseOver(mouseX, mouseY)) {
|
||||||
|
l = 16777120;
|
||||||
|
}
|
||||||
|
this.drawCenteredString(
|
||||||
|
fontRendererObj,
|
||||||
|
this.displayString,
|
||||||
|
this.x + this.xSize / 2,
|
||||||
|
this.y + (this.ySize - 8) / 2,
|
||||||
|
l);
|
||||||
|
GL11.glPopAttrib();
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderFinal(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
if (isMouseOver(mouseX, mouseY) && !StringUtils.isNullOrEmpty(hoverText)) {
|
||||||
|
List<String> list = new ArrayList<String>();
|
||||||
|
list.add(hoverText);
|
||||||
|
drawHoveringText(list, mouseX + offsetX, mouseY + offsetY + 10, fontRendererObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(int x, int y, int button) {
|
||||||
|
Minecraft.getMinecraft().getSoundHandler()
|
||||||
|
.playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
|
||||||
|
gui.buttonClicked(buttonId, button);
|
||||||
|
}
|
||||||
|
}
|
||||||
+170
@@ -0,0 +1,170 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 28/12/2014.
|
||||||
|
*/
|
||||||
|
public class ComponentCollection extends ComponentBase {
|
||||||
|
|
||||||
|
protected List<ComponentBase> components = new ArrayList<ComponentBase>();
|
||||||
|
protected int xSize;
|
||||||
|
protected int ySize;
|
||||||
|
protected List<String> deadGroups = new ArrayList<String>();
|
||||||
|
protected GUIBase gui;
|
||||||
|
private boolean openBoarders = false;
|
||||||
|
|
||||||
|
public ComponentCollection(int x, int y, int xSize, int ySize, GUIBase gui) {
|
||||||
|
super(x, y);
|
||||||
|
this.xSize = xSize;
|
||||||
|
this.ySize = ySize;
|
||||||
|
this.gui = gui;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
return xSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
return ySize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentBase addComponent(ComponentBase component) {
|
||||||
|
components.add(component);
|
||||||
|
component.setWorldAndResolution(Minecraft.getMinecraft(), width, height);
|
||||||
|
return component;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isComponentEnabled(ComponentBase component) {
|
||||||
|
return component != null && component.isEnabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isComponentCapturingMouse(ComponentBase component, int mouseX, int mouseY) {
|
||||||
|
return isComponentEnabled(component) && component.isMouseOver(mouseX, mouseY);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void renderBackground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
for (ComponentBase component : components) if (isComponentEnabled(component)) {
|
||||||
|
component.renderBackground(minecraft, offsetX + this.x, offsetY + this.y, mouseX - this.x, mouseY - this.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void renderForground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
for (ComponentBase component : components) if (isComponentEnabled(component)) {
|
||||||
|
component.renderForground(minecraft, offsetX + this.x, offsetY + this.y, mouseX - this.x, mouseY - this.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public final void renderFinal(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
for (ComponentBase component : components) if (isComponentEnabled(component)) {
|
||||||
|
component.renderFinal(minecraft, offsetX + this.x, offsetY + this.y, mouseX - this.x, mouseY - this.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(int x, int y, int button) {
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
if (!gui.buttonPressed && component.isEnabled() && component.isMouseOver(x, y)) {
|
||||||
|
component.mouseClicked(x, y, button);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// removeScheduled();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void keyTyped(char par1, int par2) {
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
if (component.isEnabled()) {
|
||||||
|
component.keyTyped(par1, par2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ComponentBase> getComponents() {
|
||||||
|
return components;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentBase getComponent(String name) {
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
if (component.name != null && component.name.equals(name)) return component;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroupEnabled(String group, boolean enabled) {
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
if (component.getGroup().equals(group)) {
|
||||||
|
component.setEnabled(enabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOnlyGroupEnabled(String group) {
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
if (component.getGroup().equals(group)) {
|
||||||
|
component.setEnabled(enabled);
|
||||||
|
} else {
|
||||||
|
component.setEnabled(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setComponentEnabled(String name, boolean enabled) {
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
if (component.name != null && component.name.equals(name)) {
|
||||||
|
component.setEnabled(enabled);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeGroup(String group) {
|
||||||
|
List<ComponentBase> list = new ArrayList<ComponentBase>();
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
if (component.getGroup().equals(group)) list.add(component);
|
||||||
|
}
|
||||||
|
components.removeAll(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setWorldAndResolution(Minecraft mc, int width, int height) {
|
||||||
|
super.setWorldAndResolution(mc, width, height);
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
component.setWorldAndResolution(mc, width, height);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void removeScheduled() {
|
||||||
|
if (!deadGroups.isEmpty()) {
|
||||||
|
for (String s : deadGroups) removeGroup(s);
|
||||||
|
deadGroups.clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void schedulRemoval(String group) {
|
||||||
|
deadGroups.add(group);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateScreen() {
|
||||||
|
for (ComponentBase component : components) {
|
||||||
|
component.updateScreen();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentCollection setOpenBoarders() {
|
||||||
|
openBoarders = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean openBoarders() {
|
||||||
|
return openBoarders;
|
||||||
|
}
|
||||||
|
}
|
||||||
+50
@@ -0,0 +1,50 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 31/12/2014.
|
||||||
|
*/
|
||||||
|
public class ComponentItemRenderer extends ComponentBase {
|
||||||
|
|
||||||
|
private static final ResourceLocation texture = new ResourceLocation("brandonscore:textures/gui/Widgets.png");
|
||||||
|
|
||||||
|
ItemStack stack;
|
||||||
|
|
||||||
|
public ComponentItemRenderer(int x, int y, ItemStack stack) {
|
||||||
|
super(x, y);
|
||||||
|
this.stack = stack;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
return 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderBackground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderForground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||||
|
drawTexturedModalRect(x, y, 118, 0, getWidth(), getHeight());
|
||||||
|
drawItemStack(stack, x + 2, y + 2, "null");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderFinal(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
if (isMouseOver(mouseX, mouseY)) {
|
||||||
|
renderToolTip(stack, mouseX + offsetX, mouseY + offsetY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+21
@@ -0,0 +1,21 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 6/03/2015.
|
||||||
|
*/
|
||||||
|
public abstract class ComponentScrollingBase extends ComponentBase {
|
||||||
|
|
||||||
|
protected GUIScrollingBase gui;
|
||||||
|
|
||||||
|
public ComponentScrollingBase(int x, int y, GUIScrollingBase gui) {
|
||||||
|
super(x, y);
|
||||||
|
this.gui = gui;
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void handleScrollInput(int direction);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isMouseOver(int mouseX, int mouseY) {
|
||||||
|
return super.isMouseOver(mouseX, mouseY + gui.scrollOffset);
|
||||||
|
}
|
||||||
|
}
|
||||||
+48
@@ -0,0 +1,48 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 13/01/2015.
|
||||||
|
*/
|
||||||
|
public class ComponentSlotBackground extends ComponentBase {
|
||||||
|
|
||||||
|
private static final ResourceLocation widgets = new ResourceLocation("brandonscore:textures/gui/Widgets.png");
|
||||||
|
|
||||||
|
public ComponentSlotBackground(int x, int y) {
|
||||||
|
super(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
return 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
return 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderBackground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
minecraft.renderEngine.bindTexture(widgets);
|
||||||
|
drawTexturedModalRect(x, y, 119, 1, getWidth(), getHeight());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderForground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {}
|
||||||
|
|
||||||
|
public static ComponentCollection addInventorySlots(ComponentCollection c, int xOffset, int yOffset,
|
||||||
|
int lockedSlot) {
|
||||||
|
for (int x = 0; x < 9; x++) if (x != lockedSlot)
|
||||||
|
c.addComponent(new ComponentSlotBackground(xOffset + x * 18, yOffset + 58)).setGroup("INVENTORY");
|
||||||
|
|
||||||
|
for (int y = 0; y < 3; y++) {
|
||||||
|
for (int x = 0; x < 9; x++) if (x + y * 9 + 9 != lockedSlot)
|
||||||
|
c.addComponent(new ComponentSlotBackground(xOffset + x * 18, yOffset + y * 18)).setGroup("INVENTORY");
|
||||||
|
}
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
}
|
||||||
+71
@@ -0,0 +1,71 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.GuiTextField;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by brandon3055 on 16/2/2016.
|
||||||
|
*/
|
||||||
|
public class ComponentTextField extends ComponentBase {
|
||||||
|
|
||||||
|
public GuiTextField textField;
|
||||||
|
private int xSize;
|
||||||
|
private int ySize;
|
||||||
|
private GUIBase parent;
|
||||||
|
private String label = "";
|
||||||
|
private int labelColour = 0;
|
||||||
|
|
||||||
|
public ComponentTextField(GUIBase parent, int x, int y, int xSize, int ySize) {
|
||||||
|
super(x, y);
|
||||||
|
this.xSize = xSize;
|
||||||
|
this.ySize = ySize;
|
||||||
|
this.parent = parent;
|
||||||
|
textField = new GuiTextField(fontRendererObj, x, y, xSize, ySize);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
return xSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
return ySize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderBackground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderForground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
drawRect(x - 1, y - 1, x + xSize - textField.width + 1, y + ySize + 1, -6250336);
|
||||||
|
textField.drawTextBox();
|
||||||
|
drawRect(x, y, x + xSize - textField.width, y + ySize, -16777216);
|
||||||
|
fontRendererObj.drawString(label, x + 1, y + 2, labelColour);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void mouseClicked(int x, int y, int button) {
|
||||||
|
textField.mouseClicked(x, y, button);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void keyTyped(char par1, int par2) {
|
||||||
|
textField.textboxKeyTyped(par1, par2);
|
||||||
|
if (textField.isFocused()) parent.componentCallBack(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isFocused() {
|
||||||
|
return textField.isFocused();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentTextField setLabel(String label, int labelColour) {
|
||||||
|
this.label = label;
|
||||||
|
this.labelColour = labelColour;
|
||||||
|
int labelLength = fontRendererObj.getStringWidth(label);
|
||||||
|
textField.xPosition = x + labelLength;
|
||||||
|
textField.width = xSize - labelLength;
|
||||||
|
textField.setTextColor(labelColour);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
+91
@@ -0,0 +1,91 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by brandon3055 on 31/7/2015.
|
||||||
|
*/
|
||||||
|
public class ComponentTextureButton extends ComponentButton {
|
||||||
|
|
||||||
|
public int textureXPos;
|
||||||
|
public int textureYPos;
|
||||||
|
private ResourceLocation texture;
|
||||||
|
private boolean forceFullRender = false;
|
||||||
|
|
||||||
|
// public ComponentTextureButton(int id, int xPos, int yPos, int textureXPos, int textureYPos, int xSise, int ySise,
|
||||||
|
// String text) {
|
||||||
|
public ComponentTextureButton(int x, int y, int textureXPos, int textureYPos, int xSize, int ySize, int id,
|
||||||
|
GUIBase gui, String displayString, String hoverText, ResourceLocation texture) {
|
||||||
|
super(x, y, xSize, ySize, id, gui, displayString, hoverText);
|
||||||
|
this.textureXPos = textureXPos;
|
||||||
|
this.textureYPos = textureYPos;
|
||||||
|
this.texture = texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentTextureButton forceFullRender() {
|
||||||
|
forceFullRender = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderForground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
minecraft.getTextureManager().bindTexture(texture);
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
|
if (!forceFullRender) {
|
||||||
|
int k = isMouseOver(mouseX, mouseY) ? 2 : 1;
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||||
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
this.drawTexturedModalRect(this.x, this.y, textureXPos, textureYPos + k * ySize, this.xSize, this.ySize);
|
||||||
|
int l = 14737632;
|
||||||
|
|
||||||
|
if (packedFGColour != 0) {
|
||||||
|
l = packedFGColour;
|
||||||
|
} else if (!this.enabled) {
|
||||||
|
l = 10526880;
|
||||||
|
} else if (isMouseOver(mouseX, mouseY)) {
|
||||||
|
l = 16777120;
|
||||||
|
}
|
||||||
|
this.drawCenteredString(
|
||||||
|
fontRendererObj,
|
||||||
|
this.displayString,
|
||||||
|
this.x + this.xSize / 2,
|
||||||
|
this.y + (this.ySize - 8) / 2,
|
||||||
|
l);
|
||||||
|
} else {
|
||||||
|
int xPos = this.x;
|
||||||
|
int yPos = this.y;
|
||||||
|
int xSize = this.xSize;
|
||||||
|
int ySize = this.ySize;
|
||||||
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
|
||||||
|
if (isMouseOver(mouseX, mouseY)) {
|
||||||
|
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||||
|
tessellator.setColorRGBA_I(0x000000, 255);
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.addVertex((double) xPos, (double) (yPos + ySize), (double) this.zLevel);
|
||||||
|
tessellator.addVertex((double) (xPos + xSize), (double) (yPos + ySize), (double) this.zLevel);
|
||||||
|
tessellator.addVertex((double) (xPos + xSize), (double) yPos, (double) this.zLevel);
|
||||||
|
tessellator.addVertex((double) xPos, (double) yPos, (double) this.zLevel);
|
||||||
|
tessellator.draw();
|
||||||
|
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
tessellator.startDrawingQuads();
|
||||||
|
tessellator.addVertexWithUV((double) xPos, (double) (yPos + ySize), (double) this.zLevel, 0, 1);
|
||||||
|
tessellator.addVertexWithUV((double) (xPos + xSize), (double) (yPos + ySize), (double) this.zLevel, 1, 1);
|
||||||
|
tessellator.addVertexWithUV((double) (xPos + xSize), (double) yPos, (double) this.zLevel, 1, 0);
|
||||||
|
tessellator.addVertexWithUV((double) xPos, (double) yPos, (double) this.zLevel, 0, 0);
|
||||||
|
tessellator.draw();
|
||||||
|
}
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
+68
@@ -0,0 +1,68 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 29/12/2014.
|
||||||
|
*/
|
||||||
|
public class ComponentTexturedRect extends ComponentBase {
|
||||||
|
|
||||||
|
private int width;
|
||||||
|
private int height;
|
||||||
|
private int texX = 0;
|
||||||
|
private int texY = 0;
|
||||||
|
private final ResourceLocation texture;
|
||||||
|
private boolean transparent = false;
|
||||||
|
|
||||||
|
public ComponentTexturedRect(int x, int y, int width, int height, ResourceLocation texture) {
|
||||||
|
super(x, y);
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
this.texture = texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ComponentTexturedRect(int x, int y, int texX, int texY, int width, int height, ResourceLocation texture,
|
||||||
|
boolean transparent) {
|
||||||
|
super(x, y);
|
||||||
|
this.width = width;
|
||||||
|
this.height = height;
|
||||||
|
this.texture = texture;
|
||||||
|
this.texX = texX;
|
||||||
|
this.texY = texY;
|
||||||
|
this.transparent = transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getWidth() {
|
||||||
|
return width;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHeight() {
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderBackground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||||
|
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||||
|
if (transparent) {
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
|
// GL11.glScalef(1f, 0.33f, 1f);
|
||||||
|
// GL11.glScalef(0.5f, 0.5f, 0.5f);
|
||||||
|
}
|
||||||
|
GL11.glColor4f(1f, 1f, 1f, 1f);
|
||||||
|
drawTexturedModalRect(x, y, texX, texY, width, height);
|
||||||
|
if (transparent) {
|
||||||
|
// GL11.glScalef(2f, 2f, 2f);
|
||||||
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void renderForground(Minecraft minecraft, int offsetX, int offsetY, int mouseX, int mouseY) {}
|
||||||
|
}
|
||||||
+142
@@ -0,0 +1,142 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 25/12/2014. This class is copied from open blocks
|
||||||
|
*/
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||||
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
public abstract class GUIBase extends GuiContainer {
|
||||||
|
|
||||||
|
protected ComponentCollection collection;
|
||||||
|
/** used to prevent multiple buttons being pressed wen overlapping components are changed */
|
||||||
|
protected boolean buttonPressed = false;
|
||||||
|
|
||||||
|
public GUIBase(Container container, int xSize, int ySize) {
|
||||||
|
super(container);
|
||||||
|
this.xSize = xSize;
|
||||||
|
this.ySize = ySize;
|
||||||
|
mc = Minecraft.getMinecraft();
|
||||||
|
collection = assembleComponents();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract ComponentCollection assembleComponents();
|
||||||
|
|
||||||
|
protected void addDependentComponents() {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClicked(int x, int y, int button) {
|
||||||
|
super.mouseClicked(x, y, button);
|
||||||
|
if (collection.isMouseOver(x - this.guiLeft, y - this.guiTop) || collection.openBoarders()) {
|
||||||
|
collection.mouseClicked(x - this.guiLeft, y - this.guiTop, button);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseMovedOrUp(int x, int y, int button) {
|
||||||
|
super.mouseMovedOrUp(x, y, button);
|
||||||
|
if (collection.isMouseOver(x - this.guiLeft, y - this.guiTop) || collection.openBoarders()) {
|
||||||
|
// if (button >= 0) collection.mouseUp(x - this.guiLeft, y - this.guiTop, button);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClickMove(int x, int y, int button, long time) {
|
||||||
|
super.mouseClickMove(x, y, button, time);
|
||||||
|
// if (collection.isMouseOver(x - this.guiLeft, y - this.guiTop)) collection.mouseDrag(x - this.guiLeft, y -
|
||||||
|
// this.guiTop, button, time);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void keyTyped(char par1, int par2) {
|
||||||
|
super.keyTyped(par1, par2);
|
||||||
|
collection.keyTyped(par1, par2);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void preRender(float mouseX, float mouseY) {}
|
||||||
|
|
||||||
|
public void postRender(int mouseX, int mouseY) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||||
|
prepareRenderState();
|
||||||
|
preRender(mouseX, mouseY);
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
GL11.glTranslated(this.guiLeft, this.guiTop, 0);
|
||||||
|
collection.renderBackground(this.mc, 0, 0, mouseX - this.guiLeft, mouseY - this.guiTop);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
postRender(mouseX, mouseY);
|
||||||
|
restoreRenderState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
|
||||||
|
// prepareRenderState();
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
collection.renderForground(this.mc, 0, 0, mouseX - this.guiLeft, mouseY - this.guiTop);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
// restoreRenderState();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float par3) {
|
||||||
|
super.drawScreen(mouseX, mouseY, par3);
|
||||||
|
prepareRenderState();
|
||||||
|
GL11.glPushMatrix();
|
||||||
|
collection.renderFinal(this.mc, this.guiLeft, this.guiTop, mouseX - this.guiLeft, mouseY - this.guiTop);
|
||||||
|
GL11.glPopMatrix();
|
||||||
|
restoreRenderState();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void prepareRenderState() {
|
||||||
|
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||||
|
RenderHelper.disableStandardItemLighting();
|
||||||
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void restoreRenderState() {
|
||||||
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||||
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
|
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||||
|
RenderHelper.enableStandardItemLighting();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setWorldAndResolution(Minecraft mc, int width, int height) {
|
||||||
|
super.setWorldAndResolution(mc, width, height);
|
||||||
|
collection.setWorldAndResolution(mc, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateScreen() {
|
||||||
|
super.updateScreen();
|
||||||
|
collection.removeScheduled();
|
||||||
|
collection.updateScreen();
|
||||||
|
buttonPressed = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void buttonClicked(int id, int button) {
|
||||||
|
buttonPressed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getXSize() {
|
||||||
|
return xSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getYSize() {
|
||||||
|
return ySize;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This can be used by components to contact the GUI and the gui can then do some custom operation for that
|
||||||
|
* component Added so ComponentTextField can let the gui know when it has been changed
|
||||||
|
*/
|
||||||
|
public void componentCallBack(ComponentBase component) {}
|
||||||
|
}
|
||||||
+76
@@ -0,0 +1,76 @@
|
|||||||
|
package com.brandon3055.draconicevolution.client.utils.guicomponents;
|
||||||
|
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Brandon on 6/03/2015.
|
||||||
|
*/
|
||||||
|
public abstract class GUIScrollingBase extends GUIBase {
|
||||||
|
|
||||||
|
public int scrollOffset;
|
||||||
|
public int pageLength;
|
||||||
|
public int scrollLimit;
|
||||||
|
public int barPosition;
|
||||||
|
public boolean disableScrollBar = true;
|
||||||
|
|
||||||
|
public GUIScrollingBase(Container container, int xSize, int ySize) {
|
||||||
|
super(container, xSize, ySize);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void handleMouseInput() {
|
||||||
|
super.handleMouseInput();
|
||||||
|
int i = org.lwjgl.input.Mouse.getEventDWheel();
|
||||||
|
if (i != 0) {
|
||||||
|
handleScrollInput(i > 0 ? -1 : 1);
|
||||||
|
|
||||||
|
for (ComponentBase c : collection.getComponents()) {
|
||||||
|
if (c instanceof ComponentScrollingBase && c.isEnabled())
|
||||||
|
((ComponentScrollingBase) c).handleScrollInput(i > 0 ? -1 : 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract void handleScrollInput(int direction);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawGuiContainerBackgroundLayer(float f, int mouseX, int mouseY) {
|
||||||
|
super.drawGuiContainerBackgroundLayer(f, mouseX, mouseY);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected int clickedY = 0;
|
||||||
|
protected boolean scrollPressed = false;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClicked(int x, int y, int button) {
|
||||||
|
super.mouseClicked(x, y, button);
|
||||||
|
if (disableScrollBar) return;
|
||||||
|
clickedY = y;
|
||||||
|
if ((x - guiLeft + 17) > 0 && (x - guiLeft + 17) < 17
|
||||||
|
&& clickedY - guiTop - 20 > barPosition
|
||||||
|
&& clickedY - guiTop - 20 < barPosition + 38)
|
||||||
|
scrollPressed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseMovedOrUp(int x, int y, int button) {
|
||||||
|
super.mouseMovedOrUp(x, y, button);
|
||||||
|
scrollPressed = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClickMove(int x, int y, int button, long time) {
|
||||||
|
super.mouseClickMove(x, y, button, time);
|
||||||
|
if (!scrollPressed || disableScrollBar) return;
|
||||||
|
barPosition += y - clickedY;
|
||||||
|
if (barPosition < 0) barPosition = 0;
|
||||||
|
else if (barPosition > 247) barPosition = 247;
|
||||||
|
if (barPosition != 0 && barPosition != 247) clickedY = y;
|
||||||
|
barMoved((double) barPosition / 247D * 1D);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param position New bar position between 0 (top) and 1 (bottom)
|
||||||
|
*/
|
||||||
|
public abstract void barMoved(double position);
|
||||||
|
}
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
package com.brandon3055.draconicevolution.common;
|
package com.brandon3055.draconicevolution.common;
|
||||||
|
|
||||||
import net.minecraft.client.audio.ISound;
|
import net.minecraft.client.audio.ISound;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
@@ -58,7 +60,6 @@ import com.brandon3055.draconicevolution.common.network.TileObjectPacket;
|
|||||||
import com.brandon3055.draconicevolution.common.network.ToolModePacket;
|
import com.brandon3055.draconicevolution.common.network.ToolModePacket;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileCKeyStone;
|
import com.brandon3055.draconicevolution.common.tileentities.TileCKeyStone;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileChaosShard;
|
import com.brandon3055.draconicevolution.common.tileentities.TileChaosShard;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileContainerTemplate;
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
|
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
import com.brandon3055.draconicevolution.common.tileentities.TileDislocatorInhibitor;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileDissEnchanter;
|
import com.brandon3055.draconicevolution.common.tileentities.TileDissEnchanter;
|
||||||
@@ -73,7 +74,6 @@ import com.brandon3055.draconicevolution.common.tileentities.TilePlayerDetectorA
|
|||||||
import com.brandon3055.draconicevolution.common.tileentities.TilePotentiometer;
|
import com.brandon3055.draconicevolution.common.tileentities.TilePotentiometer;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileSunDial;
|
import com.brandon3055.draconicevolution.common.tileentities.TileSunDial;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileTeleporterStand;
|
import com.brandon3055.draconicevolution.common.tileentities.TileTeleporterStand;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileTestBlock;
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier;
|
import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileWeatherController;
|
import com.brandon3055.draconicevolution.common.tileentities.TileWeatherController;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileEnergyRelay;
|
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileEnergyRelay;
|
||||||
@@ -91,8 +91,10 @@ import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.Til
|
|||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorEnergyInjector;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorEnergyInjector;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorStabilizer;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorStabilizer;
|
||||||
import com.brandon3055.draconicevolution.common.utills.DragonChunkLoader;
|
import com.brandon3055.draconicevolution.common.utils.DragonChunkLoader;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.handlers.FileHandler;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.handlers.ProcessHandler;
|
||||||
import com.brandon3055.draconicevolution.common.world.DraconicWorldGenerator;
|
import com.brandon3055.draconicevolution.common.world.DraconicWorldGenerator;
|
||||||
import com.brandon3055.draconicevolution.integration.computers.CCOCIntegration;
|
import com.brandon3055.draconicevolution.integration.computers.CCOCIntegration;
|
||||||
|
|
||||||
@@ -108,6 +110,8 @@ import cpw.mods.fml.relauncher.Side;
|
|||||||
public class CommonProxy {
|
public class CommonProxy {
|
||||||
|
|
||||||
public void preInit(FMLPreInitializationEvent event) {
|
public void preInit(FMLPreInitializationEvent event) {
|
||||||
|
FileHandler.init(event);
|
||||||
|
ProcessHandler.init();
|
||||||
ConfigHandler.init(event.getSuggestedConfigurationFile());
|
ConfigHandler.init(event.getSuggestedConfigurationFile());
|
||||||
BalanceConfigHandler.init(event.getModConfigurationDirectory());
|
BalanceConfigHandler.init(event.getModConfigurationDirectory());
|
||||||
registerEventListeners(event.getSide());
|
registerEventListeners(event.getSide());
|
||||||
@@ -119,29 +123,6 @@ public class CommonProxy {
|
|||||||
registerOres();
|
registerOres();
|
||||||
|
|
||||||
DraconicEvolution.reaperEnchant = new EnchantmentReaper(ConfigHandler.reaperEnchantID);
|
DraconicEvolution.reaperEnchant = new EnchantmentReaper(ConfigHandler.reaperEnchantID);
|
||||||
//
|
|
||||||
// Potion[] potionTypes = null;
|
|
||||||
// LogHelper.info("Expanding Potion array size to 256");
|
|
||||||
//
|
|
||||||
// for (Field f : Potion.class.getDeclaredFields()) {
|
|
||||||
// f.setAccessible(true);
|
|
||||||
//
|
|
||||||
// try {
|
|
||||||
// if (f.getName().equals("potionTypes") || f.getName().equals("field_76425_a")) {
|
|
||||||
// Field modfield = Field.class.getDeclaredField("modifiers");
|
|
||||||
// modfield.setAccessible(true);
|
|
||||||
// modfield.setInt(f, f.getModifiers() & ~Modifier.FINAL);
|
|
||||||
// potionTypes = (Potion[]) f.get(null);
|
|
||||||
// final Potion[] newPotionTypes = new Potion[256];
|
|
||||||
// System.arraycopy(potionTypes, 0, newPotionTypes, 0, potionTypes.length);
|
|
||||||
// f.set(null, newPotionTypes);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// catch (Exception e) {
|
|
||||||
// LogHelper.error("Severe error, please report this to the mod author:");
|
|
||||||
// e.printStackTrace();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
Achievements.addModAchievements();
|
Achievements.addModAchievements();
|
||||||
LogHelper.info("Finished PreInitialization");
|
LogHelper.info("Finished PreInitialization");
|
||||||
@@ -232,10 +213,6 @@ public class CommonProxy {
|
|||||||
GameRegistry.registerTileEntity(TileChaosShard.class, References.RESOURCESPREFIX + "TileChaosShard");
|
GameRegistry.registerTileEntity(TileChaosShard.class, References.RESOURCESPREFIX + "TileChaosShard");
|
||||||
GameRegistry.registerTileEntity(TileUpgradeModifier.class, References.RESOURCESPREFIX + "TileEnhancementModifier");
|
GameRegistry.registerTileEntity(TileUpgradeModifier.class, References.RESOURCESPREFIX + "TileEnhancementModifier");
|
||||||
GameRegistry.registerTileEntity(TileDislocatorInhibitor.class, References.RESOURCESPREFIX + "TileDislocatorInhibitor");
|
GameRegistry.registerTileEntity(TileDislocatorInhibitor.class, References.RESOURCESPREFIX + "TileDislocatorInhibitor");
|
||||||
if (DraconicEvolution.debug) {
|
|
||||||
GameRegistry.registerTileEntity(TileTestBlock.class, References.RESOURCESPREFIX + "TileTestBlock");
|
|
||||||
GameRegistry.registerTileEntity(TileContainerTemplate.class, References.RESOURCESPREFIX + "TileContainerTemplate");
|
|
||||||
}
|
|
||||||
// spotless:on
|
// spotless:on
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -281,7 +258,6 @@ public class CommonProxy {
|
|||||||
EntityRegistry.registerModEntity(EntityPersistentItem.class, "Persistent Item", 1, DraconicEvolution.instance, 32, 5, true);
|
EntityRegistry.registerModEntity(EntityPersistentItem.class, "Persistent Item", 1, DraconicEvolution.instance, 32, 5, true);
|
||||||
EntityRegistry.registerModEntity(EntityDraconicArrow.class, "Arrow", 2, DraconicEvolution.instance, 32, 5, true);
|
EntityRegistry.registerModEntity(EntityDraconicArrow.class, "Arrow", 2, DraconicEvolution.instance, 32, 5, true);
|
||||||
EntityRegistry.registerModEntity(EntityEnderArrow.class, "Ender Arrow", 3, DraconicEvolution.instance, 32, 1, true);
|
EntityRegistry.registerModEntity(EntityEnderArrow.class, "Ender Arrow", 3, DraconicEvolution.instance, 32, 1, true);
|
||||||
// EntityRegistry.registerModEntity(EntityChaosDrill.class, "Chaos Drill", 4, DraconicEvolution.instance, 10, 5, false);
|
|
||||||
EntityRegistry.registerModEntity(EntityDragonHeart.class, "Dragon Heart Item", 5, DraconicEvolution.instance, 32, 5, true);
|
EntityRegistry.registerModEntity(EntityDragonHeart.class, "Dragon Heart Item", 5, DraconicEvolution.instance, 32, 5, true);
|
||||||
EntityRegistry.registerModEntity(EntityChaosGuardian.class, "ChaosGuardian", 6, DraconicEvolution.instance, 256, 1, true);
|
EntityRegistry.registerModEntity(EntityChaosGuardian.class, "ChaosGuardian", 6, DraconicEvolution.instance, 256, 1, true);
|
||||||
EntityRegistry.registerModEntity(EntityDragonProjectile.class, "DragonProjectile", 7, DraconicEvolution.instance, 256, 1, true);
|
EntityRegistry.registerModEntity(EntityDragonProjectile.class, "DragonProjectile", 7, DraconicEvolution.instance, 256, 1, true);
|
||||||
@@ -311,4 +287,32 @@ public class CommonProxy {
|
|||||||
public ISound playISound(ISound sound) {
|
public ISound playISound(ISound sound) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDedicatedServer() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MinecraftServer getMCServer() {
|
||||||
|
return FMLCommonHandler.instance().getMinecraftServerInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
public World getClientWorld() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSpaceDown() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCtrlDown() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isShiftDown() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityPlayer getClientPlayer() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -4,8 +4,6 @@ import net.minecraft.block.Block;
|
|||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
|
||||||
import com.brandon3055.draconicevolution.common.blocks.BlockContainerTemplate;
|
|
||||||
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.CKeyStone;
|
import com.brandon3055.draconicevolution.common.blocks.CKeyStone;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.ChaosCrystal;
|
import com.brandon3055.draconicevolution.common.blocks.ChaosCrystal;
|
||||||
@@ -22,7 +20,6 @@ import com.brandon3055.draconicevolution.common.blocks.Potentiometer;
|
|||||||
import com.brandon3055.draconicevolution.common.blocks.RainSensor;
|
import com.brandon3055.draconicevolution.common.blocks.RainSensor;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.SafetyFlame;
|
import com.brandon3055.draconicevolution.common.blocks.SafetyFlame;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.TeleporterStand;
|
import com.brandon3055.draconicevolution.common.blocks.TeleporterStand;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.TestBlock;
|
|
||||||
import com.brandon3055.draconicevolution.common.blocks.XRayBlock;
|
import com.brandon3055.draconicevolution.common.blocks.XRayBlock;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.machine.DislocatorInhibitor;
|
import com.brandon3055.draconicevolution.common.blocks.machine.DislocatorInhibitor;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.machine.DissEnchanter;
|
import com.brandon3055.draconicevolution.common.blocks.machine.DissEnchanter;
|
||||||
@@ -58,7 +55,6 @@ public class ModBlocks {
|
|||||||
public static BlockDE weatherController;
|
public static BlockDE weatherController;
|
||||||
public static BlockDE sunDial;
|
public static BlockDE sunDial;
|
||||||
public static BlockDE draconiumOre;
|
public static BlockDE draconiumOre;
|
||||||
public static BlockDE testBlock;
|
|
||||||
public static BlockDE grinder;
|
public static BlockDE grinder;
|
||||||
public static BlockDE potentiometer;
|
public static BlockDE potentiometer;
|
||||||
public static BlockDE rainSensor;
|
public static BlockDE rainSensor;
|
||||||
@@ -141,11 +137,6 @@ public class ModBlocks {
|
|||||||
|
|
||||||
if (isEnabled(chaosShardAtmos)) GameRegistry.registerBlock(chaosShardAtmos, "chaosShardAtmos");
|
if (isEnabled(chaosShardAtmos)) GameRegistry.registerBlock(chaosShardAtmos, "chaosShardAtmos");
|
||||||
|
|
||||||
if (DraconicEvolution.debug) {
|
|
||||||
testBlock = new TestBlock();
|
|
||||||
containerTemplate = new BlockContainerTemplate();
|
|
||||||
}
|
|
||||||
|
|
||||||
resurrectionStone = new ItemStack(ModBlocks.draconiumBlock, 1, 1);
|
resurrectionStone = new ItemStack(ModBlocks.draconiumBlock, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -9,9 +9,9 @@ import net.minecraft.util.StatCollector;
|
|||||||
import net.minecraftforge.common.AchievementPage;
|
import net.minecraftforge.common.AchievementPage;
|
||||||
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
import cpw.mods.fml.common.gameevent.PlayerEvent;
|
||||||
|
|||||||
-105
@@ -1,105 +0,0 @@
|
|||||||
package com.brandon3055.draconicevolution.common.blocks;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.inventory.IInventory;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
|
||||||
import com.brandon3055.draconicevolution.client.gui.GuiHandler;
|
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileContainerTemplate;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Brandon on 27/06/2014.
|
|
||||||
*/
|
|
||||||
public class BlockContainerTemplate extends BlockContainerDE {
|
|
||||||
|
|
||||||
public BlockContainerTemplate() {
|
|
||||||
super(Material.iron);
|
|
||||||
this.setBlockName(Strings.containerTemplateName);
|
|
||||||
this.setCreativeTab(DraconicEvolution.tabBlocksItems);
|
|
||||||
this.setStepSound(soundTypeStone);
|
|
||||||
this.setHardness(1f);
|
|
||||||
this.setResistance(200.0f);
|
|
||||||
ModBlocks.register(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
@Override
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
blockIcon = iconRegister.registerIcon(References.RESOURCESPREFIX + "machine_side");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
|
||||||
return new TileContainerTemplate();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float prx,
|
|
||||||
float pry, float prz) {
|
|
||||||
if (!world.isRemote) {
|
|
||||||
FMLNetworkHandler
|
|
||||||
.openGui(player, DraconicEvolution.instance, GuiHandler.GUIID_CONTAINER_TEMPLATE, world, x, y, z);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
@Override
|
|
||||||
public int getRenderType() {
|
|
||||||
return super.getRenderType();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean renderAsNormalBlock() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
|
||||||
if (te != null && te instanceof IInventory) {
|
|
||||||
IInventory inventory = (IInventory) te;
|
|
||||||
|
|
||||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
|
||||||
ItemStack stack = inventory.getStackInSlot(i);
|
|
||||||
|
|
||||||
if (stack != null) {
|
|
||||||
float spawnX = x + world.rand.nextFloat();
|
|
||||||
float spawnY = y + world.rand.nextFloat();
|
|
||||||
float spawnZ = z + world.rand.nextFloat();
|
|
||||||
|
|
||||||
EntityItem droppedItem = new EntityItem(world, spawnX, spawnY, spawnZ, stack);
|
|
||||||
|
|
||||||
float multiplier = 0.05F;
|
|
||||||
|
|
||||||
droppedItem.motionX = (-0.5F + world.rand.nextFloat()) * multiplier;
|
|
||||||
droppedItem.motionY = (4 + world.rand.nextFloat()) * multiplier;
|
|
||||||
droppedItem.motionZ = (-0.5F + world.rand.nextFloat()) * multiplier;
|
|
||||||
|
|
||||||
world.spawnEntityInWorld(droppedItem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
super.breakBlock(world, x, y, z, block, meta);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,7 +10,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InventoryUtils;
|
import com.brandon3055.draconicevolution.common.utils.InventoryUtils;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
@@ -20,6 +19,7 @@ import com.brandon3055.draconicevolution.common.blocks.itemblocks.CKeyStoneItemB
|
|||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileCKeyStone;
|
import com.brandon3055.draconicevolution.common.tileentities.TileCKeyStone;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
@@ -23,16 +23,16 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
|
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
|
import com.brandon3055.draconicevolution.common.utils.IHudDisplayBlock;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import com.brandon3055.draconicevolution.common.blocks.itemblocks.DraconiumChest
|
|||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
|
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ICustomItemData;
|
import com.brandon3055.draconicevolution.common.utils.ICustomItemData;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
|||||||
@@ -14,13 +14,13 @@ import net.minecraft.util.IIcon;
|
|||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Teleporter;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.items.tools.TeleporterMKI;
|
import com.brandon3055.draconicevolution.common.items.tools.TeleporterMKI;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileTeleporterStand;
|
import com.brandon3055.draconicevolution.common.tileentities.TileTeleporterStand;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Teleporter;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
|
import com.brandon3055.draconicevolution.common.tileentities.TileDraconiumChest;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ICustomItemData;
|
import com.brandon3055.draconicevolution.common.utils.ICustomItemData;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 13/11/2014.
|
* Created by Brandon on 13/11/2014.
|
||||||
|
|||||||
+11
-15
@@ -1,5 +1,8 @@
|
|||||||
package com.brandon3055.draconicevolution.common.blocks.machine;
|
package com.brandon3055.draconicevolution.common.blocks.machine;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumberCompact;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -17,7 +20,6 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
||||||
@@ -30,7 +32,8 @@ import com.brandon3055.draconicevolution.common.tileentities.energynet.TileEnerg
|
|||||||
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileEnergyTransceiver;
|
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileEnergyTransceiver;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileRemoteEnergyBase;
|
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileRemoteEnergyBase;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileWirelessEnergyTransceiver;
|
import com.brandon3055.draconicevolution.common.tileentities.energynet.TileWirelessEnergyTransceiver;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
|
import com.brandon3055.draconicevolution.common.utils.IHudDisplayBlock;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -40,13 +43,6 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||||||
*/
|
*/
|
||||||
public class EnergyCrystal extends BlockDE implements IHudDisplayBlock {
|
public class EnergyCrystal extends BlockDE implements IHudDisplayBlock {
|
||||||
|
|
||||||
public static final byte RELAY_TIER_1 = 0;
|
|
||||||
public static final byte RELAY_TIER_2 = 1;
|
|
||||||
public static final byte TRANSCEIVER_TIER_1 = 2;
|
|
||||||
public static final byte TRANSCEIVER_TIER_2 = 3;
|
|
||||||
public static final byte WIRELESS_TRANSCEIVER_TIER_1 = 3;
|
|
||||||
public static final byte WIRELESS_TRANSCEIVER_TIER_2 = 4;
|
|
||||||
|
|
||||||
public EnergyCrystal() {
|
public EnergyCrystal() {
|
||||||
super(Material.glass);
|
super(Material.glass);
|
||||||
this.setBlockName(Strings.energyCrystalName);
|
this.setBlockName(Strings.energyCrystalName);
|
||||||
@@ -232,8 +228,8 @@ public class EnergyCrystal extends BlockDE implements IHudDisplayBlock {
|
|||||||
list.add(
|
list.add(
|
||||||
InfoHelper.HITC() + StatCollector
|
InfoHelper.HITC() + StatCollector
|
||||||
.translateToLocal(this.getUnlocalizedName() + world.getBlockMetadata(x, y, z) + ".name"));
|
.translateToLocal(this.getUnlocalizedName() + world.getBlockMetadata(x, y, z) + ".name"));
|
||||||
list.add("RF: " + tile.getEnergyStored(ForgeDirection.DOWN));
|
list.add("RF: " + formatNumberCompact(tile.getEnergyStored(ForgeDirection.DOWN)));
|
||||||
list.add("Cap: " + tile.getCapacity() + "%");
|
list.add("Cap: " + formatNumber(tile.getCapacity()) + "%");
|
||||||
if (tile instanceof TileEnergyTransceiver) {
|
if (tile instanceof TileEnergyTransceiver) {
|
||||||
String x5 = ((TileEnergyTransceiver) tile).getPowerTier() > 0
|
String x5 = ((TileEnergyTransceiver) tile).getPowerTier() > 0
|
||||||
&& ((TileEnergyTransceiver) tile).transferBoost
|
&& ((TileEnergyTransceiver) tile).transferBoost
|
||||||
@@ -247,16 +243,16 @@ public class EnergyCrystal extends BlockDE implements IHudDisplayBlock {
|
|||||||
if (tile instanceof TileRemoteEnergyBase) {
|
if (tile instanceof TileRemoteEnergyBase) {
|
||||||
list.add(
|
list.add(
|
||||||
StatCollector.translateToLocal("info.de.connections.txt") + ": "
|
StatCollector.translateToLocal("info.de.connections.txt") + ": "
|
||||||
+ ((TileRemoteEnergyBase) tile).linkedDevices.size()
|
+ formatNumber(((TileRemoteEnergyBase) tile).linkedDevices.size())
|
||||||
+ "/"
|
+ "/"
|
||||||
+ tile.getMaxConnections());
|
+ formatNumber(tile.getMaxConnections()));
|
||||||
}
|
}
|
||||||
if (tile instanceof TileWirelessEnergyTransceiver) {
|
if (tile instanceof TileWirelessEnergyTransceiver) {
|
||||||
list.add(
|
list.add(
|
||||||
StatCollector.translateToLocal("info.de.wirelessConnections.txt") + ": "
|
StatCollector.translateToLocal("info.de.wirelessConnections.txt") + ": "
|
||||||
+ ((TileWirelessEnergyTransceiver) tile).receiverList.size()
|
+ formatNumber(((TileWirelessEnergyTransceiver) tile).receiverList.size())
|
||||||
+ "/"
|
+ "/"
|
||||||
+ ((TileWirelessEnergyTransceiver) tile).getmaxWirelessConnections());
|
+ formatNumber(((TileWirelessEnergyTransceiver) tile).getmaxWirelessConnections()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tile instanceof TileRemoteEnergyBase) {
|
if (tile instanceof TileRemoteEnergyBase) {
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.gui.GuiHandler;
|
import com.brandon3055.draconicevolution.client.gui.GuiHandler;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
@@ -28,6 +27,7 @@ import com.brandon3055.draconicevolution.common.lib.References;
|
|||||||
import com.brandon3055.draconicevolution.common.tileentities.gates.TileFluidGate;
|
import com.brandon3055.draconicevolution.common.tileentities.gates.TileFluidGate;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.gates.TileFluxGate;
|
import com.brandon3055.draconicevolution.common.tileentities.gates.TileFluxGate;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.gates.TileGate;
|
import com.brandon3055.draconicevolution.common.tileentities.gates.TileGate;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -174,7 +174,7 @@ public class FlowGate extends BlockDE {
|
|||||||
|
|
||||||
((TileGate) worldObj.getTileEntity(x, y, z)).output = facing;
|
((TileGate) worldObj.getTileEntity(x, y, z)).output = facing;
|
||||||
worldObj.setBlockMetadataWithNotify(x, y, z, facing.ordinal() + (type * 6), 2);
|
worldObj.setBlockMetadataWithNotify(x, y, z, facing.ordinal() + (type * 6), 2);
|
||||||
Utills.updateNeabourBlocks(worldObj, x, y, z);
|
Utils.updateNeabourBlocks(worldObj, x, y, z);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ import com.brandon3055.draconicevolution.common.lib.References;
|
|||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileGenerator;
|
import com.brandon3055.draconicevolution.common.tileentities.TileGenerator;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileGrinder;
|
import com.brandon3055.draconicevolution.common.tileentities.TileGrinder;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ import com.brandon3055.draconicevolution.common.blocks.itemblocks.LRDItemBlock;
|
|||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
+2
-2
@@ -21,8 +21,8 @@ import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
|||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
|
import com.brandon3055.draconicevolution.common.utils.IHudDisplayBlock;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
+2
-2
@@ -26,8 +26,8 @@ import com.brandon3055.draconicevolution.common.lib.Strings;
|
|||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyPylon;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyPylon;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileInvisibleMultiblock;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileInvisibleMultiblock;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock;
|
import com.brandon3055.draconicevolution.common.utils.IHudDisplayBlock;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
+2
-2
@@ -12,12 +12,12 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorEnergyInjector;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorEnergyInjector;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -83,7 +83,7 @@ public class ReactorEnergyInjector extends BlockDE implements ITileEntityProvide
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
||||||
ForgeDirection facing = ForgeDirection.getOrientation(Utills.determineOrientation(x, y, z, entity));
|
ForgeDirection facing = ForgeDirection.getOrientation(Utils.determineOrientation(x, y, z, entity));
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
if (tile instanceof TileReactorEnergyInjector injector) {
|
if (tile instanceof TileReactorEnergyInjector injector) {
|
||||||
injector.facing = entity.isSneaking() ? facing.getOpposite() : facing;
|
injector.facing = entity.isSneaking() ? facing.getOpposite() : facing;
|
||||||
|
|||||||
+2
-2
@@ -11,13 +11,13 @@ import net.minecraft.util.ChatComponentText;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
import com.brandon3055.draconicevolution.common.blocks.BlockDE;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorStabilizer;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorStabilizer;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -86,7 +86,7 @@ public class ReactorStabilizer extends BlockDE implements ITileEntityProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) {
|
||||||
ForgeDirection facing = ForgeDirection.getOrientation(Utills.determineOrientation(x, y, z, entity));
|
ForgeDirection facing = ForgeDirection.getOrientation(Utils.determineOrientation(x, y, z, entity));
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
if (tile instanceof TileReactorStabilizer stabilizer) {
|
if (tile instanceof TileReactorStabilizer stabilizer) {
|
||||||
stabilizer.facing = entity.isSneaking() ? facing.getOpposite() : facing;
|
stabilizer.facing = entity.isSneaking() ? facing.getOpposite() : facing;
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.inventory.InventoryTool;
|
import com.brandon3055.draconicevolution.common.inventory.InventoryTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
import com.brandon3055.draconicevolution.common.utils.IInventoryTool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 13/01/2015.
|
* Created by Brandon on 13/01/2015.
|
||||||
|
|||||||
+1
-1
@@ -9,9 +9,9 @@ import net.minecraft.inventory.IInventory;
|
|||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.common.inventory.SlotOutput;
|
import com.brandon3055.draconicevolution.common.inventory.SlotOutput;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileDissEnchanter;
|
import com.brandon3055.draconicevolution.common.tileentities.TileDissEnchanter;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||||
|
|
||||||
public class ContainerDissEnchanter extends Container {
|
public class ContainerDissEnchanter extends Container {
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
|||||||
import com.brandon3055.draconicevolution.common.inventory.GenericInventory;
|
import com.brandon3055.draconicevolution.common.inventory.GenericInventory;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore.ReactorState;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.TileReactorCore.ReactorState;
|
||||||
import com.brandon3055.draconicevolution.common.utills.OreDictionaryHelper;
|
import com.brandon3055.draconicevolution.common.utils.OreDictionaryHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by brandon3055 on 30/7/2015.
|
* Created by brandon3055 on 30/7/2015.
|
||||||
|
|||||||
-74
@@ -1,74 +0,0 @@
|
|||||||
package com.brandon3055.draconicevolution.common.container;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
|
||||||
import net.minecraft.inventory.Container;
|
|
||||||
import net.minecraft.inventory.Slot;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileContainerTemplate;
|
|
||||||
|
|
||||||
public class ContainerTemplate extends Container {
|
|
||||||
|
|
||||||
private TileContainerTemplate tile;
|
|
||||||
private EntityPlayer player;
|
|
||||||
|
|
||||||
public ContainerTemplate(InventoryPlayer invPlayer, TileContainerTemplate tile) {
|
|
||||||
this.tile = tile;
|
|
||||||
this.player = invPlayer.player;
|
|
||||||
|
|
||||||
for (int x = 0; x < 9; x++) {
|
|
||||||
addSlotToContainer(new Slot(invPlayer, x, 8 + 18 * x, 116));
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int y = 0; y < 3; y++) {
|
|
||||||
for (int x = 0; x < 9; x++) {
|
|
||||||
addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 58 + y * 18));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (int x = 0; x < 9; x++) {
|
|
||||||
addSlotToContainer(new Slot(tile, x, 8 + 18 * x, 10));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canInteractWith(EntityPlayer player) {
|
|
||||||
return tile.isUseableByPlayer(player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack transferStackInSlot(EntityPlayer player, int i) {
|
|
||||||
Slot slot = getSlot(i);
|
|
||||||
|
|
||||||
if (slot != null && slot.getHasStack()) {
|
|
||||||
ItemStack stack = slot.getStack();
|
|
||||||
ItemStack result = stack.copy();
|
|
||||||
|
|
||||||
if (i >= 36) {
|
|
||||||
if (!mergeItemStack(stack, 0, 36, false)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
} else if (!isStackValidForInventory(stack, 0)
|
|
||||||
|| !mergeItemStack(stack, 36, 36 + tile.getSizeInventory(), false)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stack.stackSize == 0) {
|
|
||||||
slot.putStack(null);
|
|
||||||
} else {
|
|
||||||
slot.onSlotChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
slot.onPickupFromSlot(player, stack);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isStackValidForInventory(ItemStack stack, int slot) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+2
-2
@@ -11,8 +11,8 @@ import net.minecraft.item.ItemStack;
|
|||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier;
|
import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem.EnumUpgrade;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem.EnumUpgrade;
|
||||||
|
|
||||||
public class ContainerUpgradeModifier extends ContainerDataSync {
|
public class ContainerUpgradeModifier extends ContainerDataSync {
|
||||||
|
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import java.util.Random;
|
|||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.handlers.IProcess;
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
import com.brandon3055.brandonscore.common.handlers.ProcessHandler;
|
import com.brandon3055.draconicevolution.common.utils.handlers.IProcess;
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
import com.brandon3055.draconicevolution.common.utils.handlers.ProcessHandler;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by brandon3055 on 12/8/2015.
|
* Created by brandon3055 on 12/8/2015.
|
||||||
@@ -44,7 +44,7 @@ public class ChaosImplosion implements IProcess {
|
|||||||
|
|
||||||
for (int x = xCoord - size; x < xCoord + size; x++) {
|
for (int x = xCoord - size; x < xCoord + size; x++) {
|
||||||
for (int z = zCoord - size; z < zCoord + size; z++) {
|
for (int z = zCoord - size; z < zCoord + size; z++) {
|
||||||
double dist = Utills.getDistanceAtoB(x, z, xCoord, zCoord);
|
double dist = Utils.getDistanceAtoB(x, z, xCoord, zCoord);
|
||||||
if (dist < OD && dist >= ID) {
|
if (dist < OD && dist >= ID) {
|
||||||
float tracePower = power - (float) (expansion / 10D);
|
float tracePower = power - (float) (expansion / 10D);
|
||||||
tracePower *= 1F + ((random.nextFloat() - 0.5F) * 0.2);
|
tracePower *= 1F + ((random.nextFloat() - 0.5F) * 0.2);
|
||||||
|
|||||||
+1
-1
@@ -7,8 +7,8 @@ import net.minecraft.entity.Entity;
|
|||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.handlers.IProcess;
|
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.ReactorExplosion;
|
import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.reactor.ReactorExplosion;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.handlers.IProcess;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by brandon3055 on 12/8/2015.
|
* Created by brandon3055 on 12/8/2015.
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper;
|
import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 14/09/2014.
|
* Created by Brandon on 14/09/2014.
|
||||||
@@ -73,7 +73,7 @@ public class EntityChaosDrill extends Entity {
|
|||||||
for (int x = (int) posX - r; x <= (int) posX + r; x++) {
|
for (int x = (int) posX - r; x <= (int) posX + r; x++) {
|
||||||
for (int z = (int) posZ - r; z <= (int) posZ + r; z++) {
|
for (int z = (int) posZ - r; z <= (int) posZ + r; z++) {
|
||||||
for (int y = (int) posY - r; y <= (int) posY + r; y++) {
|
for (int y = (int) posY - r; y <= (int) posY + r; y++) {
|
||||||
int dist = (int) (Utills.getDistanceAtoB(x, y, z, (int) posX, (int) posY, (int) posZ));
|
int dist = (int) (Utils.getDistanceAtoB(x, y, z, (int) posX, (int) posY, (int) posZ));
|
||||||
if (dist <= r) {
|
if (dist <= r) {
|
||||||
if (!worldObj.isAirBlock(x, y, z)) {
|
if (!worldObj.isAirBlock(x, y, z)) {
|
||||||
if (blocks.size() <= dist) {
|
if (blocks.size() <= dist) {
|
||||||
|
|||||||
+19
-21
@@ -25,11 +25,11 @@ import net.minecraft.util.Vec3;
|
|||||||
import net.minecraft.util.WeightedRandom;
|
import net.minecraft.util.WeightedRandom;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileChaosShard;
|
import com.brandon3055.draconicevolution.common.tileentities.TileChaosShard;
|
||||||
import com.brandon3055.draconicevolution.common.utills.DamageSourceChaos;
|
import com.brandon3055.draconicevolution.common.utils.DamageSourceChaos;
|
||||||
import com.brandon3055.draconicevolution.common.utills.DragonChunkLoader;
|
import com.brandon3055.draconicevolution.common.utils.DragonChunkLoader;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 4/07/2014.
|
* Created by Brandon on 4/07/2014.
|
||||||
@@ -181,7 +181,7 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
|
|
||||||
customAIUpdate();
|
customAIUpdate();
|
||||||
if (behaviour == EnumBehaviour.FIREBOMB
|
if (behaviour == EnumBehaviour.FIREBOMB
|
||||||
&& Utills.getDistanceAtoB(posX, posY, posZ, homeX, homeY + 30, homeZ) <= 3)
|
&& Utils.getDistanceAtoB(posX, posY, posZ, homeX, homeY + 30, homeZ) <= 3)
|
||||||
moveSpeedMultiplier = 0;
|
moveSpeedMultiplier = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,8 +259,8 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
if (behaviour == EnumBehaviour.CIRCLE_PLAYER) {
|
if (behaviour == EnumBehaviour.CIRCLE_PLAYER) {
|
||||||
this.targetX = this.target.posX + (int) (Math.cos(circlePosition) * 60);
|
this.targetX = this.target.posX + (int) (Math.cos(circlePosition) * 60);
|
||||||
this.targetZ = this.target.posZ + (int) (Math.sin(circlePosition) * 60);
|
this.targetZ = this.target.posZ + (int) (Math.sin(circlePosition) * 60);
|
||||||
moveSpeedMultiplier = 1F + Math
|
moveSpeedMultiplier = 1F
|
||||||
.min(((float) Utills.getDistanceAtoB(targetX, targetZ, posX, posZ) / 50) * 3F, 3F);
|
+ Math.min(((float) Utils.getDistanceAtoB(targetX, targetZ, posX, posZ) / 50) * 3F, 3F);
|
||||||
} else {
|
} else {
|
||||||
this.targetX = this.target.posX;
|
this.targetX = this.target.posX;
|
||||||
this.targetZ = this.target.posZ;
|
this.targetZ = this.target.posZ;
|
||||||
@@ -526,7 +526,7 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case GO_HOME:
|
case GO_HOME:
|
||||||
if (Utills.getDistanceAtoB(posX, posZ, homeX, homeZ) < 70) selectNewBehaviour();
|
if (Utils.getDistanceAtoB(posX, posZ, homeX, homeZ) < 70) selectNewBehaviour();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GUARDING:
|
case GUARDING:
|
||||||
@@ -536,12 +536,12 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CHARGING:
|
case CHARGING:
|
||||||
if (Utills.getDistanceAtoB(posX, posZ, homeX, homeZ) > 300) behaviour = EnumBehaviour.GO_HOME;
|
if (Utils.getDistanceAtoB(posX, posZ, homeX, homeZ) > 300) behaviour = EnumBehaviour.GO_HOME;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CIRCLE_PLAYER:
|
case CIRCLE_PLAYER:
|
||||||
circlePosition += (0.02F * circleDirection);
|
circlePosition += (0.02F * circleDirection);
|
||||||
if (Utills.getDistanceAtoB(posX, posZ, homeX, homeZ) > 300 || posY > 250)
|
if (Utils.getDistanceAtoB(posX, posZ, homeX, homeZ) > 300 || posY > 250)
|
||||||
behaviour = EnumBehaviour.GO_HOME;
|
behaviour = EnumBehaviour.GO_HOME;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -611,18 +611,18 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
if (worldObj.isRemote || behaviour == EnumBehaviour.DEAD) return;
|
if (worldObj.isRemote || behaviour == EnumBehaviour.DEAD) return;
|
||||||
|
|
||||||
if (behaviour == EnumBehaviour.FIREBOMB
|
if (behaviour == EnumBehaviour.FIREBOMB
|
||||||
&& Utills.getDistanceAtoB(posX, posY, posZ, homeX, homeY + 30, homeZ) <= 3) {
|
&& Utils.getDistanceAtoB(posX, posY, posZ, homeX, homeY + 30, homeZ) <= 3) {
|
||||||
if (target == null || ticksExisted % 100 == 0) setNewTarget();
|
if (target == null || ticksExisted % 100 == 0) setNewTarget();
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
double distance = Utills
|
double distance = Utils
|
||||||
.getDistanceAtoB(target.posX, target.posZ, dragonPartHead.posX, dragonPartHead.posZ);
|
.getDistanceAtoB(target.posX, target.posZ, dragonPartHead.posX, dragonPartHead.posZ);
|
||||||
if (Utills.getDistanceAtoB(target.posX, target.posZ, posX, posZ) < 5) distance *= -1;
|
if (Utils.getDistanceAtoB(target.posX, target.posZ, posX, posZ) < 5) distance *= -1;
|
||||||
float anglePitch = (float) Math.toDegrees(Math.atan2(target.posY - dragonPartHead.posY, distance))
|
float anglePitch = (float) Math.toDegrees(Math.atan2(target.posY - dragonPartHead.posY, distance))
|
||||||
* -1F;
|
* -1F;
|
||||||
float angleYaw = (float) Math
|
float angleYaw = (float) Math
|
||||||
.toDegrees(Math.atan2(target.posX - dragonPartHead.posX, target.posZ - posZ)) * -1F;
|
.toDegrees(Math.atan2(target.posX - dragonPartHead.posX, target.posZ - posZ)) * -1F;
|
||||||
rotationPitch = anglePitch;
|
rotationPitch = anglePitch;
|
||||||
if (Utills.getDistanceAtoB(target.posX, target.posZ, posX, posZ) > 8) rotationYaw = angleYaw + 180;
|
if (Utils.getDistanceAtoB(target.posX, target.posZ, posX, posZ) > 8) rotationYaw = angleYaw + 180;
|
||||||
|
|
||||||
if (ticksExisted % 2 == 0) {
|
if (ticksExisted % 2 == 0) {
|
||||||
EntityDragonProjectile projectile = new EntityDragonProjectile(
|
EntityDragonProjectile projectile = new EntityDragonProjectile(
|
||||||
@@ -690,8 +690,7 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
switch (attackInProgress) {
|
switch (attackInProgress) {
|
||||||
case ATTACK_FIREBALL_CHARGE:
|
case ATTACK_FIREBALL_CHARGE:
|
||||||
if (target == null && behaviour == EnumBehaviour.CHARGING) target = attackTarget;
|
if (target == null && behaviour == EnumBehaviour.CHARGING) target = attackTarget;
|
||||||
if (Utills
|
if (Utils.getDistanceAtoB(posX, posY, posZ, attackTarget.posX, attackTarget.posY, attackTarget.posZ)
|
||||||
.getDistanceAtoB(posX, posY, posZ, attackTarget.posX, attackTarget.posY, attackTarget.posZ)
|
|
||||||
> 10) {
|
> 10) {
|
||||||
if (attackTimer % 2 == 0) {
|
if (attackTimer % 2 == 0) {
|
||||||
EntityDragonProjectile projectile = new EntityDragonProjectile(
|
EntityDragonProjectile projectile = new EntityDragonProjectile(
|
||||||
@@ -704,7 +703,7 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
worldObj.spawnEntityInWorld(projectile);
|
worldObj.spawnEntityInWorld(projectile);
|
||||||
}
|
}
|
||||||
|
|
||||||
double distance = Utills.getDistanceAtoB(
|
double distance = Utils.getDistanceAtoB(
|
||||||
attackTarget.posX,
|
attackTarget.posX,
|
||||||
attackTarget.posZ,
|
attackTarget.posZ,
|
||||||
dragonPartHead.posX,
|
dragonPartHead.posX,
|
||||||
@@ -757,8 +756,7 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
attackInProgress = -1;
|
attackInProgress = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Utills
|
if (Utils.getDistanceAtoB(posX, posY, posZ, attackTarget.posX, attackTarget.posY, attackTarget.posZ)
|
||||||
.getDistanceAtoB(posX, posY, posZ, attackTarget.posX, attackTarget.posY, attackTarget.posZ)
|
|
||||||
> 15) {
|
> 15) {
|
||||||
if (attackTimer % 2 == 0) {
|
if (attackTimer % 2 == 0) {
|
||||||
EntityDragonProjectile projectile = new EntityDragonProjectile(
|
EntityDragonProjectile projectile = new EntityDragonProjectile(
|
||||||
@@ -771,7 +769,7 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
worldObj.spawnEntityInWorld(projectile);
|
worldObj.spawnEntityInWorld(projectile);
|
||||||
}
|
}
|
||||||
|
|
||||||
double distance = Utills.getDistanceAtoB(
|
double distance = Utils.getDistanceAtoB(
|
||||||
attackTarget.posX,
|
attackTarget.posX,
|
||||||
attackTarget.posZ,
|
attackTarget.posZ,
|
||||||
dragonPartHead.posX,
|
dragonPartHead.posX,
|
||||||
@@ -837,7 +835,7 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
case CHARGING:
|
case CHARGING:
|
||||||
break;
|
break;
|
||||||
case FIREBOMB:
|
case FIREBOMB:
|
||||||
if (Utills.getDistanceAtoB(posX, posY, posZ, homeX, homeY + 30, homeZ) > 3) {
|
if (Utils.getDistanceAtoB(posX, posY, posZ, homeX, homeY + 30, homeZ) > 3) {
|
||||||
targetX = homeX;
|
targetX = homeX;
|
||||||
targetY = homeY + 30;
|
targetY = homeY + 30;
|
||||||
targetZ = homeZ;
|
targetZ = homeZ;
|
||||||
@@ -956,7 +954,7 @@ public class EntityChaosGuardian extends EntityDragon { // summon DraconicEvolut
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
case FIREBOMB:
|
case FIREBOMB:
|
||||||
if ((target == null && Utills.getDistanceAtoB(posX, posY, posZ, homeX, homeY + 30, homeZ) <= 3)
|
if ((target == null && Utils.getDistanceAtoB(posX, posY, posZ, homeX, homeY + 30, homeZ) <= 3)
|
||||||
|| rand.nextInt(5) == 0)
|
|| rand.nextInt(5) == 0)
|
||||||
selectNewBehaviour();
|
selectNewBehaviour();
|
||||||
if (damageSource.getEntity() instanceof EntityPlayer && damageSource.getEntity() != target
|
if (damageSource.getEntity() instanceof EntityPlayer && damageSource.getEntity() != target
|
||||||
|
|||||||
+1
-1
@@ -7,10 +7,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.handlers.ProcessHandler;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
||||||
import com.brandon3055.draconicevolution.common.network.GenericParticlePacket;
|
import com.brandon3055.draconicevolution.common.network.GenericParticlePacket;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.handlers.ProcessHandler;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -24,8 +24,8 @@ import net.minecraft.world.Explosion;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.utills.DamageSourceChaos;
|
import com.brandon3055.draconicevolution.common.utils.DamageSourceChaos;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 4/07/2014.
|
* Created by Brandon on 4/07/2014.
|
||||||
|
|||||||
+2
-2
@@ -13,13 +13,13 @@ import net.minecraft.util.AxisAlignedBB;
|
|||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
|
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
|
||||||
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.DraconiumBlock;
|
import com.brandon3055.draconicevolution.common.blocks.DraconiumBlock;
|
||||||
import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper.TileLocation;
|
import com.brandon3055.draconicevolution.common.blocks.multiblock.MultiblockHelper.TileLocation;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -129,7 +129,7 @@ public class EntityDragonHeart extends Entity {
|
|||||||
AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5));
|
AxisAlignedBB.getBoundingBox(posX - 5, posY - 5, posZ - 5, posX + 5, posY + 5, posZ + 5));
|
||||||
for (EntityItem item : items) {
|
for (EntityItem item : items) {
|
||||||
ItemStack stack = item.getEntityItem();
|
ItemStack stack = item.getEntityItem();
|
||||||
if (Utills.getDistanceAtoB(posX, posY + 0.5, posZ, item.posX, item.posY, item.posZ) < 1) {
|
if (Utils.getDistanceAtoB(posX, posY + 0.5, posZ, item.posX, item.posY, item.posZ) < 1) {
|
||||||
if (coresConsumed == 16 || worldObj.isRemote) break;
|
if (coresConsumed == 16 || worldObj.isRemote) break;
|
||||||
if (stack.getItem() != ModItems.draconicCore) {
|
if (stack.getItem() != ModItems.draconicCore) {
|
||||||
item.motionX = 1;
|
item.motionX = 1;
|
||||||
|
|||||||
+6
-6
@@ -17,12 +17,12 @@ import net.minecraft.util.MovingObjectPosition;
|
|||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Teleporter;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
|
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
|
||||||
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
import com.brandon3055.draconicevolution.client.render.particle.Particles;
|
||||||
import com.brandon3055.draconicevolution.common.network.GenericParticlePacket;
|
import com.brandon3055.draconicevolution.common.network.GenericParticlePacket;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Teleporter;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
import cofh.api.energy.IEnergyContainerItem;
|
import cofh.api.energy.IEnergyContainerItem;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
@@ -160,7 +160,7 @@ public class EntityDragonProjectile extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isChaser && !worldObj.isRemote) {
|
if (isChaser && !worldObj.isRemote) {
|
||||||
double tDist = Utills.getDistanceAtoB(target.posX, target.posY, target.posZ, posX, posY, posZ);
|
double tDist = Utils.getDistanceAtoB(target.posX, target.posY, target.posZ, posX, posY, posZ);
|
||||||
if (tDist <= 0) tDist = 0.1;
|
if (tDist <= 0) tDist = 0.1;
|
||||||
|
|
||||||
double x = (target.posX - posX) / tDist;
|
double x = (target.posX - posX) / tDist;
|
||||||
@@ -183,7 +183,7 @@ public class EntityDragonProjectile extends Entity {
|
|||||||
private boolean checkTargetCondition() {
|
private boolean checkTargetCondition() {
|
||||||
if (worldObj.isRemote) return false;
|
if (worldObj.isRemote) return false;
|
||||||
|
|
||||||
double targetDistance = Utills.getDistanceAtoB(posX, posY, posZ, target.posX, target.posY, target.posZ);
|
double targetDistance = Utils.getDistanceAtoB(posX, posY, posZ, target.posX, target.posY, target.posZ);
|
||||||
|
|
||||||
Entity entityHit = getHitEntity();
|
Entity entityHit = getHitEntity();
|
||||||
if (entityHit instanceof EntityDragonPart) entityHit = null;
|
if (entityHit instanceof EntityDragonPart) entityHit = null;
|
||||||
@@ -272,7 +272,7 @@ public class EntityDragonProjectile extends Entity {
|
|||||||
List<EntityLivingBase> list = worldObj.getEntitiesWithinAABBExcludingEntity(
|
List<EntityLivingBase> list = worldObj.getEntitiesWithinAABBExcludingEntity(
|
||||||
shooter,
|
shooter,
|
||||||
boundingBox.expand(60, 60, 60),
|
boundingBox.expand(60, 60, 60),
|
||||||
Utills.selectPlayer);
|
Utils.selectPlayer);
|
||||||
for (i = +0; i > 0; i--) {
|
for (i = +0; i > 0; i--) {
|
||||||
newProjectile = new EntityDragonProjectile(
|
newProjectile = new EntityDragonProjectile(
|
||||||
worldObj,
|
worldObj,
|
||||||
@@ -367,7 +367,7 @@ public class EntityDragonProjectile extends Entity {
|
|||||||
entityLivingBase.hurtResistantTime = 0;
|
entityLivingBase.hurtResistantTime = 0;
|
||||||
entityLivingBase.attackEntityFrom(
|
entityLivingBase.attackEntityFrom(
|
||||||
source,
|
source,
|
||||||
damage / (float) (Utills.getDistanceAtoB(
|
damage / (float) (Utils.getDistanceAtoB(
|
||||||
entityLivingBase.posX,
|
entityLivingBase.posX,
|
||||||
entityLivingBase.posY,
|
entityLivingBase.posY,
|
||||||
entityLivingBase.posZ,
|
entityLivingBase.posZ,
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
|
import net.minecraftforge.event.entity.living.EnderTeleportEvent;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -463,7 +463,7 @@ public class EntityEnderArrow extends EntityDraconicArrow {
|
|||||||
int y = (int) Math.floor(posY);
|
int y = (int) Math.floor(posY);
|
||||||
int z = (int) Math.floor(posZ);
|
int z = (int) Math.floor(posZ);
|
||||||
|
|
||||||
double travelDist = Utills.getDistanceAtoB(startX, startY, startZ, x, y, z);
|
double travelDist = Utils.getDistanceAtoB(startX, startY, startZ, x, y, z);
|
||||||
float travelDmg = (float) (travelDist / 5D);
|
float travelDmg = (float) (travelDist / 5D);
|
||||||
EnderTeleportEvent event = new EnderTeleportEvent(
|
EnderTeleportEvent event = new EnderTeleportEvent(
|
||||||
entityplayermp,
|
entityplayermp,
|
||||||
|
|||||||
+1
-1
@@ -9,7 +9,7 @@ import net.minecraftforge.common.config.Configuration;
|
|||||||
import net.minecraftforge.common.config.Property;
|
import net.minecraftforge.common.config.Property;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem.EnumUpgrade;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem.EnumUpgrade;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
import net.minecraftforge.common.config.Configuration;
|
import net.minecraftforge.common.config.Configuration;
|
||||||
|
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
public class ConfigHandler {
|
public class ConfigHandler {
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -19,12 +19,12 @@ import net.minecraftforge.client.event.RenderPlayerEvent;
|
|||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.handlers.FileHandler;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
import com.brandon3055.draconicevolution.client.handler.ResourceHandler;
|
||||||
import com.brandon3055.draconicevolution.client.model.special.ModelContributorWings;
|
import com.brandon3055.draconicevolution.client.model.special.ModelContributorWings;
|
||||||
import com.brandon3055.draconicevolution.common.network.ContributorPacket;
|
import com.brandon3055.draconicevolution.common.network.ContributorPacket;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.handlers.FileHandler;
|
||||||
import com.google.common.base.Charsets;
|
import com.google.common.base.Charsets;
|
||||||
import com.google.gson.stream.JsonReader;
|
import com.google.gson.stream.JsonReader;
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ShapedOreEnergyRecipe;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ShapedOreEnergyRecipe;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import net.minecraft.util.ChatComponentText;
|
|||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.items.armor.CustomArmorHandler;
|
import com.brandon3055.draconicevolution.common.items.armor.CustomArmorHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|||||||
+7
-7
@@ -45,10 +45,6 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
|||||||
import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
|
import net.minecraftforge.event.entity.player.PlayerUseItemEvent;
|
||||||
import net.minecraftforge.event.world.WorldEvent;
|
import net.minecraftforge.event.world.WorldEvent;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.handlers.ProcessHandler;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.DataUtills;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
@@ -60,7 +56,11 @@ import com.brandon3055.draconicevolution.common.items.armor.CustomArmorHandler;
|
|||||||
import com.brandon3055.draconicevolution.common.network.MountUpdatePacket;
|
import com.brandon3055.draconicevolution.common.network.MountUpdatePacket;
|
||||||
import com.brandon3055.draconicevolution.common.network.SpeedRequestPacket;
|
import com.brandon3055.draconicevolution.common.network.SpeedRequestPacket;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileGrinder;
|
import com.brandon3055.draconicevolution.common.tileentities.TileGrinder;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.DataUtils;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.Utils;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.handlers.ProcessHandler;
|
||||||
import com.brandon3055.draconicevolution.common.world.ChaosWorldGenHandler;
|
import com.brandon3055.draconicevolution.common.world.ChaosWorldGenHandler;
|
||||||
|
|
||||||
import cpw.mods.fml.common.eventhandler.EventPriority;
|
import cpw.mods.fml.common.eventhandler.EventPriority;
|
||||||
@@ -454,10 +454,10 @@ public class MinecraftForgeEventHandler {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void entityJoinWorld(EntityJoinWorldEvent event) {
|
public void entityJoinWorld(EntityJoinWorldEvent event) {
|
||||||
if (!event.world.isRemote && event.entity instanceof EntityEnderCrystal && event.entity.dimension == 1) {
|
if (!event.world.isRemote && event.entity instanceof EntityEnderCrystal && event.entity.dimension == 1) {
|
||||||
DataUtills.XZPair<Integer, Integer> location = ChaosWorldGenHandler
|
DataUtils.XZPair<Integer, Integer> location = ChaosWorldGenHandler
|
||||||
.getClosestChaosSpawn((int) event.entity.posX / 16, (int) event.entity.posZ / 16);
|
.getClosestChaosSpawn((int) event.entity.posX / 16, (int) event.entity.posZ / 16);
|
||||||
if ((location.x != 0 || location.z != 0)
|
if ((location.x != 0 || location.z != 0)
|
||||||
&& Utills.getDistanceAtoB(event.entity.posX, event.entity.posZ, location.x, location.z) < 500) {
|
&& Utils.getDistanceAtoB(event.entity.posX, event.entity.posZ, location.x, location.z) < 500) {
|
||||||
ProcessHandler.addProcess(new ChaosWorldGenHandler.CrystalRemover(event.entity));
|
ProcessHandler.addProcess(new ChaosWorldGenHandler.CrystalRemover(event.entity));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraft.nbt.NBTTagList;
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import net.minecraft.util.StringUtils;
|
import net.minecraft.util.StringUtils;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.common.container.ContainerAdvTool;
|
import com.brandon3055.draconicevolution.common.container.ContainerAdvTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
import com.brandon3055.draconicevolution.common.utils.IInventoryTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Brandon on 13/01/2015.
|
* Created by Brandon on 13/01/2015.
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ import net.minecraft.tileentity.TileEntityMobSpawner;
|
|||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
|
import com.brandon3055.draconicevolution.common.tileentities.TileCustomSpawner;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
@@ -15,10 +15,10 @@ import net.minecraft.util.StatCollector;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -36,10 +36,10 @@ public class MobSoul extends ItemDE {
|
|||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
|
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
|
||||||
String name = ItemNBTHelper.getString(stack, "Name", "Pig");
|
String name = ItemNBTHelper.getString(stack, "Name", "Pig");
|
||||||
list.add("" + EnumChatFormatting.WHITE + StatCollector.translateToLocal("info.mobSoul1.txt"));
|
list.add(EnumChatFormatting.WHITE + StatCollector.translateToLocal("info.mobSoul1.txt"));
|
||||||
list.add("" + EnumChatFormatting.WHITE + StatCollector.translateToLocal("info.mobSoul2.txt"));
|
list.add(EnumChatFormatting.WHITE + StatCollector.translateToLocal("info.mobSoul2.txt"));
|
||||||
list.add("" + EnumChatFormatting.WHITE + StatCollector.translateToLocal("info.mobSoul3.txt"));
|
list.add(EnumChatFormatting.WHITE + StatCollector.translateToLocal("info.mobSoul3.txt"));
|
||||||
list.add("" + EnumChatFormatting.DARK_PURPLE + name);
|
list.add(EnumChatFormatting.DARK_PURPLE + name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import com.brandon3055.draconicevolution.common.ModItems;
|
|||||||
import com.brandon3055.draconicevolution.common.entity.ExtendedPlayer;
|
import com.brandon3055.draconicevolution.common.entity.ExtendedPlayer;
|
||||||
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolHandler;
|
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolHandler;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
import cpw.mods.fml.client.FMLClientHandler;
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
|||||||
+4
-5
@@ -19,13 +19,12 @@ import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
|||||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||||
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.BrandonsCore;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.network.ShieldHitPacket;
|
import com.brandon3055.draconicevolution.common.network.ShieldHitPacket;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||||
|
|
||||||
import cofh.api.energy.IEnergyContainerItem;
|
import cofh.api.energy.IEnergyContainerItem;
|
||||||
@@ -261,12 +260,12 @@ public class CustomArmorHandler {
|
|||||||
&& summery.flightVModifier > 0) {
|
&& summery.flightVModifier > 0) {
|
||||||
// float percentIncrease = summery.flightVModifier;
|
// float percentIncrease = summery.flightVModifier;
|
||||||
|
|
||||||
if (BrandonsCore.proxy.isSpaceDown() && !BrandonsCore.proxy.isShiftDown()) {
|
if (DraconicEvolution.proxy.isSpaceDown() && !DraconicEvolution.proxy.isShiftDown()) {
|
||||||
// LogHelper.info(player.motionY);
|
// LogHelper.info(player.motionY);
|
||||||
player.motionY = 0.225F * summery.flightVModifier;
|
player.motionY = 0.225F * summery.flightVModifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BrandonsCore.proxy.isShiftDown() && !BrandonsCore.proxy.isSpaceDown()) {
|
if (DraconicEvolution.proxy.isShiftDown() && !DraconicEvolution.proxy.isSpaceDown()) {
|
||||||
player.motionY = -0.225F * summery.flightVModifier;
|
player.motionY = -0.225F * summery.flightVModifier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+15
-15
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.common.items.armor;
|
package com.brandon3055.draconicevolution.common.items.armor;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -26,10 +28,6 @@ import net.minecraft.util.StatCollector;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ISpecialArmor;
|
import net.minecraftforge.common.ISpecialArmor;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.BrandonsCore;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.model.ModelDraconicArmor;
|
import com.brandon3055.draconicevolution.client.model.ModelDraconicArmor;
|
||||||
import com.brandon3055.draconicevolution.client.model.ModelDraconicArmorOld;
|
import com.brandon3055.draconicevolution.client.model.ModelDraconicArmorOld;
|
||||||
@@ -39,10 +37,12 @@ import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
|||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolBase;
|
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolBase;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
import com.brandon3055.draconicevolution.common.utils.IInventoryTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
@@ -516,17 +516,17 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
|||||||
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.RFCapacity.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.RFCapacity.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ Utills.formatNumber(getMaxEnergyStored(stack)));
|
+ formatNumber(getMaxEnergyStored(stack)));
|
||||||
strings.add(
|
strings.add(
|
||||||
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.ShieldCapacity.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.ShieldCapacity.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ (int) getProtectionPoints(stack));
|
+ formatNumber((int) getProtectionPoints(stack)));
|
||||||
strings.add(
|
strings.add(
|
||||||
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.ShieldRecovery.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.ShieldRecovery.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ Utills.round(getRecoveryPoints(stack) * 0.2D, 10)
|
+ formatNumber(getRecoveryPoints(stack) * 0.2D)
|
||||||
+ " EPS");
|
+ " EPS");
|
||||||
|
|
||||||
return strings;
|
return strings;
|
||||||
@@ -579,7 +579,7 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
|||||||
@Override
|
@Override
|
||||||
public float getJumpModifier(ItemStack stack, EntityPlayer player) {
|
public float getJumpModifier(ItemStack stack, EntityPlayer player) {
|
||||||
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorSprintOnly", false)) {
|
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorSprintOnly", false)) {
|
||||||
return player.isSprinting() || BrandonsCore.proxy.isCtrlDown()
|
return player.isSprinting() || DraconicEvolution.proxy.isCtrlDown()
|
||||||
? IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f)
|
? IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f)
|
||||||
: IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f) / 5F;
|
: IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f) / 5F;
|
||||||
} else return IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f);
|
} else return IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f);
|
||||||
@@ -588,7 +588,7 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
|||||||
@Override
|
@Override
|
||||||
public boolean hasHillStep(ItemStack stack, EntityPlayer player) {
|
public boolean hasHillStep(ItemStack stack, EntityPlayer player) {
|
||||||
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorSprintOnly", false)) {
|
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorSprintOnly", false)) {
|
||||||
return (player.isSprinting() || BrandonsCore.proxy.isCtrlDown())
|
return (player.isSprinting() || DraconicEvolution.proxy.isCtrlDown())
|
||||||
&& IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorHillStep", true);
|
&& IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorHillStep", true);
|
||||||
} else return IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorHillStep", true);
|
} else return IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorHillStep", true);
|
||||||
}
|
}
|
||||||
@@ -607,7 +607,7 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
|||||||
@Override
|
@Override
|
||||||
public float getFlightSpeedModifier(ItemStack stack, EntityPlayer player) {
|
public float getFlightSpeedModifier(ItemStack stack, EntityPlayer player) {
|
||||||
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "EffectiveOnSprint", false)) {
|
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "EffectiveOnSprint", false)) {
|
||||||
return BrandonsCore.proxy.isCtrlDown()
|
return DraconicEvolution.proxy.isCtrlDown()
|
||||||
? IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorFlightSpeedMult", 0f)
|
? IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorFlightSpeedMult", 0f)
|
||||||
: 0F;
|
: 0F;
|
||||||
} else return IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorFlightSpeedMult", 0f);
|
} else return IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorFlightSpeedMult", 0f);
|
||||||
@@ -616,7 +616,7 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
|||||||
@Override
|
@Override
|
||||||
public float getFlightVModifier(ItemStack stack, EntityPlayer player) {
|
public float getFlightVModifier(ItemStack stack, EntityPlayer player) {
|
||||||
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "EffectiveOnSprint", false)) {
|
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "EffectiveOnSprint", false)) {
|
||||||
return BrandonsCore.proxy.isCtrlDown()
|
return DraconicEvolution.proxy.isCtrlDown()
|
||||||
? IConfigurableItem.ProfileHelper.getFloat(stack, "VerticalAcceleration", 0F)
|
? IConfigurableItem.ProfileHelper.getFloat(stack, "VerticalAcceleration", 0F)
|
||||||
: 0F;
|
: 0F;
|
||||||
} else return IConfigurableItem.ProfileHelper.getFloat(stack, "VerticalAcceleration", 0F);
|
} else return IConfigurableItem.ProfileHelper.getFloat(stack, "VerticalAcceleration", 0F);
|
||||||
|
|||||||
+12
-12
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.common.items.armor;
|
package com.brandon3055.draconicevolution.common.items.armor;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -23,10 +25,6 @@ import net.minecraft.util.StatCollector;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.ISpecialArmor;
|
import net.minecraftforge.common.ISpecialArmor;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.BrandonsCore;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.model.ModelDraconicArmorOld;
|
import com.brandon3055.draconicevolution.client.model.ModelDraconicArmorOld;
|
||||||
import com.brandon3055.draconicevolution.client.model.ModelWyvernArmor;
|
import com.brandon3055.draconicevolution.client.model.ModelWyvernArmor;
|
||||||
@@ -36,10 +34,12 @@ import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
|||||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||||
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolBase;
|
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolBase;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
import com.brandon3055.draconicevolution.common.utils.IInventoryTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
import com.brandon3055.draconicevolution.integration.ModHelper;
|
import com.brandon3055.draconicevolution.integration.ModHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Loader;
|
import cpw.mods.fml.common.Loader;
|
||||||
@@ -395,17 +395,17 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
|||||||
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.RFCapacity.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.RFCapacity.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ Utills.formatNumber(getMaxEnergyStored(stack)));
|
+ formatNumber(getMaxEnergyStored(stack)));
|
||||||
strings.add(
|
strings.add(
|
||||||
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.ShieldCapacity.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.ShieldCapacity.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ (int) getProtectionPoints(stack));
|
+ formatNumber((int) getProtectionPoints(stack)));
|
||||||
strings.add(
|
strings.add(
|
||||||
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.ShieldRecovery.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.ShieldRecovery.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ Utills.round(getRecoveryPoints(stack) * 0.2D, 10)
|
+ formatNumber(getRecoveryPoints(stack) * 0.2D)
|
||||||
+ " EPS");
|
+ " EPS");
|
||||||
|
|
||||||
return strings;
|
return strings;
|
||||||
@@ -457,7 +457,7 @@ public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurab
|
|||||||
@Override
|
@Override
|
||||||
public float getJumpModifier(ItemStack stack, EntityPlayer player) {
|
public float getJumpModifier(ItemStack stack, EntityPlayer player) {
|
||||||
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorSprintOnly", false)) {
|
if (IConfigurableItem.ProfileHelper.getBoolean(stack, "ArmorSprintOnly", false)) {
|
||||||
return player.isSprinting() || BrandonsCore.proxy.isCtrlDown()
|
return player.isSprinting() || DraconicEvolution.proxy.isCtrlDown()
|
||||||
? IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f)
|
? IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f)
|
||||||
: IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f) / 5F;
|
: IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f) / 5F;
|
||||||
} else return IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f);
|
} else return IConfigurableItem.ProfileHelper.getFloat(stack, "ArmorJumpMult", 0f);
|
||||||
|
|||||||
+2
-2
@@ -12,13 +12,13 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.items.ItemDE;
|
import com.brandon3055.draconicevolution.common.items.ItemDE;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
|||||||
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.MiningTool;
|
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.MiningTool;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
import com.brandon3055.draconicevolution.common.utils.IInventoryTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
|
||||||
public class DraconicAxe extends MiningTool implements IInventoryTool, IRenderTweak {
|
public class DraconicAxe extends MiningTool implements IInventoryTool, IRenderTweak {
|
||||||
|
|
||||||
|
|||||||
+8
-6
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.common.items.tools;
|
package com.brandon3055.draconicevolution.common.items.tools;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@@ -15,7 +17,6 @@ import net.minecraftforge.client.IItemRenderer;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.draconicevolution.client.render.IRenderTweak;
|
import com.brandon3055.draconicevolution.client.render.IRenderTweak;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
||||||
@@ -24,10 +25,11 @@ import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolHand
|
|||||||
import com.brandon3055.draconicevolution.common.items.weapons.IEnergyContainerWeaponItem;
|
import com.brandon3055.draconicevolution.common.items.weapons.IEnergyContainerWeaponItem;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
import com.brandon3055.draconicevolution.common.utils.IInventoryTool;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -215,7 +217,7 @@ public class DraconicDistructionStaff extends MiningTool
|
|||||||
InfoHelper.ITC() + StatCollector.translateToLocal("info.de.attackDamage.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("info.de.attackDamage.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ ToolHandler.getBaseAttackDamage(stack));
|
+ formatNumber(ToolHandler.getBaseAttackDamage(stack)));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+14
-13
@@ -1,5 +1,7 @@
|
|||||||
package com.brandon3055.draconicevolution.common.items.tools;
|
package com.brandon3055.draconicevolution.common.items.tools;
|
||||||
|
|
||||||
|
import static com.gtnewhorizon.gtnhlib.util.numberformatting.NumberFormatUtil.formatNumber;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -22,9 +24,6 @@ import net.minecraftforge.event.entity.player.UseHoeEvent;
|
|||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
|
||||||
import com.brandon3055.brandonscore.common.utills.Utills;
|
|
||||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||||
import com.brandon3055.draconicevolution.client.render.IRenderTweak;
|
import com.brandon3055.draconicevolution.client.render.IRenderTweak;
|
||||||
import com.brandon3055.draconicevolution.common.ModItems;
|
import com.brandon3055.draconicevolution.common.ModItems;
|
||||||
@@ -33,11 +32,13 @@ import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
|||||||
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolBase;
|
import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolBase;
|
||||||
import com.brandon3055.draconicevolution.common.lib.References;
|
import com.brandon3055.draconicevolution.common.lib.References;
|
||||||
import com.brandon3055.draconicevolution.common.lib.Strings;
|
import com.brandon3055.draconicevolution.common.lib.Strings;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IConfigurableItem;
|
import com.brandon3055.draconicevolution.common.utils.IConfigurableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IHudDisplayItem;
|
import com.brandon3055.draconicevolution.common.utils.IHudDisplayItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
import com.brandon3055.draconicevolution.common.utils.IUpgradableItem;
|
||||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
import com.brandon3055.draconicevolution.common.utils.InfoHelper;
|
||||||
import com.brandon3055.draconicevolution.common.utills.LogHelper;
|
import com.brandon3055.draconicevolution.common.utils.ItemConfigField;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.ItemNBTHelper;
|
||||||
|
import com.brandon3055.draconicevolution.common.utils.LogHelper;
|
||||||
|
|
||||||
import cofh.api.energy.IEnergyContainerItem;
|
import cofh.api.energy.IEnergyContainerItem;
|
||||||
import cpw.mods.fml.common.eventhandler.Event.Result;
|
import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||||
@@ -358,16 +359,16 @@ public class DraconicHoe extends ItemHoe
|
|||||||
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.RFCapacity.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.RFCapacity.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ Utills.formatNumber(getMaxEnergyStored(itemstack)));
|
+ formatNumber(getMaxEnergyStored(itemstack)));
|
||||||
strings.add(
|
strings.add(
|
||||||
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.max.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("gui.de.max.txt")
|
||||||
+ " "
|
+ " "
|
||||||
+ StatCollector.translateToLocal("gui.de.DigAOE.txt")
|
+ StatCollector.translateToLocal("gui.de.DigAOE.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ digaoe
|
+ formatNumber(digaoe)
|
||||||
+ "x"
|
+ "x"
|
||||||
+ digaoe);
|
+ formatNumber(digaoe));
|
||||||
|
|
||||||
return strings;
|
return strings;
|
||||||
}
|
}
|
||||||
@@ -388,9 +389,9 @@ public class DraconicHoe extends ItemHoe
|
|||||||
InfoHelper.ITC() + StatCollector.translateToLocal("info.de.charge.txt")
|
InfoHelper.ITC() + StatCollector.translateToLocal("info.de.charge.txt")
|
||||||
+ ": "
|
+ ": "
|
||||||
+ InfoHelper.HITC()
|
+ InfoHelper.HITC()
|
||||||
+ Utills.formatNumber(getEnergyStored(stack))
|
+ formatNumber(getEnergyStored(stack))
|
||||||
+ " / "
|
+ " / "
|
||||||
+ Utills.formatNumber(capacity));
|
+ formatNumber(capacity));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
Loaded 100 of 192 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user