mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-20 12:19:47 +00:00
Remove some dead code that is not related to unfinished features
This commit is contained in:
1 parent
5b1250ce8a
commit
a9a2db67f4
164 files changed
+102
-3006
No files matched your search
@@ -7,10 +7,4 @@ public final class Constants {
|
||||
public static final String EXTRA_TREES_MOD_ID = "extratrees";
|
||||
public static final String GENETICS_MOD_ID = "genetics";
|
||||
|
||||
public static final String LIQUID_JUICE = "juice";
|
||||
public static final String LIQUID_WATER = "water";
|
||||
public static final String LIQUID_SEED_OIL = "seedoil";
|
||||
public static final String LIQUID_CREOSOTE = "Creosote Oil";
|
||||
public static final String LIQUID_BIO_ETHANOL = "bioethanol";
|
||||
public static final String LIQUID_FOR_HONEY = "for.honey";
|
||||
}
|
||||
@@ -17,8 +17,6 @@ public interface IFlowerType<I extends IFlowerType<I>> extends Comparable<I> {
|
||||
|
||||
String getName();
|
||||
|
||||
int getID();
|
||||
|
||||
int getSections();
|
||||
|
||||
int ordinal();
|
||||
|
||||
@@ -31,10 +31,6 @@ public enum PlantType implements IStringSerializable {
|
||||
return values()[meta];
|
||||
}
|
||||
|
||||
public static PlantType get(int id) {
|
||||
return values()[id % values().length];
|
||||
}
|
||||
|
||||
public ItemStack get() {
|
||||
return new ItemStack(ModuleGardening.plant, 1, ordinal());
|
||||
}
|
||||
|
||||
@@ -2954,10 +2954,6 @@ public enum EnumFlowerColor implements IStringSerializable {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
public String getHTMLName() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public AlleleFlowerColor getFlowerColorAllele() {
|
||||
return allele;
|
||||
}
|
||||
|
||||
@@ -101,11 +101,6 @@ public enum EnumFlowerType implements IFlowerType<EnumFlowerType> {
|
||||
return flower;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getID() {
|
||||
return ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSections() {
|
||||
return sections;
|
||||
|
||||
@@ -962,10 +962,6 @@ public enum FlowerDefinition implements IFlowerDefinition {
|
||||
this(name, branch, binomial, type, true, primaryColor, secondaryColor);
|
||||
}
|
||||
|
||||
FlowerDefinition(String name, String branch, String binomial, IFlowerType<binnie.botany.genetics.EnumFlowerType> type, boolean isDominant, EnumFlowerColor colour) {
|
||||
this(name, branch, binomial, type, isDominant, colour, colour);
|
||||
}
|
||||
|
||||
FlowerDefinition(String name, String branch, String binomial, IFlowerType<binnie.botany.genetics.EnumFlowerType> flowerType, boolean isDominant, EnumFlowerColor primaryColor, EnumFlowerColor secondaryColor) {
|
||||
String uid = Constants.BOTANY_MOD_ID + ".flower" + this;
|
||||
String unlocalizedDescription = "botany.description.flower" + this;
|
||||
|
||||
@@ -42,11 +42,6 @@ public class ControlColorMixSymbol extends Control implements ITooltip {
|
||||
}
|
||||
}
|
||||
|
||||
public void setValue(IColorMix value) {
|
||||
this.value = value;
|
||||
setColor(0xffffff);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getTooltip(Tooltip tooltip, ITooltipFlag tooltipFlag) {
|
||||
if (type == 1) {
|
||||
|
||||
@@ -32,8 +32,6 @@ import binnie.core.gui.minecraft.Window;
|
||||
import binnie.core.util.I18N;
|
||||
|
||||
public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
private ControlListBox<EnumFlowerColor> selectionBoxColors;
|
||||
|
||||
public WindowBotanistDatabase(EntityPlayer player, Side side, boolean nei) {
|
||||
super(player, side, nei, Binnie.GENETICS.flowerBreedingSystem, 130);
|
||||
}
|
||||
@@ -45,17 +43,17 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
protected void addTabs() {
|
||||
new PageSpeciesOverview(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "species.overview", 0));
|
||||
new PageSpeciesFlowerGenome(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "genome.title", 0));
|
||||
new PageSpeciesClassification(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "species.classification", 0));
|
||||
new PageSpeciesResultant(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "species.resultant", 0));
|
||||
new PageSpeciesMutations(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "species.further", 0));
|
||||
new PageBranchOverview(getInfoPages(Mode.BRANCHES), new DatabaseTab(Botany.instance, "branches.overview", 0));
|
||||
new PageBranchSpecies(getInfoPages(Mode.BRANCHES), new DatabaseTab(Botany.instance, "branches.species", 0));
|
||||
new PageSpeciesOverview(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "species.overview"));
|
||||
new PageSpeciesFlowerGenome(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "genome.title"));
|
||||
new PageSpeciesClassification(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "species.classification"));
|
||||
new PageSpeciesResultant(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "species.resultant"));
|
||||
new PageSpeciesMutations(getInfoPages(Mode.SPECIES), new DatabaseTab(Botany.instance, "species.further"));
|
||||
new PageBranchOverview(getInfoPages(Mode.BRANCHES), new DatabaseTab(Botany.instance, "branches.overview"));
|
||||
new PageBranchSpecies(getInfoPages(Mode.BRANCHES), new DatabaseTab(Botany.instance, "branches.species"));
|
||||
createMode(FlowerMode.Color, new FlowerColorModeWidgets());
|
||||
new PageColorMixResultant(getInfoPages(FlowerMode.Color), new DatabaseTab(Botany.instance, "color.resultant", 0));
|
||||
new PageColorMix(getInfoPages(FlowerMode.Color), new DatabaseTab(Botany.instance, "color.further", 0));
|
||||
new PageBreeder(getInfoPages(Mode.BREEDER), getUsername(), new DatabaseTab(Botany.instance, "breeder", 0));
|
||||
new PageColorMixResultant(getInfoPages(FlowerMode.Color), new DatabaseTab(Botany.instance, "color.resultant"));
|
||||
new PageColorMix(getInfoPages(FlowerMode.Color), new DatabaseTab(Botany.instance, "color.further"));
|
||||
new PageBreeder(getInfoPages(Mode.BREEDER), getUsername(), new DatabaseTab(Botany.instance, "breeder"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package binnie.botany.modules;
|
||||
|
||||
import binnie.core.util.TileUtil;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@@ -212,10 +213,9 @@ public class ModuleFlowers extends Module {
|
||||
@SubscribeEvent
|
||||
public void onBonemeal(BonemealEvent event) {
|
||||
BlockPos pos = event.getPos();
|
||||
Block block = event.getBlock().getBlock();
|
||||
|
||||
TileEntity tile = event.getWorld().getTileEntity(pos);
|
||||
if (tile instanceof TileEntityFlower && ((TileEntityFlower) tile).onBonemeal()) {
|
||||
TileEntityFlower tile = TileUtil.getTile(event.getWorld(), pos, TileEntityFlower.class);
|
||||
if (tile != null && tile.onBonemeal()) {
|
||||
event.setResult(Event.Result.ALLOW);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ public abstract class AbstractMod implements IPacketProvider, IInitializable {
|
||||
|
||||
public abstract boolean isAvailable();
|
||||
|
||||
@Override
|
||||
public abstract String getChannel();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -64,7 +64,6 @@ import binnie.modules.ModuleManager;
|
||||
public final class BinnieCore extends AbstractMod {
|
||||
|
||||
private static final List<AbstractMod> modList = new ArrayList<>();
|
||||
public static int multipassRenderID;
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@Mod.Instance(Constants.CORE_MOD_ID)
|
||||
private static BinnieCore instance;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.core.api;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
|
||||
public interface ICraftingManager<T extends IBinnieRecipe> {
|
||||
@@ -22,13 +21,4 @@ public interface ICraftingManager<T extends IBinnieRecipe> {
|
||||
* @return an unmodifiable collection of all recipes registered to the crafting provider.
|
||||
*/
|
||||
Collection<T> recipes();
|
||||
|
||||
/**
|
||||
* @return null if this type of recipe has no jei integration
|
||||
*/
|
||||
@Nullable
|
||||
String getJEICategory();
|
||||
|
||||
@Nullable
|
||||
Object getJeiWrapper(T recipe);
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
package binnie.core.block;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2015-2016 Adrian Siekierka
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import javax.vecmath.Vector3f;
|
||||
import java.util.EnumMap;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class BaseBakedModel implements IBakedModel {
|
||||
private static final TRSRTransformation flipX = new TRSRTransformation(null, null, new Vector3f(-1, 1, 1), null);
|
||||
private final EnumMap<ItemCameraTransforms.TransformType, TRSRTransformation> transformMap = new EnumMap<>(ItemCameraTransforms.TransformType.class);
|
||||
private final ResourceLocation particle;
|
||||
|
||||
public BaseBakedModel() {
|
||||
this(null);
|
||||
}
|
||||
|
||||
public BaseBakedModel(@Nullable ResourceLocation particle) {
|
||||
this.particle = particle != null ? particle : TextureMap.LOCATION_MISSING_TEXTURE;
|
||||
}
|
||||
|
||||
protected static TRSRTransformation toLeftHand(TRSRTransformation transform) {
|
||||
return TRSRTransformation.blockCenterToCorner(flipX.compose(TRSRTransformation.blockCornerToCenter(transform)).compose(flipX));
|
||||
}
|
||||
|
||||
protected static TRSRTransformation getTransformation(float tx, float ty, float tz, float ax, float ay, float az, float s) {
|
||||
return TRSRTransformation.blockCenterToCorner(new TRSRTransformation(
|
||||
new Vector3f(tx / 16, ty / 16, tz / 16),
|
||||
TRSRTransformation.quatFromXYZDegrees(new Vector3f(ax, ay, az)),
|
||||
new Vector3f(s, s, s),
|
||||
null
|
||||
));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) {
|
||||
return ImmutablePair.of(this,
|
||||
transformMap.containsKey(cameraTransformType) ? transformMap.get(cameraTransformType).getMatrix() : null
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isGui3d() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBuiltInRenderer() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TextureAtlasSprite getParticleTexture() {
|
||||
return Minecraft.getMinecraft().getTextureMapBlocks().getAtlasSprite(particle.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemOverrideList getOverrides() {
|
||||
return ItemOverrideList.NONE;
|
||||
}
|
||||
|
||||
// ForgeBlockStateV1 transforms
|
||||
|
||||
public void addTransformation(ItemCameraTransforms.TransformType type, TRSRTransformation transformation) {
|
||||
transformMap.put(type, TRSRTransformation.blockCornerToCenter(transformation));
|
||||
}
|
||||
|
||||
public void addThirdPersonTransformation(TRSRTransformation transformation) {
|
||||
addTransformation(ItemCameraTransforms.TransformType.THIRD_PERSON_RIGHT_HAND, transformation);
|
||||
addTransformation(ItemCameraTransforms.TransformType.THIRD_PERSON_LEFT_HAND, toLeftHand(transformation));
|
||||
}
|
||||
|
||||
public void addFirstPersonTransformation(TRSRTransformation transformation) {
|
||||
addTransformation(ItemCameraTransforms.TransformType.FIRST_PERSON_RIGHT_HAND, transformation);
|
||||
addTransformation(ItemCameraTransforms.TransformType.FIRST_PERSON_LEFT_HAND, toLeftHand(transformation));
|
||||
}
|
||||
|
||||
public BaseBakedModel addDefaultBlockTransforms() {
|
||||
TRSRTransformation thirdperson = getTransformation(0, 2.5f, 0, 75, 45, 0, 0.375f);
|
||||
addTransformation(ItemCameraTransforms.TransformType.GUI, getTransformation(0, 0, 0, 30, 225, 0, 0.625f));
|
||||
addTransformation(ItemCameraTransforms.TransformType.GROUND, getTransformation(0, 3, 0, 0, 0, 0, 0.25f));
|
||||
addTransformation(ItemCameraTransforms.TransformType.FIXED, getTransformation(0, 0, 0, 0, 0, 0, 0.5f));
|
||||
addThirdPersonTransformation(thirdperson);
|
||||
addTransformation(ItemCameraTransforms.TransformType.FIRST_PERSON_RIGHT_HAND, getTransformation(0, 0, 0, 0, 45, 0, 0.4f));
|
||||
addTransformation(ItemCameraTransforms.TransformType.FIRST_PERSON_LEFT_HAND, getTransformation(0, 0, 0, 0, 255, 0, 0.4f));
|
||||
return this;
|
||||
}
|
||||
|
||||
public BaseBakedModel addDefaultItemTransforms() {
|
||||
TRSRTransformation thirdperson = getTransformation(0, 3, 1, 0, 0, 0, 0.55f);
|
||||
TRSRTransformation firstperson = getTransformation(1.13f, 3.2f, 1.13f, 0, -90, 25, 0.68f);
|
||||
addTransformation(ItemCameraTransforms.TransformType.GROUND, getTransformation(0, 2, 0, 0, 0, 0, 0.5f));
|
||||
addTransformation(ItemCameraTransforms.TransformType.HEAD, getTransformation(0, 13, 7, 0, 180, 0, 1));
|
||||
addThirdPersonTransformation(thirdperson);
|
||||
addFirstPersonTransformation(firstperson);
|
||||
return this;
|
||||
}
|
||||
|
||||
public BaseBakedModel addDefaultToolTransforms() {
|
||||
addTransformation(ItemCameraTransforms.TransformType.THIRD_PERSON_RIGHT_HAND, getTransformation(0, 4, 0.5f, 0, -90, 55, 0.85f));
|
||||
addTransformation(ItemCameraTransforms.TransformType.THIRD_PERSON_LEFT_HAND, getTransformation(0, 4, 0.5f, 0, 90, -55, 0.85f));
|
||||
addTransformation(ItemCameraTransforms.TransformType.FIRST_PERSON_RIGHT_HAND, getTransformation(1.13f, 3.2f, 1.13f, 0, -90, 25, 0.68f));
|
||||
addTransformation(ItemCameraTransforms.TransformType.FIRST_PERSON_LEFT_HAND, getTransformation(1.13f, 3.2f, 1.13f, 0, 90, -25, 0.68f));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -21,8 +21,6 @@ import net.minecraft.world.World;
|
||||
import binnie.core.BinnieCore;
|
||||
|
||||
public class BlockMetadata extends BlockContainer implements IBlockMetadata {
|
||||
static int temporyMeta = -1;
|
||||
|
||||
public BlockMetadata(final Material material) {
|
||||
super(material);
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package binnie.core.circuits;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.circuits.ChipsetManager;
|
||||
@@ -25,10 +24,6 @@ public class BinnieCircuit implements ICircuit {
|
||||
}
|
||||
}
|
||||
|
||||
public BinnieCircuit(final String uid, final int limit, final ICircuitLayout layout, final Item item, final int itemMeta) {
|
||||
this(uid, limit, layout, new ItemStack(item, 1, itemMeta));
|
||||
}
|
||||
|
||||
public void addTooltipString(final String string) {
|
||||
this.tooltips.add(string);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IBreedingTracker;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IClassification;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
@@ -209,13 +208,6 @@ public abstract class BreedingSystem implements IItemStackRepresentitive {
|
||||
return AlleleManager.alleleRegistry.isBlacklisted(allele.getUID());
|
||||
}
|
||||
|
||||
public final List<IMutation> getResultantMutations(final IAlleleSpecies species, final boolean includeInactive) {
|
||||
if (this.resultantMutations.isEmpty()) {
|
||||
this.calculateArrays();
|
||||
}
|
||||
return includeInactive ? this.allResultantMutations.get(species) : this.resultantMutations.get(species);
|
||||
}
|
||||
|
||||
public final List<IMutation> getResultantMutations(final IAlleleSpecies species) {
|
||||
if (this.resultantMutations.isEmpty()) {
|
||||
this.calculateArrays();
|
||||
@@ -223,13 +215,6 @@ public abstract class BreedingSystem implements IItemStackRepresentitive {
|
||||
return this.resultantMutations.get(species);
|
||||
}
|
||||
|
||||
public final List<IMutation> getFurtherMutations(final IAlleleSpecies species, final boolean includeInactive) {
|
||||
if (this.furtherMutations.isEmpty()) {
|
||||
this.calculateArrays();
|
||||
}
|
||||
return includeInactive ? this.allFurtherMutations.get(species) : this.furtherMutations.get(species);
|
||||
}
|
||||
|
||||
public final List<IMutation> getFurtherMutations(final IAlleleSpecies species) {
|
||||
if (this.furtherMutations.isEmpty()) {
|
||||
this.calculateArrays();
|
||||
@@ -328,26 +313,6 @@ public abstract class BreedingSystem implements IItemStackRepresentitive {
|
||||
return speciesList;
|
||||
}
|
||||
|
||||
public final List<IMutation> getDiscoveredMutations(final IBreedingTracker tracker) {
|
||||
final List<IMutation> speciesList = new ArrayList<>();
|
||||
for (final IMutation species : this.getAllMutations()) {
|
||||
if (this.isMutationDiscovered(species, tracker)) {
|
||||
speciesList.add(species);
|
||||
}
|
||||
}
|
||||
return speciesList;
|
||||
}
|
||||
|
||||
public final int getDiscoveredBranchMembers(final IClassification branch, final IBreedingTracker tracker) {
|
||||
int discoveredSpecies = 0;
|
||||
for (final IAlleleSpecies species : branch.getMemberSpecies()) {
|
||||
if (this.isSpeciesDiscovered(species, tracker)) {
|
||||
++discoveredSpecies;
|
||||
}
|
||||
}
|
||||
return discoveredSpecies;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public TextureAtlasSprite getUndiscoveredIcon() {
|
||||
return this.iconUndiscovered.getSprite();
|
||||
@@ -438,16 +403,6 @@ public abstract class BreedingSystem implements IItemStackRepresentitive {
|
||||
return this.getSpeciesRoot().getUID();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public final IChromosomeType getChromosome(int index) {
|
||||
for (IChromosomeType chromosome : this.getSpeciesRoot().getKaryotype()) {
|
||||
if (index == chromosome.ordinal()) {
|
||||
return chromosome;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public abstract int getColour();
|
||||
|
||||
public String getAlleleName(final IChromosomeType chromosome, final IAllele allele) {
|
||||
@@ -525,13 +480,4 @@ public abstract class BreedingSystem implements IItemStackRepresentitive {
|
||||
}
|
||||
return this.getSpeciesRoot().templateAsIndividual(template);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public IGenome getGenome(String uid) {
|
||||
IAllele[] template = this.getSpeciesRoot().getTemplate(uid);
|
||||
if (template == null) {
|
||||
return null;
|
||||
}
|
||||
return this.getSpeciesRoot().templateAsGenome(template);
|
||||
}
|
||||
}
|
||||
@@ -111,10 +111,6 @@ public class Gene implements IGene {
|
||||
return this.getSystem().getAlleleName(this.chromosome, this.allele);
|
||||
}
|
||||
|
||||
public String getChromosomeName() {
|
||||
return this.getSystem().getChromosomeName(this.chromosome);
|
||||
}
|
||||
|
||||
public String getShortChromosomeName() {
|
||||
return this.getSystem().getChromosomeShortName(this.chromosome);
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package binnie.core.genetics;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
public interface IAlleleProvider {
|
||||
IAllele getAllele();
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
package binnie.core.genetics;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IClassification;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
import binnie.core.util.I18N;
|
||||
|
||||
interface IBreedingMessage {
|
||||
String getTitle();
|
||||
|
||||
String getBody();
|
||||
|
||||
ItemStack getIcon();
|
||||
|
||||
class MessageSpeciesDiscovered implements IBreedingMessage {
|
||||
IAlleleSpecies species;
|
||||
ItemStack stack;
|
||||
|
||||
public MessageSpeciesDiscovered(final IAlleleSpecies species) {
|
||||
this.species = species;
|
||||
ISpeciesRoot root = null;
|
||||
for (final ISpeciesRoot sRoot : AlleleManager.alleleRegistry.getSpeciesRoot().values()) {
|
||||
if (sRoot.getKaryotype()[0].getAlleleClass().isInstance(species)) {
|
||||
root = sRoot;
|
||||
}
|
||||
}
|
||||
if (root != null) {
|
||||
this.stack = root.getMemberStack(root.templateAsIndividual(root.getTemplate(species)), EnumBeeType.DRONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("binniecore.gui.breedingmessage.species");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBody() {
|
||||
return this.species.getAlleleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIcon() {
|
||||
return this.stack;
|
||||
}
|
||||
}
|
||||
|
||||
class BranchDiscovered implements IBreedingMessage {
|
||||
IAlleleSpecies species;
|
||||
IClassification classification;
|
||||
ItemStack stack;
|
||||
|
||||
public BranchDiscovered(final IAlleleSpecies species, final IClassification classification) {
|
||||
this.species = species;
|
||||
this.classification = classification;
|
||||
ISpeciesRoot root = null;
|
||||
for (final ISpeciesRoot sRoot : AlleleManager.alleleRegistry.getSpeciesRoot().values()) {
|
||||
if (sRoot.getKaryotype()[0].getAlleleClass().isInstance(species)) {
|
||||
root = sRoot;
|
||||
}
|
||||
}
|
||||
if (root != null) {
|
||||
this.stack = root.getMemberStack(root.templateAsIndividual(root.getTemplate(species)), EnumBeeType.DRONE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("binniecore.gui.breedingmessage.branch");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBody() {
|
||||
return this.classification.getScientific();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIcon() {
|
||||
return this.stack;
|
||||
}
|
||||
}
|
||||
|
||||
class EpithetGained implements IBreedingMessage {
|
||||
String epithet;
|
||||
ItemStack stack;
|
||||
|
||||
public EpithetGained(final String epithet, final ISpeciesRoot root) {
|
||||
this.epithet = epithet;
|
||||
this.stack = root.getMemberStack(root.templateAsIndividual(root.getDefaultTemplate()), EnumBeeType.DRONE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return I18N.localise("binniecore.gui.breedingmessage.epithet");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBody() {
|
||||
return this.epithet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getIcon() {
|
||||
return this.stack;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
|
||||
@@ -80,10 +79,6 @@ public class ManagerGenetics extends ManagerBase {
|
||||
this.refreshData();
|
||||
}
|
||||
|
||||
public boolean isSpeciesDiscovered(final IAlleleSpecies species, final World world, final boolean nei) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public ITreeRoot getTreeRoot() {
|
||||
return TreeManager.treeRoot;
|
||||
}
|
||||
@@ -121,10 +116,6 @@ public class ManagerGenetics extends ManagerBase {
|
||||
return species.getRoot();
|
||||
}
|
||||
|
||||
public IAllele getToleranceAllele(final forestry.api.genetics.EnumTolerance tol) {
|
||||
return AlleleManager.alleleRegistry.getAllele(Tolerance.values()[tol.ordinal()].getUID());
|
||||
}
|
||||
|
||||
public int[] getTolerance(final forestry.api.genetics.EnumTolerance tol) {
|
||||
return Tolerance.values()[tol.ordinal()].getBounds();
|
||||
}
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
package binnie.core.genetics;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.lepidopterology.IButterfly;
|
||||
import forestry.api.lepidopterology.IButterflyNursery;
|
||||
|
||||
public class VirtualMothHousing extends VirtualHousing implements IButterflyNursery {
|
||||
public VirtualMothHousing(final EntityPlayer player) {
|
||||
super(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public IButterfly getCaterpillar() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCaterpillar(@Nullable final IButterfly butterfly) {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public IIndividual getNanny() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canNurse(final IButterfly butterfly) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public World getWorldObj() {
|
||||
return getWorld();
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package binnie.core.gui;
|
||||
public enum Attribute implements IWidgetAttribute {
|
||||
MOUSE_OVER,
|
||||
CAN_FOCUS,
|
||||
NEEDS_DELETION,
|
||||
ALWAYS_ON_TOP,
|
||||
BLOCK_TOOLTIP
|
||||
}
|
||||
@@ -5,28 +5,15 @@ import javax.annotation.Nullable;
|
||||
import binnie.core.gui.geometry.Point;
|
||||
|
||||
public interface ITopLevelWidget extends IWidget {
|
||||
void setMousePosition(final int p0, final int p1);
|
||||
|
||||
Point getAbsoluteMousePosition();
|
||||
|
||||
@Nullable
|
||||
IWidget getFocusedWidget();
|
||||
|
||||
@Nullable
|
||||
IWidget getMousedOverWidget();
|
||||
|
||||
@Nullable
|
||||
IWidget getDraggedWidget();
|
||||
|
||||
boolean isFocused(final IWidget p0);
|
||||
|
||||
boolean isMouseOver(final IWidget p0);
|
||||
|
||||
boolean isDragged(final IWidget p0);
|
||||
|
||||
void updateTopLevel();
|
||||
|
||||
void widgetDeleted(final IWidget p0);
|
||||
|
||||
Point getDragDistance();
|
||||
}
|
||||
@@ -21,22 +21,13 @@ public interface IWidget {
|
||||
|
||||
ITopLevelWidget getTopParent();
|
||||
|
||||
/**
|
||||
* @return true if this widget is the {@link #getTopParent()}
|
||||
*/
|
||||
boolean isTopLevel();
|
||||
|
||||
/**
|
||||
* @return the position of this widget
|
||||
*/
|
||||
Point getPosition();
|
||||
|
||||
Point getOriginalPosition();
|
||||
|
||||
Point getAbsolutePosition();
|
||||
|
||||
Point getOriginalAbsolutePosition();
|
||||
|
||||
void setPosition(Point position);
|
||||
|
||||
/**
|
||||
@@ -44,13 +35,6 @@ public interface IWidget {
|
||||
*/
|
||||
Point getSize();
|
||||
|
||||
void setSize(Point size);
|
||||
|
||||
/**
|
||||
* @return the offset of this widget
|
||||
*/
|
||||
Point getOffset();
|
||||
|
||||
void setOffset(final Point p0);
|
||||
|
||||
/**
|
||||
@@ -58,15 +42,8 @@ public interface IWidget {
|
||||
*/
|
||||
Area getArea();
|
||||
|
||||
/**
|
||||
* @return the position of the mouse
|
||||
*/
|
||||
Point getMousePosition();
|
||||
|
||||
Point getRelativeMousePosition();
|
||||
|
||||
int getXPos();
|
||||
|
||||
int getYPos();
|
||||
|
||||
int getWidth();
|
||||
@@ -83,10 +60,6 @@ public interface IWidget {
|
||||
@SideOnly(Side.CLIENT)
|
||||
void updateClient();
|
||||
|
||||
void enable();
|
||||
|
||||
void disable();
|
||||
|
||||
void show();
|
||||
|
||||
void hide();
|
||||
@@ -97,12 +70,6 @@ public interface IWidget {
|
||||
|
||||
boolean isVisible();
|
||||
|
||||
boolean isFocused();
|
||||
|
||||
boolean isMouseOver();
|
||||
|
||||
boolean isDragged();
|
||||
|
||||
boolean canMouseOver();
|
||||
|
||||
boolean canFocus();
|
||||
@@ -110,27 +77,17 @@ public interface IWidget {
|
||||
/* CHILDREN */
|
||||
boolean isChildVisible(IWidget child);
|
||||
|
||||
boolean isChildEnabled(IWidget child);
|
||||
|
||||
@Nullable
|
||||
IWidget addChild(IWidget child);
|
||||
void addChild(IWidget child);
|
||||
|
||||
List<IWidget> getChildren();
|
||||
|
||||
@Nullable
|
||||
IWidget deleteChild(IWidget child);
|
||||
<W> W getWidget(Class<W> widgetClass);
|
||||
|
||||
void deleteAllChildren();
|
||||
|
||||
IWidget getTopChild();
|
||||
void deleteChild(IWidget child);
|
||||
|
||||
/* EVENTS*/
|
||||
|
||||
/**
|
||||
* Calls an event
|
||||
*/
|
||||
void callEvent(Event event);
|
||||
|
||||
/**
|
||||
* Called if this widget receives an event
|
||||
*/
|
||||
@@ -145,16 +102,8 @@ public interface IWidget {
|
||||
*/
|
||||
<E extends Event> void addSelfEventHandler(Class<? super E> eventClass, EventHandler.OnEventHandler<E> handler);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void onUpdateClient();
|
||||
|
||||
void delete();
|
||||
|
||||
void onDelete();
|
||||
|
||||
@Nullable
|
||||
<T> T getWidget(final Class<T> widgetClass);
|
||||
|
||||
@Nullable
|
||||
Area getCroppedZone();
|
||||
|
||||
@@ -164,33 +113,14 @@ public interface IWidget {
|
||||
|
||||
IWidget getCropWidget();
|
||||
|
||||
boolean isMouseOverWidget(final Point p0);
|
||||
|
||||
int getLevel();
|
||||
|
||||
boolean isDescendant(final IWidget p0);
|
||||
|
||||
/* ATTRIBUTES */
|
||||
|
||||
/**
|
||||
* @return a list with all attributes that this widget has.
|
||||
*/
|
||||
List<IWidgetAttribute> getAttributes();
|
||||
|
||||
/**
|
||||
*
|
||||
* @return true if this widget has this attribute
|
||||
*/
|
||||
boolean hasAttribute(IWidgetAttribute attribute);
|
||||
|
||||
/**
|
||||
* Adds an attribute to this widget
|
||||
*/
|
||||
boolean addAttribute(IWidgetAttribute attribute);
|
||||
|
||||
boolean contains(Point point);
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void onRender(RenderStage stage, int guiWidth, int guiHeight);
|
||||
}
|
||||
@@ -43,10 +43,6 @@ public class Tooltip {
|
||||
this.tooltip.add(string);
|
||||
}
|
||||
|
||||
public String getLine(final int index) {
|
||||
return this.getList().get(index);
|
||||
}
|
||||
|
||||
public void add(final List<String> list) {
|
||||
this.tooltip.addAll(list);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,6 @@ public abstract class TopLevelWidget extends Widget implements ITopLevelWidget {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public IWidget getDraggedWidget() {
|
||||
return this.draggedWidget;
|
||||
@@ -84,7 +83,6 @@ public abstract class TopLevelWidget extends Widget implements ITopLevelWidget {
|
||||
this.setDraggedWidget(widget, -1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public IWidget getFocusedWidget() {
|
||||
return this.focusedWidget;
|
||||
@@ -112,12 +110,10 @@ public abstract class TopLevelWidget extends Widget implements ITopLevelWidget {
|
||||
return this.getMousedOverWidget() == widget;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDragged(final IWidget widget) {
|
||||
return this.getDraggedWidget() == widget;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFocused(final IWidget widget) {
|
||||
return this.getFocusedWidget() == widget;
|
||||
}
|
||||
@@ -175,7 +171,6 @@ public abstract class TopLevelWidget extends Widget implements ITopLevelWidget {
|
||||
return widgets;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setMousePosition(final int x, final int y) {
|
||||
final float dx = x - this.mousePosition.xPos();
|
||||
final float dy = y - this.mousePosition.yPos();
|
||||
@@ -209,9 +204,4 @@ public abstract class TopLevelWidget extends Widget implements ITopLevelWidget {
|
||||
this.setFocusedWidget(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getDragDistance() {
|
||||
return this.getRelativeMousePosition().sub(this.dragStart);
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,6 @@ public class Widget implements IWidget {
|
||||
private Point size;
|
||||
private Point offset;
|
||||
private Collection<EventHandler<? extends Event>> eventHandlers;
|
||||
private boolean enabled;
|
||||
private boolean visible;
|
||||
|
||||
public Widget(@Nullable final IWidget parent) {
|
||||
@@ -42,7 +41,6 @@ public class Widget implements IWidget {
|
||||
this.cropped = false;
|
||||
this.colour = 0xffffff;
|
||||
this.eventHandlers = new ArrayList<>();
|
||||
this.enabled = true;
|
||||
this.visible = true;
|
||||
this.parent = parent;
|
||||
if (parent != null) {
|
||||
@@ -51,34 +49,25 @@ public class Widget implements IWidget {
|
||||
}
|
||||
|
||||
/* ATTRIBUTES */
|
||||
@Override
|
||||
public List<IWidgetAttribute> getAttributes() {
|
||||
return this.attributes;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasAttribute(final IWidgetAttribute attribute) {
|
||||
return this.attributes.contains(attribute);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addAttribute(final IWidgetAttribute attribute) {
|
||||
return this.attributes.add(attribute);
|
||||
}
|
||||
|
||||
/* CHILDREN */
|
||||
@Override
|
||||
@Nullable
|
||||
public IWidget deleteChild(IWidget child) {
|
||||
public void deleteChild(IWidget child) {
|
||||
if (child == null) {
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
child.delete();
|
||||
this.children.remove(child);
|
||||
return child;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void deleteAllChildren() {
|
||||
while (!this.children.isEmpty()) {
|
||||
this.deleteChild(this.children.get(0));
|
||||
@@ -86,10 +75,9 @@ public class Widget implements IWidget {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public IWidget addChild(IWidget child) {
|
||||
public void addChild(IWidget child) {
|
||||
if(child == null){
|
||||
return null;
|
||||
return;
|
||||
}
|
||||
IWidget topWidget = getTopChild();
|
||||
if (topWidget != null && topWidget.hasAttribute(Attribute.ALWAYS_ON_TOP)) {
|
||||
@@ -97,23 +85,11 @@ public class Widget implements IWidget {
|
||||
} else {
|
||||
this.children.add(child);
|
||||
}
|
||||
this.onAddChild(child);
|
||||
return child;
|
||||
}
|
||||
|
||||
protected void onAddChild(IWidget widget) {
|
||||
}
|
||||
|
||||
protected void onDeleteChild(IWidget widget) {
|
||||
}
|
||||
|
||||
protected boolean hasChildren(){
|
||||
return !children.isEmpty();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected IWidget getFirstChild(){
|
||||
if(!hasChildren()){
|
||||
if(children.isEmpty()){
|
||||
return null;
|
||||
}
|
||||
return children.get(0);
|
||||
@@ -139,10 +115,9 @@ public class Widget implements IWidget {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public IWidget getTopChild() {
|
||||
if(!hasChildren()){
|
||||
if(children.isEmpty()){
|
||||
return null;
|
||||
}
|
||||
int childrenCount = getChildren().size();
|
||||
@@ -165,18 +140,6 @@ public class Widget implements IWidget {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDescendant(final IWidget widget) {
|
||||
IWidget parentWidget = this;
|
||||
while (parentWidget != widget) {
|
||||
parentWidget = parentWidget.getParent();
|
||||
if (parentWidget == null) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* GEOMETRY */
|
||||
@Override
|
||||
public final void setPosition(Point position) {
|
||||
@@ -191,11 +154,6 @@ public class Widget implements IWidget {
|
||||
return this.position.add(this.offset);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isTopLevel() {
|
||||
return this instanceof ITopLevelWidget;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Point getSize() {
|
||||
return this.size;
|
||||
@@ -206,11 +164,6 @@ public class Widget implements IWidget {
|
||||
return new Area(Point.ZERO, this.getSize());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Point getOriginalPosition() {
|
||||
return this.position;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public final Area getCroppedZone() {
|
||||
@@ -230,13 +183,6 @@ public class Widget implements IWidget {
|
||||
return parent == null ? this.getPosition() : parent.getAbsolutePosition().add(this.getPosition());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Point getOriginalAbsolutePosition() {
|
||||
IWidget parent = this.getParent();
|
||||
return parent == null ? this.getOriginalPosition() : parent.getOriginalPosition().sub(this.getOriginalPosition());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void setSize(final Point vector) {
|
||||
if (!vector.equals(this.size)) {
|
||||
this.size = new Point(vector);
|
||||
@@ -244,11 +190,6 @@ public class Widget implements IWidget {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Point getOffset() {
|
||||
return this.offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void setOffset(final Point vector) {
|
||||
if (vector != this.offset) {
|
||||
@@ -257,7 +198,6 @@ public class Widget implements IWidget {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getXPos() {
|
||||
return this.getPosition().xPos();
|
||||
}
|
||||
@@ -289,23 +229,6 @@ public class Widget implements IWidget {
|
||||
this.callEvent(new EventWidget.ChangeColour(this));
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public final boolean contains(final Point position) {
|
||||
return this.getArea().contains(position);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLevel() {
|
||||
IWidget parent = getParent();
|
||||
int level = 0;
|
||||
int index = 0;
|
||||
if(parent != null){
|
||||
List<IWidget> widgets = parent.getChildren();
|
||||
level = parent.getLevel();
|
||||
index = widgets.indexOf(this);
|
||||
}
|
||||
return level + index;
|
||||
}
|
||||
|
||||
/* EVENTS */
|
||||
@Override
|
||||
@@ -315,20 +238,19 @@ public class Widget implements IWidget {
|
||||
|
||||
@Override
|
||||
public <E extends Event> void addEventHandler(Class<? super E> eventClass, EventHandler.OnEventHandler<E> handler) {
|
||||
this.eventHandlers.add(new EventHandler<E>(eventClass, handler));
|
||||
this.eventHandlers.add(new EventHandler<>(eventClass, handler));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E extends Event> void addEventHandler(Class<? super E> eventClass, EventHandler.Origin origin, IWidget relative, EventHandler.OnEventHandler<E> handler) {
|
||||
this.eventHandlers.add(new EventHandler<E>(eventClass, origin, relative, handler));
|
||||
this.eventHandlers.add(new EventHandler<>(eventClass, origin, relative, handler));
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E extends Event> void addSelfEventHandler(Class<? super E> eventClass, EventHandler.OnEventHandler<E> handler) {
|
||||
this.eventHandlers.add(new EventHandler<E>(eventClass, EventHandler.Origin.SELF, this, handler));
|
||||
this.eventHandlers.add(new EventHandler<>(eventClass, EventHandler.Origin.SELF, this, handler));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void callEvent(final Event event) {
|
||||
this.getTopParent().receiveEvent(event);
|
||||
}
|
||||
@@ -355,7 +277,6 @@ public class Widget implements IWidget {
|
||||
return this.hasAttribute(Attribute.MOUSE_OVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Point getMousePosition() {
|
||||
return this.getTopParent().getAbsoluteMousePosition();
|
||||
}
|
||||
@@ -379,12 +300,10 @@ public class Widget implements IWidget {
|
||||
return inCrop && this.isMouseOverWidget(mouse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isMouseOverWidget(final Point relativeMouse) {
|
||||
return this.getArea().contains(relativeMouse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isMouseOver() {
|
||||
return this.getTopParent().isMouseOver(this);
|
||||
}
|
||||
@@ -448,30 +367,15 @@ public class Widget implements IWidget {
|
||||
}
|
||||
|
||||
/* STATES*/
|
||||
@Override
|
||||
public final void enable() {
|
||||
this.enabled = true;
|
||||
this.callEvent(new EventWidget.Enable(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void disable() {
|
||||
this.enabled = false;
|
||||
this.callEvent(new EventWidget.Disable(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
if (this.enabled) {
|
||||
IWidget parent = this.getParent();
|
||||
if (parent != null) {
|
||||
if (!parent.isEnabled() || !parent.isChildEnabled(this)) {
|
||||
return false;
|
||||
}
|
||||
IWidget parent = this.getParent();
|
||||
if (parent != null) {
|
||||
if (!parent.isEnabled()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -500,28 +404,12 @@ public class Widget implements IWidget {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isFocused() {
|
||||
return this.getTopParent().isFocused(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isDragged() {
|
||||
return this.getTopParent().isDragged(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChildVisible(final IWidget child) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isChildEnabled(final IWidget child) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* UPDATE */
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onUpdateClient() {
|
||||
}
|
||||
@@ -536,16 +424,8 @@ public class Widget implements IWidget {
|
||||
((ITopLevelWidget) this).updateTopLevel();
|
||||
}
|
||||
this.onUpdateClient();
|
||||
final List<IWidget> deletedWidgets = new ArrayList<>();
|
||||
for (final IWidget widget : this.getChildren()) {
|
||||
if (widget.hasAttribute(Attribute.NEEDS_DELETION)) {
|
||||
deletedWidgets.add(widget);
|
||||
} else {
|
||||
widget.updateClient();
|
||||
}
|
||||
}
|
||||
for (final IWidget widget : deletedWidgets) {
|
||||
this.deleteChild(widget);
|
||||
widget.updateClient();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -553,15 +433,6 @@ public class Widget implements IWidget {
|
||||
@Override
|
||||
public final void delete() {
|
||||
this.getTopParent().widgetDeleted(this);
|
||||
this.onDelete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDelete() {
|
||||
}
|
||||
|
||||
public void scheduleDeletion() {
|
||||
this.addAttribute(Attribute.NEEDS_DELETION);
|
||||
}
|
||||
|
||||
public IWidget getWidget() {
|
||||
|
||||
@@ -17,15 +17,9 @@ import binnie.core.gui.resource.minecraft.CraftGUITexture;
|
||||
|
||||
public class ControlCheckbox extends Control implements IControlValue<Boolean> {
|
||||
private boolean value;
|
||||
private String text;
|
||||
|
||||
public ControlCheckbox(final IWidget parent, final int x, final int y, final boolean bool) {
|
||||
this(parent, x, y, 0, "", bool);
|
||||
}
|
||||
|
||||
public ControlCheckbox(final IWidget parent, final int x, final int y, final int w, final String text, final boolean bool) {
|
||||
super(parent, x, y, (w > 16) ? w : 16, 16);
|
||||
this.text = text;
|
||||
this.value = bool;
|
||||
if (w > 16) {
|
||||
new ControlText(this, new Area(16, 1, w - 16, 16), text, TextJustification.MIDDLE_CENTER).setColor(4473924);
|
||||
|
||||
@@ -19,10 +19,6 @@ public class ControlText extends Control implements IControlValue<String> {
|
||||
this(parent, new Area(pos, new Point(500, 0)), text, TextJustification.TOP_LEFT);
|
||||
}
|
||||
|
||||
public ControlText(final IWidget parent, final String text, final TextJustification align) {
|
||||
this(parent, parent.getArea(), text, align);
|
||||
}
|
||||
|
||||
public ControlText(final IWidget parent, final Area area, final String text, final TextJustification align) {
|
||||
super(parent, area.pos().xPos(), area.pos().yPos(), area.size().xPos(), area.size().yPos());
|
||||
this.text = text;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
package binnie.core.gui.controls;
|
||||
|
||||
public interface IControlSelection<T> {
|
||||
T getSelectedValue();
|
||||
|
||||
void setSelectedValue(T value);
|
||||
|
||||
boolean isSelected(IControlSelectionOption<T> option);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package binnie.core.gui.controls;
|
||||
|
||||
public interface IControlSelectionOption<T> {
|
||||
T getValue();
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
package binnie.core.gui.controls.button;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import binnie.core.gui.IWidget;
|
||||
import binnie.core.gui.controls.core.IControlValue;
|
||||
import binnie.core.gui.events.EventMouse;
|
||||
import binnie.core.gui.events.EventValueChanged;
|
||||
|
||||
public class ControlEnumButton<T> extends ControlButton implements IControlValue<T> {
|
||||
public static final String eventEnumChanged = "eventEnumButtonChanged";
|
||||
private T currentSelection;
|
||||
private List<T> enumConstants;
|
||||
|
||||
public ControlEnumButton(final IWidget parent, final int x, final int y, final int width, final int height, final T[] values) {
|
||||
super(parent, x, y, width, height, "");
|
||||
Preconditions.checkArgument(values.length > 0, "Tried to create ControlEnumButton with no values.");
|
||||
this.enumConstants = new ArrayList<>();
|
||||
Collections.addAll(this.enumConstants, values);
|
||||
this.currentSelection = values[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return this.currentSelection.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMouseClick(final EventMouse.Down event) {
|
||||
int index = this.enumConstants.indexOf(this.currentSelection);
|
||||
if (index < this.enumConstants.size() - 1) {
|
||||
++index;
|
||||
} else {
|
||||
index = 0;
|
||||
}
|
||||
final T newEnum = this.enumConstants.get(index);
|
||||
this.setValue(newEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public T getValue() {
|
||||
return this.currentSelection;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValue(final T selection) {
|
||||
if (this.currentSelection != selection) {
|
||||
this.currentSelection = selection;
|
||||
this.callEvent(new EventValueChanged<Object>(this, this.getValue()));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package binnie.core.gui.controls.button;
|
||||
|
||||
import binnie.core.gui.IWidget;
|
||||
import binnie.core.gui.events.EventMouse;
|
||||
import binnie.core.gui.events.EventToggleButtonClicked;
|
||||
|
||||
public class ControlToggleButton extends ControlButton {
|
||||
boolean toggled;
|
||||
|
||||
public ControlToggleButton(final IWidget parent, final int x, final int y, final int width, final int height) {
|
||||
super(parent, x, y, width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMouseClick(final EventMouse.Down event) {
|
||||
this.callEvent(new EventToggleButtonClicked(this, this.toggled));
|
||||
}
|
||||
}
|
||||
@@ -73,11 +73,6 @@ public class Control extends Widget implements ITooltipHelp, ITooltip {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLevel() {
|
||||
return this.extraLevel + super.getLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getHelpTooltip(final Tooltip tooltip) {
|
||||
tooltip.add(this.helpStrings);
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package binnie.core.gui.controls.core;
|
||||
|
||||
public interface IControlIndexed {
|
||||
int getIndex();
|
||||
|
||||
void setIndex(final int p0);
|
||||
}
|
||||
@@ -4,6 +4,4 @@ import java.util.Collection;
|
||||
|
||||
public interface IControlValues<T> extends IControlValue<T> {
|
||||
Collection<T> getValues();
|
||||
|
||||
void setValues(final Collection<T> p0);
|
||||
}
|
||||
@@ -90,10 +90,6 @@ public class ControlList<T> extends Control implements IControlValue<T> {
|
||||
this.filterOptions();
|
||||
}
|
||||
|
||||
public Collection<T> getAllOptions() {
|
||||
return this.allOptions.keySet();
|
||||
}
|
||||
|
||||
public int getIndexOf(final T value) {
|
||||
int index = 0;
|
||||
for (final T option : this.getOptions()) {
|
||||
|
||||
@@ -13,10 +13,6 @@ import binnie.core.gui.resource.minecraft.CraftGUITexture;
|
||||
public class ControlOption<T> extends Control implements IControlValue<T> {
|
||||
private T value;
|
||||
|
||||
public ControlOption(final ControlList<T> controlList, final T option) {
|
||||
this(controlList, option, 16);
|
||||
}
|
||||
|
||||
public ControlOption(final ControlList<T> controlList, final T option, final int height) {
|
||||
super(controlList, 0, height, controlList.getSize().xPos(), 20);
|
||||
this.value = option;
|
||||
|
||||
@@ -44,8 +44,4 @@ public class ControlPages<T> extends Control implements IControlValues<T>, ICont
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setValues(final Collection<T> values) {
|
||||
}
|
||||
}
|
||||
@@ -39,9 +39,9 @@ public class ControlTabBar<T> extends Control implements IControlValue<T> {
|
||||
int j = 0;
|
||||
for (final T value : values) {
|
||||
if (this.position == Position.Top || this.position == Position.BOTTOM) {
|
||||
final IWidget tab = this.createTab(j * tabDimension, 0, tabDimension, this.getSize().yPos(), value);
|
||||
this.createTab(j * tabDimension, 0, tabDimension, this.getSize().yPos(), value);
|
||||
} else {
|
||||
final IWidget tab = this.createTab(0, j * tabDimension, this.getSize().xPos(), tabDimension, value);
|
||||
this.createTab(0, j * tabDimension, this.getSize().xPos(), tabDimension, value);
|
||||
}
|
||||
++j;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package binnie.core.gui.database;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
@@ -11,8 +12,8 @@ import binnie.core.gui.controls.listbox.ControlListBox;
|
||||
import binnie.core.gui.minecraft.Window;
|
||||
|
||||
class ControlMutationBox extends ControlListBox<IMutation> {
|
||||
private int index;
|
||||
private Type type;
|
||||
@Nullable
|
||||
private IAlleleSpecies species;
|
||||
|
||||
public ControlMutationBox(final IWidget parent, final int x, final int y, final int width, final int height, final Type type) {
|
||||
@@ -26,10 +27,9 @@ class ControlMutationBox extends ControlListBox<IMutation> {
|
||||
return new ControlMutationItem(this.getContent(), value, this.species, y);
|
||||
}
|
||||
|
||||
public void setSpecies(final IAlleleSpecies species) {
|
||||
public void setSpecies(@Nullable final IAlleleSpecies species) {
|
||||
if (species != this.species) {
|
||||
this.species = species;
|
||||
this.index = 0;
|
||||
this.movePercentage(-100.0f);
|
||||
final BreedingSystem system = ((WindowAbstractDatabase) this.getTopParent()).getBreedingSystem();
|
||||
final List<IMutation> discovered = system.getDiscoveredMutations(Window.get(this).getWorld(), Window.get(this).getUsername());
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package binnie.core.gui.database;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IMutation;
|
||||
|
||||
@@ -15,7 +17,7 @@ class ControlMutationItem extends ControlOption<IMutation> {
|
||||
private ControlMutationSymbol addSymbol;
|
||||
private ControlMutationSymbol arrowSymbol;
|
||||
|
||||
public ControlMutationItem(final ControlList<IMutation> controlList, final IMutation option, final IAlleleSpecies species, final int y) {
|
||||
public ControlMutationItem(final ControlList<IMutation> controlList, final IMutation option, @Nullable final IAlleleSpecies species, final int y) {
|
||||
super(controlList, option, y);
|
||||
this.itemWidget1 = new ControlDatabaseIndividualDisplay(this, 4, 4);
|
||||
this.itemWidget2 = new ControlDatabaseIndividualDisplay(this, 44, 4);
|
||||
|
||||
@@ -28,6 +28,4 @@ public class DatabaseConstants {
|
||||
public static final String BOTANY_TAB_KEY = BOTANY_KEY + TAB_PRE_FIX;
|
||||
public static final String BOTANY_GENOME_KEY = BOTANY_TAB_KEY + ".genome";
|
||||
|
||||
public static final String TIME_KEY = KEY + ".time";
|
||||
|
||||
}
|
||||
@@ -8,12 +8,10 @@ import binnie.core.util.I18N;
|
||||
public class DatabaseTab implements ITooltipHelp {
|
||||
private AbstractMod mod;
|
||||
private String unloc;
|
||||
private int colour;
|
||||
|
||||
public DatabaseTab(final AbstractMod mod, final String unloc, final int colour) {
|
||||
public DatabaseTab(final AbstractMod mod, final String unloc) {
|
||||
this.mod = mod;
|
||||
this.unloc = unloc;
|
||||
this.colour = colour;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,7 +23,6 @@ public class PageBreeder extends ControlPage<DatabaseTab> {
|
||||
public void onPageRefresh() {
|
||||
this.deleteAllChildren();
|
||||
final BreedingSystem system = ((WindowAbstractDatabase) Window.get(this)).getBreedingSystem();
|
||||
final String descriptor = system.getDescriptor();
|
||||
new ControlTextCentered(this, 8, TextFormatting.UNDERLINE + system.getDescriptor() + " " + I18N.localise(DatabaseConstants.BREEDER_KEY + ".profile"));
|
||||
new ControlTextCentered(this, 75, "" + system.discoveredSpeciesCount + "/" + system.totalSpeciesCount + " " + I18N.localise(DatabaseConstants.BREEDER_KEY + ".species"));
|
||||
new ControlBreedingProgress(this, 20, 87, 102, 14, system, system.discoveredSpeciesPercentage);
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
package binnie.core.gui.database;
|
||||
|
||||
import net.minecraft.util.text.TextFormatting;
|
||||
|
||||
import binnie.core.genetics.BreedingSystem;
|
||||
import binnie.core.gui.IWidget;
|
||||
import binnie.core.gui.controls.ControlText;
|
||||
import binnie.core.gui.controls.ControlTextCentered;
|
||||
import binnie.core.gui.controls.core.Control;
|
||||
import binnie.core.util.I18N;
|
||||
|
||||
public class PageBreederStats extends Control {
|
||||
String player;
|
||||
|
||||
public PageBreederStats(final IWidget parent, final int w, final int h, final String player) {
|
||||
super(parent, 0, 0, w, h);
|
||||
this.player = player;
|
||||
final ControlText pageBranchOverview_branchName = new ControlTextCentered(this, 8, TextFormatting.UNDERLINE + I18N.localise(DatabaseConstants.BREEDER_KEY + ".stats"));
|
||||
final BreedingSystem system = ((WindowAbstractDatabase) this.getTopParent()).getBreedingSystem();
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,6 @@ public class PageSpeciesOverview extends PageSpecies {
|
||||
this.controlInd1.setSpecies(species, EnumDiscoveryState.Show);
|
||||
this.controlInd2.setSpecies(species, EnumDiscoveryState.Show);
|
||||
final String branchBinomial = species.getBranch().getScientific();
|
||||
final String branchName = species.getBranch().getName();
|
||||
this.controlName.setValue(TextFormatting.UNDERLINE + species.getAlleleName());
|
||||
this.controlScientific.setValue(TextFormatting.ITALIC + branchBinomial + " " + species.getBinomial());
|
||||
this.controlAuthority.setValue(I18N.localise(DatabaseConstants.KEY + ".discovered") + ": " + TextFormatting.BOLD + species.getAuthority());
|
||||
|
||||
@@ -40,11 +40,6 @@ import binnie.core.gui.window.Panel;
|
||||
import binnie.core.util.I18N;
|
||||
|
||||
public abstract class WindowAbstractDatabase extends Window {
|
||||
private final int infoBoxWidth = 144;
|
||||
private final int infoBoxHeight = 176;
|
||||
private final int infoTabWidth = 16;
|
||||
private final int modeTabWidth = 22;
|
||||
private final int searchBoxHeight = 16;
|
||||
boolean isNEI;
|
||||
private int selectionBoxWidth;
|
||||
private Map<IDatabaseMode, ModeWidgets> modes;
|
||||
@@ -71,10 +66,6 @@ public abstract class WindowAbstractDatabase extends Window {
|
||||
this.selectionBoxWidth = wid;
|
||||
}
|
||||
|
||||
public WindowAbstractDatabase(final EntityPlayer player, final Side side, final boolean nei, final BreedingSystem system) {
|
||||
this(player, side, nei, system, 95);
|
||||
}
|
||||
|
||||
public void changeMode(final IDatabaseMode mode) {
|
||||
this.modePages.setValue(mode);
|
||||
}
|
||||
@@ -252,7 +243,7 @@ public abstract class WindowAbstractDatabase extends Window {
|
||||
@Override
|
||||
public void createListBox(final Area area) {
|
||||
final EntityPlayer player = this.database.getPlayer();
|
||||
final GameProfile playerName = WindowAbstractDatabase.this.getUsername();
|
||||
final GameProfile playerName = player.getGameProfile();
|
||||
final Collection<IClassification> speciesList = this.database.isNEI ? this.database.system.getAllBranches() : this.database.system.getDiscoveredBranches(this.database.getWorld(), playerName);
|
||||
ControlBranchBox controlBranchBox = new ControlBranchBox(this.modePage, area.xPos(), area.yPos(), area.width(), area.height());
|
||||
controlBranchBox.setOptions(speciesList);
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package binnie.core.gui.events;
|
||||
|
||||
import binnie.core.gui.IWidget;
|
||||
|
||||
public class EventCycleChanged extends Event {
|
||||
public int value;
|
||||
|
||||
public EventCycleChanged(final IWidget origin, final int value) {
|
||||
super(origin);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
@@ -25,10 +25,4 @@ public abstract class EventKey extends Event {
|
||||
super(origin, character, key);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Up extends EventKey {
|
||||
public Up(final IWidget origin, final char character, final int key) {
|
||||
super(origin, character, key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package binnie.core.gui.events;
|
||||
|
||||
import binnie.core.gui.IWidget;
|
||||
|
||||
public class EventToggleButtonClicked extends Event {
|
||||
boolean toggled;
|
||||
|
||||
public EventToggleButtonClicked(final IWidget origin, final boolean toggled) {
|
||||
super(origin);
|
||||
this.toggled = toggled;
|
||||
}
|
||||
|
||||
public boolean isActive() {
|
||||
return this.toggled;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package binnie.core.gui.events;
|
||||
|
||||
import binnie.core.gui.IWidget;
|
||||
|
||||
public class EventValuesChanged<T> extends Event {
|
||||
public T[] values;
|
||||
|
||||
public EventValuesChanged(final IWidget origin, final T[] values) {
|
||||
super(origin);
|
||||
this.values = values;
|
||||
}
|
||||
|
||||
public T[] getValues() {
|
||||
return this.values;
|
||||
}
|
||||
}
|
||||
@@ -7,18 +7,6 @@ public class EventWidget extends Event {
|
||||
super(origin);
|
||||
}
|
||||
|
||||
public static class Enable extends EventWidget {
|
||||
public Enable(final IWidget origin) {
|
||||
super(origin);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Disable extends EventWidget {
|
||||
public Disable(final IWidget origin) {
|
||||
super(origin);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Show extends EventWidget {
|
||||
public Show(final IWidget origin) {
|
||||
super(origin);
|
||||
|
||||
@@ -229,10 +229,6 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
this.window.callEvent(new EventMouse.Down(origin, x, y, button));
|
||||
}
|
||||
|
||||
public boolean isShiftDown() {
|
||||
return Keyboard.isKeyDown(this.mc.gameSettings.keyBindSneak.getKeyCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(final char c, final int key) {
|
||||
if (key == 1 || (key == this.mc.gameSettings.keyBindInventory.getKeyCode() && this.window.getFocusedWidget() == null)) {
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package binnie.core.gui.minecraft;
|
||||
|
||||
import binnie.core.gui.ITooltip;
|
||||
|
||||
public interface IMinecraftTooltip extends ITooltip {
|
||||
void getTooltip(final MinecraftTooltip p0);
|
||||
}
|
||||
@@ -252,10 +252,6 @@ public abstract class Window extends TopLevelWidget implements INetwork.ReceiveG
|
||||
return this.player.inventory.getItemStack();
|
||||
}
|
||||
|
||||
public void setHeldItemStack(final ItemStack stack) {
|
||||
this.player.inventory.setItemStack(stack);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public IInventory getInventory() {
|
||||
return this.entityInventory;
|
||||
@@ -276,9 +272,6 @@ public abstract class Window extends TopLevelWidget implements INetwork.ReceiveG
|
||||
return this.getPlayer().world;
|
||||
}
|
||||
|
||||
public void onInventoryUpdate() {
|
||||
}
|
||||
|
||||
public void sendClientAction(final String name, final NBTTagCompound action) {
|
||||
action.setString("type", name);
|
||||
final MessageCraftGUI packet = new MessageCraftGUI(action);
|
||||
|
||||
@@ -101,9 +101,4 @@ public class ControlErrorState extends Control implements ITooltip {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ErrorState getErrorState() {
|
||||
return this.errorState;
|
||||
}
|
||||
}
|
||||
@@ -32,11 +32,6 @@ public class ControlIconDisplay extends Control {
|
||||
this.sprite = sprite.getSprite();
|
||||
}
|
||||
|
||||
public ControlIconDisplay(final IWidget parent, final int x, final int y, TextureAtlasSprite sprite) {
|
||||
super(parent, x, y, 16, 16);
|
||||
this.sprite = sprite;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onRenderForeground(int guiWidth, int guiHeight) {
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
package binnie.core.gui.minecraft.control;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import binnie.core.gui.IWidget;
|
||||
import binnie.core.gui.controls.core.Control;
|
||||
import binnie.core.gui.minecraft.InventoryType;
|
||||
@@ -51,29 +47,6 @@ public class ControlPlayerInventory extends Control {
|
||||
}
|
||||
}
|
||||
|
||||
public void addItem(final ItemStack item) {
|
||||
for (final ControlSlot slot : this.slots) {
|
||||
if (!slot.slot.getHasStack()) {
|
||||
slot.slot.putStack(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void addInventory(final IInventory inventory) {
|
||||
for (int i = 0; i < inventory.getSizeInventory(); ++i) {
|
||||
ItemStack stackInSlot = inventory.getStackInSlot(i);
|
||||
this.addItem(stackInSlot);
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ControlSlot getSlot(final int i) {
|
||||
if (i < 0 || i >= this.slots.size()) {
|
||||
return null;
|
||||
}
|
||||
return this.slots.get(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateClient() {
|
||||
}
|
||||
|
||||
@@ -45,10 +45,10 @@ public abstract class ControlSlotBase extends Control implements ITooltip {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onRenderBackground(int guiWidth, int guiHeight) {
|
||||
final int size = this.getSize().xPos();
|
||||
CraftGUI.RENDER.texture(CraftGUITexture.SLOT, this.getArea());
|
||||
if (this.getTopParent().getMousedOverWidget() == this) {
|
||||
RenderUtil.drawGradientRect(new Area(new Point(1, 1), this.getArea().size().sub(new Point(2, 2))), -2130706433, -2130706433);
|
||||
Area area = new Area(new Point(1, 1), this.getArea().size().sub(new Point(2, 2)));
|
||||
RenderUtil.drawGradientRect(area, -2130706433, -2130706433);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,10 @@ import binnie.core.gui.controls.core.Control;
|
||||
import binnie.core.gui.resource.minecraft.CraftGUITexture;
|
||||
|
||||
public class ControlUser extends Control implements ITooltip {
|
||||
String team;
|
||||
private String username;
|
||||
private final String username;
|
||||
|
||||
public ControlUser(final IWidget parent, final int x, final int y, final String username) {
|
||||
super(parent, x, y, 16, 16);
|
||||
this.username = "";
|
||||
this.team = "";
|
||||
this.addAttribute(Attribute.MOUSE_OVER);
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
package binnie.core.gui.minecraft.render;
|
||||
|
||||
import binnie.core.gui.geometry.Area;
|
||||
import binnie.core.resource.IBinnieTexture;
|
||||
|
||||
public class MinecraftTexture {
|
||||
Area textureArea;
|
||||
IBinnieTexture texture;
|
||||
|
||||
public MinecraftTexture() {
|
||||
this.textureArea = new Area(0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package binnie.core.gui.minecraft.render;
|
||||
|
||||
import binnie.core.gui.IWidget;
|
||||
import binnie.core.gui.minecraft.GuiCraftGUI;
|
||||
|
||||
public abstract class RenderCommand {
|
||||
IWidget widget;
|
||||
|
||||
public RenderCommand(final IWidget widget) {
|
||||
this.widget = widget;
|
||||
}
|
||||
|
||||
public abstract void render(final GuiCraftGUI p0);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
@FieldsAreNonnullByDefault
|
||||
package binnie.core.gui.minecraft.render;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import binnie.core.util.FieldsAreNonnullByDefault;
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
@@ -214,7 +214,4 @@ public class TextureRenderer {
|
||||
}
|
||||
this.texture(texture.crop(direction, dim - dist), new Area(x, y, w, h));
|
||||
}
|
||||
|
||||
public void test(final IWidget widget) {
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package binnie.core.gui.renderer;
|
||||
|
||||
public enum TextureType {
|
||||
Stretched,
|
||||
Tiled
|
||||
}
|
||||
@@ -15,14 +15,6 @@ public class Texture {
|
||||
private final Border border;
|
||||
private final IBinnieTexture binnieTexture;
|
||||
|
||||
public Texture(final Area area, final IBinnieTexture binnieTexture) {
|
||||
this(area, Border.ZERO, Border.ZERO, binnieTexture);
|
||||
}
|
||||
|
||||
public Texture(final Area area, final Border padding, final IBinnieTexture binnieTexture) {
|
||||
this(area, padding, Border.ZERO, binnieTexture);
|
||||
}
|
||||
|
||||
public Texture(final Area area, final Border padding, final Border border, final IBinnieTexture binnieTexture) {
|
||||
this.area = new Area(area);
|
||||
this.padding = new Border(padding);
|
||||
@@ -34,10 +26,6 @@ public class Texture {
|
||||
return this.area;
|
||||
}
|
||||
|
||||
public Border getPadding() {
|
||||
return this.padding;
|
||||
}
|
||||
|
||||
public Border getBorder() {
|
||||
return this.border;
|
||||
}
|
||||
@@ -59,14 +47,6 @@ public class Texture {
|
||||
return this.getArea().height();
|
||||
}
|
||||
|
||||
public int u() {
|
||||
return this.getArea().xPos();
|
||||
}
|
||||
|
||||
public int v() {
|
||||
return this.getArea().yPos();
|
||||
}
|
||||
|
||||
public Texture crop(final Position anchor, final int dist) {
|
||||
return this.crop(new Border(anchor.opposite(), dist));
|
||||
}
|
||||
|
||||
@@ -38,11 +38,6 @@ public enum FluidContainerType {
|
||||
return I18N.localise("binniecore.item.container." + this.name().toLowerCase());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public ItemFluidContainer getItem() {
|
||||
return item;
|
||||
}
|
||||
|
||||
public void setItem(ItemFluidContainer item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.core.liquid;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -35,10 +34,6 @@ public class ManagerLiquid extends ManagerBase {
|
||||
this.fluids = new LinkedHashMap<>();
|
||||
}
|
||||
|
||||
public Collection<IFluidType> getFluidTypes() {
|
||||
return this.fluids.values();
|
||||
}
|
||||
|
||||
public void createLiquids(final IFluidType[] liquids) {
|
||||
for (final IFluidType liquid : liquids) {
|
||||
final BinnieFluid fluid = this.createLiquid(liquid);
|
||||
@@ -76,10 +71,6 @@ public class ManagerLiquid extends ManagerBase {
|
||||
);
|
||||
}
|
||||
|
||||
public IFluidType getFluidType(final String liquid) {
|
||||
return this.fluids.get(liquid.toLowerCase());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerSprites(TextureStitchEvent event) {
|
||||
|
||||
@@ -96,9 +96,8 @@ class BlockMachine extends Block implements IBlockMachine, ITileEntityProvider {
|
||||
return new BlockStateContainer(this, MACHINE_TYPE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public MachinePackage getPackage(final int meta) {
|
||||
private MachinePackage getPackage(final int meta) {
|
||||
return this.group.getPackage(meta);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
package binnie.core.machines;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
interface IBlockMachine {
|
||||
@Nullable
|
||||
MachinePackage getPackage(int meta);
|
||||
|
||||
String getMachineName(int meta);
|
||||
}
|
||||
@@ -23,6 +23,4 @@ public interface IMachine extends IOwnable {
|
||||
<T> Collection<T> getInterfaces(Class<T> Interface);
|
||||
|
||||
MachinePackage getPackage();
|
||||
|
||||
void sendRefreshPacket();
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTUtil;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -29,7 +28,6 @@ import binnie.core.BinnieCore;
|
||||
import binnie.core.machines.component.IInteraction;
|
||||
import binnie.core.machines.component.IRender;
|
||||
import binnie.core.machines.network.INetwork;
|
||||
import binnie.core.machines.power.ITankMachine;
|
||||
import binnie.core.network.BinnieCorePacketID;
|
||||
import binnie.core.network.INetworkedEntity;
|
||||
import binnie.core.network.packet.MessageBase;
|
||||
@@ -147,21 +145,6 @@ public class Machine implements INetworkedEntity, INbtReadable, INbtWritable, IN
|
||||
return this.tile;
|
||||
}
|
||||
|
||||
public void sendRefreshPacket() {
|
||||
if (!BinnieCore.getBinnieProxy().isSimulating(this.getTileEntity().getWorld())) {
|
||||
return;
|
||||
}
|
||||
MessageBase message = getRefreshPacket();
|
||||
if(message == null){
|
||||
return;
|
||||
}
|
||||
BinnieCore.getBinnieProxy().sendToAll(message);
|
||||
}
|
||||
|
||||
public Side getSide() {
|
||||
return BinnieCore.getBinnieProxy().isSimulating(this.getTileEntity().getWorld()) ? Side.SERVER : Side.CLIENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToPacket(final PacketPayload payload) {
|
||||
for (final MachineComponent component : this.getComponents()) {
|
||||
@@ -216,14 +199,6 @@ public class Machine implements INetworkedEntity, INbtReadable, INbtWritable, IN
|
||||
}
|
||||
}
|
||||
|
||||
public IInventory getInventory() {
|
||||
return this.getInterface(IInventory.class);
|
||||
}
|
||||
|
||||
public ITankMachine getTankContainer() {
|
||||
return this.getInterface(ITankMachine.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(final NBTTagCompound nbttagcompound) {
|
||||
for (final MachineComponent component : this.getComponents()) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import forestry.api.core.INbtReadable;
|
||||
import forestry.api.core.INbtWritable;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.core.network.packet.MachinePayload;
|
||||
|
||||
public class MachineComponent implements INbtReadable, INbtWritable {
|
||||
private IMachine machine;
|
||||
@@ -44,13 +43,6 @@ public class MachineComponent implements INbtReadable, INbtWritable {
|
||||
public void onInventoryUpdate() {
|
||||
}
|
||||
|
||||
public final MachinePayload getPayload() {
|
||||
return new MachinePayload(Binnie.MACHINE.getNetworkID(this.getClass()));
|
||||
}
|
||||
|
||||
public void recieveData(final MachinePayload payload) {
|
||||
}
|
||||
|
||||
public MachineUtil getUtil() {
|
||||
return this.getMachine().getMachineUtil();
|
||||
}
|
||||
|
||||
@@ -14,23 +14,17 @@ import binnie.core.AbstractMod;
|
||||
import binnie.core.BinnieCore;
|
||||
|
||||
public class MachineGroup {
|
||||
public boolean customRenderer;
|
||||
private AbstractMod mod;
|
||||
private String blockName;
|
||||
private String uid;
|
||||
private Map<String, MachinePackage> packages;
|
||||
private Map<Integer, MachinePackage> packagesID;
|
||||
private BlockMachine block;
|
||||
private boolean renderedTileEntity;
|
||||
|
||||
public MachineGroup(final AbstractMod mod, final String uid, final String blockName, final IMachineType[] types) {
|
||||
this.packages = new LinkedHashMap<>();
|
||||
this.packagesID = new LinkedHashMap<>();
|
||||
this.customRenderer = true;
|
||||
this.renderedTileEntity = true;
|
||||
this.mod = mod;
|
||||
this.uid = uid;
|
||||
this.blockName = blockName;
|
||||
createPackages(types);
|
||||
Binnie.MACHINE.registerMachineGroup(this);
|
||||
this.block = new BlockMachine(this, blockName);
|
||||
@@ -93,14 +87,6 @@ public class MachineGroup {
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
boolean isTileEntityRenderered() {
|
||||
return this.renderedTileEntity;
|
||||
}
|
||||
|
||||
public void renderAsBlock() {
|
||||
this.renderedTileEntity = false;
|
||||
}
|
||||
|
||||
public void setCreativeTab(final CreativeTabs tab) {
|
||||
this.block.setCreativeTab(tab);
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package binnie.core.machines;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class MachineRendererBlock {
|
||||
public static MachineRendererBlock instance = new MachineRendererBlock();
|
||||
private BinnieResource texture;
|
||||
private ModelBlock model;
|
||||
|
||||
public MachineRendererBlock() {
|
||||
this.model = new ModelBlock();
|
||||
}
|
||||
|
||||
public void renderMachine(final BinnieResource texture, final double x, final double y, final double z, final float partialTicks) {
|
||||
this.texture = texture;
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(x + 0.5, y + 1.5, z + 0.5);
|
||||
GlStateManager.rotate(180.0f, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
BinnieCore.getBinnieProxy().bindTexture(texture);
|
||||
this.model.render((float) x, (float) y, (float) z, 0.0625f, 0.0625f, 0.0625f);
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
@@ -17,15 +17,11 @@ import binnie.core.machines.inventory.ValidatorSprite;
|
||||
public class ManagerMachine extends ManagerBase {
|
||||
private Map<Class<?>, Class<?>[]> componentInterfaceMap;
|
||||
private Map<String, MachineGroup> machineGroups;
|
||||
private Map<Integer, Class<?>> networkIDToComponent;
|
||||
private Map<Class<?>, Integer> componentToNetworkID;
|
||||
private int nextNetworkID;
|
||||
|
||||
public ManagerMachine() {
|
||||
this.componentInterfaceMap = new HashMap<>();
|
||||
this.machineGroups = new HashMap<>();
|
||||
this.networkIDToComponent = new HashMap<>();
|
||||
this.componentToNetworkID = new HashMap<>();
|
||||
this.nextNetworkID = 0;
|
||||
}
|
||||
|
||||
@@ -55,16 +51,6 @@ public class ManagerMachine extends ManagerBase {
|
||||
interfaces.remove(INbtReadable.class);
|
||||
this.componentInterfaceMap.put(component, interfaces.toArray(new Class[0]));
|
||||
final int networkID = this.nextNetworkID++;
|
||||
this.networkIDToComponent.put(networkID, component);
|
||||
this.componentToNetworkID.put(component, networkID);
|
||||
}
|
||||
|
||||
public int getNetworkID(final Class<?> component) {
|
||||
return this.componentToNetworkID.get(component);
|
||||
}
|
||||
|
||||
public Class<?> getComponentClass(final int networkID) {
|
||||
return this.networkIDToComponent.get(networkID);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
package binnie.core.machines;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
class ModelBlock extends ModelBase {
|
||||
private ModelRenderer Block;
|
||||
|
||||
public ModelBlock() {
|
||||
this.textureWidth = 64;
|
||||
this.textureHeight = 32;
|
||||
(this.Block = new ModelRenderer(this, 0, 0)).addBox(0.0f, 0.0f, 0.0f, 16, 16, 16);
|
||||
this.Block.setRotationPoint(-8.0f, 8.0f, -8.0f);
|
||||
this.Block.setTextureSize(64, 32);
|
||||
this.Block.mirror = true;
|
||||
this.setRotation(this.Block, 0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void render(final float f, final float f1, final float f2, final float f3, final float f4, final float f5) {
|
||||
super.render(null, f, f1, f2, f3, f4, f5);
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
this.Block.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(final ModelRenderer model, final float x, final float y, final float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(final float f, final float f1, final float f2, final float f3, final float f4, final float f5) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, null);
|
||||
}
|
||||
}
|
||||
@@ -26,11 +26,6 @@ class DefaultMachineInventory implements IInventoryMachine {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly(final int slot) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() {
|
||||
}
|
||||
|
||||
@@ -83,11 +83,6 @@ public class TileEntityMachineBase extends TileEntity implements IInventoryMachi
|
||||
return this.getInventory().canExtractItem(i, itemstack, j);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly(final int slot) {
|
||||
return this.getInventory().isReadOnly(slot);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PowerInfo getPowerInfo() {
|
||||
return this.getPower().getPowerInfo();
|
||||
|
||||
@@ -11,7 +11,6 @@ public class ErrorState implements INbtReadable, INbtWritable {
|
||||
private IErrorStateDefinition nameDefinition;
|
||||
private IErrorStateDefinition definition;
|
||||
private int[] data;
|
||||
private boolean progress;
|
||||
private boolean itemError;
|
||||
private boolean tankError;
|
||||
private boolean powerError;
|
||||
@@ -32,14 +31,9 @@ public class ErrorState implements INbtReadable, INbtWritable {
|
||||
this(nameDefinition, definition, new int[0]);
|
||||
}
|
||||
|
||||
public ErrorState(IErrorStateDefinition nameDefinition, IErrorStateDefinition definition, int data) {
|
||||
this(nameDefinition, definition, new int[]{data});
|
||||
}
|
||||
|
||||
public ErrorState(IErrorStateDefinition nameDefinition, IErrorStateDefinition definition, int[] data) {
|
||||
EnumErrorType type = definition.getType();
|
||||
this.data = data;
|
||||
this.progress = false;
|
||||
this.itemError = type.isItemError();
|
||||
this.tankError = type.isTankError();
|
||||
this.powerError = type.isPowerError();
|
||||
@@ -49,7 +43,6 @@ public class ErrorState implements INbtReadable, INbtWritable {
|
||||
|
||||
public ErrorState(NBTTagCompound nbtTagCompound) {
|
||||
this.data = new int[0];
|
||||
this.progress = false;
|
||||
this.itemError = false;
|
||||
this.tankError = false;
|
||||
this.powerError = false;
|
||||
@@ -71,14 +64,6 @@ public class ErrorState implements INbtReadable, INbtWritable {
|
||||
return this.data;
|
||||
}
|
||||
|
||||
public boolean isProgress() {
|
||||
return this.progress;
|
||||
}
|
||||
|
||||
public void setIsProgress() {
|
||||
this.progress = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(final NBTTagCompound nbt) {
|
||||
this.nameDefinition = ErrorStateRegistry.getErrorState(nbt.getString("name"));
|
||||
|
||||
@@ -41,12 +41,6 @@ public abstract class BaseSlot<T> implements INbtWritable, INbtReadable, IValida
|
||||
@Nullable
|
||||
public abstract T getContent();
|
||||
|
||||
public abstract void setContent(final T content);
|
||||
|
||||
public boolean isEmpty() {
|
||||
return this.getContent() == null;
|
||||
}
|
||||
|
||||
public boolean isReadOnly() {
|
||||
return this.readOnly;
|
||||
}
|
||||
@@ -94,14 +88,6 @@ public abstract class BaseSlot<T> implements INbtWritable, INbtReadable, IValida
|
||||
return this.access.getInsertionSides();
|
||||
}
|
||||
|
||||
public void setInputSides(final EnumSet<EnumFacing> sides) {
|
||||
for (final EnumFacing side : EnumSet.complementOf(sides)) {
|
||||
//if (side != ForgeDirection.UNKNOWN) {
|
||||
this.access.setInsert(side, false);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
public Collection<EnumFacing> getOutputSides() {
|
||||
return this.access.getExtractionSides();
|
||||
}
|
||||
|
||||
@@ -95,17 +95,6 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
protected void transferItem(final int indexFrom, final int indexTo) {
|
||||
if (this.inventory.containsKey(indexFrom) && this.inventory.containsKey(indexTo)) {
|
||||
final InventorySlot slotFrom = this.inventory.get(indexFrom);
|
||||
final ItemStack oldStack = slotFrom.getItemStack();
|
||||
final ItemStack newStack = oldStack.isEmpty() ? ItemStack.EMPTY : oldStack.copy();
|
||||
slotFrom.setContent(ItemStack.EMPTY);
|
||||
this.inventory.get(indexTo).setContent(newStack);
|
||||
}
|
||||
this.markDirty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return this.inventory.isEmpty();
|
||||
@@ -169,14 +158,12 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final InventorySlot addSlot(final int index, final String unlocName) {
|
||||
InventorySlot slot = new InventorySlot(index, unlocName);
|
||||
this.inventory.put(index, slot);
|
||||
return slot;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final InventorySlot[] addSlotArray(final int[] indexes, final String unlocName) {
|
||||
for (final int k : indexes) {
|
||||
this.addSlot(k, unlocName);
|
||||
@@ -193,12 +180,6 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventorySlot[] getAllSlots() {
|
||||
return this.inventory.values().toArray(new InventorySlot[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InventorySlot[] getSlots(final int[] indexes) {
|
||||
final List<InventorySlot> list = new ArrayList<>();
|
||||
for (final int i : indexes) {
|
||||
@@ -209,8 +190,7 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
return list.toArray(new InventorySlot[0]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isReadOnly(final int slot) {
|
||||
private boolean isReadOnly(final int slot) {
|
||||
final InventorySlot iSlot = this.getSlot(slot);
|
||||
return iSlot == null || iSlot.isReadOnly();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IInventoryMachine extends IInventory, ISidedInventory, IValidatedInventory {
|
||||
public interface IInventoryMachine extends IInventory, ISidedInventory {
|
||||
IInventory getInventory();
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,14 +3,6 @@ package binnie.core.machines.inventory;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public interface IInventorySlots {
|
||||
InventorySlot addSlot(final int p0, final String p1);
|
||||
|
||||
InventorySlot[] addSlotArray(final int[] p0, final String p1);
|
||||
|
||||
@Nullable
|
||||
InventorySlot getSlot(final int index);
|
||||
|
||||
InventorySlot[] getSlots(final int[] p0);
|
||||
|
||||
InventorySlot[] getAllSlots();
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package binnie.core.machines.inventory;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
interface IValidatedInventory extends IInventory {
|
||||
boolean isReadOnly(final int p0);
|
||||
}
|
||||
@@ -23,7 +23,6 @@ public class InventorySlot extends BaseSlot<ItemStack> {
|
||||
return this.itemStack.isEmpty() ? null : this.itemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContent(final ItemStack itemStack) {
|
||||
this.itemStack = itemStack;
|
||||
}
|
||||
@@ -32,15 +31,6 @@ public class InventorySlot extends BaseSlot<ItemStack> {
|
||||
return this.itemStack;
|
||||
}
|
||||
|
||||
public void setItemStack(final ItemStack duplicate) {
|
||||
this.setContent(duplicate);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
return this.itemStack.isEmpty();
|
||||
}
|
||||
|
||||
public ItemStack decrStackSize(final int amount) {
|
||||
if (this.itemStack.isEmpty()) {
|
||||
return ItemStack.EMPTY;
|
||||
@@ -82,10 +72,6 @@ public class InventorySlot extends BaseSlot<ItemStack> {
|
||||
return (SlotValidator) this.validator;
|
||||
}
|
||||
|
||||
public Type getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
public void setType(final Type type) {
|
||||
this.type = type;
|
||||
if (type == Type.Recipe) {
|
||||
|
||||
@@ -9,9 +9,6 @@ import net.minecraftforge.fluids.IFluidTank;
|
||||
import binnie.core.util.I18N;
|
||||
|
||||
public class TankSlot extends BaseSlot<FluidStack> {
|
||||
public static final String NameJuice = "Juice Tank";
|
||||
public static final String NameWater = "Water Tank";
|
||||
public static String NameCupboard = "Cupboard Slot";
|
||||
private FluidTank tank;
|
||||
|
||||
public TankSlot(final int index, final String name, final int capacity) {
|
||||
@@ -38,7 +35,6 @@ public class TankSlot extends BaseSlot<FluidStack> {
|
||||
return this.tank.getFluid();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContent(final FluidStack itemStack) {
|
||||
this.tank.setFluid(itemStack);
|
||||
}
|
||||
|
||||
@@ -41,10 +41,6 @@ public class TankInfo implements INbtReadable, INbtWritable {
|
||||
return this.capacity;
|
||||
}
|
||||
|
||||
/*public IIcon getIcon() {
|
||||
return this.liquid.getFluid().getStillIcon();
|
||||
}*/
|
||||
|
||||
public boolean isEmpty() {
|
||||
return this.liquid == null;
|
||||
}
|
||||
|
||||
@@ -16,10 +16,6 @@ class ComponentCompartmentInventory extends ComponentInventorySlots implements I
|
||||
private int slotsPerPage;
|
||||
private Map<Integer, CompartmentTab> tabs;
|
||||
|
||||
public ComponentCompartmentInventory(final IMachine machine, final int sections) {
|
||||
this(machine, sections, 4);
|
||||
}
|
||||
|
||||
public ComponentCompartmentInventory(final IMachine machine, final int tabs, final int pageSize) {
|
||||
super(machine);
|
||||
this.tabs = new HashMap<>();
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
package binnie.core.machines.storage;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
class ModelCompartment extends ModelBase {
|
||||
private ModelRenderer Column1;
|
||||
private ModelRenderer Column4;
|
||||
private ModelRenderer Column2;
|
||||
private ModelRenderer Column3;
|
||||
private ModelRenderer Lid_1;
|
||||
private ModelRenderer Body_1;
|
||||
private ModelRenderer Lock_1;
|
||||
private ModelRenderer Lid_2;
|
||||
private ModelRenderer Body_2;
|
||||
private ModelRenderer Lock_2;
|
||||
private ModelRenderer Body;
|
||||
private ModelRenderer Lid_3;
|
||||
private ModelRenderer Body_3;
|
||||
private ModelRenderer Lock_3;
|
||||
private ModelRenderer Lid_4;
|
||||
private ModelRenderer Body_4;
|
||||
private ModelRenderer Lock_4;
|
||||
|
||||
public ModelCompartment() {
|
||||
this.textureWidth = 128;
|
||||
this.textureHeight = 128;
|
||||
(this.Column1 = new ModelRenderer(this, 0, 0)).addBox(-8.0f, 8.0f, -8.0f, 4, 16, 4);
|
||||
this.Column1.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Column1.setTextureSize(128, 128);
|
||||
this.Column1.mirror = true;
|
||||
this.setRotation(this.Column1, 0.0f, 0.0f, 0.0f);
|
||||
(this.Column4 = new ModelRenderer(this, 0, 0)).addBox(4.0f, 8.0f, -8.0f, 4, 16, 4);
|
||||
this.Column4.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Column4.setTextureSize(128, 128);
|
||||
this.Column4.mirror = true;
|
||||
this.setRotation(this.Column4, 0.0f, 0.0f, 0.0f);
|
||||
(this.Column2 = new ModelRenderer(this, 0, 0)).addBox(-8.0f, 8.0f, 4.0f, 4, 16, 4);
|
||||
this.Column2.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Column2.setTextureSize(128, 128);
|
||||
this.Column2.mirror = true;
|
||||
this.setRotation(this.Column2, 0.0f, 0.0f, 0.0f);
|
||||
(this.Column3 = new ModelRenderer(this, 0, 0)).addBox(4.0f, 8.0f, 4.0f, 4, 16, 4);
|
||||
this.Column3.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Column3.setTextureSize(128, 128);
|
||||
this.Column3.mirror = true;
|
||||
this.setRotation(this.Column3, 0.0f, 0.0f, 0.0f);
|
||||
(this.Lid_1 = new ModelRenderer(this, 48, 0)).addBox(-4.0f, 9.0f, -7.0f, 8, 5, 3);
|
||||
this.Lid_1.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Lid_1.setTextureSize(128, 128);
|
||||
this.Lid_1.mirror = true;
|
||||
this.setRotation(this.Lid_1, 0.0f, 0.0f, 0.0f);
|
||||
(this.Body_1 = new ModelRenderer(this, 0, 24)).addBox(-4.0f, 14.0f, -7.0f, 8, 10, 3);
|
||||
this.Body_1.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Body_1.setTextureSize(128, 128);
|
||||
this.Body_1.mirror = true;
|
||||
this.setRotation(this.Body_1, 0.0f, 0.0f, 0.0f);
|
||||
(this.Lock_1 = new ModelRenderer(this, 22, 24)).addBox(-1.0f, 12.0f, -8.0f, 2, 4, 1);
|
||||
this.Lock_1.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Lock_1.setTextureSize(128, 128);
|
||||
this.Lock_1.mirror = true;
|
||||
this.setRotation(this.Lock_1, 0.0f, 0.0f, 0.0f);
|
||||
(this.Lid_2 = new ModelRenderer(this, 48, 0)).addBox(-4.0f, 9.0f, -7.0f, 8, 5, 3);
|
||||
this.Lid_2.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Lid_2.setTextureSize(128, 128);
|
||||
this.Lid_2.mirror = true;
|
||||
this.setRotation(this.Lid_2, 0.0f, 1.570796f, 0.0f);
|
||||
(this.Body_2 = new ModelRenderer(this, 0, 24)).addBox(-4.0f, 14.0f, -7.0f, 8, 10, 3);
|
||||
this.Body_2.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Body_2.setTextureSize(128, 128);
|
||||
this.Body_2.mirror = true;
|
||||
this.setRotation(this.Body_2, 0.0f, 1.570796f, 0.0f);
|
||||
(this.Lock_2 = new ModelRenderer(this, 22, 24)).addBox(-1.0f, 12.0f, -8.0f, 2, 4, 1);
|
||||
this.Lock_2.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Lock_2.setTextureSize(128, 128);
|
||||
this.Lock_2.mirror = true;
|
||||
this.setRotation(this.Lock_2, 0.0f, 1.570796f, 0.0f);
|
||||
(this.Body = new ModelRenderer(this, 16, 0)).addBox(-4.0f, 8.0f, -4.0f, 8, 16, 8);
|
||||
this.Body.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Body.setTextureSize(128, 128);
|
||||
this.Body.mirror = true;
|
||||
this.setRotation(this.Body, 0.0f, 0.0f, 0.0f);
|
||||
(this.Lid_3 = new ModelRenderer(this, 48, 0)).addBox(-4.0f, 9.0f, -7.0f, 8, 5, 3);
|
||||
this.Lid_3.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Lid_3.setTextureSize(128, 128);
|
||||
this.Lid_3.mirror = true;
|
||||
this.setRotation(this.Lid_3, 0.0f, 3.141593f, 0.0f);
|
||||
(this.Body_3 = new ModelRenderer(this, 0, 24)).addBox(-4.0f, 14.0f, -7.0f, 8, 10, 3);
|
||||
this.Body_3.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Body_3.setTextureSize(128, 128);
|
||||
this.Body_3.mirror = true;
|
||||
this.setRotation(this.Body_3, 0.0f, 3.141593f, 0.0f);
|
||||
(this.Lock_3 = new ModelRenderer(this, 22, 24)).addBox(-1.0f, 12.0f, -8.0f, 2, 4, 1);
|
||||
this.Lock_3.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Lock_3.setTextureSize(128, 128);
|
||||
this.Lock_3.mirror = true;
|
||||
this.setRotation(this.Lock_3, 0.0f, 3.141593f, 0.0f);
|
||||
(this.Lid_4 = new ModelRenderer(this, 48, 0)).addBox(-4.0f, 9.0f, -7.0f, 8, 5, 3);
|
||||
this.Lid_4.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Lid_4.setTextureSize(128, 128);
|
||||
this.Lid_4.mirror = true;
|
||||
this.setRotation(this.Lid_4, 0.0f, -1.570796f, 0.0f);
|
||||
(this.Body_4 = new ModelRenderer(this, 0, 24)).addBox(-4.0f, 14.0f, -7.0f, 8, 10, 3);
|
||||
this.Body_4.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Body_4.setTextureSize(128, 128);
|
||||
this.Body_4.mirror = true;
|
||||
this.setRotation(this.Body_4, 0.0f, -1.570796f, 0.0f);
|
||||
(this.Lock_4 = new ModelRenderer(this, 22, 24)).addBox(-1.0f, 12.0f, -8.0f, 2, 4, 1);
|
||||
this.Lock_4.setRotationPoint(0.0f, 0.0f, 0.0f);
|
||||
this.Lock_4.setTextureSize(128, 128);
|
||||
this.Lock_4.mirror = true;
|
||||
this.setRotation(this.Lock_4, 0.0f, -1.570796f, 0.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(final Entity entity, final float f, final float f1, final float f2, final float f3, final float f4, final float f5) {
|
||||
/*super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
this.setRotationAngles(f, f1, f2, f3, f4, f5);
|
||||
this.Column1.render(f5);
|
||||
this.Column4.render(f5);
|
||||
this.Column2.render(f5);
|
||||
this.Column3.render(f5);
|
||||
this.Lid_1.render(f5);
|
||||
this.Body_1.render(f5);
|
||||
this.Lock_1.render(f5);
|
||||
this.Lid_2.render(f5);
|
||||
this.Body_2.render(f5);
|
||||
this.Lock_2.render(f5);
|
||||
this.Body.render(f5);
|
||||
this.Lid_3.render(f5);
|
||||
this.Body_3.render(f5);
|
||||
this.Lock_3.render(f5);
|
||||
this.Lid_4.render(f5);
|
||||
this.Body_4.render(f5);
|
||||
this.Lock_4.render(f5);*/
|
||||
}
|
||||
|
||||
private void setRotation(final ModelRenderer model, final float x, final float y, final float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
public void setRotationAngles(final float f, final float f1, final float f2, final float f3, final float f4, final float f5) {
|
||||
super.setRotationAngles(f, f1, f2, f3, f4, f5, null);
|
||||
}
|
||||
}
|
||||
@@ -76,10 +76,6 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
this.currentTab = 0;
|
||||
}
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowCompartment(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
package binnie.core.machines.storage;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.gui.minecraft.Window;
|
||||
import binnie.genetics.machine.craftgui.WindowMachine;
|
||||
|
||||
public class WindowTest extends WindowMachine {
|
||||
public WindowTest(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(320, 240, player, inventory, side);
|
||||
}
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
return new WindowCompartment(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTitle() {
|
||||
return "Test";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AbstractMod getMod() {
|
||||
return BinnieCore.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getBackgroundTextureName() {
|
||||
return "Test";
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package binnie.core.mod.config;
|
||||
|
||||
class BinnieItemData {
|
||||
private int item;
|
||||
private BinnieConfiguration configFile;
|
||||
private String configKey;
|
||||
|
||||
public BinnieItemData(final int item, final BinnieConfiguration configFile, final String configKey) {
|
||||
this.item = item;
|
||||
this.configFile = configFile;
|
||||
this.configKey = configKey;
|
||||
}
|
||||
}
|
||||
@@ -45,14 +45,12 @@ import forestry.api.core.IStateMapperRegister;
|
||||
import forestry.core.blocks.IColoredBlock;
|
||||
import forestry.core.items.IColoredItem;
|
||||
import forestry.core.models.BlockModelEntry;
|
||||
import forestry.core.models.ModelEntry;
|
||||
import forestry.core.utils.ModelUtil;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelManager implements IModelManager {
|
||||
|
||||
private final static List<BlockModelEntry> customBlockModels = new ArrayList<>();
|
||||
private final static List<ModelEntry> customModels = new ArrayList<>();
|
||||
private final static List<ISpriteRegister> spriteRegister = new ArrayList<>();
|
||||
public static IModelState defaultFenceState;
|
||||
private final String modID;
|
||||
@@ -87,9 +85,6 @@ public class ModelManager implements IModelManager {
|
||||
}
|
||||
}
|
||||
|
||||
for (final ModelEntry entry : customModels) {
|
||||
registry.putObject(entry.modelLocation, entry.model);
|
||||
}
|
||||
IModelState defaultBlockState = ModelUtil.loadModelState(new ResourceLocation("minecraft:models/block/block"));
|
||||
IModelState defaultFenceState = ModelUtil.loadModelState(new ResourceLocation("minecraft:models/block/fence_inventory"));
|
||||
ModelManager.defaultFenceState = mergeStates(defaultBlockState, defaultFenceState);
|
||||
@@ -107,10 +102,6 @@ public class ModelManager implements IModelManager {
|
||||
customBlockModels.add(index);
|
||||
}
|
||||
|
||||
public static void registerCustomModel(ModelEntry index) {
|
||||
customModels.add(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerItemModel(Item item, int meta, String identifier) {
|
||||
ModelLoader.setCustomModelResourceLocation(item, meta, getModelLocation(identifier));
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
package binnie.core.multiblock;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockMultiblockMachine extends BlockContainer {
|
||||
public BlockMultiblockMachine(final String blockName) {
|
||||
super(Material.IRON);
|
||||
this.setHardness(1.5f);
|
||||
this.setRegistryName(blockName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
return new TileEntityMultiblockMachine();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(final World var1, final int i) {
|
||||
return new TileEntityMultiblockMachine();
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package binnie.core.multiblock;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
|
||||
class TileEntityMultiblockMachine extends TileEntity {
|
||||
private boolean inStructure;
|
||||
private int tileX;
|
||||
private int tileY;
|
||||
private int tileZ;
|
||||
|
||||
boolean inStructure() {
|
||||
return this.inStructure;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public Machine getMachine() {
|
||||
return this.getMasterMachine();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private Machine getMasterMachine() {
|
||||
if (!this.inStructure) {
|
||||
return null;
|
||||
}
|
||||
final TileEntity tile = this.world.getTileEntity(this.getPos().add(this.tileX, this.tileY, this.tileZ));
|
||||
if (tile instanceof TileEntityMachine) {
|
||||
return ((TileEntityMachine) tile).getMachine();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
@FieldsAreNonnullByDefault
|
||||
package binnie.core.multiblock;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import binnie.core.util.FieldsAreNonnullByDefault;
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
@@ -34,6 +34,7 @@ public enum BinnieCorePacketID implements IPacketID {
|
||||
((INetworkedEntity) tile).readFromPacket(packet.payload);
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.TILE_METADATA) {
|
||||
// TODO: why doesn't this store any metadata to the packet ?
|
||||
final MessageMetadata packet2 = new MessageMetadata(message);
|
||||
final TileEntity tile = packet2.getTileEntity(BinnieCore.getBinnieProxy().getWorld());
|
||||
if (tile instanceof TileEntityMetadata) {
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package binnie.core.network;
|
||||
|
||||
public interface IPacketProvider {
|
||||
String getChannel();
|
||||
|
||||
IPacketID[] getPacketIDs();
|
||||
}
|
||||
Loaded 100 of 164 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user