mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-27 15:33:12 +00:00
Merge remote-tracking branch 'origin/master-MC1.11.2' into master-MC1.11.2
This commit is contained in:
commit
c9d3001b47
253 files changed
+3604
-3139
No files matched your search
@@ -49,7 +49,11 @@ import binnie.extratrees.kitchen.ModuleKitchen;
|
||||
import binnie.extratrees.machines.ModuleMachine;
|
||||
import binnie.extratrees.proxy.Proxy;
|
||||
|
||||
@Mod(modid = Constants.EXTRA_TREES_MOD_ID, name = "Binnie's Extra Trees", useMetadata = true, dependencies = "required-after:" + Constants.CORE_MOD_ID)
|
||||
@Mod(
|
||||
modid = Constants.EXTRA_TREES_MOD_ID,
|
||||
name = "Binnie's Extra Trees",
|
||||
dependencies = "required-after:" + Constants.CORE_MOD_ID
|
||||
)
|
||||
public class ExtraTrees extends AbstractMod {
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
|
||||
@@ -396,7 +396,7 @@ public class PlankType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColour() {
|
||||
public int getColor() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ public class BlockStainedDesign extends BlockDesign {
|
||||
player.addExhaustion(0.005F);
|
||||
|
||||
if (EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, stack) > 0 && te instanceof TileEntityMetadata) {
|
||||
java.util.List<ItemStack> items = new java.util.ArrayList<ItemStack>();
|
||||
java.util.List<ItemStack> items = new java.util.ArrayList<>();
|
||||
TileEntityMetadata tile = (TileEntityMetadata) te;
|
||||
int damage = getDroppedMeta(state, tile.getTileMetadata());
|
||||
ItemStack itemstack = TileEntityMetadata.getItemStack(this, damage);
|
||||
|
||||
@@ -102,6 +102,6 @@ public class ModuleCarpentry implements IInitializable {
|
||||
enum Axis {
|
||||
Y,
|
||||
X,
|
||||
Z;
|
||||
Z
|
||||
}
|
||||
}
|
||||
@@ -79,6 +79,8 @@ import binnie.extratrees.gen.WorldGenTree3;
|
||||
import binnie.extratrees.gen.WorldGenTropical;
|
||||
import binnie.extratrees.gen.WorldGenWalnut;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, ITreeGenerator {
|
||||
OrchardApple("malus", "domestica", EnumLeafType.DECIDUOUS, new Color(0x09E67E), new Color(0xFF9CF3), EnumSaplingType.Default, EnumETLog.Apple, new Color(0x7B7A7B)) {
|
||||
@Override
|
||||
@@ -284,7 +286,6 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.MATURATION, ForestryAllele.Maturation.Fast.getAllele());
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -330,7 +331,6 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
template.set(EnumTreeChromosome.FRUITS, AlleleETFruit.SourCherry);
|
||||
template.set(EnumTreeChromosome.YIELD, ForestryAllele.Yield.Lower.getAllele());
|
||||
template.set(EnumTreeChromosome.SAPPINESS, ForestryAllele.Sappiness.Low.getAllele());
|
||||
;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -2187,7 +2187,7 @@ public enum ETTreeDefinition implements IStringSerializable, ITreeDefinition, IT
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean setLeaves(ITreeGenome genome, World world, GameProfile owner, BlockPos pos) {
|
||||
public boolean setLeaves(ITreeGenome genome, World world, @Nullable GameProfile owner, BlockPos pos) {
|
||||
boolean placed = world.setBlockState(pos, PluginArboriculture.getBlocks().leaves.getDefaultState());
|
||||
if (!placed) {
|
||||
return false;
|
||||
|
||||
-3
@@ -17,7 +17,6 @@ import mezz.jei.api.recipe.IRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeRegistryPlugin;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import mezz.jei.api.recipe.VanillaRecipeCategoryUid;
|
||||
import mezz.jei.gui.Focus;
|
||||
|
||||
public class MultiFenceRecipeRegistryPlugin implements IRecipeRegistryPlugin {
|
||||
|
||||
@@ -25,7 +24,6 @@ public class MultiFenceRecipeRegistryPlugin implements IRecipeRegistryPlugin {
|
||||
|
||||
@Override
|
||||
public <V> List<String> getRecipeCategoryUids(IFocus<V> focus) {
|
||||
focus = Focus.check(focus);
|
||||
V ingredient = focus.getValue();
|
||||
|
||||
if (!(ingredient instanceof ItemStack)) {
|
||||
@@ -54,7 +52,6 @@ public class MultiFenceRecipeRegistryPlugin implements IRecipeRegistryPlugin {
|
||||
|
||||
@Override
|
||||
public <T extends IRecipeWrapper, V> List<T> getRecipeWrappers(IRecipeCategory<T> recipeCategory, IFocus<V> focus) {
|
||||
focus = Focus.check(focus);
|
||||
V ingredient = focus.getValue();
|
||||
if (!recipeCategory.getUid().equals(VanillaRecipeCategoryUid.CRAFTING) || !(ingredient instanceof ItemStack)) {
|
||||
return Collections.emptyList();
|
||||
|
||||
-1
@@ -54,7 +54,6 @@ public class MultiFenceRecipeSolidWrapper extends BlankRecipeWrapper implements
|
||||
for (IPlankType plankTypeSecondary : WoodManager.getAllPlankTypes()) {
|
||||
for (IPlankType plankType : WoodManager.getAllPlankTypes()) {
|
||||
if (plankType != plankTypeSecondary) {
|
||||
;
|
||||
fences.add(WoodManager.getFence(plankType, plankTypeSecondary, new FenceType(fenceType.size, false, fenceType.embossed), 1));
|
||||
outputFences.add(WoodManager.getFence(plankType, plankTypeSecondary, new FenceType(fenceType.size, true, fenceType.embossed), 2));
|
||||
}
|
||||
|
||||
@@ -47,6 +47,6 @@ public class ItemSetSquare extends Item implements IToolHammer, IItemModelRegist
|
||||
public enum EnumSetSquareMode {
|
||||
Rotate,
|
||||
Edit,
|
||||
Swap;
|
||||
Swap
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,6 @@ import binnie.core.resource.BinnieResource;
|
||||
public class MachineRendererKitchen {
|
||||
public static MachineRendererKitchen instance = new MachineRendererKitchen();
|
||||
static int level = 0;
|
||||
;
|
||||
BinnieResource texture;
|
||||
|
||||
public void renderMachine(final Machine machine, final BinnieResource texture, final double x, final double y, final double z, final float var8) {
|
||||
|
||||
@@ -12,7 +12,6 @@ import binnie.extratrees.ExtraTrees;
|
||||
|
||||
public class MachineRendererNursery {
|
||||
public static MachineRendererNursery instance = new MachineRendererNursery();
|
||||
;
|
||||
BinnieResource texture;
|
||||
//private IModelCustom casinoMachine;
|
||||
private ModelNursery model;
|
||||
|
||||
@@ -34,7 +34,7 @@ public class PageFruit extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(final ItemStack species) {
|
||||
this.deleteAllChildren();
|
||||
final WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), I18N.localise("extratrees.gui.database.tab.fruit." + (this.treesThatBearFruit ? "natural" : "potential")), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), I18N.localise("extratrees.gui.database.tab.fruit." + (this.treesThatBearFruit ? "natural" : "potential")), TextJustification.MIDDLE_CENTER);
|
||||
final Collection<IAlleleSpecies> trees = this.treesThatBearFruit ? ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatBearFruit(species, database.isNEI(), database.getWorld(), database.getUsername()) : ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatCanBearFruit(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4, 24, this.size().x() - 8, this.size().y() - 4 - 24).setOptions(trees);
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ public class PagePlanksOverview extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(final ItemStack species) {
|
||||
this.deleteAllChildren();
|
||||
final WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), species.getDisplayName(), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new Area(12, 24, this.size().x() - 24, 24), I18N.localise("extratrees.gui.database.planks.use"), TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
|
||||
new ControlText(this, new Area(12, 24, this.size().x() - 24, 24), I18N.localise("extratrees.gui.database.planks.use"), TextJustification.MIDDLE_LEFT);
|
||||
final IPlankType type = WoodManager.getPlankType(species);
|
||||
int x = 12;
|
||||
if (type != null) {
|
||||
@@ -52,8 +52,8 @@ public class PagePlanksOverview extends PageAbstract<ItemStack> {
|
||||
x += 22;
|
||||
}
|
||||
}
|
||||
final ControlText controlDescription = new ControlText(this, new Area(8, 84, this.getSize().x() - 16, 0), "", TextJustification.MiddleCenter);
|
||||
final ControlText controlSignature = new ControlText(this, new Area(8, 84, this.getSize().x() - 16, 0), "", TextJustification.BottomRight);
|
||||
final ControlText controlDescription = new ControlText(this, new Area(8, 84, this.getSize().x() - 16, 0), "", TextJustification.MIDDLE_CENTER);
|
||||
final ControlText controlSignature = new ControlText(this, new Area(8, 84, this.getSize().x() - 16, 0), "", TextJustification.BOTTOM_RIGHT);
|
||||
String desc = "";
|
||||
if (type != null) {
|
||||
desc = type.getDescription();
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PagePlanksTrees extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(final ItemStack species) {
|
||||
this.deleteAllChildren();
|
||||
final WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), species.getDisplayName(), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), species.getDisplayName(), TextJustification.MIDDLE_CENTER);
|
||||
final Collection<IAlleleSpecies> trees = ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatMakePlanks(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4, 24, this.size().x() - 8, this.size().y() - 4 - 24).setOptions(trees);
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
final IAlleleTreeSpecies treeSpecies = genome.getPrimary();
|
||||
final int w = 144;
|
||||
final int h = 176;
|
||||
new ControlText(this, new Area(0, 4, w, 16), this.getValue().toString(), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new Area(0, 4, w, 16), this.getValue().toString(), TextJustification.MIDDLE_CENTER);
|
||||
final ControlScrollableContent scrollable = new ControlScrollableContent(this, 4, 20, w - 8, h - 8 - 16, 12);
|
||||
final Control contents = new Control(scrollable, 0, 0, w - 8 - 12, h - 8 - 16);
|
||||
final int tw = w - 8 - 12;
|
||||
@@ -72,10 +72,10 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
final int th = 14;
|
||||
final int th2 = 18;
|
||||
final BreedingSystem syst = Binnie.GENETICS.treeBreedingSystem;
|
||||
new ControlText(contents, new Area(w2, y, w3, th), treeSpecies.getPlantType().toString(), TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), treeSpecies.getPlantType().toString(), TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new Area(0, y, w2, th), I18N.localise("binniecore.gui.temperature.short") + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), treeSpecies.getTemperature().getName(), TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(contents, new Area(0, y, w2, th), I18N.localise("binniecore.gui.temperature.short") + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), treeSpecies.getTemperature().getName(), TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
TextureMap map = Minecraft.getMinecraft().getTextureMapBlocks();
|
||||
ILeafSpriteProvider spriteProvider = treeSpecies.getLeafSpriteProvider();
|
||||
@@ -91,32 +91,32 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
if (leaf != null) {
|
||||
new ControlText(contents, new Area(0, y, w2, th2), I18N.localise("extratrees.gui.database.leaves") + " : ", TextJustification.MiddleRight);
|
||||
new ControlBlockIconDisplay(contents, w2, y, leaf).setColour(leafColour);
|
||||
new ControlText(contents, new Area(0, y, w2, th2), I18N.localise("extratrees.gui.database.leaves") + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlBlockIconDisplay(contents, w2, y, leaf).setColor(leafColour);
|
||||
if (fruit != null && !treeSpecies.getUID().equals("forestry.treeOak")) {
|
||||
new ControlBlockIconDisplay(contents, w2, y, fruit).setColour(fruitColour);
|
||||
new ControlBlockIconDisplay(contents, w2, y, fruit).setColor(fruitColour);
|
||||
}
|
||||
y += th2;
|
||||
}
|
||||
Map<ItemStack, Float> products = fruitProvider.getProducts();
|
||||
ItemStack log = treeSpecies.getWoodProvider().getWoodStack();
|
||||
if (log.isEmpty()) {
|
||||
new ControlText(contents, new Area(0, y, w2, th2), I18N.localise("extratrees.gui.database.log") + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(0, y, w2, th2), I18N.localise("extratrees.gui.database.log") + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
final ControlItemDisplay display = new ControlItemDisplay(contents, w2, y);
|
||||
display.setItemStack(log);
|
||||
display.setTooltip();
|
||||
y += th2;
|
||||
}
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.HEIGHT) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getHeight() + "x", TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.HEIGHT) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getHeight() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.FERTILITY) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getFertility() + "x", TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.FERTILITY) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getFertility() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
List<ItemStack> fruits = new ArrayList<>();
|
||||
fruits.addAll(products.keySet());
|
||||
if (!fruits.isEmpty()) {
|
||||
new ControlText(contents, new Area(0, y, w2, th2), syst.getChromosomeShortName(EnumTreeChromosome.FRUITS) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(0, y, w2, th2), syst.getChromosomeShortName(EnumTreeChromosome.FRUITS) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
for (ItemStack fruitw : fruits) {
|
||||
final ControlItemDisplay display2 = new ControlItemDisplay(contents, w2, y);
|
||||
display2.setItemStack(fruitw);
|
||||
@@ -124,17 +124,17 @@ public class PageSpeciesTreeGenome extends PageSpecies {
|
||||
y += th2;
|
||||
}
|
||||
}
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.YIELD) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getYield() + "x", TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.YIELD) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getYield() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.SAPPINESS) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getSappiness() + "x", TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.SAPPINESS) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getSappiness() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.MATURATION) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getMaturationTime() + "x", TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.MATURATION) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getMaturationTime() + "x", TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.GIRTH) + " : ", TextJustification.MiddleRight);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getGirth() + "x" + genome.getGirth(), TextJustification.MIDDLE_LEFTt);
|
||||
new ControlText(contents, new Area(0, y, w2, th), syst.getChromosomeShortName(EnumTreeChromosome.GIRTH) + " : ", TextJustification.MIDDLE_RIGHT);
|
||||
new ControlText(contents, new Area(w2, y, w3, th), genome.getGirth() + "x" + genome.getGirth(), TextJustification.MIDDLE_LEFT);
|
||||
y += th;
|
||||
contents.setSize(new Point(contents.size().x(), y));
|
||||
scrollable.setScrollableContent(contents);
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PageWood extends PageAbstract<ItemStack> {
|
||||
public void onValueChanged(final ItemStack species) {
|
||||
this.deleteAllChildren();
|
||||
final WindowAbstractDatabase database = Window.get(this);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), this.getValue().toString(), TextJustification.MiddleCenter);
|
||||
new ControlText(this, new Area(0, 0, this.size().x(), 24), this.getValue().toString(), TextJustification.MIDDLE_CENTER);
|
||||
final Collection<IAlleleSpecies> trees = ((TreeBreedingSystem) database.getBreedingSystem()).getTreesThatHaveWood(species, database.isNEI(), database.getWorld(), database.getUsername());
|
||||
new ControlSpeciesBox(this, 4, 24, this.size().x() - 8, this.size().y() - 4 - 24).setOptions(trees);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class WindowWoodworker extends Window {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void initialiseClient() {
|
||||
this.setTitle(Machine.getMachine(this.getInventory()).getPackage().getDisplayName());
|
||||
new ControlText(this, new Area(190, 36, 114, 10), I18N.localise("binniecore.gui.design"), TextJustification.TOP_CENTER).setColour(4473924);
|
||||
new ControlText(this, new Area(190, 36, 114, 10), I18N.localise("binniecore.gui.design"), TextJustification.TOP_CENTER).setColor(4473924);
|
||||
new Panel(this, 188, 48, 118, 126, MinecraftGUI.PanelType.Gray);
|
||||
this.textEdit = new ControlTextEdit(this, 188, 178, 118, 12);
|
||||
final ControlScrollableContent scroll = new ControlScrollableContent(this, 190, 50, 114, 122, 12);
|
||||
|
||||
Reference in new issue
Block a user