mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-21 20:52:42 +00:00
Fixed a bunch of crashes reported to openeye.
This commit is contained in:
1 parent
6ff3c9626e
commit
9d2aecff88
4 files changed
+8
-6
No files matched your search
@@ -334,6 +334,8 @@ public class ConduitUtil {
|
||||
return true;
|
||||
} else if(mode == RedstoneControlMode.NEVER) {
|
||||
return false;
|
||||
} else if(mode == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
int signalStrength = getInternalSignalForColor(bundle, col);
|
||||
|
||||
@@ -139,7 +139,7 @@ public class BlockVat extends AbstractMachineBlock<TileVat> {
|
||||
if(filled == null) { //this shouldn't be necessary but it appears to be a bug as the above method doesnt work
|
||||
FluidContainerData[] datas = FluidContainerRegistry.getRegisteredFluidContainerData();
|
||||
for (FluidContainerData data : datas) {
|
||||
if(data.fluid.getFluid().getName().equals(available.getFluid().getName()) && data.emptyContainer.isItemEqual(item)) {
|
||||
if(data != null && data.fluid.getFluid().getName().equals(available.getFluid().getName()) && data.emptyContainer.isItemEqual(item)) {
|
||||
res = data.filledContainer.copy();
|
||||
filled = FluidContainerRegistry.getFluidForFilledItem(res);
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ public class BlockTank extends AbstractMachineBlock<TileTank> implements IAdvanc
|
||||
if(filled == null) { //this shouldn't be necessary but it appears to be a bug as the above method doesnt work
|
||||
FluidContainerData[] datas = FluidContainerRegistry.getRegisteredFluidContainerData();
|
||||
for (FluidContainerData data : datas) {
|
||||
if(data.fluid.getFluid().getName().equals(available.getFluid().getName()) && data.emptyContainer.isItemEqual(item)) {
|
||||
if(data != null && data.fluid.getFluid().getName().equals(available.getFluid().getName()) && data.emptyContainer.isItemEqual(item)) {
|
||||
res = data.filledContainer.copy();
|
||||
filled = FluidContainerRegistry.getFluidForFilledItem(res);
|
||||
}
|
||||
|
||||
@@ -64,12 +64,12 @@ public class EnchanterRecipeHandler extends TemplateRecipeHandler {
|
||||
if(result == null || result.getItem() != Items.enchanted_book) {
|
||||
return;
|
||||
}
|
||||
Map<Short, Short> enchants = EnchantmentHelper.getEnchantments(result);
|
||||
Map<Number, Number> enchants = EnchantmentHelper.getEnchantments(result);
|
||||
List<EnchanterRecipe> recipes = EnchanterRecipeManager.getInstance().getRecipes();
|
||||
|
||||
for(Short id : enchants.keySet()) {
|
||||
if(id != null && id >= 0 && id < Enchantment.enchantmentsList.length) {
|
||||
Enchantment ench = Enchantment.enchantmentsList[id];
|
||||
for(Number id : enchants.keySet()) {
|
||||
if(id != null && id.intValue() >= 0 && id.intValue() < Enchantment.enchantmentsList.length) {
|
||||
Enchantment ench = Enchantment.enchantmentsList[id.intValue()];
|
||||
if(ench != null && ench.getName() != null) {
|
||||
|
||||
for (EnchanterRecipe recipe : recipes) {
|
||||
|
||||
Reference in new issue
Block a user