mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-15 01:35:08 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f6e2eec09c | ||
|
|
031b077a4b | ||
|
|
49f4c84b5d | ||
|
|
09b4d5a207 | ||
|
|
68f226e07e | ||
|
|
da6ea7048a | ||
|
|
d721a7e98f | ||
|
|
ce050eaa63 | ||
|
|
0133d143f8 | ||
|
|
7cc917ae76 | ||
|
|
6f1d00e4f5 | ||
|
|
2aa0b9bb8c | ||
|
|
d5d8885850 | ||
|
|
cb6cb3a01f | ||
|
|
cd5c2b3406 | ||
|
|
b1b06753ad | ||
|
|
5846f59d64 | ||
|
|
ec790c9333 | ||
|
|
784fa0ad30 | ||
|
|
3bd8c53273 | ||
|
|
bc10e65feb | ||
|
|
3eaf99a4d1 | ||
|
|
7910cff956 | ||
|
|
4ef9cd6a28 | ||
|
|
60b881810d | ||
|
|
c854f9b489 | ||
|
|
4e9624daab | ||
|
|
fac2008f14 | ||
|
|
2475710a6a | ||
|
|
e83d0e3fa6 | ||
|
|
052997cb09 | ||
|
|
ef372d4f84 | ||
|
|
f215990d8a | ||
|
|
f5a83016f5 | ||
|
|
eab09635e9 | ||
|
|
767ec08795 | ||
|
|
5928473316 | ||
|
|
b5989356ce | ||
|
|
4d1d3d1cca | ||
|
|
0b9b0c0068 | ||
|
|
dccaf6d7d4 | ||
|
|
73edb413f5 | ||
|
|
303c98e443 | ||
|
|
868ef735b0 | ||
|
|
1d4b5f791d | ||
|
|
46140e2e66 |
No files matched your search
+1
-1
@@ -22,7 +22,7 @@ buildscript {
|
||||
apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"
|
||||
apply plugin: 'forge'
|
||||
|
||||
version = "2.0.16"
|
||||
version = "2.0.18"
|
||||
if (System.getenv("BUILD_NUMBER") != null) {
|
||||
version = version + "-" + System.getenv("BUILD_NUMBER")
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# Git Changelog Gradle plugin
|
||||
{{#tags}}
|
||||
<h3>{{name}}</h3>
|
||||
<ul>
|
||||
|
||||
@@ -31,8 +31,8 @@ public class ControlColorDisplay extends Control implements IControlValue<IFlowe
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
IArea area = getArea();
|
||||
CraftGUI.Render.solid(area, -1);
|
||||
CraftGUI.Render.solid(area.inset(1), 0xff000000 + getValue().getColor(false));
|
||||
CraftGUI.render.solid(area, -1);
|
||||
CraftGUI.render.solid(area.inset(1), 0xff000000 + getValue().getColor(false));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,7 +19,7 @@ public class ControlColorOption extends ControlTextOption<IFlowerColor> {
|
||||
addAttribute(WidgetAttribute.MOUSE_OVER);
|
||||
CraftGUIUtil.moveWidget(textWidget, new IPoint(22.0f, 0.0f));
|
||||
textWidget.setSize(textWidget.getSize().sub(new IPoint(24.0f, 0.0f)));
|
||||
int th = (int) CraftGUI.Render.textHeight(textWidget.getValue(), textWidget.getSize().x());
|
||||
int th = (int) CraftGUI.render.textHeight(textWidget.getValue(), textWidget.getSize().x());
|
||||
int height = Math.max(20, th + 6);
|
||||
setSize(new IPoint(size().x(), height));
|
||||
textWidget.setSize(new IPoint(textWidget.getSize().x(), height));
|
||||
|
||||
@@ -31,9 +31,9 @@ public class ControlColourMixSymbol extends Control implements ITooltip {
|
||||
public void onRenderBackground() {
|
||||
super.onRenderBackground();
|
||||
if (type == 0) {
|
||||
CraftGUI.Render.texture(ControlColourMixSymbol.MutationPlus, IPoint.ZERO);
|
||||
CraftGUI.render.texture(ControlColourMixSymbol.MutationPlus, IPoint.ZERO);
|
||||
} else {
|
||||
CraftGUI.Render.texture(ControlColourMixSymbol.MutationArrow, IPoint.ZERO);
|
||||
CraftGUI.render.texture(ControlColourMixSymbol.MutationArrow, IPoint.ZERO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -13,11 +13,11 @@ import binnie.core.util.I18N;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageColourMix extends PageAbstract<IFlowerColor> {
|
||||
public class PageColorMix extends PageAbstract<IFlowerColor> {
|
||||
ControlText title;
|
||||
ControlColorMixBox list;
|
||||
|
||||
public PageColourMix(IWidget parent, DatabaseTab tab) {
|
||||
public PageColorMix(IWidget parent, DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
title = new ControlTextCentered(this, 8.0f, I18N.localise("botany.gui.controls.pageColorFurtherTitle"));
|
||||
list = new ControlColorMixBox(this, 4, 20, 136, 152, ControlColorMixBox.Type.Further);
|
||||
@@ -47,7 +47,7 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
new PageBranchSpecies(getInfoPages(Mode.Branches), new DatabaseTab(Botany.instance, "branches.species"));
|
||||
createMode(FlowerMode.COLOR, new ColorModeWidget());
|
||||
new PageColorMixResultant(getInfoPages(FlowerMode.COLOR), new DatabaseTab(Botany.instance, "colour.resultant"));
|
||||
new PageColourMix(getInfoPages(FlowerMode.COLOR), new DatabaseTab(Botany.instance, "colour.further"));
|
||||
new PageColorMix(getInfoPages(FlowerMode.COLOR), new DatabaseTab(Botany.instance, "colour.further"));
|
||||
new PageBreeder(getInfoPages(Mode.Breeder), getUsername(), new DatabaseTab(Botany.instance, "breeder"));
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ public class CircuitGarden extends BinnieCircuit {
|
||||
if (info.length() > 0) {
|
||||
info = " (" + info + EnumChatFormatting.RESET + ")";
|
||||
}
|
||||
addTooltipString("Flowers" + info);
|
||||
addTooltipString(I18N.localise("botany.circuit.flowers") + info);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -36,6 +36,7 @@ public class BlockFlower extends BlockContainer {
|
||||
setBlockBounds(0.5f - f, 0.0f, 0.5f - f, 0.5f + f, f * 3.0f, 0.5f + f);
|
||||
setTickRandomly(true);
|
||||
setBlockName("flower");
|
||||
setStepSound(Block.soundTypeGrass);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,6 +22,7 @@ public class ItemInsulatedTube extends Item {
|
||||
icons = new IIcon[3];
|
||||
setUnlocalizedName("insulatedTube");
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
public static ItemStack getInsulateStack(ItemStack stack) {
|
||||
@@ -52,9 +53,9 @@ public class ItemInsulatedTube extends Item {
|
||||
if (pass == 0) {
|
||||
return 0xffffff;
|
||||
}
|
||||
return (pass == 1) ?
|
||||
Material.get(stack.getItemDamage()).getColor() :
|
||||
Insulate.get(stack.getItemDamage()).getColor();
|
||||
return (pass == 1)
|
||||
? Material.get(stack.getItemDamage()).getColor()
|
||||
: Insulate.get(stack.getItemDamage()).getColor();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,7 @@ public class BlockPlant extends BlockBush {
|
||||
setBlockName("plant");
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setTickRandomly(true);
|
||||
setStepSound(Block.soundTypeGrass);
|
||||
}
|
||||
|
||||
public static boolean isWeed(IBlockAccess world, int x, int y, int z) {
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ModuleGardening implements IInitializable {
|
||||
if (fertilised) {
|
||||
insulate += 3;
|
||||
}
|
||||
new CircuitGarden(moist, null, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 0 + 128 * insulate), icon);
|
||||
new CircuitGarden(moist, null, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 128 * insulate), icon);
|
||||
new CircuitGarden(moist, EnumAcidity.ACID, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 1 + 128 * insulate), icon);
|
||||
new CircuitGarden(moist, EnumAcidity.NEUTRAL, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 2 + 128 * insulate), icon);
|
||||
new CircuitGarden(moist, EnumAcidity.ALKALINE, manual, fertilised, new ItemStack(Botany.insulatedTube, 1, 3 + 128 * insulate), icon);
|
||||
@@ -132,6 +132,13 @@ public class ModuleGardening implements IInitializable {
|
||||
}
|
||||
}
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.soil, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.loam, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.flowerbed, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.soilNoWeed, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.loamNoWeed, 1, OreDictionary.WILDCARD_VALUE));
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.dirt), new ItemStack(Botany.flowerbedNoWeed, 1, OreDictionary.WILDCARD_VALUE));
|
||||
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(
|
||||
Botany.trowelWood,
|
||||
new Object[]{
|
||||
@@ -193,6 +200,7 @@ public class ModuleGardening implements IInitializable {
|
||||
new ItemStack(Items.wheat_seeds),
|
||||
new ItemStack(Items.wheat_seeds)
|
||||
);
|
||||
|
||||
GameRegistry.addShapelessRecipe(BotanyItems.AshPowder.get(4), Mods.forestry.stack("ash"));
|
||||
GameRegistry.addShapelessRecipe(BotanyItems.MulchPowder.get(4), Mods.forestry.stack("mulch"));
|
||||
GameRegistry.addShapelessRecipe(BotanyItems.CompostPowder.get(4), Mods.forestry.stack("fertilizerBio"));
|
||||
@@ -202,6 +210,7 @@ public class ModuleGardening implements IInitializable {
|
||||
BotanyItems.SulphurPowder.get(4),
|
||||
new Object[]{"dustSulphur"}
|
||||
));
|
||||
|
||||
GameRegistry.addRecipe(new ShapelessOreRecipe(
|
||||
new ItemStack(Botany.pigment, 2, EnumFlowerColor.BLACK.ordinal()),
|
||||
new Object[]{
|
||||
@@ -210,6 +219,7 @@ public class ModuleGardening implements IInitializable {
|
||||
"dyeBlack"
|
||||
}
|
||||
));
|
||||
|
||||
ModuleGardening.queuedAcidFertilisers.put(BotanyItems.SulphurPowder.get(1), 1);
|
||||
ModuleGardening.queuedAcidFertilisers.put(BotanyItems.MulchPowder.get(1), 1);
|
||||
ModuleGardening.queuedAcidFertilisers.put(new ItemStack(GameRegistry.findItem("Forestry", "mulch")), 2);
|
||||
@@ -245,6 +255,7 @@ public class ModuleGardening implements IInitializable {
|
||||
'c', Items.clay_ball,
|
||||
'g', Blocks.gravel
|
||||
);
|
||||
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
ItemStack clay = new ItemStack(Botany.clay, 1, c.ordinal());
|
||||
ItemStack pigment = new ItemStack(Botany.pigment, 1, c.ordinal());
|
||||
@@ -252,8 +263,14 @@ public class ModuleGardening implements IInitializable {
|
||||
GameRegistry.addSmelting(clay, TileEntityMetadata.getItemStack(Botany.ceramic, c.ordinal()), 0.0f);
|
||||
ItemStack glass = TileEntityMetadata.getItemStack(Botany.stained, c.ordinal());
|
||||
glass.stackSize = 4;
|
||||
GameRegistry.addShapedRecipe(glass, " g ", "gpg", " g ", 'g', Blocks.glass, 'p', pigment);
|
||||
GameRegistry.addShapedRecipe(
|
||||
glass,
|
||||
" g ", "gpg", " g ",
|
||||
'g', Blocks.glass,
|
||||
'p', pigment
|
||||
);
|
||||
}
|
||||
|
||||
GameRegistry.addRecipe(new PigmentRecipe());
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binnie.core;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.items.ItemFieldKit;
|
||||
import binnie.genetics.item.ItemFieldKit;
|
||||
import binnie.core.block.MultipassBlockRenderer;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.craftgui.minecraft.ModuleCraftGUI;
|
||||
|
||||
@@ -36,10 +36,11 @@ public class ItemMetadataRenderer implements IItemRenderer {
|
||||
if (type == IItemRenderer.ItemRenderType.EQUIPPED_FIRST_PERSON) {
|
||||
GL11.glTranslated(0.5, 0.5, 0.5);
|
||||
}
|
||||
|
||||
if (type == IItemRenderer.ItemRenderType.INVENTORY && block.getRenderBlockPass() != 0) {
|
||||
GL11.glAlphaFunc(516, 0.1f);
|
||||
GL11.glEnable(3042);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
}
|
||||
GL11.glPushMatrix();
|
||||
((RenderBlocks) data[0]).renderBlockAsItem(block, TileEntityMetadata.getItemDamage(item), 1.0f);
|
||||
|
||||
@@ -15,11 +15,11 @@ public class MultipassItemRenderer implements IItemRenderer {
|
||||
GL11.glEnable(3008);
|
||||
if (block.getRenderBlockPass() != 0) {
|
||||
GL11.glAlphaFunc(516, 0.1f);
|
||||
GL11.glEnable(3042);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
} else {
|
||||
GL11.glAlphaFunc(516, 0.5f);
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
}
|
||||
|
||||
MultipassBlockRenderer.instance.renderInventoryBlock(block, TileEntityMetadata.getItemDamage(item), 0, renderer);
|
||||
|
||||
@@ -4,6 +4,6 @@ import binnie.core.craftgui.renderer.Renderer;
|
||||
import binnie.core.craftgui.resource.minecraft.CraftGUIResourceManager;
|
||||
|
||||
public class CraftGUI {
|
||||
public static CraftGUIResourceManager ResourceManager;
|
||||
public static Renderer Render;
|
||||
public static CraftGUIResourceManager resourceManager;
|
||||
public static Renderer render;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public interface IWidget {
|
||||
|
||||
void setCroppedZone(IWidget relative, IArea area);
|
||||
|
||||
boolean isCroppedWidet();
|
||||
boolean isCroppedWidget();
|
||||
|
||||
IWidget getCropWidget();
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ public abstract class TopLevelWidget extends Widget implements ITopLevelWidget {
|
||||
private Collection<IWidget> getQueuedWidgets(IWidget widget) {
|
||||
List<IWidget> widgets = new ArrayList<>();
|
||||
boolean addChildren = true;
|
||||
if (widget.isCroppedWidet()) {
|
||||
if (widget.isCroppedWidget()) {
|
||||
addChildren = widget.getCroppedZone().contains(widget.getCropWidget().getRelativeMousePosition());
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,7 @@ public class Widget implements IWidget {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCroppedWidet() {
|
||||
public boolean isCroppedWidget() {
|
||||
return cropped;
|
||||
}
|
||||
|
||||
@@ -280,21 +280,18 @@ public class Widget implements IWidget {
|
||||
return;
|
||||
}
|
||||
|
||||
CraftGUI.Render.preRender(this);
|
||||
CraftGUI.render.preRender(this);
|
||||
onRender(RenderStage.PreChildren);
|
||||
|
||||
for (IWidget widget : getWidgets()) {
|
||||
widget.render();
|
||||
}
|
||||
|
||||
for (IWidget widget : getWidgets()) {
|
||||
CraftGUI.Render.preRender(widget);
|
||||
CraftGUI.render.preRender(widget);
|
||||
widget.onRender(RenderStage.PostSiblings);
|
||||
CraftGUI.Render.postRender(widget);
|
||||
CraftGUI.render.postRender(widget);
|
||||
}
|
||||
|
||||
onRender(RenderStage.PostChildren);
|
||||
CraftGUI.Render.postRender(this);
|
||||
CraftGUI.render.postRender(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -419,11 +416,9 @@ public class Widget implements IWidget {
|
||||
public void onRender(RenderStage stage) {
|
||||
if (stage == RenderStage.PreChildren) {
|
||||
onRenderBackground();
|
||||
}
|
||||
if (stage == RenderStage.PostChildren) {
|
||||
} else if (stage == RenderStage.PostChildren) {
|
||||
onRenderForeground();
|
||||
}
|
||||
if (stage == RenderStage.PostSiblings) {
|
||||
} else if (stage == RenderStage.PostSiblings) {
|
||||
onRenderOverlay();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ public class WindowFieldKit extends Window {
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
setTitle(getName());
|
||||
CraftGUI.Render.stylesheet(new StyleSheetPunnett());
|
||||
CraftGUI.render.stylesheet(new StyleSheetPunnett());
|
||||
getWindowInventory().createSlot(0);
|
||||
getWindowInventory().createSlot(1);
|
||||
setupValidators();
|
||||
|
||||
@@ -54,7 +54,7 @@ public class ControlButton extends Control {
|
||||
} else if (isEnabled()) {
|
||||
texture = CraftGUITexture.Button;
|
||||
}
|
||||
CraftGUI.Render.texture(texture, getArea());
|
||||
CraftGUI.render.texture(texture, getArea());
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class ControlCheckbox extends Control implements IControlValue<Boolean> {
|
||||
if (isMouseOver()) {
|
||||
texture = (getValue() ? CraftGUITexture.CheckboxCheckedHighlighted : CraftGUITexture.CheckboxHighlighted);
|
||||
}
|
||||
CraftGUI.Render.texture(texture, IPoint.ZERO);
|
||||
CraftGUI.render.texture(texture, IPoint.ZERO);
|
||||
}
|
||||
|
||||
protected void onValueChanged(boolean value) {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class ControlText extends Control implements IControlValue<String> {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.text(getArea(), align, text, getColor());
|
||||
CraftGUI.render.text(getArea(), align, text, getColor());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -71,7 +71,7 @@ public class ControlTextEdit extends Control implements IControlValue<String> {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.Slot, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.Slot, getArea());
|
||||
renderTextField();
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ControlOption<T> extends Control implements IControlValue<T> {
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
if (isCurrentSelection()) {
|
||||
CraftGUI.Render.texture(CraftGUITexture.Outline, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.Outline, getArea());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ControlScrollBar extends Control {
|
||||
} else if (isEnabled()) {
|
||||
texture = CraftGUITexture.Scroll;
|
||||
}
|
||||
CraftGUI.Render.texture(texture, renderArea);
|
||||
CraftGUI.render.texture(texture, renderArea);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,7 @@ public class ControlTab<T> extends Control implements ITooltip, IControlValue<T>
|
||||
texture = CraftGUITexture.Tab;
|
||||
}
|
||||
|
||||
Texture lTexture = CraftGUI.Render.getTexture(texture);
|
||||
Texture lTexture = CraftGUI.render.getTexture(texture);
|
||||
Position position = getTabPosition();
|
||||
Texture iTexture = lTexture.crop(position, 8.0f);
|
||||
IArea area = getArea();
|
||||
@@ -56,7 +56,7 @@ public class ControlTab<T> extends Control implements ITooltip, IControlValue<T>
|
||||
}
|
||||
}
|
||||
|
||||
CraftGUI.Render.texture(iTexture, area);
|
||||
CraftGUI.render.texture(iTexture, area);
|
||||
if (this instanceof ControlTabIcon) {
|
||||
ControlTabIcon icon = (ControlTabIcon) this;
|
||||
ControlItemDisplay item = (ControlItemDisplay) getWidgets().get(0);
|
||||
@@ -67,10 +67,10 @@ public class ControlTab<T> extends Control implements ITooltip, IControlValue<T>
|
||||
}
|
||||
|
||||
if (icon.hasOutline()) {
|
||||
iTexture = CraftGUI.Render.getTexture(CraftGUITexture.TabOutline);
|
||||
iTexture = CraftGUI.render.getTexture(CraftGUITexture.TabOutline);
|
||||
iTexture = iTexture.crop(position, 8.0f);
|
||||
CraftGUI.Render.color(icon.getOutlineColor());
|
||||
CraftGUI.Render.texture(iTexture, area.inset(2));
|
||||
CraftGUI.render.color(icon.getOutlineColor());
|
||||
CraftGUI.render.texture(iTexture, area.inset(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ class ControlBreedingProgress extends Control {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.PanelBlack, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.PanelBlack, getArea());
|
||||
IArea area = getArea().inset(1);
|
||||
area.setSize(new IPoint(area.size().x() * percentage, area.size().y()));
|
||||
CraftGUI.Render.color(colour);
|
||||
CraftGUI.Render.texture(ControlBreedingProgress.Progress, area);
|
||||
CraftGUI.render.color(colour);
|
||||
CraftGUI.render.texture(ControlBreedingProgress.Progress, area);
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public class ControlDatabaseIndividualDisplay extends ControlItemDisplay impleme
|
||||
break;
|
||||
}
|
||||
if (icon != null) {
|
||||
CraftGUI.Render.iconItem(IPoint.ZERO, icon);
|
||||
CraftGUI.render.iconItem(IPoint.ZERO, icon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public class ControlItemStackOption extends ControlTextOption<ItemStack> {
|
||||
addAttribute(WidgetAttribute.MOUSE_OVER);
|
||||
CraftGUIUtil.moveWidget(textWidget, new IPoint(22.0f, 0.0f));
|
||||
textWidget.setSize(textWidget.getSize().sub(new IPoint(24.0f, 0.0f)));
|
||||
int th = (int) CraftGUI.Render.textHeight(textWidget.getValue(), textWidget.getSize().x());
|
||||
int th = (int) CraftGUI.render.textHeight(textWidget.getValue(), textWidget.getSize().x());
|
||||
int height = Math.max(20, th + 6);
|
||||
setSize(new IPoint(size().x(), height));
|
||||
textWidget.setSize(new IPoint(textWidget.getSize().x(), height));
|
||||
|
||||
@@ -26,9 +26,9 @@ class ControlMutationSymbol extends Control implements ITooltip {
|
||||
public void onRenderBackground() {
|
||||
super.onRenderBackground();
|
||||
if (type == 0) {
|
||||
CraftGUI.Render.texture(ControlMutationSymbol.MutationPlus, IPoint.ZERO);
|
||||
CraftGUI.render.texture(ControlMutationSymbol.MutationPlus, IPoint.ZERO);
|
||||
} else {
|
||||
CraftGUI.Render.texture(ControlMutationSymbol.MutationArrow, IPoint.ZERO);
|
||||
CraftGUI.render.texture(ControlMutationSymbol.MutationArrow, IPoint.ZERO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class ControlSpeciesBoxOption extends ControlTextOption<IAlleleSpecies> {
|
||||
|
||||
CraftGUIUtil.moveWidget(textWidget, new IPoint(22.0f, 0.0f));
|
||||
textWidget.setSize(textWidget.getSize().sub(new IPoint(24.0f, 0.0f)));
|
||||
int th = (int) CraftGUI.Render.textHeight(textWidget.getValue(), textWidget.getSize().x());
|
||||
int th = (int) CraftGUI.render.textHeight(textWidget.getValue(), textWidget.getSize().x());
|
||||
int height = Math.max(20, th + 6);
|
||||
setSize(new IPoint(size().x(), height));
|
||||
textWidget.setSize(new IPoint(textWidget.getSize().x(), height));
|
||||
|
||||
@@ -56,7 +56,7 @@ public class PageBranchOverview extends PageBranch {
|
||||
StringBuilder line = new StringBuilder();
|
||||
List<String> descLines = new ArrayList<>();
|
||||
for (String str : desc.split(" ")) {
|
||||
if (CraftGUI.Render.textWidth(line + " " + str) > 134) {
|
||||
if (CraftGUI.render.textWidth(line + " " + str) > 134) {
|
||||
descLines.add(EnumChatFormatting.ITALIC + line.toString() + EnumChatFormatting.RESET);
|
||||
line = new StringBuilder();
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ public class PageSpeciesOverview extends PageSpecies {
|
||||
|
||||
controlDescription.setValue(descBody + EnumChatFormatting.RESET);
|
||||
controlSignature.setValue(descSig + EnumChatFormatting.RESET);
|
||||
float descHeight = CraftGUI.Render.textHeight(controlDescription.getValue(), controlDescription.getSize().x());
|
||||
float descHeight = CraftGUI.render.textHeight(controlDescription.getValue(), controlDescription.getSize().x());
|
||||
controlSignature.setPosition(new IPoint(controlSignature.pos().x(), controlDescription.getPosition().y() + descHeight + 10.0f));
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,9 @@ public class ContainerCraftGUI extends Container {
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer player) {
|
||||
if (player instanceof EntityPlayerMP) {
|
||||
crafters.add(player);
|
||||
if (!crafters.contains(player)) {
|
||||
crafters.add(player);
|
||||
}
|
||||
sentNBT.clear();
|
||||
}
|
||||
IInventory inventory = window.getInventory();
|
||||
|
||||
@@ -26,9 +26,9 @@ public abstract class Dialog extends Control {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.gradientRect(getArea().outset(400), -1442840576, -1442840576);
|
||||
CraftGUI.Render.texture(CraftGUITexture.Window, getArea());
|
||||
CraftGUI.Render.texture(CraftGUITexture.TabOutline, getArea().inset(4));
|
||||
CraftGUI.render.gradientRect(getArea().outset(400), -1442840576, -1442840576);
|
||||
CraftGUI.render.texture(CraftGUITexture.Window, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.TabOutline, getArea().inset(4));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.core.craftgui.minecraft;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.craftgui.CraftGUI;
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.Tooltip;
|
||||
import binnie.core.craftgui.events.EventKey;
|
||||
@@ -77,10 +76,10 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
window.setMousePosition(mouseX - (int) window.getPosition().x(), mouseY - (int) window.getPosition().y());
|
||||
drawDefaultBackground();
|
||||
|
||||
GL11.glDisable(32826);
|
||||
GL11.glDisable(32826); // GL_RESCALE_NORMAL_EXT
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(2896);
|
||||
GL11.glDisable(2929);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
zLevel = 10.0f;
|
||||
GuiScreen.itemRender.zLevel = zLevel;
|
||||
|
||||
@@ -88,18 +87,18 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(32826);
|
||||
GL11.glEnable(32826); // GL_RESCALE_NORMAL_EXT
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0f, 240.0f);
|
||||
InventoryPlayer playerInventory = mc.thePlayer.inventory;
|
||||
draggedItem = playerInventory.getItemStack();
|
||||
if (draggedItem != null) {
|
||||
renderItem(new IPoint(mouseX - 8, mouseY - 8), draggedItem, 200, false);
|
||||
renderItem(new IPoint(mouseX - 8, mouseY - 8), draggedItem, 200, false);
|
||||
renderItem(new IPoint(mouseX - 8, mouseY - 8), draggedItem, false);
|
||||
renderItem(new IPoint(mouseX - 8, mouseY - 8), draggedItem, false);
|
||||
}
|
||||
GL11.glDisable(32826);
|
||||
GL11.glDisable(32826); // GL_RESCALE_NORMAL_EXT
|
||||
GL11.glPopMatrix();
|
||||
GL11.glDisable(2896);
|
||||
GL11.glDisable(2929);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
MinecraftTooltip tooltip = new MinecraftTooltip();
|
||||
if (isHelpMode()) {
|
||||
tooltip.setType(Tooltip.Type.HELP);
|
||||
@@ -108,24 +107,26 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
tooltip.setType(Tooltip.Type.STANDARD);
|
||||
window.getTooltip(tooltip);
|
||||
}
|
||||
|
||||
if (tooltip.exists()) {
|
||||
renderTooltip(new IPoint(mouseX, mouseY), tooltip);
|
||||
}
|
||||
zLevel = 0.0f;
|
||||
GL11.glEnable(2896);
|
||||
GL11.glEnable(2929);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
public void renderTooltip(IPoint mousePosition, MinecraftTooltip tooltip) {
|
||||
int mouseX = (int) mousePosition.x();
|
||||
int mouseY = (int) mousePosition.y();
|
||||
FontRenderer font = getFontRenderer();
|
||||
GL11.glDisable(32826);
|
||||
GL11.glDisable(32826); // GL_RESCALE_NORMAL_EXT
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(2896);
|
||||
GL11.glDisable(2929);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
int k = 0;
|
||||
List<String> strings = new ArrayList<String>();
|
||||
List<String> strings = new ArrayList<>();
|
||||
for (String string : tooltip.getList()) {
|
||||
if (string != null) {
|
||||
if (!string.contains("~~~")) {
|
||||
@@ -135,6 +136,7 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (String s : strings) {
|
||||
int l = font.getStringWidth(s);
|
||||
if (s.contains("~~~")) {
|
||||
@@ -144,6 +146,7 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
k = l;
|
||||
}
|
||||
}
|
||||
|
||||
int i1 = mouseX + 12;
|
||||
int j1 = mouseY - 12;
|
||||
int k2 = 8;
|
||||
@@ -158,9 +161,10 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
}
|
||||
zLevel = 300.0f;
|
||||
GuiScreen.itemRender.zLevel = 300.0f;
|
||||
int l2 = -267386864;
|
||||
int l2 = 0xf0100010;
|
||||
int j2;
|
||||
int i2 = j2 = 1342177280 + MinecraftTooltip.getOutline(tooltip.getType());
|
||||
int i2 = j2 = 0x50000000 + MinecraftTooltip.getOutline(tooltip.getType());
|
||||
|
||||
drawGradientRect(i1 - 3, j1 - 4, i1 + k + 3, j1 - 3, l2, l2);
|
||||
drawGradientRect(i1 - 3, j1 + k2 + 3, i1 + k + 3, j1 + k2 + 4, l2, l2);
|
||||
drawGradientRect(i1 - 3, j1 - 3, i1 + k + 3, j1 + k2 + 3, l2, l2);
|
||||
@@ -170,6 +174,7 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
drawGradientRect(i1 + k + 2, j1 - 3 + 1, i1 + k + 3, j1 + k2 + 3 - 1, i2, j2);
|
||||
drawGradientRect(i1 - 3, j1 - 3, i1 + k + 3, j1 - 3 + 1, i2, i2);
|
||||
drawGradientRect(i1 - 3, j1 + k2 + 2, i1 + k + 3, j1 + k2 + 3, j2, j2);
|
||||
|
||||
for (int k3 = 0; k3 < strings.size(); ++k3) {
|
||||
String s2 = strings.get(k3);
|
||||
if (k3 == 0) {
|
||||
@@ -177,6 +182,7 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
} else {
|
||||
s2 = MinecraftTooltip.getBody(tooltip.getType()) + s2;
|
||||
}
|
||||
|
||||
if (s2.contains("~~~")) {
|
||||
String split = s2.split("~~~")[1];
|
||||
try {
|
||||
@@ -192,18 +198,20 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
}
|
||||
s2 = " " + s2.replaceAll("~~~(.*?)~~~", "");
|
||||
}
|
||||
|
||||
font.drawStringWithShadow(s2, i1, j1, -1);
|
||||
if (k3 == 0) {
|
||||
j1 += 2;
|
||||
}
|
||||
j1 += 10;
|
||||
}
|
||||
|
||||
zLevel = 0.0f;
|
||||
GuiScreen.itemRender.zLevel = 0.0f;
|
||||
GL11.glEnable(2896);
|
||||
GL11.glEnable(2929);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
GL11.glEnable(32826);
|
||||
GL11.glEnable(32826); // GL_RESCALE_NORMAL_EXT
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -215,10 +223,6 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
window.callEvent(new EventMouse.Down(origin, x, y, button));
|
||||
}
|
||||
|
||||
public boolean isShiftDown() {
|
||||
return Keyboard.isKeyDown(mc.gameSettings.keyBindSneak.getKeyCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char c, int key) {
|
||||
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && window.getFocusedWidget() == null)) {
|
||||
@@ -231,10 +235,7 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
@Override
|
||||
protected void mouseMovedOrUp(int x, int y, int button) {
|
||||
IWidget origin = (window.getMousedOverWidget() == null) ? window : window.getMousedOverWidget();
|
||||
if (button == -1) {
|
||||
float dx = Mouse.getEventDX() * width / (float) mc.displayWidth;
|
||||
float dy = -(Mouse.getEventDY() * height / (float) mc.displayHeight);
|
||||
} else {
|
||||
if (button != -1) {
|
||||
window.callEvent(new EventMouse.Up(origin, x, y, button));
|
||||
}
|
||||
}
|
||||
@@ -243,7 +244,6 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
public void handleMouseInput() {
|
||||
super.handleMouseInput();
|
||||
int dWheel = Mouse.getDWheel();
|
||||
IWidget origin = (window.getFocusedWidget() == null) ? window : window.getFocusedWidget();
|
||||
if (dWheel != 0) {
|
||||
window.callEvent(new EventMouse.Wheel(window, dWheel));
|
||||
}
|
||||
@@ -254,16 +254,15 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
window.onClose();
|
||||
}
|
||||
|
||||
public void renderTexturedRect(float x, float y, float u, float v, float w, float h) {
|
||||
drawTexturedModalRect((int) x, (int) y, (int) u, (int) v, (int) w, (int) h);
|
||||
}
|
||||
|
||||
public void renderTexture(IPoint position, IArea textureArea) {
|
||||
drawTexturedModalRect((int) position.x(), (int) position.y(), (int) textureArea.pos().x(), (int) textureArea.pos().y(), (int) textureArea.size().x(), (int) textureArea.size().y());
|
||||
}
|
||||
|
||||
private void renderTexturedRect(IArea area, IPoint uv) {
|
||||
renderTexturedRect(area.pos().x(), area.pos().y(), uv.x(), uv.y(), area.size().x(), area.size().y());
|
||||
drawTexturedModalRect(
|
||||
(int) position.x(),
|
||||
(int) position.y(),
|
||||
(int) textureArea.pos().x(),
|
||||
(int) textureArea.pos().y(),
|
||||
(int) textureArea.size().x(),
|
||||
(int) textureArea.size().y()
|
||||
);
|
||||
}
|
||||
|
||||
public void renderTexturePadded(IArea area, IArea texture, IBorder padding) {
|
||||
@@ -279,19 +278,22 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
int textHeight = (int) texture.h();
|
||||
int u = (int) texture.x();
|
||||
int v = (int) texture.y();
|
||||
|
||||
if (borderTop + borderBottom > height) {
|
||||
borderTop = height / 2;
|
||||
borderBottom = height / 2;
|
||||
}
|
||||
|
||||
if (borderLeft + borderRight > width) {
|
||||
borderLeft = width / 2;
|
||||
borderRight = width / 2;
|
||||
}
|
||||
IPoint origin = area.pos();
|
||||
|
||||
drawTexturedModalRect(posX, posY, u, v, borderLeft, borderTop);
|
||||
drawTexturedModalRect(posX + width - borderRight, posY, u + textWidth - borderRight, v, borderRight, borderTop);
|
||||
drawTexturedModalRect(posX, posY + height - borderBottom, u, v + textHeight - borderBottom, borderLeft, borderBottom);
|
||||
drawTexturedModalRect(posX + width - borderRight, posY + height - borderBottom, u + textWidth - borderRight, v + textHeight - borderBottom, borderRight, borderBottom);
|
||||
|
||||
int texturingWidth;
|
||||
for (int currentXPos = borderLeft; currentXPos < width - borderRight; currentXPos += texturingWidth) {
|
||||
int distanceXRemaining = width - borderRight - currentXPos;
|
||||
@@ -299,9 +301,11 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
if (texturingWidth > distanceXRemaining) {
|
||||
texturingWidth = distanceXRemaining;
|
||||
}
|
||||
|
||||
if (texturingWidth <= 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
drawTexturedModalRect(posX + currentXPos, posY, u + borderLeft, v, texturingWidth, borderTop);
|
||||
drawTexturedModalRect(posX + currentXPos, posY + height - borderBottom, u + borderLeft, v + textHeight - borderBottom, texturingWidth, borderBottom);
|
||||
int texturingHeight;
|
||||
@@ -317,6 +321,7 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
drawTexturedModalRect(posX + currentXPos, posY + currentYPos, u + borderLeft, v + borderTop, texturingWidth, texturingHeight);
|
||||
}
|
||||
}
|
||||
|
||||
int texturingHeight2;
|
||||
for (int currentYPos2 = borderTop; currentYPos2 < height - borderBottom; currentYPos2 += texturingHeight2) {
|
||||
int distanceYRemaining2 = height - borderBottom - currentYPos2;
|
||||
@@ -324,6 +329,7 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
if (texturingHeight2 > distanceYRemaining2) {
|
||||
texturingHeight2 = distanceYRemaining2;
|
||||
}
|
||||
|
||||
if (texturingHeight2 <= 0) {
|
||||
break;
|
||||
}
|
||||
@@ -332,86 +338,84 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
}
|
||||
}
|
||||
|
||||
public void drawGradientArea(float p_73733_1_, float p_73733_2_, float p_73733_3_, float p_73733_4_, int p_73733_5_, int p_73733_6_) {
|
||||
float f = (p_73733_5_ >> 24 & 0xFF) / 255.0f;
|
||||
float f2 = (p_73733_5_ >> 16 & 0xFF) / 255.0f;
|
||||
float f3 = (p_73733_5_ >> 8 & 0xFF) / 255.0f;
|
||||
float f4 = (p_73733_5_ & 0xFF) / 255.0f;
|
||||
float f5 = (p_73733_6_ >> 24 & 0xFF) / 255.0f;
|
||||
float f6 = (p_73733_6_ >> 16 & 0xFF) / 255.0f;
|
||||
float f7 = (p_73733_6_ >> 8 & 0xFF) / 255.0f;
|
||||
float f8 = (p_73733_6_ & 0xFF) / 255.0f;
|
||||
GL11.glDisable(3553);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glDisable(3008);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glShadeModel(7425);
|
||||
public void drawGradientArea(float x, float y, float width, float height, int color1, int color2) {
|
||||
float alpha1 = (color1 >> 24 & 0xFF) / 255.0f;
|
||||
float r1 = (color1 >> 16 & 0xFF) / 255.0f;
|
||||
float b1 = (color1 >> 8 & 0xFF) / 255.0f;
|
||||
float g1 = (color1 & 0xFF) / 255.0f;
|
||||
|
||||
float alpha2 = (color2 >> 24 & 0xFF) / 255.0f;
|
||||
float r2 = (color2 >> 16 & 0xFF) / 255.0f;
|
||||
float g2 = (color2 >> 8 & 0xFF) / 255.0f;
|
||||
float b2 = (color2 & 0xFF) / 255.0f;
|
||||
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GL11.glShadeModel(GL11.GL_SMOOTH);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setColorRGBA_F(f2, f3, f4, f);
|
||||
tessellator.addVertex(p_73733_3_, p_73733_2_, zLevel);
|
||||
tessellator.addVertex(p_73733_1_, p_73733_2_, zLevel);
|
||||
tessellator.setColorRGBA_F(f6, f7, f8, f5);
|
||||
tessellator.addVertex(p_73733_1_, p_73733_4_, zLevel);
|
||||
tessellator.addVertex(p_73733_3_, p_73733_4_, zLevel);
|
||||
tessellator.setColorRGBA_F(r1, b1, g1, alpha1);
|
||||
tessellator.addVertex(width, y, zLevel);
|
||||
tessellator.addVertex(x, y, zLevel);
|
||||
tessellator.setColorRGBA_F(r2, g2, b2, alpha2);
|
||||
tessellator.addVertex(x, height, zLevel);
|
||||
tessellator.addVertex(width, height, zLevel);
|
||||
tessellator.draw();
|
||||
GL11.glShadeModel(7424);
|
||||
GL11.glDisable(3042);
|
||||
GL11.glEnable(3008);
|
||||
GL11.glEnable(3553);
|
||||
GL11.glShadeModel(GL11.GL_FLAT);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
public void renderItem(IPoint pos, ItemStack item, boolean rotating) {
|
||||
renderItem(pos, item, (int) zLevel + 3, rotating);
|
||||
}
|
||||
|
||||
private void renderItem(IPoint pos, ItemStack item, int zLevel, boolean rotating) {
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240.0f, 240.0f);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glPushAttrib(8256);
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(32826);
|
||||
GL11.glEnable(2929);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
FontRenderer font = item.getItem().getFontRenderer(item);
|
||||
if (font == null) {
|
||||
font = getFontRenderer();
|
||||
}
|
||||
if (item != null) {
|
||||
BinnieCore.proxy.getMinecraftInstance();
|
||||
float phase = Minecraft.getSystemTime() / 20.0f;
|
||||
|
||||
BinnieCore.proxy.getMinecraftInstance();
|
||||
float phase = Minecraft.getSystemTime() / 20.0f;
|
||||
|
||||
if (rotating) {
|
||||
GL11.glPushMatrix();
|
||||
if (rotating) {
|
||||
GL11.glTranslatef(8.0f, 8.0f, 0.0f);
|
||||
GL11.glRotatef(phase, 0.0f, -0.866f, 0.5f);
|
||||
GL11.glTranslatef(-8.0f, -8.0f, -67.1f);
|
||||
}
|
||||
GuiScreen.itemRender.renderItemAndEffectIntoGUI(font, mc.renderEngine, item, (int) pos.x(), (int) pos.y());
|
||||
GL11.glPopMatrix();
|
||||
GuiScreen.itemRender.renderItemOverlayIntoGUI(font, mc.renderEngine, item, (int) pos.x(), (int) pos.y(), null);
|
||||
GL11.glTranslatef(8.0f, 8.0f, 0.0f);
|
||||
GL11.glRotatef(phase, 0.0f, -0.866f, 0.5f);
|
||||
GL11.glTranslatef(-8.0f, -8.0f, -67.1f);
|
||||
}
|
||||
|
||||
GuiScreen.itemRender.renderItemAndEffectIntoGUI(font, mc.renderEngine, item, (int) pos.x(), (int) pos.y());
|
||||
if (rotating) {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
GuiScreen.itemRender.renderItemOverlayIntoGUI(font, mc.renderEngine, item, (int) pos.x(), (int) pos.y(), null);
|
||||
GL11.glClear(256);
|
||||
GL11.glEnable(3042);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
CraftGUI.Render.color(-1);
|
||||
GL11.glEnable(32826);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
|
||||
public void renderIcon(IPoint pos, IIcon icon, ResourceLocation map) {
|
||||
if (icon == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(32826);
|
||||
GL11.glEnable(32826); // GL_RESCALE_NORMAL_EXT
|
||||
BinnieCore.proxy.bindTexture(map);
|
||||
GuiScreen.itemRender.zLevel = zLevel;
|
||||
GuiScreen.itemRender.renderIcon((int) pos.x(), (int) pos.y(), icon, 16, 16);
|
||||
GL11.glEnable(32826);
|
||||
GL11.glEnable(32826); // GL_RESCALE_NORMAL_EXT
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public boolean isHelpMode() {
|
||||
return Keyboard.isKeyDown(15);
|
||||
return Keyboard.isKeyDown(Keyboard.KEY_TAB);
|
||||
}
|
||||
|
||||
public FontRenderer getFontRenderer() {
|
||||
@@ -432,47 +436,42 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
float w = area.size().x();
|
||||
float h = area.size().y();
|
||||
y = height - (y + h);
|
||||
float k = xSize;
|
||||
float scaleX = width / (float) mc.displayWidth;
|
||||
float scaleY = height / (float) mc.displayHeight;
|
||||
x += 0.0f;
|
||||
y += 0.0f;
|
||||
w += 0.0f;
|
||||
h += 0.0f;
|
||||
GL11.glScissor((int) (x / scaleX), (int) (y / scaleY), (int) (w / scaleX), (int) (h / scaleY));
|
||||
}
|
||||
|
||||
public int getZLevel() {
|
||||
return (int) zLevel;
|
||||
}
|
||||
public void drawRect(float x, float y, float width, float height, int color) {
|
||||
if (x < width) {
|
||||
float temp = x;
|
||||
x = width;
|
||||
width = temp;
|
||||
}
|
||||
|
||||
public void drawRect(float p_73734_0_, float p_73734_1_, float p_73734_2_, float p_73734_3_, int p_73734_4_) {
|
||||
if (p_73734_0_ < p_73734_2_) {
|
||||
float j1 = p_73734_0_;
|
||||
p_73734_0_ = p_73734_2_;
|
||||
p_73734_2_ = j1;
|
||||
if (y < height) {
|
||||
float temp = y;
|
||||
y = height;
|
||||
height = temp;
|
||||
}
|
||||
if (p_73734_1_ < p_73734_3_) {
|
||||
float j1 = p_73734_1_;
|
||||
p_73734_1_ = p_73734_3_;
|
||||
p_73734_3_ = j1;
|
||||
}
|
||||
float f3 = (p_73734_4_ >> 24 & 0xFF) / 255.0f;
|
||||
float f4 = (p_73734_4_ >> 16 & 0xFF) / 255.0f;
|
||||
float f5 = (p_73734_4_ >> 8 & 0xFF) / 255.0f;
|
||||
float f6 = (p_73734_4_ & 0xFF) / 255.0f;
|
||||
|
||||
float alpha = (color >> 24 & 0xFF) / 255.0f;
|
||||
float r = (color >> 16 & 0xFF) / 255.0f;
|
||||
float g = (color >> 8 & 0xFF) / 255.0f;
|
||||
float b = (color & 0xFF) / 255.0f;
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
GL11.glEnable(3042);
|
||||
GL11.glDisable(3553);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
GL11.glColor4f(f4, f5, f6, f3);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GL11.glColor4f(r, g, b, alpha);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.addVertex(p_73734_0_, p_73734_3_, 0.0);
|
||||
tessellator.addVertex(p_73734_2_, p_73734_3_, 0.0);
|
||||
tessellator.addVertex(p_73734_2_, p_73734_1_, 0.0);
|
||||
tessellator.addVertex(p_73734_0_, p_73734_1_, 0.0);
|
||||
tessellator.addVertex(x, height, 0.0);
|
||||
tessellator.addVertex(width, height, 0.0);
|
||||
tessellator.addVertex(width, y, 0.0);
|
||||
tessellator.addVertex(x, y, 0.0);
|
||||
tessellator.draw();
|
||||
GL11.glEnable(3553);
|
||||
GL11.glDisable(3042);
|
||||
GL11.glColor4f(1, 1, 1, 255);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
}
|
||||
}
|
||||
@@ -78,8 +78,8 @@ public abstract class Window extends TopLevelWidget implements INetwork.RecieveG
|
||||
ControlSlot.highlighting.put(h, new ArrayList<>());
|
||||
}
|
||||
|
||||
CraftGUI.Render = new Renderer(gui);
|
||||
CraftGUI.Render.stylesheet(StyleSheetManager.getDefault());
|
||||
CraftGUI.render = new Renderer(gui);
|
||||
CraftGUI.render.stylesheet(StyleSheetManager.getDefault());
|
||||
titleButtonLeft = -14.0f;
|
||||
|
||||
if (showHelpButton()) {
|
||||
@@ -211,15 +211,15 @@ public abstract class Window extends TopLevelWidget implements INetwork.RecieveG
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.color(0xffffff);
|
||||
CraftGUI.render.color(0xffffff);
|
||||
if (getBackground1() != null) {
|
||||
CraftGUI.Render.texture(getBackground1(), IPoint.ZERO);
|
||||
CraftGUI.render.texture(getBackground1(), IPoint.ZERO);
|
||||
}
|
||||
if (getBackground2() != null) {
|
||||
CraftGUI.Render.texture(getBackground2(), new IPoint(256.0f, 0.0f));
|
||||
CraftGUI.render.texture(getBackground2(), new IPoint(256.0f, 0.0f));
|
||||
}
|
||||
CraftGUI.Render.color(getColor());
|
||||
CraftGUI.Render.texture(CraftGUITexture.Window, getArea());
|
||||
CraftGUI.render.color(getColor());
|
||||
CraftGUI.render.texture(CraftGUITexture.Window, getArea());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -85,9 +85,9 @@ public class ControlEnergyBar extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.EnergyBarBack, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.EnergyBarBack, getArea());
|
||||
float percentage = getPercentage() / 100.0f;
|
||||
CraftGUI.Render.color(getColourFromPercentage(percentage));
|
||||
CraftGUI.render.color(getColourFromPercentage(percentage));
|
||||
IArea area = getArea();
|
||||
|
||||
switch (direction) {
|
||||
@@ -106,27 +106,27 @@ public class ControlEnergyBar extends Control implements ITooltip {
|
||||
|
||||
if (isMouseOver() && Window.get(this).getGui().isHelpMode()) {
|
||||
int c = 0xaa000000 + MinecraftTooltip.getOutline(Tooltip.Type.HELP);
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), c, c);
|
||||
CraftGUI.render.gradientRect(getArea().inset(1), c, c);
|
||||
} else if (ControlEnergyBar.isError) {
|
||||
int c = 0xaa000000 + MinecraftTooltip.getOutline(MinecraftTooltip.Type.ERROR);
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), c, c);
|
||||
CraftGUI.render.gradientRect(getArea().inset(1), c, c);
|
||||
}
|
||||
|
||||
CraftGUI.Render.texture(CraftGUITexture.EnergyBarGlow, area);
|
||||
CraftGUI.render.texture(CraftGUITexture.EnergyBarGlow, area);
|
||||
GL11.glColor3d(1.0, 1.0, 1.0);
|
||||
CraftGUI.Render.texture(CraftGUITexture.EnergyBarGlass, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.EnergyBarGlass, getArea());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
if (isMouseOver() && Window.get(this).getGui().isHelpMode()) {
|
||||
IArea area = getArea();
|
||||
CraftGUI.Render.color(MinecraftTooltip.getOutline(Tooltip.Type.HELP));
|
||||
CraftGUI.Render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
CraftGUI.render.color(MinecraftTooltip.getOutline(Tooltip.Type.HELP));
|
||||
CraftGUI.render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
} else if (ControlEnergyBar.isError) {
|
||||
IArea area = getArea();
|
||||
CraftGUI.Render.color(MinecraftTooltip.getOutline(MinecraftTooltip.Type.ERROR));
|
||||
CraftGUI.Render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
CraftGUI.render.color(MinecraftTooltip.getOutline(MinecraftTooltip.Type.ERROR));
|
||||
CraftGUI.render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ControlErrorState extends Control implements ITooltip {
|
||||
} else if (type == 0) {
|
||||
texture = CraftGUITexture.StateError;
|
||||
}
|
||||
CraftGUI.Render.texture(texture, IPoint.ZERO);
|
||||
CraftGUI.render.texture(texture, IPoint.ZERO);
|
||||
super.onRenderBackground();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ public class ControlHelp extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.HelpButton, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.HelpButton, getArea());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,6 +16,6 @@ public class ControlIconDisplay extends Control {
|
||||
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
CraftGUI.Render.iconItem(IPoint.ZERO, icon);
|
||||
CraftGUI.render.iconItem(IPoint.ZERO, icon);
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@ public class ControlImage extends Control {
|
||||
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
CraftGUI.Render.texture(key, IPoint.ZERO);
|
||||
CraftGUI.render.texture(key, IPoint.ZERO);
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ public class ControlInfo extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.InfoButton, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.InfoButton, getArea());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -60,10 +60,10 @@ public class ControlItemDisplay extends Control implements ITooltip {
|
||||
GL11.glScalef(scale, scale, 1.0f);
|
||||
BinnieCore.proxy.getMinecraftInstance();
|
||||
float phase = Minecraft.getSystemTime() / 20.0f;
|
||||
CraftGUI.Render.item(IPoint.ZERO, itemStack, rotating);
|
||||
CraftGUI.render.item(IPoint.ZERO, itemStack, rotating);
|
||||
GL11.glPopMatrix();
|
||||
} else {
|
||||
CraftGUI.Render.item(IPoint.ZERO, itemStack, rotating);
|
||||
CraftGUI.render.item(IPoint.ZERO, itemStack, rotating);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -72,18 +72,18 @@ public class ControlLiquidTank extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(horizontal ? CraftGUITexture.HorizontalLiquidTank : CraftGUITexture.LiquidTank, IPoint.ZERO);
|
||||
CraftGUI.render.texture(horizontal ? CraftGUITexture.HorizontalLiquidTank : CraftGUITexture.LiquidTank, IPoint.ZERO);
|
||||
if (isMouseOver() && Window.get(this).getGui().isHelpMode()) {
|
||||
int c = 0xaa000000 + MinecraftTooltip.getOutline(Tooltip.Type.HELP);
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), c, c);
|
||||
CraftGUI.render.gradientRect(getArea().inset(1), c, c);
|
||||
} else if (ControlLiquidTank.tankError.contains(tankID)) {
|
||||
int c = 0xaa000000 + MinecraftTooltip.getOutline(MinecraftTooltip.Type.ERROR);
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), c, c);
|
||||
CraftGUI.render.gradientRect(getArea().inset(1), c, c);
|
||||
} else if (getSuperParent().getMousedOverWidget() == this) {
|
||||
if (Window.get(this).getGui().getDraggedItem() != null) {
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), 0xaaff9999, 0xaaff9999);
|
||||
CraftGUI.render.gradientRect(getArea().inset(1), 0xaaff9999, 0xaaff9999);
|
||||
} else {
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), 0x80ffffff, 0x80ffffff);
|
||||
CraftGUI.render.gradientRect(getArea().inset(1), 0x80ffffff, 0x80ffffff);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,8 +96,8 @@ public class ControlLiquidTank extends Control implements ITooltip {
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = hex & 0xFF;
|
||||
GL11.glColor4f(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
IPoint pos = getAbsolutePosition();
|
||||
IPoint offset = new IPoint(0.0f, height - squaled);
|
||||
IArea limited = getArea().inset(1);
|
||||
@@ -105,34 +105,35 @@ public class ControlLiquidTank extends Control implements ITooltip {
|
||||
limited.setSize(new IPoint(limited.w() - 1.0f, limited.h()));
|
||||
}
|
||||
|
||||
CraftGUI.Render.limitArea(new IArea(limited.pos().add(pos).add(offset), limited.size().sub(offset)));
|
||||
GL11.glEnable(3089);
|
||||
CraftGUI.render.limitArea(new IArea(limited.pos().add(pos).add(offset), limited.size().sub(offset)));
|
||||
GL11.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
BinnieCore.proxy.bindTexture(TextureMap.locationItemsTexture);
|
||||
for (int y = 0; y < height; y += 16) {
|
||||
for (int x = 0; x < (horizontal ? 58 : 16); x += 16) {
|
||||
IIcon icon = fluid.getIcon();
|
||||
CraftGUI.Render.iconBlock(new IPoint(1 + x, 1 + y), icon);
|
||||
CraftGUI.render.iconBlock(new IPoint(x + 1, y + 1), icon);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(3089);
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1, 1, 1, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
CraftGUI.Render.texture(horizontal ? CraftGUITexture.HorizontalLiquidTankOverlay : CraftGUITexture.LiquidTankOverlay, IPoint.ZERO);
|
||||
CraftGUI.render.texture(horizontal ? CraftGUITexture.HorizontalLiquidTankOverlay : CraftGUITexture.LiquidTankOverlay, IPoint.ZERO);
|
||||
if (isMouseOver() && Window.get(this).getGui().isHelpMode()) {
|
||||
IArea area = getArea();
|
||||
CraftGUI.Render.color(MinecraftTooltip.getOutline(Tooltip.Type.HELP));
|
||||
CraftGUI.Render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
CraftGUI.render.color(MinecraftTooltip.getOutline(Tooltip.Type.HELP));
|
||||
CraftGUI.render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
}
|
||||
|
||||
if (ControlLiquidTank.tankError.contains(tankID)) {
|
||||
IArea area = getArea();
|
||||
CraftGUI.Render.color(MinecraftTooltip.getOutline(MinecraftTooltip.Type.ERROR));
|
||||
CraftGUI.Render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
CraftGUI.render.color(MinecraftTooltip.getOutline(MinecraftTooltip.Type.ERROR));
|
||||
CraftGUI.render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ControlPowerSystem extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.PowerButton, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.PowerButton, getArea());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,7 +20,7 @@ public class ControlProgress extends ControlProgressBase {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(progressBlank, getArea());
|
||||
CraftGUI.Render.texturePercentage(progressBar, getArea(), direction, progress);
|
||||
CraftGUI.render.texture(progressBlank, getArea());
|
||||
CraftGUI.render.texturePercentage(progressBar, getArea(), direction, progress);
|
||||
}
|
||||
}
|
||||
@@ -37,17 +37,17 @@ public class ControlSlide extends Control {
|
||||
public void onRenderBackground() {
|
||||
super.onRenderBackground();
|
||||
if (label != null) {
|
||||
float lw = CraftGUI.Render.textWidth(label) + 16;
|
||||
float lh = CraftGUI.Render.textHeight() + 16;
|
||||
float lw = CraftGUI.render.textWidth(label) + 16;
|
||||
float lh = CraftGUI.render.textHeight() + 16;
|
||||
boolean hor = anchor.x() != 0;
|
||||
IArea ar = isSlideActive() ? expanded : shrunk;
|
||||
IArea tabArea = new IArea(hor ? (-lh / 2.0f) : (-lw / 2.0f), hor ? (-lw / 2.0f) : (-lh / 2.0f), hor ? lh : lw, hor ? lw : lh);
|
||||
IPoint shift = new IPoint(ar.w() * (1 - anchor.x()) / 2.0f, ar.h() * (1 - anchor.y()) / 2.0f);
|
||||
tabArea = tabArea.shift(shift.x() - (-3.0f + lh / 2.0f) * anchor.x(), shift.y() - (-3.0f + lh / 2.0f) * anchor.y());
|
||||
Texture texture = CraftGUI.Render.getTexture(isSlideActive() ? CraftGUITexture.Tab : CraftGUITexture.TabDisabled).crop(anchor.opposite(), 8.0f);
|
||||
CraftGUI.Render.texture(texture, tabArea);
|
||||
texture = CraftGUI.Render.getTexture(CraftGUITexture.TabOutline).crop(anchor.opposite(), 8.0f);
|
||||
CraftGUI.Render.texture(texture, tabArea.inset(2));
|
||||
Texture texture = CraftGUI.render.getTexture(isSlideActive() ? CraftGUITexture.Tab : CraftGUITexture.TabDisabled).crop(anchor.opposite(), 8.0f);
|
||||
CraftGUI.render.texture(texture, tabArea);
|
||||
texture = CraftGUI.render.getTexture(CraftGUITexture.TabOutline).crop(anchor.opposite(), 8.0f);
|
||||
CraftGUI.render.texture(texture, tabArea.inset(2));
|
||||
IArea labelArea = new IArea(-lw / 2.0f, 0.0f, lw, lh);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(shift.x() + anchor.x() * 2.0f, shift.y() + anchor.y() * 2.0f, 0.0f);
|
||||
@@ -57,12 +57,12 @@ public class ControlSlide extends Control {
|
||||
if (anchor.y() > 0) {
|
||||
GL11.glTranslatef(0.0f, -lh, 0.0f);
|
||||
}
|
||||
CraftGUI.Render.text(labelArea, TextJustification.MIDDLE_CENTER, label, 16777215);
|
||||
CraftGUI.render.text(labelArea, TextJustification.MIDDLE_CENTER, label, 16777215);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
CraftGUI.Render.texture(CraftGUITexture.Window, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.Window, getArea());
|
||||
Object slideTexture = (anchor == Position.BOTTOM) ? CraftGUITexture.SlideDown : ((anchor == Position.TOP) ? CraftGUITexture.SlideUp : ((anchor == Position.LEFT) ? CraftGUITexture.SlideLeft : CraftGUITexture.SlideRight));
|
||||
CraftGUI.Render.texture(slideTexture, new IPoint((anchor.x() + 1.0f) * w() / 2.0f - 8.0f, (anchor.y() + 1.0f) * h() / 2.0f - 8.0f));
|
||||
CraftGUI.render.texture(slideTexture, new IPoint((anchor.x() + 1.0f) * w() / 2.0f - 8.0f, (anchor.y() + 1.0f) * h() / 2.0f - 8.0f));
|
||||
}
|
||||
|
||||
public boolean isSlideActive() {
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ControlSlot extends ControlSlotBase {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.Slot, IPoint.ZERO);
|
||||
CraftGUI.render.texture(CraftGUITexture.Slot, IPoint.ZERO);
|
||||
if (slot == null) {
|
||||
return;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public class ControlSlot extends ControlSlotBase {
|
||||
if (islot != null && islot.getValidator() != null) {
|
||||
IIcon icon = islot.getValidator().getIcon(!islot.getInputSides().isEmpty());
|
||||
if (icon != null) {
|
||||
CraftGUI.Render.iconItem(new IPoint(1.0f, 1.0f), icon);
|
||||
CraftGUI.render.iconItem(new IPoint(1.0f, 1.0f), icon);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,13 +90,13 @@ public class ControlSlot extends ControlSlotBase {
|
||||
|
||||
highlighted = true;
|
||||
int c = 0xaa000000 + Math.min(highlight.getKey().getColour(), 0xffffff);
|
||||
CraftGUI.Render.gradientRect(new IArea(1.0f, 1.0f, 16.0f, 16.0f), c, c);
|
||||
CraftGUI.render.gradientRect(new IArea(1.0f, 1.0f, 16.0f, 16.0f), c, c);
|
||||
}
|
||||
if (!highlighted && getSuperParent().getMousedOverWidget() == this) {
|
||||
if (Window.get(this).getGui().getDraggedItem() != null && !slot.isItemValid(Window.get(this).getGui().getDraggedItem())) {
|
||||
CraftGUI.Render.gradientRect(new IArea(1.0f, 1.0f, 16.0f, 16.0f), 0xaaff9999, 0xaaff9999);
|
||||
CraftGUI.render.gradientRect(new IArea(1.0f, 1.0f, 16.0f, 16.0f), 0xaaff9999, 0xaaff9999);
|
||||
} else {
|
||||
CraftGUI.Render.gradientRect(new IArea(1.0f, 1.0f, 16.0f, 16.0f), 0x80ffffff, 0x80ffffff);
|
||||
CraftGUI.render.gradientRect(new IArea(1.0f, 1.0f, 16.0f, 16.0f), 0x80ffffff, 0x80ffffff);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -123,8 +123,8 @@ public class ControlSlot extends ControlSlotBase {
|
||||
area = getParent().getArea();
|
||||
area.setPosition(IPoint.ZERO.sub(getPosition()));
|
||||
}
|
||||
CraftGUI.Render.color(c);
|
||||
CraftGUI.Render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
CraftGUI.render.color(c);
|
||||
CraftGUI.render.texture(CraftGUITexture.Outline, area.outset(1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@ public abstract class ControlSlotBase extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.Slot, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.Slot, getArea());
|
||||
if (getSuperParent().getMousedOverWidget() == this) {
|
||||
CraftGUI.Render.gradientRect(new IArea(new IPoint(1.0f, 1.0f), getArea().size().sub(new IPoint(2.0f, 2.0f))), 0x80ffffff, 0x80ffffff);
|
||||
CraftGUI.render.gradientRect(new IArea(new IPoint(1.0f, 1.0f), getArea().size().sub(new IPoint(2.0f, 2.0f))), 0x80ffffff, 0x80ffffff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ public class ControlSlotCharge extends Control {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.PanelBlack, getArea());
|
||||
CraftGUI.Render.texturePercentage(CraftGUI.Render.getTexture(CraftGUITexture.SlotCharge), getArea().inset(1), Position.BOTTOM, getCharge());
|
||||
CraftGUI.render.texture(CraftGUITexture.PanelBlack, getArea());
|
||||
CraftGUI.render.texturePercentage(CraftGUI.render.getTexture(CraftGUITexture.SlotCharge), getArea().inset(1), Position.BOTTOM, getCharge());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -23,7 +23,7 @@ public class ControlUser extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.UserButton, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.UserButton, getArea());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -18,12 +18,12 @@ import java.util.List;
|
||||
|
||||
public class Renderer {
|
||||
protected GuiCraftGUI gui;
|
||||
protected int currentColour;
|
||||
protected int currentColor;
|
||||
protected Texture currentTexture;
|
||||
protected IStyleSheet stylesheet;
|
||||
|
||||
public Renderer(GuiCraftGUI gui) {
|
||||
currentColour = 16777215;
|
||||
currentColor = 0xffffff;
|
||||
this.gui = gui;
|
||||
}
|
||||
|
||||
@@ -31,37 +31,38 @@ public class Renderer {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(widget.getPosition().x(), widget.getPosition().y(), 0.0f);
|
||||
color(widget.getColor());
|
||||
if (widget.isCroppedWidet()) {
|
||||
if (widget.isCroppedWidget()) {
|
||||
IWidget cropRelative = (widget.getCropWidget() != null) ? widget.getCropWidget() : widget;
|
||||
IPoint pos = cropRelative.getAbsolutePosition();
|
||||
IArea cropZone = widget.getCroppedZone();
|
||||
GL11.glEnable(3089);
|
||||
GL11.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
limitArea(new IArea(pos.add(cropZone.pos()), cropZone.size()));
|
||||
|
||||
}
|
||||
GL11.glDisable(2929);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
|
||||
public void postRender(IWidget widget) {
|
||||
if (widget.isCroppedWidet()) {
|
||||
GL11.glDisable(3089);
|
||||
if (widget.isCroppedWidget()) {
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
}
|
||||
GL11.glEnable(2929);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void color(int hex) {
|
||||
currentColour = hex;
|
||||
currentColor = hex;
|
||||
int a = (hex & 0xFF000000) >> 24;
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = hex & 0xFF;
|
||||
|
||||
if (a < 0) {
|
||||
a += 256;
|
||||
}
|
||||
|
||||
if (a > 0 && a != 255) {
|
||||
GL11.glColor4f(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f);
|
||||
GL11.glEnable(3042);
|
||||
} else {
|
||||
GL11.glColor3f(r / 255.0f, g / 255.0f, b / 255.0f);
|
||||
}
|
||||
@@ -78,7 +79,7 @@ public class Renderer {
|
||||
if (texture != currentTexture && texture != null) {
|
||||
BinnieCore.proxy.bindTexture(texture.getFilename());
|
||||
}
|
||||
color(currentColour);
|
||||
color(currentColor);
|
||||
}
|
||||
|
||||
public void texture(Object texture, IPoint position) {
|
||||
@@ -89,6 +90,7 @@ public class Renderer {
|
||||
if (texture == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
setTexture(texture);
|
||||
IPoint point = position.sub(new IPoint(texture.getBorder().l(), texture.getBorder().t()));
|
||||
IArea textureArea = texture.getArea().outset(texture.getBorder());
|
||||
@@ -103,6 +105,7 @@ public class Renderer {
|
||||
if (texture == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
setTexture(texture);
|
||||
IArea textureArea = texture.getArea().outset(texture.getBorder());
|
||||
IArea targetArea = area.outset(texture.getBorder());
|
||||
@@ -146,7 +149,7 @@ public class Renderer {
|
||||
float stringWidth = textWidth(string);
|
||||
float posX = area.size().x() - stringWidth;
|
||||
posX *= justification.getXOffset();
|
||||
GL11.glDisable(2929);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
gui.getFontRenderer().drawString(string, (int) (pos.x() + posX), (int) posY, colour);
|
||||
posY += textHeight();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class StyleSheetManager {
|
||||
private static class DefaultStyleSheet implements IStyleSheet {
|
||||
@Override
|
||||
public Texture getTexture(Object key) {
|
||||
return CraftGUI.ResourceManager.getTexture(key.toString());
|
||||
return CraftGUI.resourceManager.getTexture(key.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class CraftGUIResourceManager implements IResourceManagerReloadListener {
|
||||
public CraftGUIResourceManager() {
|
||||
textureSheets = new HashMap<>();
|
||||
textures = new HashMap<>();
|
||||
CraftGUI.ResourceManager = this;
|
||||
CraftGUI.resourceManager = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,6 +26,6 @@ public enum CraftGUITextureSheet implements IBinnieTexture {
|
||||
if (BinnieCore.proxy.isServer()) {
|
||||
return null;
|
||||
}
|
||||
return CraftGUI.ResourceManager.getTextureSheet(name).getTexture();
|
||||
return CraftGUI.resourceManager.getTextureSheet(name).getTexture();
|
||||
}
|
||||
}
|
||||
@@ -25,23 +25,23 @@ public class Panel extends Control {
|
||||
if (panelType instanceof MinecraftGUI.PanelType) {
|
||||
switch ((MinecraftGUI.PanelType) panelType) {
|
||||
case Black:
|
||||
CraftGUI.Render.texture(CraftGUITexture.PanelBlack, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.PanelBlack, getArea());
|
||||
break;
|
||||
|
||||
case Gray:
|
||||
CraftGUI.Render.texture(CraftGUITexture.PanelGray, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.PanelGray, getArea());
|
||||
break;
|
||||
|
||||
case Tinted:
|
||||
CraftGUI.Render.texture(CraftGUITexture.PanelTinted, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.PanelTinted, getArea());
|
||||
break;
|
||||
|
||||
case Outline:
|
||||
CraftGUI.Render.texture(CraftGUITexture.Outline, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.Outline, getArea());
|
||||
break;
|
||||
|
||||
case TabOutline:
|
||||
CraftGUI.Render.texture(CraftGUITexture.TabOutline, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.TabOutline, getArea());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package binnie.core.item;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.flower.TileEntityFlower;
|
||||
import binnie.botany.items.ItemFieldKit;
|
||||
import binnie.genetics.item.ItemFieldKit;
|
||||
import binnie.botany.network.PacketID;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.IInitializable;
|
||||
|
||||
@@ -24,13 +24,16 @@ public class MachineComponent implements INBTTagable {
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound nbttagcompound) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public void onUpdate() {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public Class[] getComponentInterfaces() {
|
||||
@@ -38,6 +41,7 @@ public class MachineComponent implements INBTTagable {
|
||||
}
|
||||
|
||||
public void onInventoryUpdate() {
|
||||
// ignored
|
||||
}
|
||||
|
||||
public MachinePayload getPayload() {
|
||||
|
||||
@@ -164,9 +164,9 @@ public class MachineUtil {
|
||||
return machine.getInterface(IProcess.class);
|
||||
}
|
||||
|
||||
public List<ItemStack> getNonNullStacks(int[] slotAcclimatiser) {
|
||||
List<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
for (ItemStack stack : getStacks(slotAcclimatiser)) {
|
||||
public List<ItemStack> getNonNullStacks(int[] slot) {
|
||||
List<ItemStack> stacks = new ArrayList<>();
|
||||
for (ItemStack stack : getStacks(slot)) {
|
||||
if (stack != null) {
|
||||
stacks.add(stack);
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
|
||||
|
||||
public ComponentProcessIndefinate(IMachine machine, float energyPerTick) {
|
||||
super(machine);
|
||||
this.energyPerTick = energyPerTick;
|
||||
actionPauseProcess = 0.0f;
|
||||
actionCancelTask = 0.0f;
|
||||
clientEnergyPerSecond = 0;
|
||||
this.energyPerTick = energyPerTick;
|
||||
}
|
||||
|
||||
protected IPoweredMachine getPower() {
|
||||
@@ -52,6 +52,7 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
|
||||
} else if (isInProgress()) {
|
||||
onCancelTask();
|
||||
}
|
||||
|
||||
if (actionPauseProcess > 0.0f) {
|
||||
actionPauseProcess--;
|
||||
}
|
||||
|
||||
@@ -37,6 +37,6 @@ class ControlColourSelector extends Control implements ITooltip, IControlValue<E
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
super.onRenderBackground();
|
||||
CraftGUI.Render.gradientRect(getArea(), 0xff000000 + value.getColor(), 0xff000000 + value.getColor());
|
||||
CraftGUI.render.gradientRect(getArea(), 0xff000000 + value.getColor(), 0xff000000 + value.getColor());
|
||||
}
|
||||
}
|
||||
@@ -162,9 +162,9 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
Panel panel = new Panel(thisPage, 0.0f, 0.0f, thisPage.w(), thisPage.h(), MinecraftGUI.PanelType.Black) {
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
Texture iTexture = CraftGUI.Render.getTexture(CraftGUITexture.TabOutline);
|
||||
CraftGUI.Render.color(getTab(panels.get(this)).getColor().getColor());
|
||||
CraftGUI.Render.texture(iTexture, getArea().inset(3));
|
||||
Texture iTexture = CraftGUI.render.getTexture(CraftGUITexture.TabOutline);
|
||||
CraftGUI.render.color(getTab(panels.get(this)).getColor().getColor());
|
||||
CraftGUI.render.texture(iTexture, getArea().inset(3));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -314,8 +314,8 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
ControlScrollableContent<IWidget> scroll = new ControlScrollableContent<IWidget>(this, 124.0f, 16.0f, 116.0f, 92.0f, 6.0f) {
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.color(11184810);
|
||||
CraftGUI.Render.texture(CraftGUITexture.Outline, getArea().inset(new IBorder(0.0f, 6.0f, 0.0f, 0.0f)));
|
||||
CraftGUI.render.color(11184810);
|
||||
CraftGUI.render.texture(CraftGUITexture.Outline, getArea().inset(new IBorder(0.0f, 6.0f, 0.0f, 0.0f)));
|
||||
}
|
||||
};
|
||||
slotGrid = new Control(scroll, 1.0f, 1.0f, 108.0f, 18.0f);
|
||||
@@ -482,7 +482,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
Object texture = isMouseOver() ? CraftGUITexture.TabHighlighted : CraftGUITexture.Tab;
|
||||
CraftGUI.Render.texture(CraftGUI.Render.getTexture(texture).crop(Position.BOTTOM, 8.0f), getArea());
|
||||
CraftGUI.render.texture(CraftGUI.render.getTexture(texture).crop(Position.BOTTOM, 8.0f), getArea());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,30 +32,32 @@ public enum BinnieCorePacketID implements IPacketID {
|
||||
((INetworkedEntity) tile).readFromPacket(packet.payload);
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.TileMetadata) {
|
||||
MessageMetadata packet2 = new MessageMetadata(message);
|
||||
TileEntity tile = packet2.getTileEntity(BinnieCore.proxy.getWorld());
|
||||
MessageMetadata packet = new MessageMetadata(message);
|
||||
TileEntity tile = packet.getTileEntity(BinnieCore.proxy.getWorld());
|
||||
if (tile instanceof TileEntityMetadata) {
|
||||
((TileEntityMetadata) tile).setTileMetadata(packet2.meta, true);
|
||||
((TileEntityMetadata) tile).setTileMetadata(packet.meta, true);
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.CraftGUIAction && context.side == Side.CLIENT) {
|
||||
MessageCraftGUI packet3 = new MessageCraftGUI(message);
|
||||
EntityPlayer player = BinnieCore.proxy.getPlayer();
|
||||
if (player.openContainer instanceof ContainerCraftGUI && packet3.getTagCompound() != null) {
|
||||
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.CLIENT, player, packet3.getTagCompound());
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.CraftGUIAction && context.side == Side.SERVER && context.netHandler instanceof NetHandlerPlayServer) {
|
||||
MessageCraftGUI packet3 = new MessageCraftGUI(message);
|
||||
EntityPlayer player = ((NetHandlerPlayServer) context.netHandler).playerEntity;
|
||||
if (player.openContainer instanceof ContainerCraftGUI && packet3.getTagCompound() != null) {
|
||||
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.SERVER, player, packet3.getTagCompound());
|
||||
} else if (this == BinnieCorePacketID.CraftGUIAction) {
|
||||
if (context.side == Side.CLIENT) {
|
||||
MessageCraftGUI packet = new MessageCraftGUI(message);
|
||||
EntityPlayer player = BinnieCore.proxy.getPlayer();
|
||||
if (player.openContainer instanceof ContainerCraftGUI && packet.getTagCompound() != null) {
|
||||
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.CLIENT, player, packet.getTagCompound());
|
||||
}
|
||||
} else if (context.netHandler instanceof NetHandlerPlayServer) {
|
||||
MessageCraftGUI packet = new MessageCraftGUI(message);
|
||||
EntityPlayer player = ((NetHandlerPlayServer) context.netHandler).playerEntity;
|
||||
if (player.openContainer instanceof ContainerCraftGUI && packet.getTagCompound() != null) {
|
||||
((ContainerCraftGUI) player.openContainer).recieveNBT(Side.SERVER, player, packet.getTagCompound());
|
||||
}
|
||||
}
|
||||
} else if (this == BinnieCorePacketID.TileDescriptionSync && context.side == Side.CLIENT) {
|
||||
MessageTileNBT packet4 = new MessageTileNBT(message);
|
||||
TileEntity tile = packet4.getTarget(BinnieCore.proxy.getWorld());
|
||||
if (tile != null && packet4.getTagCompound() != null) {
|
||||
MessageTileNBT packet = new MessageTileNBT(message);
|
||||
TileEntity tile = packet.getTarget(BinnieCore.proxy.getWorld());
|
||||
if (tile != null && packet.getTagCompound() != null) {
|
||||
IMachine machine = Machine.getMachine(tile);
|
||||
if (machine != null && machine instanceof INetwork.TilePacketSync) {
|
||||
((INetwork.TilePacketSync) machine).syncFromNBT(packet4.getTagCompound());
|
||||
((INetwork.TilePacketSync) machine).syncFromNBT(packet.getTagCompound());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ControlClimateBar extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.EnergyBarBack, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.EnergyBarBack, getArea());
|
||||
int types = isHumidity ? 3 : 6;
|
||||
int w = (int) ((getSize().x() - 2.0f) / types);
|
||||
for (int i = 0; i < types; ++i) {
|
||||
@@ -82,10 +82,10 @@ public class ControlClimateBar extends Control implements ITooltip {
|
||||
} else {
|
||||
color = TEMP_COLORS[i];
|
||||
}
|
||||
CraftGUI.Render.solid(new IArea(x + 1, 1.0f, w, getSize().y() - 2.0f), color.getRGB());
|
||||
CraftGUI.render.solid(new IArea(x + 1, 1.0f, w, getSize().y() - 2.0f), color.getRGB());
|
||||
}
|
||||
}
|
||||
CraftGUI.Render.texture(CraftGUITexture.EnergyBarGlass, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.EnergyBarGlass, getArea());
|
||||
}
|
||||
|
||||
public void setSpecies(IAlleleBeeSpecies species) {
|
||||
|
||||
@@ -51,10 +51,10 @@ public class ExtraTrees extends AbstractMod {
|
||||
public static Block blockLog;
|
||||
public static BlockCarpentry blockCarpentry;
|
||||
public static Block blockPlanks;
|
||||
public static Block blockShrubLeaves;
|
||||
public static Block blockMachine;
|
||||
public static Block blockFence;
|
||||
public static BlockCarpentry blockPanel;
|
||||
public static Block blockKitchen;
|
||||
public static Block blockSlab;
|
||||
public static Block blockDoubleSlab;
|
||||
public static Item itemHammer;
|
||||
|
||||
@@ -30,7 +30,8 @@ import java.util.List;
|
||||
public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
protected BlockETDoor() {
|
||||
super(Material.wood);
|
||||
setHardness(3.0f).setStepSound(Block.soundTypeWood);
|
||||
setHardness(3.0f);
|
||||
setStepSound(Block.soundTypeWood);
|
||||
setCreativeTab(Tabs.tabArboriculture);
|
||||
setBlockName("door");
|
||||
}
|
||||
@@ -58,23 +59,23 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int par5) {
|
||||
if (par5 != 1 && par5 != 0) {
|
||||
public IIcon getIcon(IBlockAccess blockAccess, int x, int y, int z, int meta) {
|
||||
if (meta != 1 && meta != 0) {
|
||||
int i1 = getFullMetadata(blockAccess, x, y, z);
|
||||
int j1 = i1 & 0x3;
|
||||
boolean flag = (i1 & 0x4) != 0;
|
||||
boolean flag2;
|
||||
boolean flag3 = (i1 & 0x8) != 0;
|
||||
if (flag) {
|
||||
flag2 = (j1 == 0 && par5 == 2)
|
||||
|| (j1 == 1 && par5 == 5)
|
||||
|| (j1 == 2 && par5 == 3)
|
||||
|| (j1 == 3 && par5 == 4);
|
||||
flag2 = (j1 == 0 && meta == 2)
|
||||
|| (j1 == 1 && meta == 5)
|
||||
|| (j1 == 2 && meta == 3)
|
||||
|| (j1 == 3 && meta == 4);
|
||||
} else {
|
||||
flag2 = (j1 == 0 && par5 == 5)
|
||||
|| (j1 == 1 && par5 == 3)
|
||||
|| (j1 == 2 && par5 == 4)
|
||||
|| (j1 == 3 && par5 == 2);
|
||||
flag2 = (j1 == 0 && meta == 5)
|
||||
|| (j1 == 1 && meta == 3)
|
||||
|| (j1 == 2 && meta == 4)
|
||||
|| (j1 == 3 && meta == 2);
|
||||
|
||||
if ((i1 & 0x10) != 0) {
|
||||
flag2 = !flag2;
|
||||
@@ -121,38 +122,70 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
return WoodManager.getPlankType(meta & 0xFF).getColor();
|
||||
}
|
||||
|
||||
public int getFullMetadata(IBlockAccess blockAccess, int x, int y, int pzr4) {
|
||||
int l = blockAccess.getBlockMetadata(x, y, pzr4);
|
||||
public int getFullMetadata(IBlockAccess blockAccess, int x, int y, int z) {
|
||||
int l = blockAccess.getBlockMetadata(x, y, z);
|
||||
boolean flag = (l & 0x8) != 0x0;
|
||||
int i1;
|
||||
int j1;
|
||||
if (flag) {
|
||||
i1 = blockAccess.getBlockMetadata(x, y - 1, pzr4);
|
||||
i1 = blockAccess.getBlockMetadata(x, y - 1, z);
|
||||
j1 = l;
|
||||
} else {
|
||||
i1 = l;
|
||||
j1 = blockAccess.getBlockMetadata(x, y + 1, pzr4);
|
||||
j1 = blockAccess.getBlockMetadata(x, y + 1, z);
|
||||
}
|
||||
|
||||
boolean flag2 = (j1 & 0x1) != 0x0;
|
||||
return (i1 & 0x7) | (flag ? 8 : 0) | (flag2 ? 16 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
|
||||
if (player.capabilities.isCreativeMode && (meta & 0x8) != 0x0 && world.getBlock(x, y - 1, z) == this) {
|
||||
world.setBlockToAir(x, y - 1, z);
|
||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if ((meta & 8) == 0) {
|
||||
boolean flag = false;
|
||||
if (world.getBlock(x, y + 1, z) != this) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
flag = true;
|
||||
}
|
||||
|
||||
if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z)) {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
if (flag) {
|
||||
if (!world.isRemote) {
|
||||
dropBlockAsItem(world, x, y, z, meta, 0);
|
||||
}
|
||||
} else {
|
||||
boolean flag1 = world.isBlockIndirectlyGettingPowered(x, y, z) || world.isBlockIndirectlyGettingPowered(x, y + 1, z);
|
||||
if ((flag1 || block.canProvidePower()) && block != this) {
|
||||
func_150014_a(world, x, y, z, flag1);
|
||||
}
|
||||
}
|
||||
|
||||
if (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z)) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
if (world.getBlock(x, y + 1, z) == this) {
|
||||
world.setBlockToAir(x, y + 1, z);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (world.getBlock(x, y - 1, z) != this) {
|
||||
world.setBlockToAir(x, y, z);
|
||||
}
|
||||
|
||||
if (block != this) {
|
||||
onNeighborBlockChange(world, x, y - 1, z, block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int meta, int fortune) {
|
||||
int yCoord = y;
|
||||
if ((meta & 0x08) != 0) {
|
||||
yCoord -= 1;
|
||||
y -= 1;
|
||||
}
|
||||
return BlockMetadata.getBlockDropped(this, world, x, yCoord, z, meta);
|
||||
return BlockMetadata.getBlockDropped(this, world, x, y, z, meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -170,13 +203,6 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockEventReceived(World world, int x, int y, int z, int eventId, int eventType) {
|
||||
super.onBlockEventReceived(world, x, y, z, eventId, eventType);
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
return tileentity != null && tileentity.receiveClientEvent(eventId, eventType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPlacedMeta(ItemStack stack, World world, int x, int y, int z, ForgeDirection direction) {
|
||||
return TileEntityMetadata.getItemDamage(stack);
|
||||
@@ -188,24 +214,24 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
public String getBlockName(ItemStack stack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(stack);
|
||||
String typeName = getDoorType(meta).getName();
|
||||
String woodName = WoodManager.getPlankType(meta & 0xFF).getName();
|
||||
if (typeName.equals("")) {
|
||||
if (typeName.isEmpty()) {
|
||||
return I18N.localise("extratrees.block.door.name", woodName);
|
||||
}
|
||||
return I18N.localise("extratrees.block.door.name.adv", woodName, typeName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack itemStack, List tooltip) {
|
||||
public void addBlockTooltip(ItemStack stack, List tooltip) {
|
||||
// ignored
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dropAsStack(World world, int x, int y, int z, ItemStack itemStack) {
|
||||
dropBlockAsItem(world, x, y, z, itemStack);
|
||||
public void dropAsStack(World world, int x, int y, int z, ItemStack stack) {
|
||||
dropBlockAsItem(world, x, y, z, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -226,11 +252,6 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWood(IBlockAccess world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFlammability(IBlockAccess world, int x, int y, int z, ForgeDirection face) {
|
||||
return 20;
|
||||
@@ -247,13 +268,7 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int par6) {
|
||||
super.breakBlock(world, x, y, z, block, par6);
|
||||
world.removeTileEntity(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z, EntityPlayer player) {
|
||||
return BlockMetadata.getPickBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package binnie.extratrees.block;
|
||||
|
||||
import forestry.arboriculture.blocks.BlockForestryLeaves;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockShrubLeaves extends BlockForestryLeaves {
|
||||
public BlockShrubLeaves() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void beginLeavesDecay(World world, int x, int y, int z) {
|
||||
// ignored, no able decay
|
||||
}
|
||||
}
|
||||
@@ -40,22 +40,26 @@ public class ModuleBlocks implements IInitializable {
|
||||
ExtraTrees.blockPlanks = new BlockETPlanks();
|
||||
ExtraTrees.blockFence = new BlockFence();
|
||||
ExtraTrees.blockLog = new BlockETLog();
|
||||
ExtraTrees.blockShrubLeaves = new BlockShrubLeaves();
|
||||
ExtraTrees.blockGate = new BlockGate();
|
||||
ExtraTrees.blockDoor = new BlockETDoor();
|
||||
ExtraTrees.blockMultiFence = new BlockMultiFence();
|
||||
ExtraTrees.blockSlab = new BlockETSlab(false);
|
||||
ExtraTrees.blockDoubleSlab = new BlockETSlab(true);
|
||||
ExtraTrees.blockStairs = new BlockETStairs(ExtraTrees.blockPlanks);
|
||||
|
||||
GameRegistry.registerBlock(ExtraTrees.blockPlanks, ItemMetadata.class, "planks");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockFence, ItemMetadata.class, "fence");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockMultiFence, ItemMetadata.class, "multifence");
|
||||
BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockMultiFence), new ItemMetadataRenderer());
|
||||
GameRegistry.registerBlock(ExtraTrees.blockLog, ItemMetadata.class, "log");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockShrubLeaves, "shrubLeaves");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockGate, ItemMetadata.class, "gate");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockSlab, ItemETSlab.class, "slab");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockDoubleSlab, ItemETSlab.class, "doubleSlab");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockDoor, ItemETDoor.class, "door");
|
||||
GameRegistry.registerBlock(ExtraTrees.blockStairs, ItemETStairs.class, "stairs");
|
||||
|
||||
BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockStairs), new StairItemRenderer());
|
||||
BinnieCore.proxy.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockGate), new GateItemRenderer());
|
||||
for (ILogType plank : ILogType.ExtraTreeLog.values()) {
|
||||
|
||||
@@ -135,7 +135,7 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
if (block.getPrimaryMaterial() != block.getSecondaryMaterial()) {
|
||||
tooltip.add(I18N.localise(
|
||||
"extratrees.block.tooltip.twoColors",
|
||||
"extratrees.block.tooltip.twoMaterials",
|
||||
block.getPrimaryMaterial().getName(),
|
||||
block.getSecondaryMaterial().getName()
|
||||
));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package binnie.extratrees.carpentry;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extratrees.api.IDesign;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -11,6 +12,7 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockStainedDesign extends BlockDesign {
|
||||
@@ -60,4 +62,18 @@ public class BlockStainedDesign extends BlockDesign {
|
||||
public String getBlockName(DesignBlock design) {
|
||||
return I18N.localise("extratrees.block.stainedglass.name", design.getDesign().getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBlockTooltip(ItemStack stack, List tooltip) {
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
if (block.getPrimaryMaterial() != block.getSecondaryMaterial()) {
|
||||
tooltip.add(I18N.localise(
|
||||
"extratrees.block.tooltip.twoColors",
|
||||
block.getPrimaryMaterial().getName(),
|
||||
block.getSecondaryMaterial().getName()
|
||||
));
|
||||
} else {
|
||||
tooltip.add(block.getPrimaryMaterial().getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,6 @@ public class ControlBlockIconDisplay extends Control {
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.iconBlock(IPoint.ZERO, icon);
|
||||
CraftGUI.render.iconBlock(IPoint.ZERO, icon);
|
||||
}
|
||||
}
|
||||
@@ -8,13 +8,12 @@ import binnie.core.craftgui.WidgetAttribute;
|
||||
import binnie.core.craftgui.controls.core.Control;
|
||||
import binnie.core.craftgui.geometry.IPoint;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ControlFluidDisplay extends Control implements ITooltip {
|
||||
public boolean hastooltip;
|
||||
public boolean hasTooltip;
|
||||
|
||||
protected FluidStack itemStack;
|
||||
|
||||
@@ -33,11 +32,11 @@ public class ControlFluidDisplay extends Control implements ITooltip {
|
||||
public ControlFluidDisplay(IWidget parent, float x, float y, float size) {
|
||||
super(parent, x, y, size, size);
|
||||
itemStack = null;
|
||||
hastooltip = false;
|
||||
hasTooltip = false;
|
||||
}
|
||||
|
||||
public void setTooltip() {
|
||||
hastooltip = true;
|
||||
hasTooltip = true;
|
||||
addAttribute(WidgetAttribute.MOUSE_OVER);
|
||||
}
|
||||
|
||||
@@ -59,21 +58,21 @@ public class ControlFluidDisplay extends Control implements ITooltip {
|
||||
int r = (hex & 0xFF0000) >> 16;
|
||||
int g = (hex & 0xFF00) >> 8;
|
||||
int b = hex & 0xFF;
|
||||
IIcon icon = itemStack.getFluid().getIcon(itemStack);
|
||||
GL11.glColor4f(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f);
|
||||
GL11.glEnable(3042);
|
||||
GL11.glBlendFunc(770, 771);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
if (getSize().x() != 16.0f) {
|
||||
GL11.glPushMatrix();
|
||||
float scale = getSize().x() / 16.0f;
|
||||
GL11.glScalef(scale, scale, 1.0f);
|
||||
CraftGUI.Render.iconBlock(IPoint.ZERO, itemStack.getFluid().getIcon(itemStack));
|
||||
CraftGUI.render.iconBlock(IPoint.ZERO, itemStack.getFluid().getIcon(itemStack));
|
||||
GL11.glPopMatrix();
|
||||
} else {
|
||||
CraftGUI.Render.iconBlock(IPoint.ZERO, itemStack.getFluid().getIcon(itemStack));
|
||||
CraftGUI.render.iconBlock(IPoint.ZERO, itemStack.getFluid().getIcon(itemStack));
|
||||
}
|
||||
GL11.glDisable(3042);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glColor4f(1, 1, 1, 1.0f);
|
||||
}
|
||||
|
||||
public void setItemStack(FluidStack itemStack) {
|
||||
@@ -82,7 +81,7 @@ public class ControlFluidDisplay extends Control implements ITooltip {
|
||||
|
||||
@Override
|
||||
public void getTooltip(Tooltip tooltip) {
|
||||
if (hastooltip && itemStack != null) {
|
||||
if (hasTooltip && itemStack != null) {
|
||||
tooltip.add(itemStack.getLocalizedName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ControlLumbermillProgress extends ControlProgressBase {
|
||||
public void onRenderForeground() {
|
||||
GL11.glDisable(2896);
|
||||
int sawX = (int) (63.0f * progress);
|
||||
CraftGUI.Render.texture(ControlLumbermillProgress.saw, new IPoint(sawX, -8.0f + 6.0f * (float) Math.sin(animation)));
|
||||
CraftGUI.render.texture(ControlLumbermillProgress.saw, new IPoint(sawX, -8.0f + 6.0f * (float) Math.sin(animation)));
|
||||
ItemStack item = Window.get(this).getInventory().getStackInSlot(Lumbermill.SLOT_WOOD);
|
||||
if (item == null) {
|
||||
return;
|
||||
@@ -62,7 +62,7 @@ public class ControlLumbermillProgress extends ControlProgressBase {
|
||||
|
||||
IIcon icon = block.getIcon(2, item.getItemDamage());
|
||||
for (int i = 0; i < 4; ++i) {
|
||||
CraftGUI.Render.iconBlock(new IPoint(1 + i * 16, 1.0f), icon);
|
||||
CraftGUI.render.iconBlock(new IPoint(1 + i * 16, 1.0f), icon);
|
||||
}
|
||||
ItemStack result = Lumbermill.getPlankProduct(item);
|
||||
if (result == null) {
|
||||
@@ -79,12 +79,12 @@ public class ControlLumbermillProgress extends ControlProgressBase {
|
||||
|
||||
IIcon icon2 = block2.getIcon(2, result.getItemDamage());
|
||||
IPoint pos = getAbsolutePosition();
|
||||
CraftGUI.Render.limitArea(new IArea(pos.add(new IPoint(0.0f, 0.0f)), new IPoint(progress * 64.0f + 2.0f, 18.0f)));
|
||||
CraftGUI.render.limitArea(new IArea(pos.add(new IPoint(0.0f, 0.0f)), new IPoint(progress * 64.0f + 2.0f, 18.0f)));
|
||||
GL11.glEnable(3089);
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
CraftGUI.Render.iconBlock(new IPoint(1 + j * 16, 1.0f), icon2);
|
||||
CraftGUI.render.iconBlock(new IPoint(1 + j * 16, 1.0f), icon2);
|
||||
}
|
||||
GL11.glDisable(3089);
|
||||
CraftGUI.Render.texture(ControlLumbermillProgress.saw2, new IPoint(sawX + 2, -8.0f + 6.0f * (float) Math.sin(animation)));
|
||||
CraftGUI.render.texture(ControlLumbermillProgress.saw2, new IPoint(sawX + 2, -8.0f + 6.0f * (float) Math.sin(animation)));
|
||||
}
|
||||
}
|
||||
@@ -38,9 +38,9 @@ public class ControlSlotFluid extends Control implements ITooltip {
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
int size = (int) getSize().x();
|
||||
CraftGUI.Render.texture(CraftGUITexture.Slot, getArea());
|
||||
CraftGUI.render.texture(CraftGUITexture.Slot, getArea());
|
||||
if (getSuperParent().getMousedOverWidget() == this) {
|
||||
CraftGUI.Render.gradientRect(new IArea(new IPoint(1.0f, 1.0f), getArea().size().sub(new IPoint(2.0f, 2.0f))), 0x80ffffff, 0x80ffffff);
|
||||
CraftGUI.render.gradientRect(new IArea(new IPoint(1.0f, 1.0f), getArea().size().sub(new IPoint(2.0f, 2.0f))), 0x80ffffff, 0x80ffffff);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -147,21 +147,21 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
|
||||
|
||||
@Override
|
||||
public void onRenderBackground() {
|
||||
CraftGUI.Render.texture(CraftGUITexture.Slot, IPoint.ZERO);
|
||||
CraftGUI.render.texture(CraftGUITexture.Slot, IPoint.ZERO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRenderForeground() {
|
||||
ItemStack image = ((WindowWoodworker) getSuperParent()).getDesignerType().getDisplayStack(getValue());
|
||||
CraftGUI.Render.item(new IPoint(1.0f, 1.0f), image);
|
||||
CraftGUI.render.item(new IPoint(1.0f, 1.0f), image);
|
||||
if (((IControlValue) getParent()).getValue() == getValue()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (Window.get(this).getMousedOverWidget() == this) {
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), 0x44ffffff, 0x44ffffff);
|
||||
CraftGUI.render.gradientRect(getArea().inset(1), 0x44ffffff, 0x44ffffff);
|
||||
} else {
|
||||
CraftGUI.Render.gradientRect(getArea().inset(1), 0xaa888888, 0xaa888888);
|
||||
CraftGUI.render.gradientRect(getArea().inset(1), 0xaa888888, 0xaa888888);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class PagePlanksOverview extends PageAbstract<ItemStack> {
|
||||
|
||||
controlDescription.setValue(descBody + EnumChatFormatting.RESET);
|
||||
controlSignature.setValue(descSig + EnumChatFormatting.RESET);
|
||||
float descHeight = CraftGUI.Render.textHeight(controlDescription.getValue(), controlDescription.getSize().x());
|
||||
float descHeight = CraftGUI.render.textHeight(controlDescription.getValue(), controlDescription.getSize().x());
|
||||
controlSignature.setPosition(new IPoint(controlSignature.pos().x(), controlDescription.getPosition().y() + descHeight + 10.0f));
|
||||
}
|
||||
}
|
||||
@@ -6,28 +6,64 @@ import binnie.core.util.I18N;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.ILogType;
|
||||
import binnie.extratrees.worldgen.DefaultTreeGenerator;
|
||||
import binnie.extratrees.worldgen.WorldGenAlder;
|
||||
import binnie.extratrees.worldgen.WorldGenApple;
|
||||
import binnie.extratrees.worldgen.WorldGenAsh;
|
||||
import binnie.extratrees.worldgen.WorldGenAcornOak;
|
||||
import binnie.extratrees.worldgen.WorldGenAspen;
|
||||
import binnie.extratrees.worldgen.WorldGenBalsamFir;
|
||||
import binnie.extratrees.worldgen.WorldGenBanana;
|
||||
import binnie.extratrees.worldgen.WorldGenBeech;
|
||||
import binnie.extratrees.worldgen.WorldGenConifer;
|
||||
import binnie.extratrees.worldgen.WorldGenBox;
|
||||
import binnie.extratrees.worldgen.WorldGenBrazilNut;
|
||||
import binnie.extratrees.worldgen.WorldGenBrazilwood;
|
||||
import binnie.extratrees.worldgen.WorldGenButternut;
|
||||
import binnie.extratrees.worldgen.WorldGenCedar;
|
||||
import binnie.extratrees.worldgen.WorldGenClove;
|
||||
import binnie.extratrees.worldgen.WorldGenCoconut;
|
||||
import binnie.extratrees.worldgen.WorldGenCoffee;
|
||||
import binnie.extratrees.worldgen.WorldGenCommonAlder;
|
||||
import binnie.extratrees.worldgen.WorldGenCommonAsh;
|
||||
import binnie.extratrees.worldgen.WorldGenCommonBeech;
|
||||
import binnie.extratrees.worldgen.WorldGenCopperBeech;
|
||||
import binnie.extratrees.worldgen.WorldGenCypress;
|
||||
import binnie.extratrees.worldgen.WorldGenDefault;
|
||||
import binnie.extratrees.worldgen.WorldGenEucalyptus;
|
||||
import binnie.extratrees.worldgen.WorldGenFir;
|
||||
import binnie.extratrees.worldgen.WorldGenDouglasFir;
|
||||
import binnie.extratrees.worldgen.WorldGenElder;
|
||||
import binnie.extratrees.worldgen.WorldGenElm;
|
||||
import binnie.extratrees.worldgen.WorldGenFloweringCrabapple;
|
||||
import binnie.extratrees.worldgen.WorldGenGingko;
|
||||
import binnie.extratrees.worldgen.WorldGenHawthorn;
|
||||
import binnie.extratrees.worldgen.WorldGenHazel;
|
||||
import binnie.extratrees.worldgen.WorldGenHolly;
|
||||
import binnie.extratrees.worldgen.WorldGenJungle;
|
||||
import binnie.extratrees.worldgen.WorldGenHornbeam;
|
||||
import binnie.extratrees.worldgen.WorldGenIroko;
|
||||
import binnie.extratrees.worldgen.WorldGenLazy;
|
||||
import binnie.extratrees.worldgen.WorldGenMaple;
|
||||
import binnie.extratrees.worldgen.WorldGenPalm;
|
||||
import binnie.extratrees.worldgen.WorldGenPoplar;
|
||||
import binnie.extratrees.worldgen.WorldGenLoblollyPine;
|
||||
import binnie.extratrees.worldgen.WorldGenLocust;
|
||||
import binnie.extratrees.worldgen.WorldGenLogwood;
|
||||
import binnie.extratrees.worldgen.WorldGenMango;
|
||||
import binnie.extratrees.worldgen.WorldGenMonkeyPuzzle;
|
||||
import binnie.extratrees.worldgen.WorldGenOldFustic;
|
||||
import binnie.extratrees.worldgen.WorldGenOlive;
|
||||
import binnie.extratrees.worldgen.WorldGenOrchardApple;
|
||||
import binnie.extratrees.worldgen.WorldGenOsangeOsange;
|
||||
import binnie.extratrees.worldgen.WorldGenPear;
|
||||
import binnie.extratrees.worldgen.WorldGenPecan;
|
||||
import binnie.extratrees.worldgen.WorldGenPrairieCrabapple;
|
||||
import binnie.extratrees.worldgen.WorldGenPurpleheart;
|
||||
import binnie.extratrees.worldgen.WorldGenRainbowGum;
|
||||
import binnie.extratrees.worldgen.WorldGenRedMaple;
|
||||
import binnie.extratrees.worldgen.WorldGenRoseGum;
|
||||
import binnie.extratrees.worldgen.WorldGenRosewood;
|
||||
import binnie.extratrees.worldgen.WorldGenRowan;
|
||||
import binnie.extratrees.worldgen.WorldGenSallow;
|
||||
import binnie.extratrees.worldgen.WorldGenShrub;
|
||||
import binnie.extratrees.worldgen.WorldGenSorbus;
|
||||
import binnie.extratrees.worldgen.WorldGenSilverFir;
|
||||
import binnie.extratrees.worldgen.WorldGenSwampGum;
|
||||
import binnie.extratrees.worldgen.WorldGenSweetCrabapple;
|
||||
import binnie.extratrees.worldgen.WorldGenSweetgum;
|
||||
import binnie.extratrees.worldgen.WorldGenSycamore;
|
||||
import binnie.extratrees.worldgen.WorldGenTree;
|
||||
import binnie.extratrees.worldgen.WorldGenTree2;
|
||||
import binnie.extratrees.worldgen.WorldGenTree3;
|
||||
import binnie.extratrees.worldgen.WorldGenTropical;
|
||||
import binnie.extratrees.worldgen.WorldGenWalnut;
|
||||
import binnie.extratrees.worldgen.WorldGenWesternHemlock;
|
||||
import binnie.extratrees.worldgen.WorldGenWhitebeam;
|
||||
import binnie.extratrees.worldgen.WorldGenYew;
|
||||
import binnie.genetics.genetics.AlleleHelper;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -71,10 +107,10 @@ import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGermlingIconProvider {
|
||||
OrchardApple("malus", "domestica", 0x648830, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Apple, WorldGenApple.OrchardApple.class),
|
||||
SweetCrabapple("malus", "coronaria", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.SweetCrabapple.class),
|
||||
FloweringCrabapple("malus", "hopa", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.FloweringCrabapple.class),
|
||||
PrairieCrabapple("malus", "ioensis", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenApple.PrairieCrabapple.class),
|
||||
OrchardApple("malus", "domestica", 0x648830, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Apple, WorldGenOrchardApple.class),
|
||||
SweetCrabapple("malus", "coronaria", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenSweetCrabapple.class),
|
||||
FloweringCrabapple("malus", "hopa", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenFloweringCrabapple.class),
|
||||
PrairieCrabapple("malus", "ioensis", 0x7a9953, ILogType.ExtraTreeLog.Apple, ExtraTreeFruitGene.Crabapple, WorldGenPrairieCrabapple.class),
|
||||
Blackthorn("prunus", "spinosa ", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.Blackthorn),
|
||||
CherryPlum("prunus", "cerasifera", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.CherryPlum),
|
||||
Peach("prunus", "persica", 0x6d8f1e, ILogType.ForestryLog.PLUM, ExtraTreeFruitGene.Peach),
|
||||
@@ -99,75 +135,75 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
Banana("musa", "sinensis", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.Banana, WorldGenBanana.class),
|
||||
RedBanana("musa", "rubra", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.RedBanana, WorldGenBanana.class),
|
||||
Plantain("musa", "paradisiaca", 0xa1cd8e, ILogType.ExtraTreeLog.Banana, ExtraTreeFruitGene.Plantain, WorldGenBanana.class),
|
||||
Butternut("juglans", "cinerea", 0x82b58c, ILogType.ExtraTreeLog.Butternut, ExtraTreeFruitGene.Butternut, WorldGenWalnut.Butternut.class),
|
||||
Rowan("sorbus", "aucuparia", 0x9ec79b, ILogType.ExtraTreeLog.Rowan, null, WorldGenSorbus.Rowan.class),
|
||||
Hemlock("tsuga", "heterophylla", 0x5cac72, ILogType.ExtraTreeLog.Hemlock, null, WorldGenConifer.WesternHemlock.class),
|
||||
Ash("fraxinus", "excelsior", 0x488e2b, ILogType.ExtraTreeLog.Ash, null, WorldGenAsh.CommonAsh.class),
|
||||
Alder("alnus", "glutinosa", 0x698a33, ILogType.ExtraTreeLog.Alder, null, WorldGenAlder.CommonAlder.class),
|
||||
Beech("fagus", "sylvatica", 0x83a04c, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenBeech.CommonBeech.class),
|
||||
CopperBeech("fagus", "purpurea", 0x801318, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenBeech.CopperBeech.class),
|
||||
Aspen("populus", "tremula", 0x8acc37, ILogType.ForestryLog.POPLAR, null, WorldGenPoplar.Aspen.class),
|
||||
Yew("taxus", "baccata", 0x948a4d, ILogType.ExtraTreeLog.Yew, null, WorldGenConifer.Yew.class),
|
||||
Cypress("chamaecyparis", "lawsoniana", 0x89c9a7, ILogType.ExtraTreeLog.Cypress, null, WorldGenConifer.Cypress.class),
|
||||
DouglasFir("pseudotsuga", "menziesii", 0x99b582, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.DouglasFir.class),
|
||||
Hazel("Corylus", "avellana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenTree3.Hazel.class),
|
||||
Sycamore("ficus", "sycomorus", 0xa0a52f, ILogType.ExtraTreeLog.Fig, ExtraTreeFruitGene.Fig, WorldGenTree3.Sycamore.class),
|
||||
Whitebeam("sorbus", "aria", 0xbace99, ILogType.ExtraTreeLog.Whitebeam, null, WorldGenSorbus.Whitebeam.class),
|
||||
Hawthorn("crataegus", "monogyna", 0x6ba84a, ILogType.ExtraTreeLog.Hawthorn, null, WorldGenTree3.Hawthorn.class),
|
||||
Pecan("carya", "illinoinensis", 0x85b674, ILogType.ExtraTreeLog.Hickory, ExtraTreeFruitGene.Pecan, WorldGenTree3.Pecan.class),
|
||||
Elm("ulmus", "procera", 0x7c9048, ILogType.ExtraTreeLog.Elm, null, WorldGenTree3.Elm.class),
|
||||
Elder("sambucus", "nigra", 0xaeb873, ILogType.ExtraTreeLog.Elder, ExtraTreeFruitGene.Elderberry, WorldGenTree3.Elder.class),
|
||||
Holly("ilex", "aquifolium", 0x254b4c, ILogType.ExtraTreeLog.Holly, null, WorldGenHolly.Holly.class),
|
||||
Hornbeam("carpinus", "betulus", 0x96a71b, ILogType.ExtraTreeLog.Hornbeam, null, WorldGenTree3.Hornbeam.class),
|
||||
Sallow("salix", "caprea", 0xaeb323, ILogType.ForestryLog.WILLOW, null, WorldGenTree3.Sallow.class),
|
||||
AcornOak("quercus", "robur", 0x66733e, ILogType.VanillaLog.Oak, ExtraTreeFruitGene.Acorn, WorldGenTree3.AcornOak.class),
|
||||
Fir("abies", "alba", 0x6f7c20, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.SilverFir.class),
|
||||
Cedar("cedrus", "libani", 0x95a370, ILogType.ExtraTreeLog.Cedar, null, WorldGenConifer.Cedar.class),
|
||||
Olive("olea", "europaea", 0x3c4834, ILogType.ExtraTreeLog.Olive, ExtraTreeFruitGene.Olive, WorldGenTree2.Olive.class),
|
||||
RedMaple("acer", "ubrum", 0xe82e17, ILogType.ForestryLog.MAPLE, null, WorldGenMaple.RedMaple.class),
|
||||
BalsamFir("abies", "balsamea", 0x74a07c, ILogType.ExtraTreeLog.Fir, null, WorldGenFir.BalsamFir.class),
|
||||
LoblollyPine("pinus", "taeda", 0x6f8a47, ILogType.ForestryLog.PINE, null, WorldGenConifer.LoblollyPine.class),
|
||||
Sweetgum("liquidambar", "styraciflua", 0x8b8762, ILogType.ExtraTreeLog.Sweetgum, null, WorldGenTree2.Sweetgum.class),
|
||||
Locust("robinia", "pseudoacacia", 0x887300, ILogType.ExtraTreeLog.Locust, null, WorldGenTree2.Locust.class),
|
||||
Pear("pyrus", "communis", 0x5e8826, ILogType.ExtraTreeLog.Pear, ExtraTreeFruitGene.Pear, WorldGenTree2.Pear.class),
|
||||
OsangeOsange("maclura", "pomifera", 0x687a50, ILogType.ExtraTreeLog.Maclura, ExtraTreeFruitGene.OsangeOsange, WorldGenJungle.OsangeOsange.class),
|
||||
OldFustic("maclura", "tinctoria", 0x687a50, ILogType.ExtraTreeLog.Maclura, null, WorldGenJungle.OldFustic.class),
|
||||
Brazilwood("caesalpinia", "echinata", 0x607459, ILogType.ExtraTreeLog.Brazilwood, null, WorldGenJungle.Brazilwood.class),
|
||||
Logwood("haematoxylum", "campechianum", 0x889f6b, ILogType.ExtraTreeLog.Logwood, null, WorldGenJungle.Logwood.class),
|
||||
Rosewood("dalbergia", "latifolia", 0x879b22, ILogType.ExtraTreeLog.Rosewood, null, WorldGenJungle.Rosewood.class),
|
||||
Purpleheart("peltogyne", "spp.", 0x778f55, ILogType.ExtraTreeLog.Purpleheart, null, WorldGenJungle.Purpleheart.class),
|
||||
Iroko("milicia", "excelsa", 0xafc86c, ILogType.ExtraTreeLog.Iroko, null, WorldGenTree2.Iroko.class),
|
||||
Gingko("ginkgo", "biloba", 0x719651, ILogType.ExtraTreeLog.Gingko, ExtraTreeFruitGene.GingkoNut, WorldGenTree2.Gingko.class),
|
||||
Brazilnut("bertholletia", "excelsa", 0x7c8f7b, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.BrazilNut, WorldGenJungle.BrazilNut.class),
|
||||
RoseGum("eucalyptus", "grandis", 0x9ca258, ILogType.ExtraTreeLog.Eucalyptus, null, WorldGenEucalyptus.RoseGum.class),
|
||||
SwampGum("eucalyptus", "grandis", 0xa2c686, ILogType.ExtraTreeLog.Eucalyptus2, null, WorldGenEucalyptus.SwampGum.class),
|
||||
Box("boxus", "sempervirens", 0x72996d, ILogType.ExtraTreeLog.Box, null, WorldGenTree2.Box.class),
|
||||
Clove("syzygium", "aromaticum", 0x7a821f, ILogType.ExtraTreeLog.Syzgium, ExtraTreeFruitGene.Clove, WorldGenTree2.Clove.class),
|
||||
Coffee("coffea", "arabica", 0x6f9065, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coffee, WorldGenJungle.Coffee.class),
|
||||
MonkeyPuzzle("araucaria", "araucana", 0x576158, ILogType.ForestryLog.PINE, null, WorldGenConifer.MonkeyPuzzle.class),
|
||||
RainbowGum("eucalyptus", "deglupta", 0xb7f025, ILogType.ExtraTreeLog.Eucalyptus3, null, WorldGenEucalyptus.RainbowGum.class),
|
||||
Butternut("juglans", "cinerea", 0x82b58c, ILogType.ExtraTreeLog.Butternut, ExtraTreeFruitGene.Butternut, WorldGenButternut.class),
|
||||
Rowan("sorbus", "aucuparia", 0x9ec79b, ILogType.ExtraTreeLog.Rowan, null, WorldGenRowan.class),
|
||||
Hemlock("tsuga", "heterophylla", 0x5cac72, ILogType.ExtraTreeLog.Hemlock, null, WorldGenWesternHemlock.class),
|
||||
Ash("fraxinus", "excelsior", 0x488e2b, ILogType.ExtraTreeLog.Ash, null, WorldGenCommonAsh.class),
|
||||
Alder("alnus", "glutinosa", 0x698a33, ILogType.ExtraTreeLog.Alder, null, WorldGenCommonAlder.class),
|
||||
Beech("fagus", "sylvatica", 0x83a04c, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenCommonBeech.class),
|
||||
CopperBeech("fagus", "purpurea", 0x801318, ILogType.ExtraTreeLog.Beech, ExtraTreeFruitGene.Beechnut, WorldGenCopperBeech.class),
|
||||
Aspen("populus", "tremula", 0x8acc37, ILogType.ForestryLog.POPLAR, null, WorldGenAspen.class),
|
||||
Yew("taxus", "baccata", 0x948a4d, ILogType.ExtraTreeLog.Yew, null, WorldGenYew.class),
|
||||
Cypress("chamaecyparis", "lawsoniana", 0x89c9a7, ILogType.ExtraTreeLog.Cypress, null, WorldGenCypress.class),
|
||||
DouglasFir("pseudotsuga", "menziesii", 0x99b582, ILogType.ExtraTreeLog.Fir, null, WorldGenDouglasFir.class),
|
||||
Hazel("Corylus", "avellana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenHazel.class),
|
||||
Sycamore("ficus", "sycomorus", 0xa0a52f, ILogType.ExtraTreeLog.Fig, ExtraTreeFruitGene.Fig, WorldGenSycamore.class),
|
||||
Whitebeam("sorbus", "aria", 0xbace99, ILogType.ExtraTreeLog.Whitebeam, null, WorldGenWhitebeam.class),
|
||||
Hawthorn("crataegus", "monogyna", 0x6ba84a, ILogType.ExtraTreeLog.Hawthorn, null, WorldGenHawthorn.class),
|
||||
Pecan("carya", "illinoinensis", 0x85b674, ILogType.ExtraTreeLog.Hickory, ExtraTreeFruitGene.Pecan, WorldGenPecan.class),
|
||||
Elm("ulmus", "procera", 0x7c9048, ILogType.ExtraTreeLog.Elm, null, WorldGenElm.class),
|
||||
Elder("sambucus", "nigra", 0xaeb873, ILogType.ExtraTreeLog.Elder, ExtraTreeFruitGene.Elderberry, WorldGenElder.class),
|
||||
Holly("ilex", "aquifolium", 0x254b4c, ILogType.ExtraTreeLog.Holly, null, WorldGenHolly.class),
|
||||
Hornbeam("carpinus", "betulus", 0x96a71b, ILogType.ExtraTreeLog.Hornbeam, null, WorldGenHornbeam.class),
|
||||
Sallow("salix", "caprea", 0xaeb323, ILogType.ForestryLog.WILLOW, null, WorldGenSallow.class),
|
||||
AcornOak("quercus", "robur", 0x66733e, ILogType.VanillaLog.Oak, ExtraTreeFruitGene.Acorn, WorldGenAcornOak.class),
|
||||
Fir("abies", "alba", 0x6f7c20, ILogType.ExtraTreeLog.Fir, null, WorldGenSilverFir.class),
|
||||
Cedar("cedrus", "libani", 0x95a370, ILogType.ExtraTreeLog.Cedar, null, WorldGenCedar.class),
|
||||
Olive("olea", "europaea", 0x3c4834, ILogType.ExtraTreeLog.Olive, ExtraTreeFruitGene.Olive, WorldGenOlive.class),
|
||||
RedMaple("acer", "ubrum", 0xe82e17, ILogType.ForestryLog.MAPLE, null, WorldGenRedMaple.class),
|
||||
BalsamFir("abies", "balsamea", 0x74a07c, ILogType.ExtraTreeLog.Fir, null, WorldGenBalsamFir.class),
|
||||
LoblollyPine("pinus", "taeda", 0x6f8a47, ILogType.ForestryLog.PINE, null, WorldGenLoblollyPine.class),
|
||||
Sweetgum("liquidambar", "styraciflua", 0x8b8762, ILogType.ExtraTreeLog.Sweetgum, null, WorldGenSweetgum.class),
|
||||
Locust("robinia", "pseudoacacia", 0x887300, ILogType.ExtraTreeLog.Locust, null, WorldGenLocust.class),
|
||||
Pear("pyrus", "communis", 0x5e8826, ILogType.ExtraTreeLog.Pear, ExtraTreeFruitGene.Pear, WorldGenPear.class),
|
||||
OsangeOsange("maclura", "pomifera", 0x687a50, ILogType.ExtraTreeLog.Maclura, ExtraTreeFruitGene.OsangeOsange, WorldGenOsangeOsange.class),
|
||||
OldFustic("maclura", "tinctoria", 0x687a50, ILogType.ExtraTreeLog.Maclura, null, WorldGenOldFustic.class),
|
||||
Brazilwood("caesalpinia", "echinata", 0x607459, ILogType.ExtraTreeLog.Brazilwood, null, WorldGenBrazilwood.class),
|
||||
Logwood("haematoxylum", "campechianum", 0x889f6b, ILogType.ExtraTreeLog.Logwood, null, WorldGenLogwood.class),
|
||||
Rosewood("dalbergia", "latifolia", 0x879b22, ILogType.ExtraTreeLog.Rosewood, null, WorldGenRosewood.class),
|
||||
Purpleheart("peltogyne", "spp.", 0x778f55, ILogType.ExtraTreeLog.Purpleheart, null, WorldGenPurpleheart.class),
|
||||
Iroko("milicia", "excelsa", 0xafc86c, ILogType.ExtraTreeLog.Iroko, null, WorldGenIroko.class),
|
||||
Gingko("ginkgo", "biloba", 0x719651, ILogType.ExtraTreeLog.Gingko, ExtraTreeFruitGene.GingkoNut, WorldGenGingko.class),
|
||||
Brazilnut("bertholletia", "excelsa", 0x7c8f7b, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.BrazilNut, WorldGenBrazilNut.class),
|
||||
RoseGum("eucalyptus", "grandis", 0x9ca258, ILogType.ExtraTreeLog.Eucalyptus, null, WorldGenRoseGum.class),
|
||||
SwampGum("eucalyptus", "grandis", 0xa2c686, ILogType.ExtraTreeLog.Eucalyptus2, null, WorldGenSwampGum.class),
|
||||
Box("boxus", "sempervirens", 0x72996d, ILogType.ExtraTreeLog.Box, null, WorldGenBox.class),
|
||||
Clove("syzygium", "aromaticum", 0x7a821f, ILogType.ExtraTreeLog.Syzgium, ExtraTreeFruitGene.Clove, WorldGenClove.class),
|
||||
Coffee("coffea", "arabica", 0x6f9065, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coffee, WorldGenCoffee.class),
|
||||
MonkeyPuzzle("araucaria", "araucana", 0x576158, ILogType.ForestryLog.PINE, null, WorldGenMonkeyPuzzle.class),
|
||||
RainbowGum("eucalyptus", "deglupta", 0xb7f025, ILogType.ExtraTreeLog.Eucalyptus3, null, WorldGenRainbowGum.class),
|
||||
PinkIvory("berchemia", "zeyheri", 0x7c9159, ILogType.ExtraTreeLog.PinkIvory, null, WorldGenTree.class),
|
||||
Blackcurrant("ribes", "nigrum", 0xa6da5c, null, ExtraTreeFruitGene.Blackcurrant, WorldGenShrub.Shrub.class),
|
||||
Redcurrant("ribes", "rubrum", 0x74ac00, null, ExtraTreeFruitGene.Redcurrant, WorldGenShrub.Shrub.class),
|
||||
Blackberry("rubus", "fruticosus", 0x92c15b, null, ExtraTreeFruitGene.Blackberry, WorldGenShrub.Shrub.class),
|
||||
Raspberry("rubus", "idaeus", 0x83b96e, null, ExtraTreeFruitGene.Raspberry, WorldGenShrub.Shrub.class),
|
||||
Blueberry("vaccinium", "corymbosum", 0x72c750, null, ExtraTreeFruitGene.Blueberry, WorldGenShrub.Shrub.class),
|
||||
Cranberry("vaccinium", "oxycoccos", 0x96d179, null, ExtraTreeFruitGene.Cranberry, WorldGenShrub.Shrub.class),
|
||||
Juniper("juniperus", "communis", 0x90b149, null, ExtraTreeFruitGene.Juniper, WorldGenShrub.Shrub.class),
|
||||
Gooseberry("ribes", "grossularia", 0x79bb00, null, ExtraTreeFruitGene.Gooseberry, WorldGenShrub.Shrub.class),
|
||||
GoldenRaspberry("rubus", "occidentalis", 0x83b96e, null, ExtraTreeFruitGene.GoldenRaspberry, WorldGenShrub.Shrub.class),
|
||||
Cinnamon("cinnamomum", "cassia", 0x738e0b, ILogType.ExtraTreeLog.Cinnamon, null, WorldGenLazy.Tree.class),
|
||||
Coconut("cocous", "nucifera", 0x649923, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coconut, WorldGenPalm.Coconut.class),
|
||||
Cashew("anacardium", "occidentale", 0xabb962, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Cashew, WorldGenLazy.Tree.class),
|
||||
Avacado("persea", "americana", 0x96a375, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Avacado, WorldGenLazy.Tree.class),
|
||||
Nutmeg("myristica", "fragrans", 0x488d4c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Nutmeg, WorldGenLazy.Tree.class),
|
||||
Allspice("pimenta", "dioica", 0x7c9724, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Allspice, WorldGenLazy.Tree.class),
|
||||
Chilli("capsicum", "annuum", 0x2a9f01, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Chilli, WorldGenLazy.Tree.class),
|
||||
StarAnise("illicium", "verum", 0x7fc409, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.StarAnise, WorldGenLazy.Tree.class),
|
||||
Mango("mangifera", "indica", 0x87b574, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Mango, WorldGenTropical.Mango.class),
|
||||
Starfruit("averrhoa", "carambola", 0x6da92d, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Starfruit, WorldGenLazy.Tree.class),
|
||||
Candlenut("aleurites", "moluccana", 0x8aa36c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Candlenut, WorldGenLazy.Tree.class),
|
||||
DwarfHazel("Corylus", "americana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenShrub.Shrub.class);
|
||||
Blackcurrant("ribes", "nigrum", 0xa6da5c, null, ExtraTreeFruitGene.Blackcurrant, WorldGenShrub.class),
|
||||
Redcurrant("ribes", "rubrum", 0x74ac00, null, ExtraTreeFruitGene.Redcurrant, WorldGenShrub.class),
|
||||
Blackberry("rubus", "fruticosus", 0x92c15b, null, ExtraTreeFruitGene.Blackberry, WorldGenShrub.class),
|
||||
Raspberry("rubus", "idaeus", 0x83b96e, null, ExtraTreeFruitGene.Raspberry, WorldGenShrub.class),
|
||||
Blueberry("vaccinium", "corymbosum", 0x72c750, null, ExtraTreeFruitGene.Blueberry, WorldGenShrub.class),
|
||||
Cranberry("vaccinium", "oxycoccos", 0x96d179, null, ExtraTreeFruitGene.Cranberry, WorldGenShrub.class),
|
||||
Juniper("juniperus", "communis", 0x90b149, null, ExtraTreeFruitGene.Juniper, WorldGenShrub.class),
|
||||
Gooseberry("ribes", "grossularia", 0x79bb00, null, ExtraTreeFruitGene.Gooseberry, WorldGenShrub.class),
|
||||
GoldenRaspberry("rubus", "occidentalis", 0x83b96e, null, ExtraTreeFruitGene.GoldenRaspberry, WorldGenShrub.class),
|
||||
Cinnamon("cinnamomum", "cassia", 0x738e0b, ILogType.ExtraTreeLog.Cinnamon, null, WorldGenLazy.class),
|
||||
Coconut("cocous", "nucifera", 0x649923, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Coconut, WorldGenCoconut.class),
|
||||
Cashew("anacardium", "occidentale", 0xabb962, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Cashew, WorldGenLazy.class),
|
||||
Avacado("persea", "americana", 0x96a375, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Avacado, WorldGenLazy.class),
|
||||
Nutmeg("myristica", "fragrans", 0x488d4c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Nutmeg, WorldGenLazy.class),
|
||||
Allspice("pimenta", "dioica", 0x7c9724, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Allspice, WorldGenLazy.class),
|
||||
Chilli("capsicum", "annuum", 0x2a9f01, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Chilli, WorldGenLazy.class),
|
||||
StarAnise("illicium", "verum", 0x7fc409, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.StarAnise, WorldGenLazy.class),
|
||||
Mango("mangifera", "indica", 0x87b574, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Mango, WorldGenMango.class),
|
||||
Starfruit("averrhoa", "carambola", 0x6da92d, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Starfruit, WorldGenLazy.class),
|
||||
Candlenut("aleurites", "moluccana", 0x8aa36c, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.Candlenut, WorldGenLazy.class),
|
||||
DwarfHazel("Corylus", "americana", 0x9bb552, ILogType.ExtraTreeLog.Hazel, ExtraTreeFruitGene.Hazelnut, WorldGenShrub.class);
|
||||
|
||||
public ILogType wood;
|
||||
|
||||
@@ -1169,6 +1205,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
try {
|
||||
return gen.getConstructor(ITreeGenData.class).newInstance(tree);
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
// ignored
|
||||
}
|
||||
}
|
||||
@@ -1179,11 +1216,9 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
leafType = type;
|
||||
if (leafType == LeafType.CONIFER) {
|
||||
saplingType = SaplingType.CONIFER;
|
||||
}
|
||||
if (leafType == LeafType.JUNGLE) {
|
||||
} else if (leafType == LeafType.JUNGLE) {
|
||||
saplingType = SaplingType.JUNGLE;
|
||||
}
|
||||
if (leafType == LeafType.PALM) {
|
||||
} else if (leafType == LeafType.PALM) {
|
||||
saplingType = SaplingType.PALM;
|
||||
}
|
||||
return this;
|
||||
@@ -1247,7 +1282,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
return this;
|
||||
}
|
||||
|
||||
public int getLeafColour(ITree tree) {
|
||||
public int getLeafColor(ITree tree) {
|
||||
return color;
|
||||
}
|
||||
|
||||
@@ -1359,14 +1394,14 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
public int getGermlingColour(EnumGermlingType type, int renderPass) {
|
||||
if (type == EnumGermlingType.SAPLING) {
|
||||
if (renderPass == 0) {
|
||||
return getLeafColour(null);
|
||||
return getLeafColor(null);
|
||||
}
|
||||
if (getLog() == null) {
|
||||
return 0xffffff;
|
||||
}
|
||||
return getLog().getColour();
|
||||
}
|
||||
return getLeafColour(null);
|
||||
return getLeafColor(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import binnie.core.Mods;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BlockTypeLeaf extends BlockType {
|
||||
public BlockTypeLeaf() {
|
||||
super(Mods.forestry.block("leaves"), 0);
|
||||
public BlockTypeLeaf(boolean decay) {
|
||||
super(decay ? Mods.forestry.block("leaves") : ExtraTrees.blockShrubLeaves, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -24,8 +24,9 @@ public class DefaultTreeGenerator implements ITreeGenerator {
|
||||
|
||||
@Override
|
||||
public void setLogBlock(ITreeGenome genome, World world, int x, int y, int z, ForgeDirection direction) {
|
||||
if (extraTreeSpecies.wood != null)
|
||||
if (extraTreeSpecies.wood != null) {
|
||||
extraTreeSpecies.wood.placeBlock(world, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenAcornOak extends WorldGenTree {
|
||||
public WorldGenAcornOak(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = 3.0f;
|
||||
float width = height * randBetween(0.45f, 0.5f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.4f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width * 0.7f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.2f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenAlder {
|
||||
public static class CommonAlder extends WorldGenTree {
|
||||
public CommonAlder(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(1, 2);
|
||||
float width = height * randBetween(0.4f, 0.45f);
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.3f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.4f, 1, leaf, false);
|
||||
}
|
||||
float f5 = 0.0f;
|
||||
float h5 = leafSpawn;
|
||||
leafSpawn = h5 - 1.0f;
|
||||
generateCylinder(new Vector(f5, h5, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenApple {
|
||||
public static class OrchardApple extends WorldGenTree {
|
||||
public OrchardApple(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
while (leafSpawn > 2) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 6);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class SweetCrabapple extends WorldGenTree {
|
||||
public SweetCrabapple(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 4);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class FloweringCrabapple extends WorldGenTree {
|
||||
public FloweringCrabapple(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.0f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 6);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
|
||||
public static class PrairieCrabapple extends WorldGenTree {
|
||||
public PrairieCrabapple(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 1.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.5f, 1, leaf, false);
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.0f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 4);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenAsh {
|
||||
public static class CommonAsh extends WorldGenTree {
|
||||
public CommonAsh(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.35f, 0.45f);
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
|
||||
}
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenAspen extends WorldGenTree {
|
||||
public WorldGenAspen(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = randBetween(height / 2, height / 2 + 1) + 1;
|
||||
float width = height * randBetween(0.25f, 0.35f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.5f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.9f, 1.1f) * width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenBalsamFir extends WorldGenTree {
|
||||
public WorldGenBalsamFir(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 2;
|
||||
float bottom = 1.0f;
|
||||
float width = height / randBetween(2.0f, 2.5f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
float radius = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
radius *= width;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), radius, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -13,10 +13,10 @@ public class WorldGenBanana extends WorldGenTree {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height + 1;
|
||||
float width = height / randBetween(1.8f, 2.0f);
|
||||
int bottom = randBetween(3, 4);
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.9f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.9f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.arboriculture.ITree;
|
||||
|
||||
public class WorldGenBeech {
|
||||
public static class CommonBeech extends WorldGenTree {
|
||||
public CommonBeech(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.47f, 0.5f);
|
||||
float f = 0.0f;
|
||||
float h = leafSpawn;
|
||||
leafSpawn = h - 1.0f;
|
||||
generateCylinder(new Vector(f, h, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
float f2 = 0.0f;
|
||||
float h2 = leafSpawn;
|
||||
leafSpawn = h2 - 1.0f;
|
||||
generateCylinder(new Vector(f2, h2, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
float f3 = 0.0f;
|
||||
float h3 = leafSpawn;
|
||||
leafSpawn = h3 - 1.0f;
|
||||
generateCylinder(new Vector(f3, h3, 0.0f), width, 1, leaf, false);
|
||||
float f4 = 0.0f;
|
||||
float h4 = leafSpawn;
|
||||
leafSpawn = h4 - 1.0f;
|
||||
generateCylinder(new Vector(f4, h4, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
float f5 = 0.0f;
|
||||
float h5 = leafSpawn;
|
||||
leafSpawn = h5 - 1.0f;
|
||||
generateCylinder(new Vector(f5, h5, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
public static class CopperBeech extends CommonBeech {
|
||||
public CopperBeech(ITree tree) {
|
||||
super(tree);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenBox extends WorldGenTree {
|
||||
public WorldGenBox(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = 0.0f;
|
||||
float width = 1.5f;
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenBrazilNut extends WorldGenTree {
|
||||
public WorldGenBrazilNut(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = height - 3;
|
||||
float width = height * randBetween(0.25f, 0.3f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(7, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenBrazilwood extends WorldGenTree {
|
||||
public WorldGenBrazilwood(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = 1.0f;
|
||||
float width = height * randBetween(0.15f, 0.2f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.8f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenButternut extends WorldGenTree {
|
||||
public WorldGenButternut(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
int leafSpawn = height + 1;
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 2.0f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 3.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 4.5f, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 5.0f, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > 3) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 5.0f, 1, leaf, false);
|
||||
}
|
||||
if (rand.nextBoolean()) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 4.0f, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 3);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCedar extends WorldGenTree {
|
||||
public WorldGenCedar(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 3;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.7f, 0.75f);
|
||||
if (width > 7.0f) {
|
||||
width = 7.0f;
|
||||
}
|
||||
|
||||
float coneHeight = leafSpawn - bottom;
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), girth, 1, leaf, false);
|
||||
}
|
||||
|
||||
for (leafSpawn = height + 3; leafSpawn > bottom; leafSpawn += 1 + rand.nextInt(2)) {
|
||||
float cone = 1.0f - (leafSpawn - bottom) / coneHeight;
|
||||
cone *= 2.0f - cone;
|
||||
|
||||
float radius = (0.7f + rand.nextFloat() * 0.3f) * width;
|
||||
radius *= cone;
|
||||
if (radius < 2.0f) {
|
||||
radius = 2.0f;
|
||||
}
|
||||
|
||||
float xOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
|
||||
xOffset *= cone;
|
||||
if (xOffset > radius / 2.0f) {
|
||||
xOffset = radius / 2.0f;
|
||||
}
|
||||
|
||||
float yOffset = (-width + rand.nextFloat() * 2.0f * width) / 2.0f;
|
||||
yOffset *= cone;
|
||||
if (yOffset > radius / 2.0f) {
|
||||
yOffset = radius / 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), 0.7f * radius, 1, leaf, false);
|
||||
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), radius, 1, leaf, false);
|
||||
generateCylinder(new Vector(xOffset, leafSpawn--, yOffset), 0.5f * radius, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenClove extends WorldGenTree {
|
||||
public WorldGenClove(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = 2.0f;
|
||||
float width = height * randBetween(0.25f, 0.3f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.6f, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.4f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(4, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCoconut extends WorldGenTree {
|
||||
public WorldGenCoconut(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float width = height * randBetween(0.35f, 0.4f);
|
||||
if (width < 1.2) {
|
||||
width = 1.55f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.6f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(6, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCoffee extends WorldGenTree {
|
||||
public WorldGenCoffee(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height;
|
||||
float bottom = 1.0f;
|
||||
float width = height * randBetween(0.25f, 0.3f);
|
||||
if (width < 2.0f) {
|
||||
width = 2.0f;
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
}
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 0.3f, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(3, 1);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCommonAlder extends WorldGenTree {
|
||||
public WorldGenCommonAlder(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(1, 2);
|
||||
float width = height * randBetween(0.4f, 0.45f);
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.3f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.4f, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCommonAsh extends WorldGenTree {
|
||||
public WorldGenCommonAsh(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.35f, 0.45f);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), randBetween(0.95f, 1.05f) * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), 0.7f * width, 1, leaf, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preGenerate() {
|
||||
height = determineHeight(5, 2);
|
||||
girth = determineGirth(treeGen.getGirth(world, startX, startY, startZ));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package binnie.extratrees.worldgen;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
|
||||
public class WorldGenCommonBeech extends WorldGenTree {
|
||||
public WorldGenCommonBeech(ITreeGenData tree) {
|
||||
super(tree);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate() {
|
||||
generateTreeTrunk(height, girth);
|
||||
float leafSpawn = height + 1;
|
||||
float bottom = randBetween(2, 3);
|
||||
float width = height * randBetween(0.47f, 0.5f);
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.4f * width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), 0.8f * width, 1, leaf, false);
|
||||
|
||||
while (leafSpawn > bottom) {
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width, 1, leaf, false);
|
||||
generateCylinder(new Vector(0.0f, leafSpawn--, 0.0f), width - 0.5f, 1, leaf, false);
|
||||
}
|
||||
|
||||
generateCylinder(new Vector(0.0f, leafSpawn, 0.0f), width - 1.0f, 1, leaf, false);
|
||||
}
|
||||
}
|
||||
Loaded 100 of 201 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user