mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
and here comes the LGPL
This commit is contained in:
parent
f90815897e
commit
d94a48b8c9
165
LICENSE.LESSER
Normal file
165
LICENSE.LESSER
Normal file
@ -0,0 +1,165 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
@ -86,6 +86,7 @@ public class WeaponRecipes {
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_cursed, 1), new Object[] { "TTM", "SRI", 'S', STEEL.plate(), 'I', STEEL.ingot(), 'R', ModItems.wire_red_copper, 'T', TI.plate(), 'M', ModItems.mechanism_revolver_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_nightmare, 1), new Object[] { "SEM", " RW", 'S', STEEL.plate(), 'W', KEY_PLANKS, 'R', ModItems.wire_aluminium, 'E', ModItems.powder_power, 'M', ModItems.mechanism_revolver_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_revolver_nightmare2, 1), new Object[] { "SSM", "RRW", 'S', OreDictManager.getReflector(), 'W', W.ingot(), 'R', ModItems.wire_gold, 'M', ModItems.mechanism_special });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_bio_revolver, 1), new Object[] { "SSM", "BTW", 'S', STEEL.plate(), 'M', ModItems.mechanism_revolver_2, 'B', B.ingot(), 'T', ModItems.bolt_tungsten, 'W', KEY_LOG });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_fatman, 1), new Object[] { "SSI", "IIM", "WPH", 'S', STEEL.plate(), 'I', STEEL.ingot(), 'W', ModItems.wire_aluminium, 'H', ModItems.hull_small_steel, 'P', Item.getItemFromBlock(Blocks.piston), 'M', ModItems.mechanism_launcher_2 });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_mirv, 1), new Object[] { "LLL", "WFW", "SSS", 'S', STEEL.plate(), 'L', PB.plate(), 'W', ModItems.wire_gold, 'F', ModItems.gun_fatman });
|
||||
CraftingManager.addRecipeAuto(new ItemStack(ModItems.gun_proto, 1), new Object[] { "LLL", "WFW", "SSS", 'S', ModItems.plate_polymer, 'L', ModItems.plate_desh, 'W', ModItems.wire_tungsten, 'F', ModItems.gun_fatman });
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
package com.hbm.inventory.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.hbm.items.ModItems;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.packet.AuxButtonPacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
import com.hbm.tileentity.turret.TileEntityTurretArty;
|
||||
@ -9,6 +14,7 @@ import com.hbm.util.I18nUtil;
|
||||
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GUITurretArty extends GUITurretBase {
|
||||
@ -23,6 +29,46 @@ public class GUITurretArty extends GUITurretBase {
|
||||
public void drawScreen(int mouseX, int mouseY, float f) {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
/*List<Object[]> objects = new ArrayList();
|
||||
objects.add(new Object[]{EnumChatFormatting.YELLOW + "Title"});
|
||||
objects.add(new Object[]{"Stack:", new ItemStack(ModItems.upgrade_5g)});
|
||||
objects.add(new Object[]{new ItemStack(ModItems.upgrade_afterburn_1), new ItemStack(ModItems.upgrade_afterburn_2), new ItemStack(ModItems.upgrade_afterburn_3)});
|
||||
objects.add(new Object[]{new ItemStack(ModItems.upgrade_5g), "is the stack"});
|
||||
|
||||
this.drawHoveringText2(objects, mouseX, mouseY, this.fontRendererObj);*/
|
||||
|
||||
if(this.mc.thePlayer.inventory.getItemStack() == null && this.guiLeft + 79 <= mouseX && guiLeft + 79 + 54 > mouseX && guiTop + 62 < mouseY && guiTop + 62 + 54 >= mouseY) {
|
||||
|
||||
boolean draw = true;
|
||||
for(int i = 0; i < 9; i++) {
|
||||
if(this.isMouseOverSlot(this.inventorySlots.getSlot(i), mouseX, mouseY) && this.inventorySlots.getSlot(i).getHasStack()) {
|
||||
draw = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(draw) {
|
||||
List list = new ArrayList();
|
||||
ModItems.ammo_arty.getSubItems(ModItems.ammo_arty, MainRegistry.weaponTab, list);
|
||||
int cycle = (int) ((System.currentTimeMillis() % (1000 * list.size())) / 1000);
|
||||
ItemStack selected = (ItemStack) list.get(cycle);
|
||||
selected.stackSize = 0;
|
||||
List<Object[]> lines = new ArrayList();
|
||||
lines.add(list.toArray());
|
||||
lines.add(new Object[] {I18nUtil.resolveKey(selected.getDisplayName())});
|
||||
this.drawHoveringText2(lines, mouseX, mouseY, this.fontRendererObj);
|
||||
|
||||
/*List list = new ArrayList();
|
||||
ModItems.ammo_arty.getSubItems(ModItems.ammo_arty, MainRegistry.weaponTab, list);
|
||||
List<Object[]> lines = new ArrayList();
|
||||
for(Object o : list) {
|
||||
ItemStack stack = (ItemStack) o;
|
||||
lines.add(new Object[] {stack, stack.getDisplayName()});
|
||||
}
|
||||
this.drawHoveringText2(lines, mouseX, mouseY, this.fontRendererObj);*/
|
||||
}
|
||||
}
|
||||
|
||||
TileEntityTurretArty arty = (TileEntityTurretArty) turret;
|
||||
String mode = arty.mode == arty.MODE_ARTILLERY ? "artillery" : arty.mode == arty.MODE_CANNON ? "cannon" : "manual";
|
||||
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 151, guiTop + 16, 18, 18, mouseX, mouseY, I18nUtil.resolveKeyArray("turret.arty." + mode));
|
||||
|
||||
@ -16,6 +16,8 @@ import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public abstract class GuiInfoContainer extends GuiContainer {
|
||||
@ -87,19 +89,39 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
}
|
||||
|
||||
//TODO: do the funny
|
||||
protected void drawHoveringText2(List lines, int x, int y, FontRenderer font) {
|
||||
protected void drawHoveringText2(List<Object[]> lines, int x, int y, FontRenderer font) {
|
||||
|
||||
if(!lines.isEmpty()) {
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
int height = 0;
|
||||
int longestline = 0;
|
||||
Iterator iterator = lines.iterator();
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
String line = (String) iterator.next();
|
||||
int lineWidth = font.getStringWidth(line);
|
||||
Object[] line = (Object[]) iterator.next();
|
||||
int lineWidth = 0;
|
||||
|
||||
boolean hasStack = false;
|
||||
|
||||
for(Object o : line) {
|
||||
|
||||
if(o instanceof String) {
|
||||
lineWidth += font.getStringWidth((String) o);
|
||||
} else {
|
||||
lineWidth += 18;
|
||||
hasStack = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(hasStack) {
|
||||
height += 18;
|
||||
} else {
|
||||
height += 10;
|
||||
}
|
||||
|
||||
if(lineWidth > longestline) {
|
||||
longestline = lineWidth;
|
||||
@ -108,11 +130,6 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
|
||||
int minX = x + 12;
|
||||
int minY = y - 12;
|
||||
int height = 8;
|
||||
|
||||
if(lines.size() > 1) {
|
||||
height += 2 + (lines.size() - 1) * 10;
|
||||
}
|
||||
|
||||
if(minX + longestline > this.width) {
|
||||
minX -= 28 + longestline;
|
||||
@ -141,14 +158,38 @@ public abstract class GuiInfoContainer extends GuiContainer {
|
||||
this.drawGradientRect(minX - 3, minY + height + 2, minX + longestline + 3, minY + height + 3, color1, color1);
|
||||
|
||||
for(int index = 0; index < lines.size(); ++index) {
|
||||
String line = (String) lines.get(index);
|
||||
font.drawStringWithShadow(line, minX, minY, -1);
|
||||
|
||||
Object[] line = (Object[]) lines.get(index);
|
||||
int indent = 0;
|
||||
boolean hasStack = false;
|
||||
|
||||
for(Object o : line) {
|
||||
if(!(o instanceof String)) {
|
||||
hasStack = true;
|
||||
}
|
||||
}
|
||||
|
||||
for(Object o : line) {
|
||||
|
||||
if(o instanceof String) {
|
||||
font.drawStringWithShadow((String) o, minX + indent, minY + (hasStack ? 4 : 0), -1);
|
||||
indent += font.getStringWidth((String) o) + 2;
|
||||
} else {
|
||||
ItemStack stack = (ItemStack) o;
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
itemRender.renderItemAndEffectIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY);
|
||||
itemRender.renderItemOverlayIntoGUI(this.fontRendererObj, this.mc.getTextureManager(), stack, minX + indent, minY, stack.stackSize == 0 ? (EnumChatFormatting.RED + "_ _") : null);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
indent += 18;
|
||||
}
|
||||
}
|
||||
|
||||
if(index == 0) {
|
||||
minY += 2;
|
||||
}
|
||||
|
||||
minY += 10;
|
||||
minY += hasStack ? 18 : 10;
|
||||
}
|
||||
|
||||
this.zLevel = 0.0F;
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (4277)";
|
||||
public static final String VERSION = "1.0.27 BETA (4291)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -16,6 +16,7 @@ import com.hbm.lib.Library;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.sound.AudioWrapper;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityCrateBase;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityCrateIron;
|
||||
import com.hbm.tileentity.machine.storage.TileEntityCrateSteel;
|
||||
|
||||
@ -195,13 +196,12 @@ public class TileEntityMachineAssembler extends TileEntityMachineBase implements
|
||||
tryExchangeTemplates(te1, te2);
|
||||
|
||||
//OUTPUT
|
||||
if(te1 instanceof IInventory) {
|
||||
if(te1 instanceof TileEntityCrateBase || te1 instanceof TileEntityChest) {
|
||||
IInventory chest = (IInventory)te1;
|
||||
|
||||
tryFillContainer(chest, 5);
|
||||
}
|
||||
|
||||
if(te2 instanceof IInventory) {
|
||||
if(te2 instanceof TileEntityCrateBase || te2 instanceof TileEntityChest) {
|
||||
IInventory chest = (IInventory)te2;
|
||||
|
||||
for(int i = 0; i < chest.getSizeInventory(); i++)
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
"modid": "hbm",
|
||||
"name": "Hbm's Nuclear Tech",
|
||||
"description": "A mod that adds weapons, nuclear themed stuff and machines",
|
||||
"version":"1.0.27_X4277",
|
||||
"version":"1.0.27_X4291",
|
||||
"mcversion": "1.7.10",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user