mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
wabbledee
This commit is contained in:
parent
e4567bec16
commit
cce163f84c
@ -22,3 +22,6 @@
|
|||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
* Fixed DFC receivers not outputting power
|
* Fixed DFC receivers not outputting power
|
||||||
|
* Fixed the custom machine NEI handlers not working
|
||||||
|
* Fixed a potential crash caused by invalid assembly templates
|
||||||
|
* Fixed general weirdness with the schrabidium transmutator item IO
|
||||||
@ -1268,6 +1268,7 @@ public class AssemblerRecipes extends SerializableRecipe {
|
|||||||
ComparableStack compStack = ItemAssemblyTemplate.readType(stack);
|
ComparableStack compStack = ItemAssemblyTemplate.readType(stack);
|
||||||
if(compStack != null) {
|
if(compStack != null) {
|
||||||
AssemblerRecipe recipe = recipes.get(compStack);
|
AssemblerRecipe recipe = recipes.get(compStack);
|
||||||
|
if(recipe == null) return null;
|
||||||
AStack[] ret = recipe.ingredients;
|
AStack[] ret = recipe.ingredients;
|
||||||
return ret == null ? null : Arrays.asList(ret);
|
return ret == null ? null : Arrays.asList(ret);
|
||||||
}
|
}
|
||||||
@ -1280,6 +1281,7 @@ public class AssemblerRecipes extends SerializableRecipe {
|
|||||||
if(out != null) {
|
if(out != null) {
|
||||||
ComparableStack comp = new ComparableStack(out);
|
ComparableStack comp = new ComparableStack(out);
|
||||||
AssemblerRecipe recipe = recipes.get(comp);
|
AssemblerRecipe recipe = recipes.get(comp);
|
||||||
|
if(recipe == null) return null;
|
||||||
AStack[] ret = recipe.ingredients;
|
AStack[] ret = recipe.ingredients;
|
||||||
return ret == null ? null : Arrays.asList(ret);
|
return ret == null ? null : Arrays.asList(ret);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,8 @@ import java.util.List;
|
|||||||
import codechicken.nei.recipe.*;
|
import codechicken.nei.recipe.*;
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
import com.hbm.blocks.generic.BlockMotherOfAllOres.TileEntityRandomOre;
|
||||||
|
import com.hbm.config.CustomMachineConfigJSON;
|
||||||
|
import com.hbm.handler.nei.CustomMachineHandler;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemBattery;
|
import com.hbm.items.machine.ItemBattery;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
@ -26,6 +28,9 @@ public class NEIConfig implements IConfigureNEI {
|
|||||||
for (TemplateRecipeHandler handler: NEIRegistry.listAllHandlers()) {
|
for (TemplateRecipeHandler handler: NEIRegistry.listAllHandlers()) {
|
||||||
registerHandler(handler);
|
registerHandler(handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(CustomMachineConfigJSON.MachineConfiguration conf : CustomMachineConfigJSON.niceList) registerHandler(new CustomMachineHandler(conf));
|
||||||
|
|
||||||
//Some things are even beyond my control...or are they?
|
//Some things are even beyond my control...or are they?
|
||||||
API.hideItem(ItemBattery.getEmptyBattery(ModItems.memory));
|
API.hideItem(ItemBattery.getEmptyBattery(ModItems.memory));
|
||||||
API.hideItem(ItemBattery.getFullBattery(ModItems.memory));
|
API.hideItem(ItemBattery.getFullBattery(ModItems.memory));
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package com.hbm.main;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.config.CustomMachineConfigJSON;
|
|
||||||
import com.hbm.config.VersatileConfig;
|
import com.hbm.config.VersatileConfig;
|
||||||
import com.hbm.handler.nei.*;
|
import com.hbm.handler.nei.*;
|
||||||
|
|
||||||
@ -65,8 +64,6 @@ public class NEIRegistry {
|
|||||||
handlers.add(new ArcWelderHandler());
|
handlers.add(new ArcWelderHandler());
|
||||||
handlers.add(new ExposureChamberHandler());
|
handlers.add(new ExposureChamberHandler());
|
||||||
|
|
||||||
for(CustomMachineConfigJSON.MachineConfiguration conf : CustomMachineConfigJSON.niceList) handlers.add(new CustomMachineHandler(conf));
|
|
||||||
|
|
||||||
return handlers;
|
return handlers;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,9 +33,7 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntityMachineB
|
|||||||
|
|
||||||
private AudioWrapper audio;
|
private AudioWrapper audio;
|
||||||
|
|
||||||
private static final int[] slots_top = new int[] { 0 };
|
private static final int[] slots_io = new int[] { 0, 1, 2, 3 };
|
||||||
private static final int[] slots_bottom = new int[] { 1, 2 };
|
|
||||||
private static final int[] slots_side = new int[] { 3, 2 };
|
|
||||||
|
|
||||||
public TileEntityMachineSchrabidiumTransmutator() {
|
public TileEntityMachineSchrabidiumTransmutator() {
|
||||||
super(4);
|
super(4);
|
||||||
@ -82,22 +80,24 @@ public class TileEntityMachineSchrabidiumTransmutator extends TileEntityMachineB
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
|
public int[] getAccessibleSlotsFromSide(int p_94128_1_) {
|
||||||
return p_94128_1_ == 0 ? slots_bottom : (p_94128_1_ == 1 ? slots_top : slots_side);
|
return slots_io;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canExtractItem(int i, ItemStack stack, int j) {
|
public boolean canExtractItem(int i, ItemStack stack, int j) {
|
||||||
|
|
||||||
if (i == 2 && stack.getItem() != null && (stack.getItem() == ModItems.redcoil_capacitor && stack.getItemDamage() == stack.getMaxDamage()) || stack.getItem() == ModItems.euphemium_capacitor) {
|
if(stack.getItem() == ModItems.euphemium_capacitor) return false;
|
||||||
|
|
||||||
|
if(i == 2 && stack.getItem() != null && (stack.getItem() == ModItems.redcoil_capacitor && stack.getItemDamage() == stack.getMaxDamage())) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 1) {
|
if(i == 1) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 3) {
|
if(i == 3) {
|
||||||
if (stack.getItem() instanceof IBatteryItem && ((IBatteryItem)stack.getItem()).getCharge(stack) == 0)
|
if(stack.getItem() instanceof IBatteryItem && ((IBatteryItem) stack.getItem()).getCharge(stack) == 0)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user