mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 04:32:24 +00:00
Fix many server crashes from client-side code
This commit is contained in:
1 parent
f660f213f6
commit
b8acba968e
49 files changed
+232
-147
No files matched your search
@@ -239,6 +239,7 @@ public class BlockCeramicBrick extends Block implements IMultipassBlock<CeramicB
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerSprites(ITextureManager manager) {
|
||||
for (CeramicBrickType type : CeramicBrickType.VALUES) {
|
||||
type.sprites = new TextureAtlasSprite[3];
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
type.sprites[i] = TextureManager.registerSprite(new ResourceLocation(Constants.BOTANY_MOD_ID + ":blocks/ceramic." + type.id + "." + i));
|
||||
}
|
||||
|
||||
@@ -3,8 +3,11 @@ package binnie.botany.ceramic.brick;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class CeramicBrickPair {
|
||||
EnumFlowerColor colorFirst;
|
||||
@@ -49,8 +52,11 @@ public class CeramicBrickPair {
|
||||
return ordinal;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public TextureAtlasSprite getSprite(int pass) {
|
||||
return this.type.sprites[pass];
|
||||
TextureAtlasSprite[] sprites = this.type.sprites;
|
||||
Preconditions.checkState(sprites != null, "Sprites have not been registered.");
|
||||
return sprites[pass];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package binnie.botany.ceramic.brick;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.genetics.EnumFlowerColor;
|
||||
import binnie.botany.items.BotanyItems;
|
||||
@@ -11,8 +8,12 @@ import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public enum CeramicBrickType implements IStringSerializable {
|
||||
Tile("tile", "Ceramic Tile"){
|
||||
@@ -229,10 +230,12 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
|
||||
String id;
|
||||
String name;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
TextureAtlasSprite[] sprites;
|
||||
|
||||
CeramicBrickType(final String id, final String name) {
|
||||
this.sprites = new TextureAtlasSprite[3];
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@@ -8,11 +8,17 @@ import binnie.extrabees.ExtraBees;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum BotanyTexture implements IBinnieTexture {
|
||||
;
|
||||
String texture;
|
||||
ResourceType type;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
private BinnieResource resource;
|
||||
|
||||
BotanyTexture(final ResourceType base, final String texture) {
|
||||
this.texture = texture;
|
||||
this.type = base;
|
||||
@@ -21,6 +27,9 @@ public enum BotanyTexture implements IBinnieTexture {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return Binnie.RESOURCE.getPNG(ExtraBees.instance, this.type, this.texture);
|
||||
if (resource == null) {
|
||||
resource = Binnie.RESOURCE.getPNG(ExtraBees.instance, this.type, this.texture);
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,8 @@ import forestry.api.genetics.ISpeciesRoot;
|
||||
import forestry.core.genetics.alleles.AlleleSpecies;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class AlleleFlowerSpecies extends AlleleSpecies implements IAlleleFlowerSpecies, IAlleleFlowerSpeciesBuilder {
|
||||
|
||||
@@ -86,11 +86,13 @@ public class AlleleFlowerSpecies extends AlleleSpecies implements IAlleleFlowerS
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getFlowerModel(EnumFlowerStage type, boolean flowered) {
|
||||
return flowerType.getModel(type, flowered);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerModels(Item item, IModelManager manager, EnumFlowerStage type) {
|
||||
flowerType.registerModels(item, manager, type);
|
||||
}
|
||||
|
||||
@@ -86,8 +86,8 @@ public enum EnumFlowerType implements IFlowerType<EnumFlowerType> {
|
||||
ModelBakery.registerItemVariants(item, pollen, seed, flower);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public ModelResourceLocation getModel(EnumFlowerStage type, boolean flowered) {
|
||||
if (type == EnumFlowerStage.SEED) {
|
||||
return seed;
|
||||
|
||||
@@ -5,7 +5,6 @@ import binnie.core.machines.IMachineType;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.MachinePackage;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -41,11 +40,11 @@ enum Compartment implements IMachineType {
|
||||
}
|
||||
|
||||
public abstract static class PackageCompartment extends MachinePackage {
|
||||
private BinnieResource renderTexture;
|
||||
private IBinnieTexture renderTexture;
|
||||
|
||||
protected PackageCompartment(final String uid, final IBinnieTexture renderTexture) {
|
||||
super(uid, false);
|
||||
this.renderTexture = renderTexture.getTexture();
|
||||
this.renderTexture = renderTexture;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,7 +59,7 @@ enum Compartment implements IMachineType {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
MachineRendererCompartment.instance.renderMachine(machine, 16777215, renderTexture, x, y, z, partialTicks);
|
||||
MachineRendererCompartment.instance.renderMachine(machine, 16777215, renderTexture.getTexture(), x, y, z, partialTicks);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@ import binnie.core.resource.ResourceType;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum BinnieCoreTexture implements IBinnieTexture {
|
||||
Compartment(ResourceType.Tile, "Compartment"),
|
||||
CompartmentIron(ResourceType.Tile, "CompartmentIron"),
|
||||
@@ -21,6 +23,10 @@ public enum BinnieCoreTexture implements IBinnieTexture {
|
||||
String texture;
|
||||
ResourceType type;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
private BinnieResource resource;
|
||||
|
||||
BinnieCoreTexture(final ResourceType base, final String texture) {
|
||||
this.texture = texture;
|
||||
this.type = base;
|
||||
@@ -29,6 +35,9 @@ public enum BinnieCoreTexture implements IBinnieTexture {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return Binnie.RESOURCE.getPNG(BinnieCore.getInstance(), this.type, this.texture);
|
||||
if (resource == null) {
|
||||
resource = Binnie.RESOURCE.getPNG(BinnieCore.getInstance(), this.type, this.texture);
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,13 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TextureRenderer {
|
||||
private static void renderTexturePadded(final IArea area, final IArea texture, final IBorder padding) {
|
||||
int borderLeft = padding.l();
|
||||
|
||||
@@ -9,6 +9,7 @@ import binnie.core.machines.network.INetwork;
|
||||
import binnie.core.machines.power.PowerSystem;
|
||||
import binnie.core.network.packet.MessageCraftGUI;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.core.resource.ResourceType;
|
||||
import binnie.craftgui.controls.ControlText;
|
||||
import binnie.craftgui.controls.ControlTextCentered;
|
||||
@@ -156,8 +157,14 @@ public abstract class Window extends TopLevelWidget implements INetwork.RecieveG
|
||||
|
||||
protected abstract String getBackgroundTextureName();
|
||||
|
||||
public BinnieResource getBackgroundTextureFile(final int i) {
|
||||
return Binnie.RESOURCE.getPNG(this.getMod(), ResourceType.GUI, this.getBackgroundTextureName() + ((i == 1) ? "" : i));
|
||||
public IBinnieTexture getBackgroundTextureFile(final int i) {
|
||||
return new IBinnieTexture() {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return Binnie.RESOURCE.getPNG(getMod(), ResourceType.GUI, getBackgroundTextureName() + ((i == 1) ? "" : i));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public boolean showHelpButton() {
|
||||
@@ -191,6 +198,7 @@ public abstract class Window extends TopLevelWidget implements INetwork.RecieveG
|
||||
return this.windowInventory;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public final void initGui() {
|
||||
if (this.hasBeenInitialised) {
|
||||
return;
|
||||
@@ -207,6 +215,7 @@ public abstract class Window extends TopLevelWidget implements INetwork.RecieveG
|
||||
this.hasBeenInitialised = true;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract void initialiseClient();
|
||||
|
||||
public void initialiseServer() {
|
||||
|
||||
@@ -7,15 +7,14 @@ import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.events.EventValueChanged;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IClassification;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
public class PageBranchSpecies extends PageBranch {
|
||||
private ControlText pageBranchSpecies_title;
|
||||
private ControlSpeciesBox pageBranchSpecies_speciesList;
|
||||
|
||||
@Mod.EventHandler
|
||||
public void onHandleEvent(final EventValueChanged<IAlleleSpecies> event) {
|
||||
}
|
||||
// @Mod.EventHandler
|
||||
// public void onHandleEvent(final EventValueChanged<IAlleleSpecies> event) {
|
||||
// }
|
||||
|
||||
public PageBranchSpecies(final IWidget parent, final DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
|
||||
@@ -1,35 +1,32 @@
|
||||
package binnie.craftgui.resource;
|
||||
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.craftgui.core.geometry.IArea;
|
||||
import binnie.craftgui.core.geometry.IBorder;
|
||||
import binnie.craftgui.core.geometry.Position;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class Texture {
|
||||
@Nullable
|
||||
public static final Texture NULL = null;
|
||||
IArea area;
|
||||
IBorder padding;
|
||||
IBorder border;
|
||||
BinnieResource filename;
|
||||
private final IArea area;
|
||||
private final IBorder padding;
|
||||
private final IBorder border;
|
||||
private final IBinnieTexture binnieTexture;
|
||||
|
||||
public Texture(final IArea area, final BinnieResource filename) {
|
||||
this(area, IBorder.ZERO, IBorder.ZERO, filename);
|
||||
public Texture(final IArea area, final IBinnieTexture binnieTexture) {
|
||||
this(area, IBorder.ZERO, IBorder.ZERO, binnieTexture);
|
||||
}
|
||||
|
||||
public Texture(final IArea area, final IBorder padding, final BinnieResource filename) {
|
||||
this(area, padding, IBorder.ZERO, filename);
|
||||
public Texture(final IArea area, final IBorder padding, final IBinnieTexture binnieTexture) {
|
||||
this(area, padding, IBorder.ZERO, binnieTexture);
|
||||
}
|
||||
|
||||
public Texture(final IArea area, final IBorder padding, final IBorder border, final BinnieResource filename) {
|
||||
this.padding = IBorder.ZERO;
|
||||
this.border = IBorder.ZERO;
|
||||
public Texture(final IArea area, final IBorder padding, final IBorder border, final IBinnieTexture binnieTexture) {
|
||||
this.area = new IArea(area);
|
||||
this.padding = new IBorder(padding);
|
||||
this.border = new IBorder(border);
|
||||
this.filename = filename;
|
||||
this.binnieTexture = binnieTexture;
|
||||
}
|
||||
|
||||
public IArea getArea() {
|
||||
@@ -44,8 +41,9 @@ public class Texture {
|
||||
return this.border;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getFilename() {
|
||||
return this.filename;
|
||||
return this.binnieTexture.getTexture();
|
||||
}
|
||||
|
||||
public IBorder getTotalPadding() {
|
||||
@@ -73,7 +71,7 @@ public class Texture {
|
||||
}
|
||||
|
||||
public Texture crop(final IBorder crop) {
|
||||
final Texture copy = new Texture(this.area, this.padding, this.border, this.filename);
|
||||
final Texture copy = new Texture(this.area, this.padding, this.border, this.binnieTexture);
|
||||
if (crop.b() > 0) {
|
||||
copy.border.b(0);
|
||||
copy.padding.b(copy.padding.b() - Math.min(crop.b(), copy.padding.b()));
|
||||
|
||||
@@ -70,7 +70,7 @@ public class CraftGUIResourceManager implements IResourceManagerReloadListener {
|
||||
if (sheet.has("padding")) {
|
||||
padding = this.getBorder(sheet.get("padding").getAsString());
|
||||
}
|
||||
this.textures.put(name, new Texture(uv, padding, border, textureSheet.getTexture()));
|
||||
this.textures.put(name, new Texture(uv, padding, border, textureSheet));
|
||||
}
|
||||
}
|
||||
} catch (RuntimeException runtimeexception) {
|
||||
|
||||
@@ -6,12 +6,18 @@ import binnie.craftgui.core.CraftGUI;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum CraftGUITextureSheet implements IBinnieTexture {
|
||||
Controls2("controls"),
|
||||
Panel2("panels"),
|
||||
Slots("slots");
|
||||
|
||||
String name;
|
||||
private final String name;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
private BinnieResource resource;
|
||||
|
||||
CraftGUITextureSheet(final String name) {
|
||||
this.name = name;
|
||||
@@ -25,6 +31,9 @@ public enum CraftGUITextureSheet implements IBinnieTexture {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return CraftGUI.resourceManager.getTextureSheet(this.name).getTexture();
|
||||
if (resource == null) {
|
||||
resource = CraftGUI.resourceManager.getTextureSheet(this.name).getTexture();
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.craftgui.resource.minecraft;
|
||||
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.craftgui.core.geometry.IArea;
|
||||
import binnie.craftgui.core.geometry.IBorder;
|
||||
@@ -8,10 +7,6 @@ import binnie.craftgui.resource.Texture;
|
||||
|
||||
public class PaddedTexture extends Texture {
|
||||
public PaddedTexture(final int u, final int v, final int w, final int h, final int offset, final IBinnieTexture textureFile, final int leftPadding, final int rightPadding, final int topPadding, final int bottomPadding) {
|
||||
this(u, v, w, h, offset, textureFile.getTexture(), leftPadding, rightPadding, topPadding, bottomPadding);
|
||||
}
|
||||
|
||||
public PaddedTexture(final int u, final int v, final int w, final int h, final int offset, final BinnieResource textureFile, final int leftPadding, final int rightPadding, final int topPadding, final int bottomPadding) {
|
||||
super(new IArea(u, v, w, h), new IBorder(topPadding, rightPadding, bottomPadding, leftPadding), new IBorder(offset), textureFile);
|
||||
}
|
||||
}
|
||||
@@ -6,11 +6,17 @@ import binnie.core.resource.ResourceType;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class ParsedTextureSheet implements IBinnieTexture {
|
||||
private String name;
|
||||
private String modid;
|
||||
private String path;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
private BinnieResource resource;
|
||||
|
||||
public ParsedTextureSheet(final String name, final String modid, final String path) {
|
||||
this.name = name;
|
||||
this.modid = modid;
|
||||
@@ -20,6 +26,9 @@ class ParsedTextureSheet implements IBinnieTexture {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return new BinnieResource(this.modid, ResourceType.GUI, this.path);
|
||||
if (resource == null) {
|
||||
resource = new BinnieResource(this.modid, ResourceType.GUI, this.path);
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
@@ -5,24 +5,19 @@ import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.craftgui.core.geometry.IArea;
|
||||
import binnie.craftgui.core.geometry.IBorder;
|
||||
import binnie.craftgui.resource.Texture;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class StandardTexture extends Texture {
|
||||
public StandardTexture(final int u, final int v, final int w, final int h, final IBinnieTexture textureFile) {
|
||||
this(u, v, w, h, 0, textureFile.getTexture());
|
||||
}
|
||||
|
||||
public StandardTexture(final int u, final int v, final int w, final int h, final int offset, final IBinnieTexture textureFile) {
|
||||
this(u, v, w, h, offset, textureFile.getTexture());
|
||||
}
|
||||
|
||||
public StandardTexture(final int u, final int v, final int w, final int h, final BinnieResource textureFile) {
|
||||
this(u, v, w, h, 0, textureFile);
|
||||
}
|
||||
|
||||
public StandardTexture(final int u, final int v, final int w, final int h, final int padding, final BinnieResource textureFile) {
|
||||
public StandardTexture(final int u, final int v, final int w, final int h, final int padding, final IBinnieTexture textureFile) {
|
||||
super(new IArea(u, v, w, h), IBorder.ZERO, new IBorder(padding), textureFile);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return this.getFilename();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class AlvearyFrame {
|
||||
|
||||
public static class PackageAlvearyFrame extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
|
||||
public PackageAlvearyFrame() {
|
||||
super("frame", ExtraBeeTexture.AlvearyFrame.getTexture(), false);
|
||||
super("frame", ExtraBeeTexture.AlvearyFrame, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ public class AlvearyHatchery {
|
||||
|
||||
public static class PackageAlvearyHatchery extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
|
||||
public PackageAlvearyHatchery() {
|
||||
super("hatchery", ExtraBeeTexture.AlvearyHatchery.getTexture(), false);
|
||||
super("hatchery", ExtraBeeTexture.AlvearyHatchery, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,7 @@ import forestry.api.apiculture.IBeeModifier;
|
||||
public class AlvearyLighting {
|
||||
public static class PackageAlvearyLighting extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
|
||||
public PackageAlvearyLighting() {
|
||||
super("lighting", ExtraBeeTexture.AlvearyLighting.getTexture(), false);
|
||||
super("lighting", ExtraBeeTexture.AlvearyLighting, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,11 +4,13 @@ import binnie.core.machines.IMachineType;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.MachinePackage;
|
||||
import binnie.core.machines.MachineRendererBlock;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.extrabees.apiary.ModuleApiary;
|
||||
import binnie.extrabees.apiary.TileExtraBeeAlveary;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public enum AlvearyMachine implements IMachineType {
|
||||
Mutator(AlvearyMutator.PackageAlvearyMutator.class),
|
||||
@@ -40,9 +42,9 @@ public enum AlvearyMachine implements IMachineType {
|
||||
}
|
||||
|
||||
public abstract static class AlvearyPackage extends MachinePackage {
|
||||
BinnieResource machineTexture;
|
||||
private final IBinnieTexture machineTexture;
|
||||
|
||||
public AlvearyPackage(final String id, final BinnieResource machineTexture, final boolean powered) {
|
||||
public AlvearyPackage(final String id, final IBinnieTexture machineTexture, final boolean powered) {
|
||||
super(id, powered);
|
||||
this.machineTexture = machineTexture;
|
||||
}
|
||||
@@ -61,8 +63,9 @@ public enum AlvearyMachine implements IMachineType {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
MachineRendererBlock.instance.renderMachine(this.machineTexture, x, y, z, partialTicks);
|
||||
MachineRendererBlock.instance.renderMachine(this.machineTexture.getTexture(), x, y, z, partialTicks);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,6 @@ import forestry.api.apiculture.IBeeListener;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
@@ -53,7 +52,7 @@ public class AlvearyMutator {
|
||||
|
||||
public static class PackageAlvearyMutator extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
|
||||
public PackageAlvearyMutator() {
|
||||
super("mutator", ExtraBeeTexture.AlvearyMutator.getTexture(), false);
|
||||
super("mutator", ExtraBeeTexture.AlvearyMutator, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,7 @@ import forestry.api.apiculture.IBeeModifier;
|
||||
public class AlvearyRainShield {
|
||||
public static class PackageAlvearyRainShield extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
|
||||
public PackageAlvearyRainShield() {
|
||||
super("rainShield", ExtraBeeTexture.AlvearyRainShield.getTexture(), false);
|
||||
super("rainShield", ExtraBeeTexture.AlvearyRainShield, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -32,7 +32,7 @@ public class AlvearyStimulator {
|
||||
|
||||
public static class PackageAlvearyStimulator extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
|
||||
public PackageAlvearyStimulator() {
|
||||
super("stimulator", ExtraBeeTexture.AlvearyStimulator.getTexture(), true);
|
||||
super("stimulator", ExtraBeeTexture.AlvearyStimulator, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,7 +20,7 @@ import java.util.List;
|
||||
public class AlvearyTransmission {
|
||||
public static class PackageAlvearyTransmission extends AlvearyMachine.AlvearyPackage implements IMachineInformation {
|
||||
public PackageAlvearyTransmission() {
|
||||
super("transmission", ExtraBeeTexture.AlvearyTransmission.getTexture(), false);
|
||||
super("transmission", ExtraBeeTexture.AlvearyTransmission, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,6 +8,8 @@ import binnie.extrabees.ExtraBees;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum ExtraBeeTexture implements IBinnieTexture {
|
||||
AlvearyMutator(ResourceType.Tile, "alveary/AlvearyMutator"),
|
||||
AlvearyNovaBlock(ResourceType.Tile, "alveary/AlvearyNovaBlock"),
|
||||
@@ -22,8 +24,12 @@ public enum ExtraBeeTexture implements IBinnieTexture {
|
||||
GUIProgress2(ResourceType.GUI, "processes2"),
|
||||
AlvearyTransmission(ResourceType.Tile, "alveary/AlvearyTransmission");
|
||||
|
||||
String texture;
|
||||
ResourceType type;
|
||||
private final String texture;
|
||||
private final ResourceType type;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
private BinnieResource resource;
|
||||
|
||||
ExtraBeeTexture(final ResourceType base, final String texture) {
|
||||
this.texture = texture;
|
||||
@@ -33,6 +39,9 @@ public enum ExtraBeeTexture implements IBinnieTexture {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return Binnie.RESOURCE.getPNG(ExtraBees.instance, this.type, this.texture);
|
||||
if (resource == null) {
|
||||
resource = Binnie.RESOURCE.getPNG(ExtraBees.instance, this.type, this.texture);
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
@@ -1182,7 +1182,6 @@ public enum ExtraBeesSpecies implements IAlleleBeeSpecies {
|
||||
Deprecated;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getSpriteColour(int renderPass) {
|
||||
return (renderPass == 0) ? this.primaryColor : ((renderPass == 1) ? this.secondaryColor : 16777215);
|
||||
|
||||
@@ -8,21 +8,27 @@ import binnie.extratrees.ExtraTrees;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum ExtraTreeTexture implements IBinnieTexture {
|
||||
Gui(ResourceType.GUI, "gui"),
|
||||
Nursery(ResourceType.Tile, "Nursery");
|
||||
Nursery(ResourceType.Tile, "Nursery"),
|
||||
Carpenter(ResourceType.Tile, "extratrees/carpenter_"),
|
||||
Paneler(ResourceType.Tile, "extratrees/paneler_"),
|
||||
Tileworker(ResourceType.Tile, "extratrees/tileworker_"),
|
||||
Incubator(ResourceType.Tile, "extratrees/incubator_"),
|
||||
Lumbermill(ResourceType.Tile, "extratrees/sawmill_"),
|
||||
Press(ResourceType.Tile, "extratrees/press_"),
|
||||
Distillery(ResourceType.Tile, "extratrees/distillery_"),
|
||||
Brewery(ResourceType.Tile, "extratrees/brewery_"),
|
||||
Infuser(ResourceType.Tile, "extratrees/infuser_");
|
||||
|
||||
String texture;
|
||||
ResourceType type;
|
||||
public static String carpenterTexture = "extratrees/carpenter_";
|
||||
public static String panelerTexture = "extratrees/paneler_";
|
||||
public static String tileworkerTexture = "extratrees/tileworker_";
|
||||
public static String incubatorTexture = "extratrees/incubator_";
|
||||
public static String lumbermillTexture = "extratrees/sawmill_";
|
||||
public static String pressTexture = "extratrees/press_";
|
||||
public static String distilleryTexture = "extratrees/distillery_";
|
||||
public static String breweryTexture = "extratrees/brewery_";
|
||||
public static String infuserTexture = "extratrees/infuser_";
|
||||
private final String texture;
|
||||
private final ResourceType type;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
private BinnieResource resource;
|
||||
|
||||
ExtraTreeTexture(final ResourceType base, final String texture) {
|
||||
this.texture = texture;
|
||||
@@ -32,7 +38,10 @@ public enum ExtraTreeTexture implements IBinnieTexture {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return Binnie.RESOURCE.getPNG(ExtraTrees.instance, this.type, this.texture);
|
||||
if (resource == null) {
|
||||
resource = Binnie.RESOURCE.getPNG(ExtraTrees.instance, this.type, this.texture);
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -10,7 +10,7 @@ import binnie.extratrees.machines.ExtraTreeMachine;
|
||||
public class BottleRack {
|
||||
public static class PackageBottleRack extends KitchenMachine.PackageKitchenMachine implements IMachineInformation {
|
||||
public PackageBottleRack() {
|
||||
super("bottleRack", ExtraTreeTexture.lumbermillTexture);
|
||||
super("bottleRack", ExtraTreeTexture.Lumbermill);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
package binnie.extratrees.kitchen;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.machines.IMachineType;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.MachinePackage;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.ResourceType;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -43,14 +41,9 @@ public enum KitchenMachine implements IMachineType {
|
||||
}
|
||||
|
||||
public abstract static class PackageKitchenMachine extends MachinePackage {
|
||||
BinnieResource textureName;
|
||||
private final IBinnieTexture textureName;
|
||||
|
||||
protected PackageKitchenMachine(final String uid, final String textureName) {
|
||||
super(uid, false);
|
||||
this.textureName = Binnie.RESOURCE.getFile(ExtraTrees.instance, ResourceType.Tile, textureName);
|
||||
}
|
||||
|
||||
protected PackageKitchenMachine(final String uid, final BinnieResource textureName) {
|
||||
protected PackageKitchenMachine(final String uid, final IBinnieTexture textureName) {
|
||||
super(uid, false);
|
||||
this.textureName = textureName;
|
||||
}
|
||||
@@ -67,7 +60,7 @@ public enum KitchenMachine implements IMachineType {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
MachineRendererKitchen.instance.renderMachine(machine, textureName, x, y, z, partialTicks);
|
||||
MachineRendererKitchen.instance.renderMachine(machine, textureName.getTexture(), x, y, z, partialTicks);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package binnie.extratrees.machines;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.ceramic.CeramicDesignSystem;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import binnie.extratrees.api.IDesignMaterial;
|
||||
@@ -14,15 +15,15 @@ import binnie.extratrees.core.ExtraTreeTexture;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public enum DesignerType {
|
||||
Woodworker("woodworker", ExtraTreeTexture.carpenterTexture),
|
||||
Panelworker("panelworker", ExtraTreeTexture.panelerTexture),
|
||||
GlassWorker("glassworker", ExtraTreeTexture.panelerTexture),
|
||||
Tileworker("tileworker", ExtraTreeTexture.tileworkerTexture);
|
||||
Woodworker("woodworker", ExtraTreeTexture.Carpenter),
|
||||
Panelworker("panelworker", ExtraTreeTexture.Paneler),
|
||||
GlassWorker("glassworker", ExtraTreeTexture.Paneler), // TODO why is this the Paneler texture?
|
||||
Tileworker("tileworker", ExtraTreeTexture.Tileworker);
|
||||
|
||||
public String name;
|
||||
public String texture;
|
||||
public IBinnieTexture texture;
|
||||
|
||||
DesignerType(final String name, final String texture) {
|
||||
DesignerType(final String name, final IBinnieTexture texture) {
|
||||
this.name = name;
|
||||
this.texture = texture;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.extratrees.machines;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.machines.IMachineType;
|
||||
import binnie.core.machines.Machine;
|
||||
@@ -8,19 +7,20 @@ import binnie.core.machines.MachineComponent;
|
||||
import binnie.core.machines.MachinePackage;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.machines.component.IInteraction;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.ResourceType;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.core.ExtraTreesGUID;
|
||||
import binnie.extratrees.machines.brewery.BreweryMachine;
|
||||
import binnie.extratrees.machines.distillery.DistilleryMachine;
|
||||
import binnie.extratrees.machines.lumbermill.LumbermillMachine;
|
||||
import binnie.extratrees.machines.fruitpress.FruitPressMachine;
|
||||
import binnie.extratrees.machines.lumbermill.LumbermillMachine;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public enum ExtraTreeMachine implements IMachineType {
|
||||
Lumbermill(LumbermillMachine.class),
|
||||
@@ -72,14 +72,9 @@ public enum ExtraTreeMachine implements IMachineType {
|
||||
}
|
||||
|
||||
public abstract static class PackageExtraTreeMachine extends MachinePackage {
|
||||
BinnieResource textureName;
|
||||
private final IBinnieTexture textureName;
|
||||
|
||||
protected PackageExtraTreeMachine(final String uid, final String textureName, final boolean powered) {
|
||||
super(uid, powered);
|
||||
this.textureName = Binnie.RESOURCE.getFile(ExtraTrees.instance, ResourceType.Tile, textureName);
|
||||
}
|
||||
|
||||
protected PackageExtraTreeMachine(final String uid, final BinnieResource textureName, final boolean powered) {
|
||||
protected PackageExtraTreeMachine(final String uid, final IBinnieTexture textureName, final boolean powered) {
|
||||
super(uid, powered);
|
||||
this.textureName = textureName;
|
||||
}
|
||||
@@ -94,8 +89,9 @@ public enum ExtraTreeMachine implements IMachineType {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
MachineRendererForestry.renderMachine(this.textureName.getShortPath(), x, y, z, partialTicks);
|
||||
MachineRendererForestry.renderMachine(this.textureName.getTexture().getShortPath(), x, y, z, partialTicks);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public class Infuser {
|
||||
|
||||
public static class PackageInfuser extends ExtraTreeMachine.PackageExtraTreeMachine implements IMachineInformation {
|
||||
public PackageInfuser() {
|
||||
super("infuser", ExtraTreeTexture.infuserTexture, true);
|
||||
super("infuser", ExtraTreeTexture.Infuser, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,7 @@ public class Nursery {
|
||||
|
||||
public static class PackageNursery extends ExtraTreeMachine.PackageExtraTreeMachine {
|
||||
public PackageNursery() {
|
||||
super("nursery", ExtraTreeTexture.Nursery.getTexture(), false);
|
||||
super("nursery", ExtraTreeTexture.Nursery, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,7 +24,7 @@ public class BreweryMachine extends ExtraTreeMachine.PackageExtraTreeMachine imp
|
||||
public static final int[] SLOTS_INVENTORY = new int[]{5, 6, 7, 8, 9, 10, 11, 12, 13};
|
||||
|
||||
public BreweryMachine() {
|
||||
super("brewery", ExtraTreeTexture.breweryTexture, true);
|
||||
super("brewery", ExtraTreeTexture.Brewery, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,7 +18,7 @@ public class DistilleryMachine extends ExtraTreeMachine.PackageExtraTreeMachine
|
||||
public static final int TANK_OUTPUT = 1;
|
||||
|
||||
public DistilleryMachine() {
|
||||
super("distillery", ExtraTreeTexture.distilleryTexture, true);
|
||||
super("distillery", ExtraTreeTexture.Distillery, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,7 +20,7 @@ public class FruitPressMachine extends ExtraTreeMachine.PackageExtraTreeMachine
|
||||
public static final int TANK_OUTPUT_CAPACITY = 5000;
|
||||
|
||||
public FruitPressMachine() {
|
||||
super("press", ExtraTreeTexture.pressTexture, true);
|
||||
super("press", ExtraTreeTexture.Press, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,7 +23,7 @@ public class LumbermillMachine extends ExtraTreeMachine.PackageExtraTreeMachine
|
||||
public static final int TANK_WATER_CAPACITY = 10000;
|
||||
|
||||
public LumbermillMachine() {
|
||||
super("lumbermill", ExtraTreeTexture.lumbermillTexture, true);
|
||||
super("lumbermill", ExtraTreeTexture.Lumbermill, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
package binnie.genetics.core;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.resource.BinnieSprite;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.BinnieSprite;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.core.resource.ResourceType;
|
||||
import binnie.genetics.Genetics;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum GeneticsTexture implements IBinnieTexture {
|
||||
GeneticMachine(ResourceType.Tile, "GeneticMachine"),
|
||||
Genepool(ResourceType.Tile, "Genepool"),
|
||||
@@ -26,8 +28,13 @@ public enum GeneticsTexture implements IBinnieTexture {
|
||||
Acclimatiser(ResourceType.Tile, "Acclimatiser"),
|
||||
Splicer(ResourceType.Tile, "Splicer");
|
||||
|
||||
String texture;
|
||||
ResourceType type;
|
||||
private final String texture;
|
||||
private final ResourceType type;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Nullable
|
||||
private BinnieResource resource;
|
||||
|
||||
public static BinnieSprite dnaIcon = Binnie.RESOURCE.getItemSprite(Genetics.instance, "dna");
|
||||
|
||||
GeneticsTexture(final ResourceType base, final String texture) {
|
||||
@@ -38,7 +45,10 @@ public enum GeneticsTexture implements IBinnieTexture {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public BinnieResource getTexture() {
|
||||
return Binnie.RESOURCE.getPNG(Genetics.instance, this.type, this.texture);
|
||||
if (resource == null) {
|
||||
resource = Binnie.RESOURCE.getPNG(Genetics.instance, this.type, this.texture);
|
||||
}
|
||||
return resource;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import binnie.core.machines.IMachineType;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.MachinePackage;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
import binnie.genetics.Genetics;
|
||||
import binnie.genetics.machine.inoculator.PackageInoculator;
|
||||
@@ -13,6 +12,8 @@ import binnie.genetics.machine.polymeriser.PackagePolymeriser;
|
||||
import binnie.genetics.machine.sequencer.PackageSequencer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public enum GeneticMachine implements IMachineType {
|
||||
Isolator(PackageIsolator.class),
|
||||
@@ -41,12 +42,12 @@ public enum GeneticMachine implements IMachineType {
|
||||
}
|
||||
|
||||
public abstract static class PackageGeneticBase extends MachinePackage {
|
||||
BinnieResource renderTexture;
|
||||
int colour;
|
||||
private final IBinnieTexture renderTexture;
|
||||
private final int colour;
|
||||
|
||||
protected PackageGeneticBase(final String uid, final IBinnieTexture renderTexture, final int flashColour, final boolean powered) {
|
||||
super(uid, powered);
|
||||
this.renderTexture = renderTexture.getTexture();
|
||||
this.renderTexture = renderTexture;
|
||||
this.colour = flashColour;
|
||||
}
|
||||
|
||||
@@ -60,6 +61,7 @@ public enum GeneticMachine implements IMachineType {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTicks, int destroyStage) {
|
||||
MachineRendererGenetics.instance.renderMachine(machine, x, y, z, partialTicks, destroyStage);
|
||||
}
|
||||
|
||||
@@ -15,10 +15,11 @@ import binnie.genetics.machine.acclimatiser.Acclimatiser;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WindowAcclimatiser extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress);
|
||||
static Texture Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress);
|
||||
public static final int[] slotReserve = new int[]{0, 1, 2, 3};
|
||||
public static final int slotTarget = 4;
|
||||
public static final int[] slotAcclimatiser = new int[]{5, 6, 7};
|
||||
@@ -29,6 +30,7 @@ public class WindowAcclimatiser extends WindowMachine {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
|
||||
@@ -22,20 +22,22 @@ import binnie.genetics.machine.analyser.Analyser;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WindowAnalyser extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(0, 218, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture Progress = new StandardTexture(0, 201, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture ProgressBase = new StandardTexture(0, 218, 142, 17, ExtraBeeTexture.GUIProgress);
|
||||
static Texture Progress = new StandardTexture(0, 201, 142, 17, ExtraBeeTexture.GUIProgress);
|
||||
|
||||
public WindowAnalyser(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(220, 210, player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
WindowAnalyser.ProgressBase = new StandardTexture(0, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
|
||||
WindowAnalyser.Progress = new StandardTexture(66, 51, 66, 40, GeneticsTexture.GUIProcess.getTexture());
|
||||
WindowAnalyser.ProgressBase = new StandardTexture(0, 51, 66, 40, GeneticsTexture.GUIProcess);
|
||||
WindowAnalyser.Progress = new StandardTexture(66, 51, 66, 40, GeneticsTexture.GUIProcess);
|
||||
int x = 16;
|
||||
final int y = 32;
|
||||
new ControlSlotArray.Builder(this, x, y, 2, 3).create(Analyser.SLOT_RESERVE);
|
||||
|
||||
@@ -20,16 +20,18 @@ import binnie.genetics.machine.genepool.Genepool;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WindowGenepool extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress);
|
||||
static Texture Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress);
|
||||
|
||||
public WindowGenepool(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(280, 198, player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
|
||||
@@ -21,16 +21,18 @@ import binnie.genetics.machine.inoculator.Inoculator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WindowInoculator extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
static Texture Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
static Texture ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2);
|
||||
static Texture Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2);
|
||||
|
||||
public WindowInoculator(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(266, 240, player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
|
||||
@@ -20,16 +20,18 @@ import binnie.genetics.machine.isolator.Isolator;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WindowIsolator extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(0, 218, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture Progress = new StandardTexture(0, 201, 142, 17, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture ProgressBase = new StandardTexture(0, 218, 142, 17, ExtraBeeTexture.GUIProgress);
|
||||
static Texture Progress = new StandardTexture(0, 201, 142, 17, ExtraBeeTexture.GUIProgress);
|
||||
|
||||
public WindowIsolator(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(330, 208, player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
|
||||
@@ -4,6 +4,7 @@ import binnie.craftgui.minecraft.Window;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -15,6 +16,7 @@ public abstract class WindowMachine extends Window {
|
||||
public abstract String getTitle();
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
this.setTitle(this.getTitle());
|
||||
}
|
||||
|
||||
@@ -20,16 +20,18 @@ import binnie.genetics.machine.polymeriser.Polymeriser;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WindowPolymeriser extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(76, 170, 160, 79, GeneticsTexture.GUIProcess.getTexture());
|
||||
static Texture Progress = new StandardTexture(76, 91, 160, 79, GeneticsTexture.GUIProcess.getTexture());
|
||||
static Texture ProgressBase = new StandardTexture(76, 170, 160, 79, GeneticsTexture.GUIProcess);
|
||||
static Texture Progress = new StandardTexture(76, 91, 160, 79, GeneticsTexture.GUIProcess);
|
||||
|
||||
public WindowPolymeriser(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(278, 212, player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
|
||||
@@ -24,10 +24,11 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WindowSequencer extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(64, 114, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture Progress = new StandardTexture(64, 123, 98, 9, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture ProgressBase = new StandardTexture(64, 114, 98, 9, ExtraBeeTexture.GUIProgress);
|
||||
static Texture Progress = new StandardTexture(64, 123, 98, 9, ExtraBeeTexture.GUIProgress);
|
||||
ControlText slotText;
|
||||
|
||||
public WindowSequencer(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
@@ -43,6 +44,7 @@ public class WindowSequencer extends WindowMachine {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
|
||||
@@ -20,16 +20,18 @@ import binnie.genetics.machine.splicer.Splicer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class WindowSplicer extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
static Texture Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2.getTexture());
|
||||
static Texture ProgressBase = new StandardTexture(0, 72, 142, 72, GeneticsTexture.GUIProcess2);
|
||||
static Texture Progress = new StandardTexture(0, 0, 142, 72, GeneticsTexture.GUIProcess2);
|
||||
|
||||
public WindowSplicer(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(280, 240, player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
|
||||
Reference in new issue
Block a user