generated from tilera/1710mod
parent
e530a67fb6
commit
4b927c39f7
7 changed files with 16 additions and 11 deletions
|
@ -47,7 +47,7 @@ public class RedPowerNEIPlugin {
|
||||||
public static boolean base;
|
public static boolean base;
|
||||||
public static boolean compat;
|
public static boolean compat;
|
||||||
static Block micro;
|
static Block micro;
|
||||||
private List<RedPowerNEIPlugin.ItemRange> validMicroTypes = new ArrayList();
|
private List<RedPowerNEIPlugin.ItemRange> validMicroTypes = new ArrayList<>();
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event) {}
|
public void preInit(FMLPreInitializationEvent event) {}
|
||||||
|
@ -58,9 +58,7 @@ public class RedPowerNEIPlugin {
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void postInit(FMLPostInitializationEvent event) {
|
public void postInit(FMLPostInitializationEvent event) {
|
||||||
if (FMLCommonHandler.instance().getSide().isServer()) {
|
if (FMLCommonHandler.instance().getSide().isServer()) {
|
||||||
FMLLog.severe(
|
FMLLog.severe("[RedPowerNEIPlugin] Server env detected, disabling...");
|
||||||
"[RedPowerNEIPlugin] Server env detected, disabling...", new Object[0]
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
if (Loader.isModLoaded("NotEnoughItems")) {
|
if (Loader.isModLoaded("NotEnoughItems")) {
|
||||||
wiring = Loader.isModLoaded("RedPowerWiring");
|
wiring = Loader.isModLoaded("RedPowerWiring");
|
||||||
|
@ -97,7 +95,7 @@ public class RedPowerNEIPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadSaws() {
|
private void loadSaws() {
|
||||||
List<ItemHandsaw> saws = new ArrayList();
|
List<ItemHandsaw> saws = new ArrayList<>();
|
||||||
|
|
||||||
for (Object item : Item.itemRegistry) {
|
for (Object item : Item.itemRegistry) {
|
||||||
if (item instanceof ItemHandsaw) {
|
if (item instanceof ItemHandsaw) {
|
||||||
|
|
|
@ -136,6 +136,7 @@ public class ItemMicro extends ItemBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
@Override
|
||||||
public boolean func_150936_a(
|
public boolean func_150936_a(
|
||||||
World world, int x, int y, int z, int side, EntityPlayer player, ItemStack ist
|
World world, int x, int y, int z, int side, EntityPlayer player, ItemStack ist
|
||||||
) {
|
) {
|
||||||
|
@ -300,8 +301,11 @@ public class ItemMicro extends ItemBlock {
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
@Override
|
||||||
public void getSubItems(Item id, CreativeTabs tab, List list) {
|
public void getSubItems(Item id, CreativeTabs tab, List list) {
|
||||||
if (tab != CreativeExtraTabs.tabWires && tab != CreativeExtraTabs.tabMachine) {
|
// NEI passes null as tab
|
||||||
|
if (tab != null && tab != CreativeExtraTabs.tabWires
|
||||||
|
&& tab != CreativeExtraTabs.tabMachine) {
|
||||||
if (tab == CreativeExtraTabs.tabMicros) {
|
if (tab == CreativeExtraTabs.tabMicros) {
|
||||||
for (int i = 0; i < 255; ++i) {
|
for (int i = 0; i < 255; ++i) {
|
||||||
String stub = CoverLib.getName(i);
|
String stub = CoverLib.getName(i);
|
||||||
|
|
|
@ -16,7 +16,8 @@ public class MicroPlacementRibbon extends MicroPlacementWire {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCreativeItems(int hb, CreativeTabs tab, List<ItemStack> items) {
|
public void addCreativeItems(int hb, CreativeTabs tab, List<ItemStack> items) {
|
||||||
if (tab == CreativeExtraTabs.tabWires || tab == CreativeTabs.tabAllSearch) {
|
if (tab == null || tab == CreativeExtraTabs.tabWires
|
||||||
|
|| tab == CreativeTabs.tabAllSearch) {
|
||||||
switch (hb) {
|
switch (hb) {
|
||||||
case 12:
|
case 12:
|
||||||
items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 3072));
|
items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 3072));
|
||||||
|
|
|
@ -88,7 +88,8 @@ public class MicroPlacementTube implements IMicroPlacement {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCreativeItems(int hb, CreativeTabs tab, List<ItemStack> items) {
|
public void addCreativeItems(int hb, CreativeTabs tab, List<ItemStack> items) {
|
||||||
if (tab == CreativeExtraTabs.tabMachine || tab == CreativeTabs.tabAllSearch) {
|
if (tab == null || tab == CreativeExtraTabs.tabMachine
|
||||||
|
|| tab == CreativeTabs.tabAllSearch) {
|
||||||
switch (hb) {
|
switch (hb) {
|
||||||
case 7:
|
case 7:
|
||||||
items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 1792));
|
items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 1792));
|
||||||
|
|
|
@ -8,7 +8,6 @@ import java.util.Random;
|
||||||
|
|
||||||
import codechicken.nei.PositionedStack;
|
import codechicken.nei.PositionedStack;
|
||||||
import codechicken.nei.recipe.ShapedRecipeHandler;
|
import codechicken.nei.recipe.ShapedRecipeHandler;
|
||||||
import codechicken.nei.recipe.TemplateRecipeHandler.CachedRecipe;
|
|
||||||
import com.eloraam.redpower.RedPowerBase;
|
import com.eloraam.redpower.RedPowerBase;
|
||||||
import com.eloraam.redpower.base.ItemHandsaw;
|
import com.eloraam.redpower.base.ItemHandsaw;
|
||||||
import com.eloraam.redpower.core.CoverLib;
|
import com.eloraam.redpower.core.CoverLib;
|
||||||
|
|
|
@ -153,7 +153,8 @@ public class MicroPlacementJacket implements IMicroPlacement {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCreativeItems(int hb, CreativeTabs tab, List<ItemStack> itemList) {
|
public void addCreativeItems(int hb, CreativeTabs tab, List<ItemStack> itemList) {
|
||||||
if (tab == CreativeExtraTabs.tabWires || tab == CreativeTabs.tabAllSearch) {
|
if (tab == null || tab == CreativeExtraTabs.tabWires
|
||||||
|
|| tab == CreativeTabs.tabAllSearch) {
|
||||||
switch (hb) {
|
switch (hb) {
|
||||||
case 64:
|
case 64:
|
||||||
itemList.add(new ItemStack(CoverLib.blockCoverPlate, 1, 16386));
|
itemList.add(new ItemStack(CoverLib.blockCoverPlate, 1, 16386));
|
||||||
|
|
|
@ -146,7 +146,8 @@ public class MicroPlacementWire implements IMicroPlacement {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCreativeItems(int hb, CreativeTabs tab, List<ItemStack> items) {
|
public void addCreativeItems(int hb, CreativeTabs tab, List<ItemStack> items) {
|
||||||
if (tab == CreativeExtraTabs.tabWires || tab == CreativeTabs.tabAllSearch) {
|
if (tab == null || tab == CreativeExtraTabs.tabWires
|
||||||
|
|| tab == CreativeTabs.tabAllSearch) {
|
||||||
switch (hb) {
|
switch (hb) {
|
||||||
case 1:
|
case 1:
|
||||||
items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 256));
|
items.add(new ItemStack(CoverLib.blockCoverPlate, 1, 256));
|
||||||
|
|
Loading…
Reference in a new issue