mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-14 17:24:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f253dfc5dc | ||
|
|
6582ea3e56 | ||
|
|
bb96e7deae | ||
|
|
7643d11e14 | ||
|
|
4eb26e9d77 | ||
|
|
2b1843b74d | ||
|
|
0b312261db | ||
|
|
bd0746583a | ||
|
|
b4143fb0ef | ||
|
|
77c47e9071 | ||
|
|
f27b66c53f | ||
|
|
ad16588e3b | ||
|
|
5acbd0b977 | ||
|
|
7e22128279 | ||
|
|
65e11fa564 | ||
|
|
355c85598e | ||
|
|
63232799bc | ||
|
|
a48f59e0ed | ||
|
|
84d462d8d5 | ||
|
|
b32f2a210c | ||
|
|
c988aa9870 |
No files matched your search
@@ -0,0 +1,17 @@
|
||||
name: Optimize images
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
push:
|
||||
branches: [ master, main, release/** ]
|
||||
paths:
|
||||
- "**/*.png"
|
||||
|
||||
jobs:
|
||||
optimize-images:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/optimize-images.yml@master
|
||||
secrets: inherit
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:ForestryMC:4.11.0:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.7.3:dev')
|
||||
api('com.github.GTNewHorizons:ForestryMC:4.11.28:dev')
|
||||
implementation('com.github.GTNewHorizons:GTNHLib:0.11.19:dev')
|
||||
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.26-GTNH:dev')
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.105-GTNH:dev')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.45:api')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.61:api')
|
||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
compileOnly("curse.maven:extrabiomesxl-60041:2273301")
|
||||
}
|
||||
+23
-3
@@ -39,14 +39,34 @@ remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/co
|
||||
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
enableModernJavaSyntax = true
|
||||
# Enables modern Java syntax support. Valid values:
|
||||
# - false: No modern syntax, Java 8 only
|
||||
# - jabel: Jabel syntax-only support, compiles to J8 bytecode
|
||||
# - jvmDowngrader: Full modern Java via JVM Downgrader (syntax + stdlib APIs)
|
||||
# - modern: Native modern Java bytecode, no downgrading
|
||||
enableModernJavaSyntax = jabel
|
||||
|
||||
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||
# and should *not* be used in most situations. -1 disables this.
|
||||
# forceToolchainVersion = -1
|
||||
|
||||
# Target JVM version for JVM Downgrader bytecode downgrading.
|
||||
# Only used when enableModernJavaSyntax = jvmDowngrader
|
||||
# downgradeTargetVersion = 8
|
||||
|
||||
# Comma-separated list of Java versions for multi-release jar support (JVM Downgrader only).
|
||||
# Classes will be available in META-INF/versions/N/ for each version N in this list.
|
||||
# Default: "21,25" (J25+ gets native classes, J21-24 gets partial downgrade, J8-20 gets full downgrade).
|
||||
# jvmDowngraderMultiReleaseVersions = 21,25
|
||||
|
||||
# Specifies how JVM Downgrader API stubs are provided. Options:
|
||||
# - shade: Shade minimized stubs into the jar
|
||||
# - gtnhlib: GTNHLib provides stubs at runtime (adds version constraint)
|
||||
# - external: Another dependency provides stubs (no constraint, no warning)
|
||||
# - (empty): Warning reminding you to configure stubs
|
||||
# Note: 'shade' option requires you to verify license compliance, see: https://github.com/unimined/JvmDowngrader/blob/main/LICENSE.md
|
||||
# jvmDowngraderStubsProvider =
|
||||
|
||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||
enableGenericInjection = true
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/e1118b4c7c2858d28154d086dbff010e/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/59a9771cad43219260d9aac9a8ec4d6a/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c5ee947fbfb70bc347d8d531e3a578c4/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/5ee463876563a46fff651cce1bc53a4c/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/832229f0f6f0be60ed817c5a5e5848eb/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/b96cb7670c095245220e7d01d5927b58/redirect
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
|
||||
toolchainVersion=25
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
+1
-1
@@ -17,5 +17,5 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.6'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.26'
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public class Botany extends AbstractMod {
|
||||
EnumSoilType type = soil.getType(event.world, event.x, y, event.z);
|
||||
int next = Math
|
||||
.min(type.ordinal() + Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 2);
|
||||
if (soil.fertilise(event.world, event.x, y, event.z, EnumSoilType.values()[next])
|
||||
if (soil.fertilise(event.world, event.x, y, event.z, EnumSoilType.VALUES[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem = event.entityPlayer.getHeldItem();
|
||||
heldItem.stackSize--;
|
||||
@@ -284,7 +284,7 @@ public class Botany extends AbstractMod {
|
||||
EnumAcidity pH = soil.getPH(event.world, event.x, y, event.z);
|
||||
int next = Math
|
||||
.max(pH.ordinal() - Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 0);
|
||||
if (soil.setPH(event.world, event.x, y, event.z, EnumAcidity.values()[next])
|
||||
if (soil.setPH(event.world, event.x, y, event.z, EnumAcidity.VALUES[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem2 = event.entityPlayer.getHeldItem();
|
||||
heldItem2.stackSize--;
|
||||
@@ -297,7 +297,7 @@ public class Botany extends AbstractMod {
|
||||
EnumAcidity pH = soil.getPH(event.world, event.x, y, event.z);
|
||||
int next = Math
|
||||
.min(pH.ordinal() + Gardening.getFertiliserStrength(event.entityPlayer.getHeldItem()), 2);
|
||||
if (soil.setPH(event.world, event.x, y, event.z, EnumAcidity.values()[next])
|
||||
if (soil.setPH(event.world, event.x, y, event.z, EnumAcidity.VALUES[next])
|
||||
&& !event.entityPlayer.capabilities.isCreativeMode) {
|
||||
ItemStack heldItem3 = event.entityPlayer.getHeldItem();
|
||||
heldItem3.stackSize--;
|
||||
|
||||
@@ -6,6 +6,11 @@ public enum EnumAcidity {
|
||||
NEUTRAL,
|
||||
ALKALINE;
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumAcidity[] VALUES = values();
|
||||
|
||||
public String getID() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@ public enum EnumFlowerChromosome implements IChromosomeType {
|
||||
SAPPINESS(IAlleleFloat.class),
|
||||
STEM(IAlleleInteger.class);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumFlowerChromosome[] VALUES = values();
|
||||
private final Class<? extends IAllele> cls;
|
||||
|
||||
EnumFlowerChromosome(Class<? extends IAllele> cls) {
|
||||
|
||||
@@ -6,6 +6,11 @@ public enum EnumMoisture {
|
||||
NORMAL,
|
||||
DAMP;
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumMoisture[] VALUES = values();
|
||||
|
||||
public String getID() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@ public enum EnumSoilType {
|
||||
LOAM,
|
||||
FLOWERBED;
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumSoilType[] VALUES = values();
|
||||
|
||||
public String getID() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class BlockCeramic extends Block implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List<ItemStack> itemList) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.VALUES) {
|
||||
itemList.add(TileEntityMetadata.getItemStack(this, c.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,12 +102,12 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> itemList) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.VALUES) {
|
||||
BlockType type = new BlockType(c, c, TileType.Tile);
|
||||
itemList.add(TileEntityMetadata.getItemStack(this, type.ordinal()));
|
||||
}
|
||||
|
||||
for (TileType type2 : TileType.values()) {
|
||||
for (TileType type2 : TileType.VALUES) {
|
||||
if (type2.canDouble()) {
|
||||
itemList.add(new BlockType(EnumFlowerColor.BROWN, EnumFlowerColor.GOLD, type2).getStack(1));
|
||||
}
|
||||
@@ -130,13 +130,13 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return getType(meta).getIcon(MultipassBlockRenderer.getLayer());
|
||||
return TileType.get(meta >>> 16 & 0xFF).icons[MultipassBlockRenderer.getLayer()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
for (TileType type : TileType.values()) {
|
||||
for (TileType type : TileType.VALUES) {
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
type.icons[i] = Botany.proxy.getIcon(register, "ceramic." + type.id + "." + i);
|
||||
}
|
||||
@@ -167,6 +167,9 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getRenderColor(int meta) {
|
||||
if (!MultipassBlockRenderer.isRendering()) {
|
||||
return EnumFlowerColor.get(meta & 0xFF).getColor(false);
|
||||
}
|
||||
return colorMultiplier(meta);
|
||||
}
|
||||
|
||||
@@ -177,14 +180,14 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
|
||||
@Override
|
||||
public int colorMultiplier(int meta) {
|
||||
BlockType type = getType(meta);
|
||||
if (MultipassBlockRenderer.getLayer() == 0) {
|
||||
int layer = MultipassBlockRenderer.getLayer();
|
||||
if (layer == 0) {
|
||||
return 0xffffff;
|
||||
}
|
||||
if (MultipassBlockRenderer.getLayer() == 1) {
|
||||
return type.color1.getColor(false);
|
||||
if (layer == 1) {
|
||||
return EnumFlowerColor.get(meta & 0xFF).getColor(false);
|
||||
}
|
||||
return type.color2.getColor(false);
|
||||
return EnumFlowerColor.get(meta >>> 8 & 0xFF).getColor(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -205,6 +208,10 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
VerticalStripeBrick("verticalbrickstripe", "verticalStripedCeramicBricks"),
|
||||
VerticalLargeBrick("verticalbricklarge", "largeVerticalCeramicBricks");
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final TileType[] VALUES = values();
|
||||
private final String id;
|
||||
private final String name;
|
||||
private final IIcon[] icons;
|
||||
@@ -216,7 +223,7 @@ public class BlockCeramicBrick extends Block implements IBlockMetadata, IMultipa
|
||||
}
|
||||
|
||||
public static TileType get(int id) {
|
||||
return values()[id % values().length];
|
||||
return VALUES[id % VALUES.length];
|
||||
}
|
||||
|
||||
public boolean canDouble() {
|
||||
|
||||
@@ -124,7 +124,7 @@ public class BlockStained extends Block implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> itemList) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.VALUES) {
|
||||
itemList.add(TileEntityMetadata.getItemStack(this, c.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ public class CeramicColor implements IDesignMaterial {
|
||||
|
||||
static {
|
||||
CeramicColor.map = new LinkedHashMap<>();
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.VALUES) {
|
||||
CeramicColor.map.put(c, new CeramicColor(c));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class CeramicDesignSystem implements IDesignSystem {
|
||||
|
||||
@Override
|
||||
public void registerIcons(IIconRegister register) {
|
||||
for (EnumPattern pattern : EnumPattern.values()) {
|
||||
for (EnumPattern pattern : EnumPattern.VALUES) {
|
||||
primary.put(
|
||||
pattern.ordinal(),
|
||||
BinnieCore.proxy.getIcon(
|
||||
|
||||
@@ -52,7 +52,7 @@ public class CeramicTileRecipe implements IRecipe {
|
||||
}
|
||||
}
|
||||
|
||||
for (BlockCeramicBrick.TileType type : BlockCeramicBrick.TileType.values()) {
|
||||
for (BlockCeramicBrick.TileType type : BlockCeramicBrick.TileType.VALUES) {
|
||||
ItemStack stack2 = type.getRecipe(stacks);
|
||||
if (stack2 != null) {
|
||||
return stack2;
|
||||
|
||||
@@ -91,7 +91,7 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
}
|
||||
};
|
||||
List<IFlowerColor> colors = new ArrayList<>();
|
||||
Collections.addAll(colors, EnumFlowerColor.values());
|
||||
Collections.addAll(colors, EnumFlowerColor.VALUES);
|
||||
listBox.setOptions(colors);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ public class GardenLogic extends FarmLogic {
|
||||
if (pH.ordinal() < acidity.ordinal()) {
|
||||
ItemStack stack = getAvailableAlkaline();
|
||||
if (stack != null && soil
|
||||
.setPH(world, position.x, position.y, position.z, EnumAcidity.values()[pH.ordinal() + 1])) {
|
||||
.setPH(world, position.x, position.y, position.z, EnumAcidity.VALUES[pH.ordinal() + 1])) {
|
||||
housing.getFarmInventory().removeResources(new ItemStack[] { stack });
|
||||
continue;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ public class GardenLogic extends FarmLogic {
|
||||
if (pH.ordinal() > acidity.ordinal()) {
|
||||
ItemStack stack = getAvailableAcid();
|
||||
if (stack != null && soil
|
||||
.setPH(world, position.x, position.y, position.z, EnumAcidity.values()[pH.ordinal() - 1])) {
|
||||
.setPH(world, position.x, position.y, position.z, EnumAcidity.VALUES[pH.ordinal() - 1])) {
|
||||
housing.getFarmInventory().removeResources(new ItemStack[] { stack });
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ public class BlockFlower extends BlockContainer {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
for (EnumFlowerType type : EnumFlowerType.values()) {
|
||||
for (EnumFlowerType type : EnumFlowerType.VALUES) {
|
||||
type.registerIcons(register);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ public class BlockSoil extends Block implements IBlockSoil {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
for (EnumMoisture moisture : EnumMoisture.values()) {
|
||||
for (EnumAcidity pH : EnumAcidity.values()) {
|
||||
for (EnumMoisture moisture : EnumMoisture.VALUES) {
|
||||
for (EnumAcidity pH : EnumAcidity.VALUES) {
|
||||
int index = moisture.ordinal() + pH.ordinal() * 3;
|
||||
String id = "soil/" + getType().getID() + "." + pH.getID() + "." + moisture.getID();
|
||||
iconsTop[index] = Botany.proxy.getIcon(register, id + ".0");
|
||||
@@ -104,8 +104,8 @@ public class BlockSoil extends Block implements IBlockSoil {
|
||||
@Override
|
||||
public void updateTick(World world, int x, int y, int z, Random random) {
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
EnumMoisture moisture = EnumMoisture.values()[meta % 3];
|
||||
EnumAcidity acidity = EnumAcidity.values()[meta / 3];
|
||||
EnumMoisture moisture = EnumMoisture.VALUES[meta % 3];
|
||||
EnumAcidity acidity = EnumAcidity.VALUES[meta / 3];
|
||||
EnumMoisture desiredMoisture = Gardening.getNaturalMoisture(world, x, y, z);
|
||||
if (desiredMoisture.ordinal() > moisture.ordinal()) {
|
||||
moisture = ((moisture == EnumMoisture.DRY) ? EnumMoisture.NORMAL : EnumMoisture.DAMP);
|
||||
@@ -141,12 +141,12 @@ public class BlockSoil extends Block implements IBlockSoil {
|
||||
|
||||
@Override
|
||||
public EnumAcidity getPH(World world, int x, int y, int z) {
|
||||
return EnumAcidity.values()[world.getBlockMetadata(x, y, z) / 3];
|
||||
return EnumAcidity.VALUES[world.getBlockMetadata(x, y, z) / 3];
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumMoisture getMoisture(World world, int x, int y, int z) {
|
||||
return EnumMoisture.values()[world.getBlockMetadata(x, y, z) % 3];
|
||||
return EnumMoisture.VALUES[world.getBlockMetadata(x, y, z) % 3];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -233,8 +233,8 @@ public class Gardening {
|
||||
BiomeGenBase biome = world.getBiomeGenForCoords(x, z);
|
||||
return canTolerate(
|
||||
flower,
|
||||
EnumAcidity.values()[soilMeta / 3 % 3],
|
||||
EnumMoisture.values()[soilMeta % 3],
|
||||
EnumAcidity.VALUES[soilMeta / 3 % 3],
|
||||
EnumMoisture.VALUES[soilMeta % 3],
|
||||
EnumTemperature.getFromValue(biome.temperature));
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@ public class ItemSoil extends ItemBlock {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
|
||||
super.addInformation(stack, player, tooltip, advanced);
|
||||
EnumMoisture moisture = EnumMoisture.values()[stack.getItemDamage() % 3];
|
||||
EnumAcidity acidity = EnumAcidity.values()[stack.getItemDamage() / 3];
|
||||
EnumMoisture moisture = EnumMoisture.VALUES[stack.getItemDamage() % 3];
|
||||
EnumAcidity acidity = EnumAcidity.VALUES[stack.getItemDamage() / 3];
|
||||
String info = "";
|
||||
|
||||
if (moisture == EnumMoisture.DRY) {
|
||||
|
||||
@@ -109,7 +109,7 @@ public class ModuleGardening implements IInitializable {
|
||||
|
||||
for (boolean manual : new boolean[] { true, false }) {
|
||||
for (boolean fertilised : new boolean[] { true, false }) {
|
||||
for (EnumMoisture moist : EnumMoisture.values()) {
|
||||
for (EnumMoisture moist : EnumMoisture.VALUES) {
|
||||
ItemStack icon = (moist == EnumMoisture.DRY) ? yellow
|
||||
: ((moist == EnumMoisture.NORMAL) ? red : blue);
|
||||
int insulate = 2 - moist.ordinal();
|
||||
@@ -258,7 +258,7 @@ public class ModuleGardening implements IInitializable {
|
||||
GameRegistry
|
||||
.addRecipe(BotanyItems.Mortar.get(6), " c ", "cgc", " c ", 'c', Items.clay_ball, 'g', Blocks.gravel);
|
||||
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.VALUES) {
|
||||
ItemStack clay = new ItemStack(Botany.clay, 1, c.ordinal());
|
||||
ItemStack pigment = new ItemStack(Botany.pigment, 1, c.ordinal());
|
||||
GameRegistry.addShapelessRecipe(clay, Items.clay_ball, Items.clay_ball, Items.clay_ball, pigment);
|
||||
@@ -276,9 +276,9 @@ public class ModuleGardening implements IInitializable {
|
||||
return null;
|
||||
}
|
||||
return new ItemStack(
|
||||
Gardening.getSoilBlock(EnumSoilType.values()[type]),
|
||||
Gardening.getSoilBlock(EnumSoilType.VALUES[type]),
|
||||
1,
|
||||
BlockSoil.getMeta(EnumAcidity.values()[pH], EnumMoisture.values()[moisture]));
|
||||
BlockSoil.getMeta(EnumAcidity.VALUES[pH], EnumMoisture.VALUES[moisture]));
|
||||
}
|
||||
|
||||
private void addAcidFertiliser(ItemStack stack, int strengthMax) {
|
||||
|
||||
@@ -92,7 +92,10 @@ public enum EnumFlowerColor implements IFlowerColor {
|
||||
YELLOW("yellow", 0xffff00),
|
||||
YELLOW_GREEN("yellowGreen", 0x9acd32);
|
||||
|
||||
private static final EnumFlowerColor[] ALL_VALUES = values();
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumFlowerColor[] VALUES = values();
|
||||
private final int color;
|
||||
private final int colorDis;
|
||||
private final String name;
|
||||
@@ -2964,7 +2967,7 @@ public enum EnumFlowerColor implements IFlowerColor {
|
||||
}
|
||||
|
||||
public static EnumFlowerColor get(int i) {
|
||||
return ALL_VALUES[Math.max(0, i) % ALL_VALUES.length];
|
||||
return VALUES[Math.max(0, i) % VALUES.length];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -57,6 +57,10 @@ public enum EnumFlowerType implements IFlowerType {
|
||||
DELPHINIUM(2),
|
||||
HOLLYHOCK(2);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumFlowerType[] VALUES = values();
|
||||
private final int sections;
|
||||
private final IIcon[] stem;
|
||||
private final IIcon[] petal;
|
||||
|
||||
@@ -232,7 +232,7 @@ public class FlowerHelper extends SpeciesRoot implements IFlowerRoot {
|
||||
|
||||
@Override
|
||||
public IChromosomeType[] getKaryotype() {
|
||||
return EnumFlowerChromosome.values();
|
||||
return EnumFlowerChromosome.VALUES;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -496,7 +496,7 @@ public enum FlowerSpecies implements IAlleleFlowerSpecies {
|
||||
|
||||
@Override
|
||||
public EnumHumidity getHumidity() {
|
||||
return EnumHumidity.values()[getMoisture().ordinal()];
|
||||
return EnumHumidity.VALUES[getMoisture().ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,7 +9,7 @@ import forestry.core.genetics.alleles.EnumAllele;
|
||||
public class FlowerTemplates {
|
||||
|
||||
public static IAllele[] getDefaultTemplate() {
|
||||
IAllele[] alleles = new IAllele[EnumFlowerChromosome.values().length];
|
||||
IAllele[] alleles = new IAllele[EnumFlowerChromosome.VALUES.length];
|
||||
alleles[EnumFlowerChromosome.SPECIES.ordinal()] = FlowerSpecies.POPPY;
|
||||
alleles[EnumFlowerChromosome.PRIMARY.ordinal()] = AlleleHelper.getAllele(EnumFlowerColor.RED);
|
||||
alleles[EnumFlowerChromosome.SECONDARY.ordinal()] = AlleleHelper.getAllele(EnumFlowerColor.RED);
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ModuleGenetics implements IInitializable {
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
for (EnumFlowerColor color : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor color : EnumFlowerColor.VALUES) {
|
||||
AlleleManager.alleleRegistry.registerAllele(color.getAllele());
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ItemClay extends Item {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.VALUES) {
|
||||
list.add(new ItemStack(this, 1, c.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class ItemPigment extends Item {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor c : EnumFlowerColor.VALUES) {
|
||||
list.add(new ItemStack(this, 1, c.ordinal()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ public class MessageFlowerUpdate extends MessageCoordinates {
|
||||
public void readData(ByteBuf data) throws IOException {
|
||||
super.readData(data);
|
||||
render = new TileEntityFlower.RenderInfo();
|
||||
render.primary = EnumFlowerColor.values()[data.readByte()];
|
||||
render.secondary = EnumFlowerColor.values()[data.readByte()];
|
||||
render.stem = EnumFlowerColor.values()[data.readByte()];
|
||||
render.type = EnumFlowerType.values()[data.readByte()];
|
||||
render.primary = EnumFlowerColor.get(data.readByte());
|
||||
render.secondary = EnumFlowerColor.get(data.readByte());
|
||||
render.stem = EnumFlowerColor.get(data.readByte());
|
||||
render.type = EnumFlowerType.VALUES[data.readByte()];
|
||||
render.age = data.readByte();
|
||||
render.section = data.readByte();
|
||||
render.wilted = data.readBoolean();
|
||||
|
||||
@@ -12,6 +12,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import binnie.Binnie;
|
||||
import binnie.core.block.MultipassBlockRenderer;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.config.BCConfig;
|
||||
import binnie.core.craftgui.minecraft.ModuleCraftGUI;
|
||||
import binnie.core.gui.BinnieCoreGUI;
|
||||
import binnie.core.gui.BinnieGUIHandler;
|
||||
@@ -78,7 +79,9 @@ public class BinnieCore extends AbstractMod {
|
||||
}
|
||||
|
||||
addModule(new ModuleCraftGUI());
|
||||
addModule(new ModuleStorage());
|
||||
if (!BCConfig.disableCompartments) {
|
||||
addModule(new ModuleStorage());
|
||||
}
|
||||
addModule(new ModuleItems());
|
||||
if (Loader.isModLoaded("BuildCraft|Silicon")) {
|
||||
addModule(new ModuleTrigger());
|
||||
|
||||
@@ -17,6 +17,8 @@ public class ItemMetadata extends ItemBlock {
|
||||
|
||||
public ItemMetadata(Block block) {
|
||||
super(block);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -14,6 +14,7 @@ public class MultipassBlockRenderer implements ISimpleBlockRenderingHandler {
|
||||
|
||||
public static MultipassBlockRenderer instance;
|
||||
private static int layer = 0;
|
||||
private static boolean rendering = false;
|
||||
|
||||
public MultipassBlockRenderer() {
|
||||
MultipassBlockRenderer.instance = this;
|
||||
@@ -23,31 +24,49 @@ public class MultipassBlockRenderer implements ISimpleBlockRenderingHandler {
|
||||
return MultipassBlockRenderer.layer;
|
||||
}
|
||||
|
||||
public static boolean isRendering() {
|
||||
return MultipassBlockRenderer.rendering;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int meta, int modelID, RenderBlocks renderer) {
|
||||
IMultipassBlock multipassBlock = (IMultipassBlock) block;
|
||||
int passes = multipassBlock.getNumberOfPasses();
|
||||
|
||||
block.setBlockBoundsForItemRender();
|
||||
renderer.setRenderBoundsFromBlock(block);
|
||||
GL11.glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
|
||||
MultipassBlockRenderer.layer = 0;
|
||||
while (MultipassBlockRenderer.layer < ((IMultipassBlock) block).getNumberOfPasses()) {
|
||||
renderItem(block, renderer, meta);
|
||||
MultipassBlockRenderer.layer++;
|
||||
MultipassBlockRenderer.rendering = true;
|
||||
try {
|
||||
for (int pass = 0; pass < passes; ++pass) {
|
||||
MultipassBlockRenderer.layer = pass;
|
||||
renderItem(block, multipassBlock, renderer, meta);
|
||||
}
|
||||
} finally {
|
||||
MultipassBlockRenderer.layer = 0;
|
||||
MultipassBlockRenderer.rendering = false;
|
||||
}
|
||||
MultipassBlockRenderer.layer = 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
boolean r = true;
|
||||
MultipassBlockRenderer.layer = 0;
|
||||
while (MultipassBlockRenderer.layer < ((IMultipassBlock) block).getNumberOfPasses()) {
|
||||
r = renderer.renderStandardBlock(block, x, y, z);
|
||||
MultipassBlockRenderer.layer++;
|
||||
IMultipassBlock multipassBlock = (IMultipassBlock) block;
|
||||
int passes = multipassBlock.getNumberOfPasses();
|
||||
boolean rendered = true;
|
||||
|
||||
MultipassBlockRenderer.rendering = true;
|
||||
try {
|
||||
for (int pass = 0; pass < passes; ++pass) {
|
||||
MultipassBlockRenderer.layer = pass;
|
||||
rendered = renderer.renderStandardBlock(block, x, y, z);
|
||||
}
|
||||
return rendered;
|
||||
} finally {
|
||||
MultipassBlockRenderer.layer = 0;
|
||||
MultipassBlockRenderer.rendering = false;
|
||||
}
|
||||
MultipassBlockRenderer.layer = 0;
|
||||
return r;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -60,8 +79,8 @@ public class MultipassBlockRenderer implements ISimpleBlockRenderingHandler {
|
||||
return BinnieCore.multipassRenderID;
|
||||
}
|
||||
|
||||
public void renderItem(Block block, RenderBlocks renderer, int meta) {
|
||||
setColor(((IMultipassBlock) block).colorMultiplier(meta));
|
||||
private void renderItem(Block block, IMultipassBlock multipassBlock, RenderBlocks renderer, int meta) {
|
||||
setColor(multipassBlock.colorMultiplier(meta));
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0f, -1.0f, 0.0f);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package binnie.core.config;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.Config;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
|
||||
@Config(modid = BinnieCore.CORE_MODID)
|
||||
public class BCConfig {
|
||||
|
||||
@Config.Comment("If true, disables all compartment storage machines (no blocks/recipes will be registered).")
|
||||
@Config.DefaultBoolean(false)
|
||||
@Config.RequiresMcRestart
|
||||
public static boolean disableCompartments;
|
||||
}
|
||||
@@ -188,7 +188,9 @@ public class WindowFieldKit extends Window {
|
||||
glassOffsetX *= 1.0f - analyseProgress;
|
||||
glassOffsetY += glassVY;
|
||||
glassOffsetY *= 1.0f - analyseProgress;
|
||||
GlassControl.setOffset(new IPoint(glassOffsetX, glassOffsetY));
|
||||
if (GlassControl != null) {
|
||||
GlassControl.setOffset(new IPoint(glassOffsetX, glassOffsetY));
|
||||
}
|
||||
}
|
||||
|
||||
private void refreshSpecies() {
|
||||
|
||||
@@ -20,6 +20,10 @@ public enum EnumColor {
|
||||
Yellow("Yellow", 16777045, 'e'),
|
||||
White("White", 16777215, 'f');
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumColor[] VALUES = values();
|
||||
private final int colour;
|
||||
private final String name;
|
||||
private final char code;
|
||||
|
||||
@@ -240,12 +240,16 @@ public class GuiCraftGUI extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char c, int key) {
|
||||
NEIHook.lastKeyTyped(key, c);
|
||||
boolean noFocusedWidget = window.getFocusedWidget() == null;
|
||||
|
||||
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && window.getFocusedWidget() == null)) {
|
||||
if (noFocusedWidget) {
|
||||
NEIHook.lastKeyTyped(key, c);
|
||||
}
|
||||
|
||||
if (key == 1 || (key == mc.gameSettings.keyBindInventory.getKeyCode() && noFocusedWidget)) {
|
||||
mc.thePlayer.closeScreen();
|
||||
}
|
||||
IWidget origin = (window.getFocusedWidget() == null) ? window : window.getFocusedWidget();
|
||||
IWidget origin = noFocusedWidget ? window : window.getFocusedWidget();
|
||||
window.callEvent(new EventKey.Down(origin, c, key));
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ public abstract class Window extends TopLevelWidget implements INetwork.ReceiveG
|
||||
protected float titleButtonLeft;
|
||||
protected float titleButtonRight;
|
||||
private GuiCraftGUI gui;
|
||||
private Renderer renderer;
|
||||
private final ContainerCraftGUI container;
|
||||
private final WindowInventory windowInventory;
|
||||
private ControlText title;
|
||||
@@ -83,8 +84,8 @@ public abstract class Window extends TopLevelWidget implements INetwork.ReceiveG
|
||||
ControlSlot.highlighting.put(h, new ArrayList<>());
|
||||
}
|
||||
|
||||
CraftGUI.render = new Renderer(gui);
|
||||
CraftGUI.render.stylesheet(StyleSheetManager.getDefault());
|
||||
renderer = new Renderer(gui);
|
||||
renderer.stylesheet(StyleSheetManager.getDefault());
|
||||
titleButtonLeft = -14.0f;
|
||||
|
||||
if (showHelpButton()) {
|
||||
@@ -195,6 +196,9 @@ public abstract class Window extends TopLevelWidget implements INetwork.ReceiveG
|
||||
}
|
||||
|
||||
public void initGui() {
|
||||
|
||||
CraftGUI.render = renderer;
|
||||
|
||||
if (hasBeenInitialised) {
|
||||
return;
|
||||
}
|
||||
@@ -267,7 +271,9 @@ public abstract class Window extends TopLevelWidget implements INetwork.ReceiveG
|
||||
entityInventory = inventory;
|
||||
}
|
||||
|
||||
public void onClose() {}
|
||||
public void onClose() {
|
||||
CraftGUI.render = null;
|
||||
}
|
||||
|
||||
public boolean isServer() {
|
||||
return !isClient();
|
||||
|
||||
@@ -113,7 +113,7 @@ class FlowerBreedingSystem extends BreedingSystem {
|
||||
case PRIMARY:
|
||||
case SECONDARY:
|
||||
case STEM:
|
||||
for (EnumFlowerColor color : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor color : EnumFlowerColor.VALUES) {
|
||||
alleles.add(color.getAllele());
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
package binnie.core.liquid;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
@@ -9,32 +11,62 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import binnie.core.ManagerBase;
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ManagerLiquid extends ManagerBase {
|
||||
|
||||
private static final Set<String> EXTERNAL_FLUIDS = new HashSet<>();
|
||||
|
||||
static {
|
||||
EXTERNAL_FLUIDS.add("liquidnitrogen");
|
||||
}
|
||||
|
||||
private static boolean isExternalFluid(String identifier) {
|
||||
return EXTERNAL_FLUIDS.contains(identifier) && Loader.isModLoaded("gregtech");
|
||||
}
|
||||
|
||||
public Map<String, IFluidType> fluids;
|
||||
private final Set<String> ownedFluids;
|
||||
|
||||
public ManagerLiquid() {
|
||||
fluids = new LinkedHashMap<>();
|
||||
ownedFluids = new HashSet<>();
|
||||
}
|
||||
|
||||
public void createLiquids(IFluidType[] liquids, int startID) {
|
||||
for (IFluidType liquid : liquids) {
|
||||
BinnieFluid fluid = createLiquid(liquid, startID++);
|
||||
if (fluid == null) {
|
||||
String identifier = liquid.getIdentifier().toLowerCase();
|
||||
Fluid fluid = createOrGetLiquid(liquid, startID++);
|
||||
if (fluid == null && !isExternalFluid(identifier)) {
|
||||
throw new RuntimeException("Liquid registered incorrectly - " + liquid.getIdentifier());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BinnieFluid createLiquid(IFluidType fluid, int id) {
|
||||
fluids.put(fluid.getIdentifier().toLowerCase(), fluid);
|
||||
BinnieFluid binnieFluid = new BinnieFluid(fluid);
|
||||
FluidRegistry.registerFluid(binnieFluid);
|
||||
Fluid registeredFluid = createOrGetLiquid(fluid, id);
|
||||
return (registeredFluid instanceof BinnieFluid) ? (BinnieFluid) registeredFluid : null;
|
||||
}
|
||||
|
||||
private Fluid createOrGetLiquid(IFluidType fluid, int id) {
|
||||
String identifier = fluid.getIdentifier().toLowerCase();
|
||||
fluids.put(identifier, fluid);
|
||||
Fluid registeredFluid = FluidRegistry.getFluid(identifier);
|
||||
if (registeredFluid == null && !isExternalFluid(identifier)) {
|
||||
BinnieFluid binnieFluid = new BinnieFluid(fluid);
|
||||
FluidRegistry.registerFluid(binnieFluid);
|
||||
registeredFluid = FluidRegistry.getFluid(identifier);
|
||||
ownedFluids.add(identifier);
|
||||
} else if (registeredFluid == null) {
|
||||
FMLLog.warning(
|
||||
"[Binnie] External liquid %s is not registered yet. Waiting for the owning mod to register it before postInit.",
|
||||
identifier);
|
||||
}
|
||||
ItemFluidContainer.registerFluid(fluid, id);
|
||||
return binnieFluid;
|
||||
return registeredFluid;
|
||||
}
|
||||
|
||||
public FluidStack getLiquidStack(String name, int amount) {
|
||||
@@ -44,18 +76,26 @@ public class ManagerLiquid extends ManagerBase {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void reloadIcons(IIconRegister register) {
|
||||
for (IFluidType type : fluids.values()) {
|
||||
Fluid fluid = getLiquidStack(type.getIdentifier(), 1).getFluid();
|
||||
String identifier = type.getIdentifier().toLowerCase();
|
||||
FluidStack stack = getLiquidStack(identifier, 1);
|
||||
Fluid fluid = stack == null ? null : stack.getFluid();
|
||||
type.registerIcon(register);
|
||||
if (fluid == null) {
|
||||
throw new RuntimeException("[Binnie] Liquid not registered properly - " + type.getIdentifier());
|
||||
}
|
||||
fluid.setIcons(type.getIcon());
|
||||
if (ownedFluids.contains(identifier)) {
|
||||
fluid.setIcons(type.getIcon());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
for (IFluidType fluid : fluids.values()) {
|
||||
String identifier = fluid.getIdentifier().toLowerCase();
|
||||
if (isExternalFluid(identifier) && FluidRegistry.getFluid(identifier) == null) {
|
||||
throw new RuntimeException("[Binnie] External liquid not registered - " + identifier);
|
||||
}
|
||||
for (FluidContainer container : FluidContainer.values()) {
|
||||
if (container.isActive() && fluid.canPlaceIn(container)) {
|
||||
container.registerContainerData(fluid);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.core.machines;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import binnie.core.util.I18N;
|
||||
@@ -53,8 +52,7 @@ public abstract class MachinePackage {
|
||||
this.group = group;
|
||||
}
|
||||
|
||||
public abstract void renderMachine(Machine machine, double x, double y, double z, float partialTick,
|
||||
RenderBlocks renderer);
|
||||
public abstract void renderMachine(Machine machine, double x, double y, double z, float partialTick);
|
||||
|
||||
public boolean isActive() {
|
||||
return active;
|
||||
|
||||
@@ -5,7 +5,6 @@ import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import binnie.Binnie;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
@@ -13,30 +12,27 @@ import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
// Hmm. It's used class
|
||||
public class RendererMachine extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler {
|
||||
|
||||
RenderBlocks blockRenderer;
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity entity, double x, double y, double z, float partialTick) {
|
||||
renderTileEntity((TileEntityMachine) entity, x, y, z, partialTick, blockRenderer);
|
||||
renderTileEntity((TileEntityMachine) entity, x, y, z, partialTick);
|
||||
}
|
||||
|
||||
public void renderTileEntity(TileEntityMachine entity, double x, double y, double z, float partialTick,
|
||||
RenderBlocks renderer) {
|
||||
private void renderTileEntity(TileEntityMachine entity, double x, double y, double z, float partialTick) {
|
||||
if (entity != null && entity.getMachine() != null) {
|
||||
MachinePackage machinePackage = entity.getMachine().getPackage();
|
||||
machinePackage.renderMachine(entity.getMachine(), x, y, z, partialTick, renderer);
|
||||
machinePackage.renderMachine(entity.getMachine(), x, y, z, partialTick);
|
||||
}
|
||||
}
|
||||
|
||||
public void renderInvBlock(RenderBlocks renderblocks, Block block, int i, int j) {
|
||||
private void renderInvBlock(Block block, int i, int j) {
|
||||
TileEntity entity = block.createTileEntity(null, i);
|
||||
renderTileEntity((TileEntityMachine) entity, 0.0, -0.1, 0.0, 0.0625f, renderblocks);
|
||||
renderTileEntity((TileEntityMachine) entity, 0.0, -0.1, 0.0, 0.0625f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
if (modelID == Binnie.Machine.getMachineRenderID()) {
|
||||
renderInvBlock(renderer, block, metadata, modelID);
|
||||
renderInvBlock(block, metadata, modelID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +44,7 @@ public class RendererMachine extends TileEntitySpecialRenderer implements ISimpl
|
||||
&& tile.getMachine().getPackage() != null
|
||||
&& tile.getMachine().getPackage().getGroup() != null
|
||||
&& !tile.getMachine().getPackage().getGroup().customRenderer) {
|
||||
renderTileEntity(tile, x, y, z, 1.0f, renderer);
|
||||
renderTileEntity(tile, x, y, z, 1.0f);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -62,9 +58,4 @@ public class RendererMachine extends TileEntitySpecialRenderer implements ISimpl
|
||||
public int getRenderId() {
|
||||
return Binnie.Machine.getMachineRenderID();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_147496_a(World par1World) {
|
||||
blockRenderer = new RenderBlocks(par1World);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.core.machines.inventory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
@@ -16,10 +15,13 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import binnie.core.machines.IMachine;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectLinkedOpenHashMap;
|
||||
|
||||
public class ComponentInventorySlots extends ComponentInventory implements IInventoryMachine, IInventorySlots {
|
||||
|
||||
private final Map<Integer, InventorySlot> inventory = new LinkedHashMap<>();
|
||||
private final Int2ObjectLinkedOpenHashMap<InventorySlot> inventory = new Int2ObjectLinkedOpenHashMap<>();
|
||||
private int cachedSize = 0;
|
||||
private int[] cachedAccessibleSlots = null;
|
||||
|
||||
public ComponentInventorySlots(IMachine machine) {
|
||||
super(machine);
|
||||
@@ -27,25 +29,20 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
int size = 0;
|
||||
for (Integer index : inventory.keySet()) {
|
||||
size = Math.max(size, index + 1);
|
||||
}
|
||||
return size;
|
||||
return cachedSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int index) {
|
||||
if (inventory.containsKey(index)) {
|
||||
return inventory.get(index).getContent();
|
||||
}
|
||||
return null;
|
||||
InventorySlot slot = inventory.get(index);
|
||||
return slot != null ? slot.getContent() : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int index, int amount) {
|
||||
if (inventory.containsKey(index)) {
|
||||
ItemStack stack = inventory.get(index).decrStackSize(amount);
|
||||
InventorySlot slot = inventory.get(index);
|
||||
if (slot != null) {
|
||||
ItemStack stack = slot.decrStackSize(amount);
|
||||
markDirty();
|
||||
return stack;
|
||||
}
|
||||
@@ -59,8 +56,9 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int index, ItemStack itemStack) {
|
||||
if (inventory.containsKey(index) && (itemStack == null || inventory.get(index).isValid(itemStack))) {
|
||||
inventory.get(index).setContent(itemStack);
|
||||
InventorySlot slot = inventory.get(index);
|
||||
if (slot != null && (itemStack == null || slot.isValid(itemStack))) {
|
||||
slot.setContent(itemStack);
|
||||
}
|
||||
markDirty();
|
||||
}
|
||||
@@ -113,7 +111,7 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
public void writeToNBT(NBTTagCompound nbttagcompound) {
|
||||
super.writeToNBT(nbttagcompound);
|
||||
NBTTagList inventoryNBT = new NBTTagList();
|
||||
for (Map.Entry<Integer, InventorySlot> entry : inventory.entrySet()) {
|
||||
for (Map.Entry<Integer, InventorySlot> entry : inventory.int2ObjectEntrySet()) {
|
||||
NBTTagCompound slotNBT = new NBTTagCompound();
|
||||
slotNBT.setInteger("id", entry.getKey());
|
||||
entry.getValue().writeToNBT(slotNBT);
|
||||
@@ -125,6 +123,8 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
@Override
|
||||
public InventorySlot addSlot(int index, String unlocalizedName) {
|
||||
inventory.put(index, new InventorySlot(index, unlocalizedName));
|
||||
cachedSize = Math.max(cachedSize, index + 1);
|
||||
cachedAccessibleSlots = null;
|
||||
return getSlot(index);
|
||||
}
|
||||
|
||||
@@ -138,10 +138,7 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
|
||||
@Override
|
||||
public InventorySlot getSlot(int index) {
|
||||
if (inventory.containsKey(index)) {
|
||||
return inventory.get(index);
|
||||
}
|
||||
return null;
|
||||
return inventory.get(index);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -151,7 +148,7 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
|
||||
@Override
|
||||
public InventorySlot[] getSlots(int[] indexes) {
|
||||
List<InventorySlot> list = new ArrayList<>();
|
||||
List<InventorySlot> list = new ArrayList<>(indexes.length);
|
||||
for (int i : indexes) {
|
||||
if (getSlot(i) != null) {
|
||||
list.add(getSlot(i));
|
||||
@@ -213,18 +210,20 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int var1) {
|
||||
List<Integer> slots = new ArrayList<>();
|
||||
for (InventorySlot slot : inventory.values()) {
|
||||
if (slot.canInsert() || slot.canExtract()) {
|
||||
slots.add(slot.getIndex());
|
||||
if (cachedAccessibleSlots == null) {
|
||||
List<Integer> slots = new ArrayList<>();
|
||||
for (InventorySlot slot : inventory.values()) {
|
||||
if (slot.canInsert() || slot.canExtract()) {
|
||||
slots.add(slot.getIndex());
|
||||
}
|
||||
}
|
||||
|
||||
cachedAccessibleSlots = new int[slots.size()];
|
||||
for (int i = 0; i < slots.size(); ++i) {
|
||||
cachedAccessibleSlots[i] = slots.get(i);
|
||||
}
|
||||
}
|
||||
|
||||
int[] ids = new int[slots.size()];
|
||||
for (int i = 0; i < slots.size(); ++i) {
|
||||
ids[i] = slots.get(i);
|
||||
}
|
||||
return ids;
|
||||
return cachedAccessibleSlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -234,6 +233,7 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slot, ItemStack itemstack, int direction) {
|
||||
return getSlot(slot).canExtract(ForgeDirection.getOrientation(direction));
|
||||
InventorySlot iSlot = getSlot(slot);
|
||||
return iSlot != null && iSlot.canExtract(ForgeDirection.getOrientation(direction));
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ public class ComponentTankContainer extends MachineComponent implements ITankMac
|
||||
|
||||
@Override
|
||||
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
|
||||
int index = getTankIndexToDrain(from, null);
|
||||
int index = getTankIndexToDrain(from, resource);
|
||||
if (!tanks.containsKey(index)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,11 @@ public interface IProcess extends IErrorStateSource {
|
||||
boolean isInProgress();
|
||||
|
||||
ProcessInfo getInfo();
|
||||
|
||||
/***
|
||||
* Returns true if the current target got worked on at least once.
|
||||
*/
|
||||
default boolean workedOnTarget() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.core.machines.storage;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -51,8 +50,7 @@ enum Compartment implements IMachineType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick,
|
||||
RenderBlocks renderer) {
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick) {
|
||||
MachineRendererCompartment.instance.renderMachine(machine, renderTexture, x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class CompartmentTab implements INBTTagable {
|
||||
public void readFromNBT(NBTTagCompound nbt) {
|
||||
name = nbt.getString("name");
|
||||
icon = ItemStack.loadItemStackFromNBT(nbt.getCompoundTag("icon"));
|
||||
color = EnumColor.values()[nbt.getByte("color")];
|
||||
color = EnumColor.VALUES[nbt.getByte("color")];
|
||||
id = nbt.getByte("id");
|
||||
}
|
||||
|
||||
|
||||
@@ -256,8 +256,8 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
ControlSlide slide = new ControlSlide(this, 0.0f, 134.0f, 136.0f, 92.0f, Position.LEFT);
|
||||
slide.setLabel(I18N.localise("binniecore.machine.storage.tab.properties"));
|
||||
slide.setSlide(false);
|
||||
slide.addHelp(I18N.localise("binniecore.machine.storage.tooltip.properties"));
|
||||
slide.addHelp(I18N.localise("binniecore.machine.storage.tooltip.properties.desc"));
|
||||
slide.addHelp(I18N.localise("binniecore.machine.storage.tab.properties"));
|
||||
slide.addHelp(I18N.localise("binniecore.machine.storage.tab.properties.desc"));
|
||||
Panel tabPropertyPanel = new Panel(slide, 16.0f, 8.0f, 112.0f, 76.0f, MinecraftGUI.PanelType.Gray);
|
||||
int y2 = 4;
|
||||
new ControlText(tabPropertyPanel, new IPoint(4.0f, y2), I18N.localise("binniecore.machine.storage.tab.name"));
|
||||
@@ -320,7 +320,7 @@ public class WindowCompartment extends WindowMachine implements IWindowAffectsSh
|
||||
1 + cw * (cc / 8),
|
||||
cw,
|
||||
cw,
|
||||
EnumColor.values()[cc]);
|
||||
EnumColor.VALUES[cc]);
|
||||
color.addSelfEventHandler(new EventMouse.Down.Handler() {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.extrabees.apiary.machine;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -66,8 +65,7 @@ public enum AlvearyMachine implements IMachineType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick,
|
||||
RenderBlocks renderer) {
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick) {
|
||||
MachineRendererBlock.instance.renderMachine(machineTexture, x, y, z, partialTick);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,9 +54,9 @@ public class ControlClimateBar extends Control implements ITooltip {
|
||||
}
|
||||
|
||||
if (isHumidity) {
|
||||
tooltip.add(EnumHumidity.values()[type].name);
|
||||
tooltip.add(EnumHumidity.VALUES[type].name);
|
||||
} else {
|
||||
tooltip.add(EnumTemperature.values()[type + 1].name);
|
||||
tooltip.add(EnumTemperature.VALUES[type + 1].name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -101,6 +101,10 @@ public enum EnumHoneyComb implements IItemEnum {
|
||||
CYANITE(new Color(0x27204d), new Color(0x86ed)),
|
||||
BLUTONIUM(new Color(0x27204d), new Color(0x1b00e6));
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumHoneyComb[] VALUES = values();
|
||||
public final Map<ItemStack, Float> products;
|
||||
public final int primaryColor;
|
||||
public final int secondaryColor;
|
||||
@@ -117,10 +121,10 @@ public enum EnumHoneyComb implements IItemEnum {
|
||||
|
||||
public static EnumHoneyComb get(ItemStack itemStack) {
|
||||
int i = itemStack.getItemDamage();
|
||||
if (i >= 0 && i < values().length) {
|
||||
return values()[i];
|
||||
if (i >= 0 && i < VALUES.length) {
|
||||
return VALUES[i];
|
||||
}
|
||||
return values()[0];
|
||||
return VALUES[0];
|
||||
}
|
||||
|
||||
public void addRecipe() {
|
||||
|
||||
@@ -44,6 +44,10 @@ public enum EnumHoneyDrop implements IItemEnum {
|
||||
MAGENTA(new Color(0xe57fd8), new Color(0xff00cc), "for.honey"),
|
||||
LIGHTGRAY(new Color(0x999999), new Color(0xc9c9c9), "for.honey");
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumHoneyDrop[] VALUES = values();
|
||||
public final int primaryColor;
|
||||
public final int secondaryColor;
|
||||
|
||||
@@ -58,10 +62,10 @@ public enum EnumHoneyDrop implements IItemEnum {
|
||||
|
||||
public static EnumHoneyDrop get(ItemStack itemStack) {
|
||||
int i = itemStack.getItemDamage();
|
||||
if (i >= 0 && i < values().length) {
|
||||
return values()[i];
|
||||
if (i >= 0 && i < VALUES.length) {
|
||||
return VALUES[i];
|
||||
}
|
||||
return values()[0];
|
||||
return VALUES[0];
|
||||
}
|
||||
|
||||
public void addRemenant(ItemStack stack) {
|
||||
|
||||
@@ -24,6 +24,10 @@ public enum EnumPropolis implements IItemEnum {
|
||||
// GLACIAL,
|
||||
// PEAT
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumPropolis[] VALUES = values();
|
||||
public final int secondaryColor;
|
||||
public final int primaryColor;
|
||||
public final String liquidName;
|
||||
@@ -36,10 +40,10 @@ public enum EnumPropolis implements IItemEnum {
|
||||
|
||||
public static EnumPropolis get(ItemStack itemStack) {
|
||||
int i = itemStack.getItemDamage();
|
||||
if (i >= 0 && i < values().length) {
|
||||
return values()[i];
|
||||
if (i >= 0 && i < VALUES.length) {
|
||||
return VALUES[i];
|
||||
}
|
||||
return values()[0];
|
||||
return VALUES[0];
|
||||
}
|
||||
|
||||
public void addRecipe() {
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ItemHoneyComb extends ItemProduct {
|
||||
protected IIcon icon2;
|
||||
|
||||
public ItemHoneyComb() {
|
||||
super("honeyComb", EnumHoneyComb.values());
|
||||
super("honeyComb", EnumHoneyComb.VALUES);
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
}
|
||||
|
||||
@@ -148,7 +148,9 @@ public class ItemHoneyComb extends ItemProduct {
|
||||
|
||||
EnumHoneyComb.COFFEE.addProduct(beeswax, 0.90f);
|
||||
EnumHoneyComb.COFFEE.addProduct(honeyDrop, 0.75f);
|
||||
EnumHoneyComb.COFFEE.tryAddProduct(Mods.ic2.stack("itemCofeePowder"), 0.75f);
|
||||
if (!OreDictionary.getOres("dustCoffee").isEmpty()) {
|
||||
EnumHoneyComb.COFFEE.tryAddProduct(OreDictionary.getOres("dustCoffee").get(0), 0.75f);
|
||||
}
|
||||
|
||||
EnumHoneyComb.GLACIAL.tryAddProduct(EnumHoneyDrop.ICE, 0.80f);
|
||||
EnumHoneyComb.GLACIAL.addProduct(honeyDrop, 0.75f);
|
||||
@@ -231,15 +233,15 @@ public class ItemHoneyComb extends ItemProduct {
|
||||
OreDictionary.registerOre("beeComb", new ItemStack(ExtraBees.comb, 1, 32767));
|
||||
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
EnumHoneyComb type = EnumHoneyComb.values()[EnumHoneyComb.RED.ordinal() + i];
|
||||
EnumHoneyComb type = EnumHoneyComb.VALUES[EnumHoneyComb.RED.ordinal() + i];
|
||||
if (type != EnumHoneyComb.RED) {
|
||||
type.copyProducts(EnumHoneyComb.RED);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
EnumHoneyComb type = EnumHoneyComb.values()[EnumHoneyComb.RED.ordinal() + i];
|
||||
EnumHoneyDrop drop = EnumHoneyDrop.values()[EnumHoneyDrop.RED.ordinal() + i];
|
||||
EnumHoneyComb type = EnumHoneyComb.VALUES[EnumHoneyComb.RED.ordinal() + i];
|
||||
EnumHoneyDrop drop = EnumHoneyDrop.VALUES[EnumHoneyDrop.RED.ordinal() + i];
|
||||
int[] dyeC = { 1, 11, 4, 2, 0, 15, 3, 14, 6, 5, 8, 12, 9, 10, 13, 7 };
|
||||
int k = dyeC[i];
|
||||
ItemStack dye = switch (k) {
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ItemHoneyDrop extends ItemProduct {
|
||||
protected IIcon icon2;
|
||||
|
||||
public ItemHoneyDrop() {
|
||||
super("honeyDrop", EnumHoneyDrop.values());
|
||||
super("honeyDrop", EnumHoneyDrop.VALUES);
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ import forestry.api.core.Tabs;
|
||||
public class ItemPropolis extends ItemProduct {
|
||||
|
||||
public ItemPropolis() {
|
||||
super("propolis", EnumPropolis.values());
|
||||
super("propolis", EnumPropolis.VALUES);
|
||||
setCreativeTab(Tabs.tabApiculture);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,13 +25,13 @@ public class ModuleProducts implements IInitializable {
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
for (EnumHoneyComb info : EnumHoneyComb.values()) {
|
||||
for (EnumHoneyComb info : EnumHoneyComb.VALUES) {
|
||||
info.addRecipe();
|
||||
}
|
||||
for (EnumHoneyDrop info2 : EnumHoneyDrop.values()) {
|
||||
for (EnumHoneyDrop info2 : EnumHoneyDrop.VALUES) {
|
||||
info2.addRecipe();
|
||||
}
|
||||
for (EnumPropolis info3 : EnumPropolis.values()) {
|
||||
for (EnumPropolis info3 : EnumPropolis.VALUES) {
|
||||
info3.addRecipe();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ public class BlockExtraBeeHive extends Block {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int metadata) {
|
||||
if (metadata >= EnumHiveType.values().length) {
|
||||
if (metadata >= EnumHiveType.VALUES.length) {
|
||||
return null;
|
||||
}
|
||||
if (side < 2) {
|
||||
@@ -56,8 +56,8 @@ public class BlockExtraBeeHive extends Block {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
icons = new IIcon[EnumHiveType.values().length][2];
|
||||
for (EnumHiveType hive : EnumHiveType.values()) {
|
||||
icons = new IIcon[EnumHiveType.VALUES.length][2];
|
||||
for (EnumHiveType hive : EnumHiveType.VALUES) {
|
||||
icons[hive.ordinal()][0] = ExtraBees.proxy
|
||||
.getIcon(register, "hive/" + hive.toString().toLowerCase() + ".0");
|
||||
icons[hive.ordinal()][1] = ExtraBees.proxy
|
||||
@@ -68,7 +68,7 @@ public class BlockExtraBeeHive extends Block {
|
||||
@Override
|
||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
ArrayList<ItemStack> ret = new ArrayList<>();
|
||||
List<IHiveDrop> dropList = EnumHiveType.values()[metadata].drops;
|
||||
List<IHiveDrop> dropList = EnumHiveType.VALUES[metadata].drops;
|
||||
Collections.shuffle(dropList);
|
||||
int tries = 0;
|
||||
|
||||
|
||||
@@ -12,6 +12,10 @@ public enum EnumHiveType {
|
||||
NETHER,
|
||||
MARBLE;
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumHiveType[] VALUES = values();
|
||||
public final List<IHiveDrop> drops;
|
||||
|
||||
EnumHiveType() {
|
||||
|
||||
@@ -40,8 +40,8 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
|
||||
public static DoorType getDoorType(int tileMeta) {
|
||||
int type = (tileMeta & 0xF00) >> 8;
|
||||
if (type < DoorType.values().length) {
|
||||
return DoorType.values()[type];
|
||||
if (type < DoorType.VALUES.length) {
|
||||
return DoorType.VALUES[type];
|
||||
}
|
||||
return DoorType.STANDARD;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
for (DoorType type : DoorType.values()) {
|
||||
for (DoorType type : DoorType.VALUES) {
|
||||
type.iconDoorLower = ExtraTrees.proxy.getIcon(register, "door." + type.id + ".lower");
|
||||
type.iconDoorUpper = ExtraTrees.proxy.getIcon(register, "door." + type.id + ".upper");
|
||||
type.iconDoorLowerFlip = new IconFlipped(type.iconDoorLower, true, false);
|
||||
@@ -237,18 +237,18 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> itemList) {
|
||||
for (IPlankType type : PlankType.ExtraTreePlanks.values()) {
|
||||
for (IPlankType type : PlankType.ExtraTreePlanks.VALUES) {
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.STANDARD));
|
||||
}
|
||||
for (IPlankType type : PlankType.ForestryPlanks.values()) {
|
||||
for (IPlankType type : PlankType.ForestryPlanks.VALUES) {
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.STANDARD));
|
||||
}
|
||||
for (IPlankType type : PlankType.ExtraBiomesPlank.values()) {
|
||||
for (IPlankType type : PlankType.ExtraBiomesPlank.VALUES) {
|
||||
if (type.getStack() != null) {
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.STANDARD));
|
||||
}
|
||||
}
|
||||
for (IPlankType type : PlankType.VanillaPlanks.values()) {
|
||||
for (IPlankType type : PlankType.VanillaPlanks.VALUES) {
|
||||
itemList.add(WoodManager.getDoor(type, DoorType.STANDARD));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int i = 0; i < ILogType.ExtraTreeLog.values().length; ++i) {
|
||||
for (int i = 0; i < ILogType.ExtraTreeLog.VALUES.length; ++i) {
|
||||
list.add(TileEntityMetadata.getItemStack(this, i));
|
||||
}
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
|
||||
|
||||
public IIcon getIcon(int side, int tileMeta, int blockMeta) {
|
||||
int oriented = blockMeta & 0xC;
|
||||
ILogType.ExtraTreeLog log = ILogType.ExtraTreeLog.values()[tileMeta];
|
||||
ILogType.ExtraTreeLog log = ILogType.ExtraTreeLog.VALUES[tileMeta];
|
||||
switch (oriented) {
|
||||
case 4:
|
||||
if (side > 3) {
|
||||
@@ -125,7 +125,7 @@ public class BlockETLog extends BlockLog implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
ILogType.ExtraTreeLog[] logs = ILogType.ExtraTreeLog.values();
|
||||
ILogType.ExtraTreeLog[] logs = ILogType.ExtraTreeLog.VALUES;
|
||||
if (meta < 0 || meta >= logs.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ public class BlockETPlanks extends BlockWood implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise("extratrees.block.plank.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
return I18N.localise("extratrees.block.plank.name", PlankType.ExtraTreePlanks.VALUES[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,7 +90,7 @@ public class BlockETPlanks extends BlockWood implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int i = 0; i < PlankType.ExtraTreePlanks.values().length; ++i) {
|
||||
for (int i = 0; i < PlankType.ExtraTreePlanks.VALUES.length; ++i) {
|
||||
list.add(TileEntityMetadata.getItemStack(this, i));
|
||||
}
|
||||
}
|
||||
@@ -107,13 +107,13 @@ public class BlockETPlanks extends BlockWood implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return PlankType.ExtraTreePlanks.values()[meta].getIcon();
|
||||
return PlankType.ExtraTreePlanks.VALUES[meta].getIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister register) {
|
||||
for (PlankType.ExtraTreePlanks plank : PlankType.ExtraTreePlanks.values()) {
|
||||
for (PlankType.ExtraTreePlanks plank : PlankType.ExtraTreePlanks.VALUES) {
|
||||
plank.loadIcon(register);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
@Override
|
||||
public String getBlockName(ItemStack itemStack) {
|
||||
int meta = TileEntityMetadata.getItemDamage(itemStack);
|
||||
return I18N.localise("extratrees.block.woodslab.name", PlankType.ExtraTreePlanks.values()[meta].getName());
|
||||
return I18N.localise("extratrees.block.woodslab.name", PlankType.ExtraTreePlanks.VALUES[meta].getName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -106,7 +106,7 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
if (field_150004_a) {
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < PlankType.ExtraTreePlanks.values().length; ++i) {
|
||||
for (int i = 0; i < PlankType.ExtraTreePlanks.VALUES.length; ++i) {
|
||||
list.add(TileEntityMetadata.getItemStack(this, i));
|
||||
}
|
||||
}
|
||||
@@ -123,7 +123,7 @@ public class BlockETSlab extends BlockWoodSlab implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
return PlankType.ExtraTreePlanks.values()[meta].getIcon();
|
||||
return PlankType.ExtraTreePlanks.VALUES[meta].getIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -43,7 +43,7 @@ public class BlockETStairs extends BlockStairs implements IBlockMetadata {
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tabs, List<ItemStack> list) {
|
||||
for (int i = 0; i < PlankType.ExtraTreePlanks.values().length; ++i) {
|
||||
for (int i = 0; i < PlankType.ExtraTreePlanks.VALUES.length; ++i) {
|
||||
list.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,10 @@ public enum DoorType {
|
||||
DOUBLE("double"),
|
||||
FULL("full");
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final DoorType[] VALUES = values();
|
||||
final String id;
|
||||
IIcon iconDoorLower;
|
||||
IIcon iconDoorUpper;
|
||||
|
||||
@@ -58,7 +58,7 @@ public interface ILogType {
|
||||
Rosewood("rosewood", 0x998666, PlankType.ExtraTreePlanks.Rosewood),
|
||||
Purpleheart("purpleheart", 0x9392a2, PlankType.ExtraTreePlanks.Purpleheart),
|
||||
Iroko("iroko", 0x605c5b, PlankType.ExtraTreePlanks.Iroko),
|
||||
Gingko("gingko", 0xadae9c, PlankType.ExtraTreePlanks.Gingko),
|
||||
Ginkgo("ginkgo", 0xadae9c, PlankType.ExtraTreePlanks.Ginkgo),
|
||||
Eucalyptus("eucalyptus", 0xeadeda, PlankType.ExtraTreePlanks.Eucalyptus),
|
||||
Eucalyptus2("eucalyptus", 0x867e65, PlankType.ExtraTreePlanks.Eucalyptus),
|
||||
Box("box", 0xab6f57, PlankType.ExtraTreePlanks.Box),
|
||||
@@ -67,6 +67,10 @@ public interface ILogType {
|
||||
Cinnamon("cinnamon", 0x86583c, PlankType.VanillaPlanks.JUNGLE),
|
||||
PinkIvory("pinkivory", 0x7f6554, PlankType.ExtraTreePlanks.PinkIvory);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final ExtraTreeLog[] VALUES = values();
|
||||
private final String name;
|
||||
private final int color;
|
||||
private final IDesignMaterial plank;
|
||||
@@ -86,7 +90,7 @@ public interface ILogType {
|
||||
}
|
||||
|
||||
public static void registerIcons(IIconRegister register) {
|
||||
for (ExtraTreeLog log : values()) {
|
||||
for (ExtraTreeLog log : VALUES) {
|
||||
log.trunk = ExtraTrees.proxy.getIcon(register, "logs/" + log.toString().toLowerCase() + "Trunk");
|
||||
log.bark = ExtraTrees.proxy.getIcon(register, "logs/" + log.toString().toLowerCase() + "Bark");
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ItemETDoor extends ItemMetadata {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register) {
|
||||
for (DoorType type : DoorType.values()) {
|
||||
for (DoorType type : DoorType.VALUES) {
|
||||
type.iconItem = ExtraTrees.proxy.getIcon(register, "door." + type.id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,6 @@ public class ItemETSlab extends ItemMetadata {
|
||||
theHalfSlab = (BlockETSlab) ExtraTrees.blockSlab;
|
||||
doubleSlab = (BlockETSlab) ExtraTrees.blockDoubleSlab;
|
||||
isFullBlock = (block != theHalfSlab);
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,12 +19,14 @@ public class ItemETStairs extends ItemBlock {
|
||||
super(block);
|
||||
setCreativeTab(CreativeTabs.tabBlock);
|
||||
setUnlocalizedName("stairs");
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int par1) {
|
||||
return PlankType.ExtraTreePlanks.values()[par1].getIcon();
|
||||
return PlankType.ExtraTreePlanks.VALUES[par1].getIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -67,12 +67,12 @@ public class ModuleBlocks implements IInitializable {
|
||||
.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockStairs), new StairItemRenderer());
|
||||
BinnieCore.proxy
|
||||
.registerCustomItemRenderer(Item.getItemFromBlock(ExtraTrees.blockGate), new GateItemRenderer());
|
||||
for (ILogType plank : ILogType.ExtraTreeLog.values()) {
|
||||
for (ILogType plank : ILogType.ExtraTreeLog.VALUES) {
|
||||
OreDictionary.registerOre("logWood", plank.getItemStack());
|
||||
}
|
||||
|
||||
GameRegistry.addSmelting(ExtraTrees.blockLog, new ItemStack(Items.coal, 1, 1), 0.15f);
|
||||
for (IPlankType plank2 : PlankType.ExtraTreePlanks.values()) {
|
||||
for (IPlankType plank2 : PlankType.ExtraTreePlanks.VALUES) {
|
||||
OreDictionary.registerOre("plankWood", plank2.getStack());
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ public class ModuleBlocks implements IInitializable {
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
for (PlankType.ExtraTreePlanks plank : PlankType.ExtraTreePlanks.values()) {
|
||||
for (PlankType.ExtraTreePlanks plank : PlankType.ExtraTreePlanks.VALUES) {
|
||||
ItemStack planks = plank.getStack();
|
||||
ItemStack slabs = TileEntityMetadata.getItemStack(ExtraTrees.blockSlab, plank.ordinal());
|
||||
ItemStack stairs = TileEntityMetadata.getItemStack(ExtraTrees.blockStairs, plank.ordinal());
|
||||
|
||||
@@ -18,16 +18,16 @@ import extrabiomes.api.Stuff;
|
||||
public class PlankType {
|
||||
|
||||
public static void setup() {
|
||||
for (VanillaPlanks plank : VanillaPlanks.values()) {
|
||||
for (VanillaPlanks plank : VanillaPlanks.VALUES) {
|
||||
CarpentryManager.carpentryInterface.registerCarpentryWood(plank.ordinal(), plank);
|
||||
}
|
||||
for (ExtraTreePlanks plank2 : ExtraTreePlanks.values()) {
|
||||
for (ExtraTreePlanks plank2 : ExtraTreePlanks.VALUES) {
|
||||
CarpentryManager.carpentryInterface.registerCarpentryWood(plank2.ordinal() + 32, plank2);
|
||||
}
|
||||
for (ForestryPlanks plank3 : ForestryPlanks.values()) {
|
||||
for (ForestryPlanks plank3 : ForestryPlanks.VALUES) {
|
||||
CarpentryManager.carpentryInterface.registerCarpentryWood(plank3.ordinal() + 128, plank3);
|
||||
}
|
||||
for (ExtraBiomesPlank plank4 : ExtraBiomesPlank.values()) {
|
||||
for (ExtraBiomesPlank plank4 : ExtraBiomesPlank.VALUES) {
|
||||
CarpentryManager.carpentryInterface.registerCarpentryWood(plank4.ordinal() + 192, plank4);
|
||||
}
|
||||
}
|
||||
@@ -67,9 +67,13 @@ public class PlankType {
|
||||
Olive(0xb0ad88),
|
||||
Sweetgum(0xd59658),
|
||||
Rosewood(0x761500),
|
||||
Gingko(0xf4e7ba),
|
||||
Ginkgo(0xf4e7ba),
|
||||
PinkIvory(0xec8ca0);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final ExtraTreePlanks[] VALUES = values();
|
||||
private final int color;
|
||||
private IIcon icon;
|
||||
|
||||
@@ -121,6 +125,10 @@ public class PlankType {
|
||||
ACACIA(0xba6337),
|
||||
DARKOAK(0x462d15);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final VanillaPlanks[] VALUES = values();
|
||||
private final int color;
|
||||
|
||||
VanillaPlanks(int color) {
|
||||
@@ -192,6 +200,10 @@ public class PlankType {
|
||||
COCOBOLO(0x731302),
|
||||
ZEBRAWOOD(0xa6824e);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final ForestryPlanks[] VALUES = values();
|
||||
private final int color;
|
||||
|
||||
ForestryPlanks(int color) {
|
||||
@@ -241,6 +253,10 @@ public class PlankType {
|
||||
Fir(0x7e774a),
|
||||
Acacia(0xbfaa7e);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final ExtraBiomesPlank[] VALUES = values();
|
||||
private final int color;
|
||||
|
||||
ExtraBiomesPlank(int color) {
|
||||
|
||||
@@ -15,7 +15,7 @@ public class StairItemRenderer implements IItemRenderer {
|
||||
private void renderStairBlock(RenderBlocks renderBlocks, ItemStack item, float f, float g, float h) {
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
Block block = ((ItemBlock) item.getItem()).field_150939_a;
|
||||
IIcon textureIndex = PlankType.ExtraTreePlanks.values()[item.getItemDamage()].getIcon();
|
||||
IIcon textureIndex = PlankType.ExtraTreePlanks.VALUES[item.getItemDamage()].getIcon();
|
||||
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
if (i == 0) {
|
||||
|
||||
@@ -105,12 +105,12 @@ public class WoodManager {
|
||||
}
|
||||
|
||||
List<IPlankType> list = new ArrayList<>();
|
||||
Collections.addAll(list, PlankType.ExtraTreePlanks.values());
|
||||
Collections.addAll(list, PlankType.ForestryPlanks.values());
|
||||
Collections.addAll(list, PlankType.ExtraTreePlanks.VALUES);
|
||||
Collections.addAll(list, PlankType.ForestryPlanks.VALUES);
|
||||
if (Mods.extraBiomes.active()) {
|
||||
Collections.addAll(list, PlankType.ExtraBiomesPlank.values());
|
||||
Collections.addAll(list, PlankType.ExtraBiomesPlank.VALUES);
|
||||
}
|
||||
Collections.addAll(list, PlankType.VanillaPlanks.values());
|
||||
Collections.addAll(list, PlankType.VanillaPlanks.VALUES);
|
||||
allPlankTypes = list;
|
||||
return list;
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@ public class BlockFence extends net.minecraft.block.BlockFence implements IBlock
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (IFenceProvider type : PlankType.ExtraTreePlanks.values()) {
|
||||
for (IFenceProvider type : PlankType.ExtraTreePlanks.VALUES) {
|
||||
list.add(type.getFence());
|
||||
}
|
||||
|
||||
for (IFenceProvider type : PlankType.VanillaPlanks.values()) {
|
||||
for (IFenceProvider type : PlankType.VanillaPlanks.VALUES) {
|
||||
if (type != PlankType.VanillaPlanks.OAK) {
|
||||
list.add(type.getFence());
|
||||
}
|
||||
|
||||
@@ -408,6 +408,9 @@ public enum EnumPattern implements IPattern {
|
||||
|
||||
private ILayout leftRotation;
|
||||
private ILayout horizontalFlip;
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final EnumPattern[] VALUES = values();
|
||||
|
||||
EnumPattern() {
|
||||
|
||||
@@ -20,7 +20,7 @@ public class GlassType implements IDesignMaterial {
|
||||
for (StandardColor c : StandardColor.values()) {
|
||||
GlassType.types.put(c.ordinal(), new GlassType(c.ordinal(), c.name, c.color));
|
||||
}
|
||||
for (EnumFlowerColor c2 : EnumFlowerColor.values()) {
|
||||
for (EnumFlowerColor c2 : EnumFlowerColor.VALUES) {
|
||||
GlassType.types
|
||||
.put(128 + c2.ordinal(), new GlassType(128 + c2.ordinal(), c2.getName(), c2.getColor(false)));
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ public class ModuleCore implements IInitializable {
|
||||
Collections.addAll(speciesQueue, ExtraTreeSpecies.values());
|
||||
|
||||
Queue<ILogType> logQueue = new LinkedList<>();
|
||||
Collections.addAll(logQueue, ILogType.ExtraTreeLog.values());
|
||||
Collections.addAll(logQueue, ILogType.ExtraTreeLog.VALUES);
|
||||
|
||||
Queue<IDesignMaterial> plankQueue = new LinkedList<>();
|
||||
Collections.addAll(plankQueue, PlankType.ExtraTreePlanks.values());
|
||||
Collections.addAll(plankQueue, PlankType.ExtraTreePlanks.VALUES);
|
||||
|
||||
Queue<ExtraTreeFruitGene> fruitQueue = new LinkedList<>();
|
||||
Collections.addAll(fruitQueue, ExtraTreeFruitGene.values());
|
||||
|
||||
@@ -69,7 +69,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
Acorn(6, 0x72b226, 0xad6a1d, FruitSprite.Tiny),
|
||||
Elderberry(9, 0x71975d, 0x515b43, FruitSprite.Tiny),
|
||||
Olive(9, 0x879e35, 0x62572a, FruitSprite.Small),
|
||||
GingkoNut(7, 0x8c975b, 0xe5daad, FruitSprite.Tiny),
|
||||
GinkgoNut(7, 0x8c975b, 0xe5daad, FruitSprite.Tiny),
|
||||
Coffee(8, 0x716d1d, 0xf84f66, FruitSprite.Tiny),
|
||||
Pear(10, 0x9f8f51, 0x9fd551, FruitSprite.Pear),
|
||||
OsangeOsange(10, 0x979752, 0xa2bf27, FruitSprite.Larger),
|
||||
@@ -205,8 +205,8 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
ExtraTreeFruitGene.Elderberry.setFamily(familyPrune);
|
||||
ExtraTreeFruitGene.Olive.addProduct(Food.Olive.get(1), 1.0f);
|
||||
ExtraTreeFruitGene.Olive.setFamily(familyPrune);
|
||||
ExtraTreeFruitGene.GingkoNut.addProduct(Food.GingkoNut.get(1), 1.0f);
|
||||
ExtraTreeFruitGene.GingkoNut.setFamily(familyNuts);
|
||||
ExtraTreeFruitGene.GinkgoNut.addProduct(Food.GinkgoNut.get(1), 1.0f);
|
||||
ExtraTreeFruitGene.GinkgoNut.setFamily(familyNuts);
|
||||
ExtraTreeFruitGene.Coffee.addProduct(Food.Coffee.get(1), 1.0f);
|
||||
ExtraTreeFruitGene.Coffee.setFamily(familyJungle);
|
||||
ExtraTreeFruitGene.Pear.addProduct(Food.Pear.get(1), 1.0f);
|
||||
@@ -387,7 +387,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
if (ripeningTime >= ripeningPeriod) {
|
||||
return 1.0f;
|
||||
}
|
||||
return ripeningTime / ripeningPeriod;
|
||||
return (float) ripeningTime / ripeningPeriod;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -418,7 +418,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register) {
|
||||
if (ordinal() == 0) {
|
||||
for (FruitSprite sprite : FruitSprite.values()) {
|
||||
for (FruitSprite sprite : FruitSprite.VALUES) {
|
||||
sprite.registerIcons(register);
|
||||
}
|
||||
}
|
||||
@@ -436,7 +436,7 @@ public enum ExtraTreeFruitGene implements IAlleleFruit, IFruitProvider {
|
||||
|
||||
for (ItemStack stack : products.keySet()) {
|
||||
if (stack.getItem() == ExtraTrees.itemFood) {
|
||||
return Food.values()[stack.getItemDamage()].toString();
|
||||
return Food.VALUES[stack.getItemDamage()].toString();
|
||||
}
|
||||
}
|
||||
return "NoFruit";
|
||||
|
||||
@@ -125,7 +125,7 @@ public class ExtraTreeMutation implements ITreeMutation {
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Brazilwood, getVanilla("Kapok"), ExtraTreeSpecies.Purpleheart, 10);
|
||||
new ExtraTreeMutation(getVanilla("Ebony"), getVanilla("Teak"), ExtraTreeSpecies.Rosewood, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Rosewood, getVanilla("Kapok"), ExtraTreeSpecies.Logwood, 10);
|
||||
new ExtraTreeMutation(getVanilla("Wenge"), getVanilla("Lime"), ExtraTreeSpecies.Gingko, 10);
|
||||
new ExtraTreeMutation(getVanilla("Wenge"), getVanilla("Lime"), ExtraTreeSpecies.Ginkgo, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Beech, getVanilla("Jungle"), ExtraTreeSpecies.Brazilnut, 10);
|
||||
new ExtraTreeMutation(getVanilla("Balsa"), getVanilla("Jungle"), ExtraTreeSpecies.RoseGum, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.RoseGum, getVanilla("Mahogony"), ExtraTreeSpecies.SwampGum, 10);
|
||||
@@ -165,8 +165,8 @@ public class ExtraTreeMutation implements ITreeMutation {
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Allspice, ExtraTreeSpecies.Clove, ExtraTreeSpecies.StarAnise, 10);
|
||||
new ExtraTreeMutation(getVanilla("Jungle"), ExtraTreeSpecies.Orange, ExtraTreeSpecies.Mango, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.StarAnise, ExtraTreeSpecies.Mango, ExtraTreeSpecies.Starfruit, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Hazel, ExtraTreeSpecies.Gingko, ExtraTreeSpecies.Candlenut, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Hazel, ExtraTreeSpecies.Gingko, ExtraTreeSpecies.Chilli, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Hazel, ExtraTreeSpecies.Ginkgo, ExtraTreeSpecies.Candlenut, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Hazel, ExtraTreeSpecies.Ginkgo, ExtraTreeSpecies.Chilli, 10);
|
||||
new ExtraTreeMutation(ExtraTreeSpecies.Hazel, ExtraTreeSpecies.Alder, ExtraTreeSpecies.DwarfHazel, 10);
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
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,
|
||||
Ginkgo("ginkgo", "biloba", 0x719651, ILogType.ExtraTreeLog.Ginkgo, ExtraTreeFruitGene.GinkgoNut,
|
||||
WorldGenGingko.class),
|
||||
Brazilnut("bertholletia", "excelsa", 0x7c8f7b, ILogType.VanillaLog.Jungle, ExtraTreeFruitGene.BrazilNut,
|
||||
WorldGenBrazilNut.class),
|
||||
@@ -548,7 +548,7 @@ public enum ExtraTreeSpecies implements IAlleleTreeSpecies, IIconProvider, IGerm
|
||||
ExtraTreeSpecies.Iroko.addFamily(familyNuts).addFamily(familyJungle).setHeight(EnumAllele.Height.AVERAGE)
|
||||
.setFertility(EnumAllele.Saplings.LOW);
|
||||
|
||||
ExtraTreeSpecies.Gingko.addFamily(familyNuts).addFamily(familyJungle).setLeafType(LeafType.JUNGLE)
|
||||
ExtraTreeSpecies.Ginkgo.addFamily(familyNuts).addFamily(familyJungle).setLeafType(LeafType.JUNGLE)
|
||||
.setHeight(EnumAllele.Height.LARGE).setYield(EnumAllele.Yield.LOWER)
|
||||
.setSappiness(EnumAllele.Sappiness.LOW);
|
||||
|
||||
|
||||
@@ -19,6 +19,10 @@ public enum FruitSprite implements IIconProvider {
|
||||
Larger,
|
||||
Pear;
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final FruitSprite[] VALUES = values();
|
||||
private BinnieIcon icon;
|
||||
|
||||
public short getIndex() {
|
||||
@@ -29,8 +33,8 @@ public enum FruitSprite implements IIconProvider {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(short texUID) {
|
||||
int index = texUID - 4200;
|
||||
if (index >= 0 && index < values().length) {
|
||||
return values()[index].icon.getIcon();
|
||||
if (index >= 0 && index < VALUES.length) {
|
||||
return VALUES[index].icon.getIcon();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ public enum Food implements IItemMisc {
|
||||
Acorn(0),
|
||||
Elderberry(1),
|
||||
Olive(1),
|
||||
GingkoNut(1),
|
||||
GinkgoNut(1),
|
||||
Coffee(0),
|
||||
OsangeOrange(1),
|
||||
Clove(0),
|
||||
@@ -79,6 +79,10 @@ public enum Food implements IItemMisc {
|
||||
Starfruit(2),
|
||||
Candlenut(0);
|
||||
|
||||
/**
|
||||
* Cached values() array for frequent read-only operations, the array should NOT be mutated.
|
||||
*/
|
||||
public static final Food[] VALUES = values();
|
||||
private IIcon icon;
|
||||
private final int hunger;
|
||||
private final List<String> ores;
|
||||
@@ -125,7 +129,7 @@ public enum Food implements IItemMisc {
|
||||
Food.Acorn.ore("Acorn");
|
||||
Food.Elderberry.ore("Elderberry");
|
||||
Food.Olive.ore("Olive");
|
||||
Food.GingkoNut.ore("GingkoNut");
|
||||
Food.GinkgoNut.ore("GinkgoNut");
|
||||
Food.Coffee.ore("Coffee");
|
||||
Food.OsangeOrange.ore("OsangeOrange");
|
||||
Food.Clove.ore("Clove");
|
||||
|
||||
@@ -18,22 +18,18 @@ import forestry.api.core.Tabs;
|
||||
|
||||
public class ItemFood extends net.minecraft.item.ItemFood {
|
||||
|
||||
protected IItemMisc[] items;
|
||||
|
||||
public ItemFood() {
|
||||
super(0, 0.0f, false);
|
||||
setUnlocalizedName("food");
|
||||
setCreativeTab(Tabs.tabArboriculture);
|
||||
setHasSubtypes(true);
|
||||
items = Food.values();
|
||||
|
||||
registerItem(this, getUnlocalizedName().substring(5));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (IItemMisc itemMisc : items) {
|
||||
for (IItemMisc itemMisc : Food.VALUES) {
|
||||
if (itemMisc.isActive()) {
|
||||
list.add(getStack(itemMisc, 1));
|
||||
}
|
||||
@@ -41,7 +37,7 @@ public class ItemFood extends net.minecraft.item.ItemFood {
|
||||
}
|
||||
|
||||
private IItemMisc getItem(int damage) {
|
||||
return (damage >= items.length) ? items[0] : items[damage];
|
||||
return (damage >= Food.VALUES.length) ? Food.VALUES[0] : Food.VALUES[damage];
|
||||
}
|
||||
|
||||
public ItemStack getStack(IItemMisc type, int size) {
|
||||
@@ -79,7 +75,7 @@ public class ItemFood extends net.minecraft.item.ItemFood {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register) {
|
||||
for (IItemMisc item : items) {
|
||||
for (IItemMisc item : Food.VALUES) {
|
||||
if (item.isActive()) {
|
||||
item.registerIcons(register);
|
||||
}
|
||||
@@ -87,7 +83,7 @@ public class ItemFood extends net.minecraft.item.ItemFood {
|
||||
}
|
||||
|
||||
private Food getFood(ItemStack stack) {
|
||||
return Food.values()[stack.getItemDamage()];
|
||||
return Food.VALUES[stack.getItemDamage()];
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ModuleItems implements IInitializable {
|
||||
Food.Acorn.addOil(20, 50, 3);
|
||||
Food.Elderberry.addJuice(10, 100, 5);
|
||||
Food.Olive.addOil(20, 50, 3);
|
||||
Food.GingkoNut.addOil(20, 50, 5);
|
||||
Food.GinkgoNut.addOil(20, 50, 5);
|
||||
Food.Coffee.addOil(15, 20, 2);
|
||||
Food.OsangeOrange.addJuice(10, 300, 15);
|
||||
Food.Clove.addOil(10, 25, 2);
|
||||
@@ -233,7 +233,7 @@ public class ModuleItems implements IInitializable {
|
||||
FuelManager.bronzeEngineFuel.put(
|
||||
ExtraTreeLiquid.Resin.get(1).getFluid(),
|
||||
new EngineBronzeFuel(ExtraTreeLiquid.Resin.get(1).getFluid(), 30, 10000, 1));
|
||||
for (ILogType.ExtraTreeLog log : ILogType.ExtraTreeLog.values()) {
|
||||
for (ILogType.ExtraTreeLog log : ILogType.ExtraTreeLog.VALUES) {
|
||||
log.addRecipe();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.extratrees.machines;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -81,8 +80,7 @@ public enum ExtraTreeMachine implements IMachineType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick,
|
||||
RenderBlocks renderer) {
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick) {
|
||||
MachineRendererForestry.renderMachine(textureName.getShortPath(), x, y, z);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,8 @@ public class Lumbermill {
|
||||
|
||||
private static Collection<ItemStack> getRecipeResult(ItemStack output) {
|
||||
List<ItemStack> list = new ArrayList<>();
|
||||
for (IRecipe iRecipe : CraftingManager.getInstance().getRecipeList()) {
|
||||
List<IRecipe> iRecipes = new ArrayList<>(CraftingManager.getInstance().getRecipeList());
|
||||
for (IRecipe iRecipe : iRecipes) {
|
||||
if (iRecipe instanceof ShapelessRecipes shapeless) {
|
||||
if (shapeless.recipeItems.size() != 1 || !(shapeless.recipeItems.get(0) instanceof ItemStack)) {
|
||||
continue;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package binnie.genetics;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigException;
|
||||
import com.gtnewhorizon.gtnhlib.config.ConfigurationManager;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.Tags;
|
||||
import binnie.core.gui.IBinnieGUID;
|
||||
@@ -8,6 +11,7 @@ import binnie.core.machines.MachineGroup;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
import binnie.core.network.IPacketID;
|
||||
import binnie.core.proxy.IProxyCore;
|
||||
import binnie.genetics.config.GeneticsConfig;
|
||||
import binnie.genetics.core.GeneticsGUI;
|
||||
import binnie.genetics.core.GeneticsPacket;
|
||||
import binnie.genetics.item.ItemAnalyst;
|
||||
@@ -28,19 +32,29 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
|
||||
@Mod(
|
||||
modid = "Genetics",
|
||||
modid = Genetics.GENETICS_MODID,
|
||||
name = "Genetics",
|
||||
version = Tags.VERSION,
|
||||
useMetadata = true,
|
||||
dependencies = "after:BinnieCore")
|
||||
public class Genetics extends AbstractMod {
|
||||
|
||||
public static final String GENETICS_MODID = "Genetics";
|
||||
|
||||
@Mod.Instance("Genetics")
|
||||
public static Genetics instance;
|
||||
|
||||
@SidedProxy(clientSide = "binnie.genetics.proxy.ProxyClient", serverSide = "binnie.genetics.proxy.ProxyServer")
|
||||
public static Proxy proxy;
|
||||
|
||||
static {
|
||||
try {
|
||||
ConfigurationManager.registerConfig(GeneticsConfig.class);
|
||||
} catch (ConfigException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public static final String CHANNEL = "GEN";
|
||||
|
||||
public static ItemSerumArray itemSerumArray = null;
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
package binnie.extrabees.config;
|
||||
package binnie.genetics.config;
|
||||
|
||||
import static binnie.extrabees.ExtraBees.EB_MODID;
|
||||
import static binnie.genetics.Genetics.GENETICS_MODID;
|
||||
|
||||
import com.gtnewhorizon.gtnhlib.config.Config;
|
||||
|
||||
@Config(modid = EB_MODID)
|
||||
public class EBConfigMachines {
|
||||
@Config(modid = GENETICS_MODID)
|
||||
public class GeneticsConfig {
|
||||
|
||||
@Config.Comment("Percentage chance of Isolator consuming bee. 0 never consumes, 1 always does.")
|
||||
@Config.RangeFloat(min = 0f, max = 1f)
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.genetics.machine;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import binnie.core.machines.Machine;
|
||||
@@ -26,7 +25,7 @@ public abstract class PackageGeneticBase extends MachinePackage {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick, RenderBlocks renderer) {
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick) {
|
||||
MachineRendererGenetics.instance.renderMachine(machine, renderTexture, x, y, z);
|
||||
}
|
||||
}
|
||||
@@ -43,14 +43,7 @@ public class AnalyserComponentFX extends MachineComponent
|
||||
BinnieCore.proxy.getMinecraftInstance().effectRenderer
|
||||
.addEffect(new EntityFX(world, x + 0.5, y + 1.3 + rand.nextDouble() * 0.2, z + 0.5, 0.0, 0.0, 0.0) {
|
||||
|
||||
double axisX = posX;
|
||||
double axisZ = posZ;
|
||||
double angle = rand.nextDouble() * 2.0 * 3.1415;
|
||||
|
||||
{
|
||||
axisX = 0.0;
|
||||
axisZ = 0.0;
|
||||
angle = 0.0;
|
||||
motionX = 0.05 * (rand.nextDouble() - 0.5);
|
||||
motionZ = 0.05 * (rand.nextDouble() - 0.5);
|
||||
motionY = 0.0;
|
||||
|
||||
@@ -48,9 +48,6 @@ public class InoculatorComponentFX extends MachineComponent
|
||||
double angle = (int) (worldObj.getTotalWorldTime() % 4L) * 0.5 * 3.1415;
|
||||
|
||||
{
|
||||
axisX = 0.0;
|
||||
axisZ = 0.0;
|
||||
angle = 0.0;
|
||||
motionX = 0.0;
|
||||
motionZ = 0.0;
|
||||
motionY = 0.007 + rand.nextDouble() * 0.002;
|
||||
|
||||
@@ -65,10 +65,10 @@ public class IsolatorComponentFX extends MachineComponent implements IRender.Ran
|
||||
}
|
||||
|
||||
BinnieCore.proxy.getMinecraftInstance().effectRenderer
|
||||
.addEffect(new EntityFX(world, x + 0.5, y + 1, z + 0.5, 0.0, 0.0, 0.0) {
|
||||
.addEffect(new EntityFX(world, x + 0.5, y + 1, z + 0.75, 0.0, 0.0, 0.0) {
|
||||
|
||||
final double axisX = 0.0;
|
||||
final double axisZ = 0.0;
|
||||
final double axisX = posX;
|
||||
final double axisZ = posZ - 0.25;
|
||||
double angle = 0.0;
|
||||
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ import binnie.core.machines.power.ComponentProcessSetCost;
|
||||
import binnie.core.machines.power.ErrorState;
|
||||
import binnie.core.machines.power.IProcess;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.extrabees.config.EBConfigMachines;
|
||||
import binnie.genetics.config.GeneticsConfig;
|
||||
import binnie.genetics.item.ItemSequence;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
@@ -100,7 +100,7 @@ public class IsolatorComponentLogic extends ComponentProcessSetCost implements I
|
||||
ItemStack serum = ItemSequence.create(gene);
|
||||
getUtil().setStack(Isolator.SLOT_RESULT, serum);
|
||||
getUtil().decreaseStack(Isolator.SLOT_SEQUENCER_VIAL, 1);
|
||||
if (rand.nextFloat() < EBConfigMachines.isolatorConsumptionChance) {
|
||||
if (rand.nextFloat() < GeneticsConfig.isolatorConsumptionChance) {
|
||||
getUtil().decreaseStack(Isolator.SLOT_TARGET, 1);
|
||||
}
|
||||
getUtil().drainTank(Isolator.TANK_ETHANOL, (int) ethanolPerProcess);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package binnie.genetics.machine.lab;
|
||||
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.genetics.core.GeneticsTexture;
|
||||
import binnie.genetics.machine.ComponentGUIHolder;
|
||||
@@ -20,7 +18,7 @@ public class LabMachinePackage extends PackageGeneticBase {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick, RenderBlocks renderer) {
|
||||
public void renderMachine(Machine machine, double x, double y, double z, float partialTick) {
|
||||
MachineRendererLab.instance.renderMachine(machine, renderTexture, x, y, z);
|
||||
}
|
||||
}
|
||||
@@ -37,9 +37,6 @@ public class PolymeriserComponentFX extends MachineComponent implements IRender.
|
||||
double angle = 0.7 + (int) (worldObj.getTotalWorldTime() % 2L) * 3.1415;
|
||||
|
||||
{
|
||||
axisX = 0.0;
|
||||
axisZ = 0.0;
|
||||
angle = 0.0;
|
||||
motionX = 0.0;
|
||||
motionZ = 0.0;
|
||||
motionY = -0.006;
|
||||
|
||||
Loaded 100 of 1977 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user