Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Fixed issue where server would crash on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
XenoMustache committed Jul 9, 2019
1 parent a626a1d commit c126b6b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/xenomustache/ironfurnaces/IronFurnaces.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
public class IronFurnaces {
public static final String MODID = "ironfurnaces";
public static final String NAME = "Iron Furnaces";
public static final String VERSION = "1.3.4";
public static final String VERSION = "1.3.5";
public static final ModTab creativeTab = new ModTab();
@SidedProxy(serverSide = "com.xenomustache.ironfurnaces.proxy.CommonProxy", clientSide = "com.xenomustache.ironfurnaces.proxy.ClientProxy")
public static CommonProxy proxy;
Expand All @@ -35,7 +35,7 @@ public void preinit(FMLPreInitializationEvent event) {
GameRegistry.registerTileEntity(TileEntityGlassFurnace.class, "ironfurnaces:glass_furnace");
GameRegistry.registerTileEntity(TileEntityObsidianFurnace.class, "ironfurnaces:obsidian_furnace");

GameRegistry.registerTileEntity(TileEntityShulkerFurnace.class, "ironfurnaces:shulker_furnace");
//GameRegistry.registerTileEntity(TileEntityShulkerFurnace.class, "ironfurnaces:shulker_furnace");
}

@Mod.EventBusSubscriber
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,10 +422,10 @@ public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
return itemstack;
}

public static Block getBlockByColor(EnumDyeColor colorIn)
{
switch (colorIn)
{
// public static Block getBlockByColor(EnumDyeColor colorIn)
// {
// switch (colorIn)
// {
//case WHITE:
// return Blocks.WHITE_SHULKER_BOX;
//case ORANGE:
Expand Down Expand Up @@ -459,24 +459,24 @@ public static Block getBlockByColor(EnumDyeColor colorIn)
// return Blocks.RED_SHULKER_BOX;
//case BLACK:
// return Blocks.BLACK_SHULKER_BOX;
default:
if(isBurning)
return IFBlocks.shulkerFurnaceActive;
else
return IFBlocks.shulkerFurnaceIdle;
}
}
// default:
// if(isBurning)
// return IFBlocks.shulkerFurnaceActive;
// else
// return IFBlocks.shulkerFurnaceIdle;
// }
// }

@SideOnly(Side.CLIENT)
public static EnumDyeColor getColorFromItem(Item itemIn)
{
return getColorFromBlock(Block.getBlockFromItem(itemIn));
}

public static ItemStack getColoredItemStack(EnumDyeColor colorIn)
{
return new ItemStack(getBlockByColor(colorIn));
}
// public static ItemStack getColoredItemStack(EnumDyeColor colorIn)
// {
// return new ItemStack(getBlockByColor(colorIn));
// }

@SideOnly(Side.CLIENT)
public static EnumDyeColor getColorFromBlock(Block blockIn)
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/xenomustache/ironfurnaces/blocks/IFBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public class IFBlocks {
public static BlockObsidianFurnace obsidianFurnaceIdle = new BlockObsidianFurnace("obsidian_furnace_idle", false);
public static BlockObsidianFurnace obsidianFurnaceActive = new BlockObsidianFurnace("obsidian_furnace_active", true);

public static BlockShulkerFurnace shulkerFurnaceIdle = new BlockShulkerFurnace("shulker_furnace_idle", false, EnumDyeColor.PURPLE);
public static BlockShulkerFurnace shulkerFurnaceActive = new BlockShulkerFurnace("shulker_furnace_active", true, EnumDyeColor.PURPLE);
//public static BlockShulkerFurnace shulkerFurnaceIdle = new BlockShulkerFurnace("shulker_furnace_idle", false, EnumDyeColor.PURPLE);
// public static BlockShulkerFurnace shulkerFurnaceActive = new BlockShulkerFurnace("shulker_furnace_active", true, EnumDyeColor.PURPLE);

public static void register(IForgeRegistry<Block> registry) {
registry.registerAll(
Expand All @@ -32,9 +32,9 @@ public static void register(IForgeRegistry<Block> registry) {
glassFurnaceIdle,
glassFurnaceActive.setLightLevel(0.875F),
obsidianFurnaceIdle,
obsidianFurnaceActive.setLightLevel(0.875F),
shulkerFurnaceIdle,
shulkerFurnaceActive.setLightLevel(0.875F));
obsidianFurnaceActive.setLightLevel(0.875F));
//shulkerFurnaceIdle,
//shulkerFurnaceActive.setLightLevel(0.875F));
}

public static void registerItemBlocks(IForgeRegistry<Item> registry) {
Expand Down Expand Up @@ -65,7 +65,7 @@ public static void registerModels() {
glassFurnaceActive.registerItemModel(Item.getItemFromBlock(glassFurnaceActive));
obsidianFurnaceIdle.registerItemModel(Item.getItemFromBlock(obsidianFurnaceIdle));
obsidianFurnaceActive.registerItemModel(Item.getItemFromBlock(obsidianFurnaceActive));
shulkerFurnaceIdle.registerItemModel(Item.getItemFromBlock(shulkerFurnaceIdle));
shulkerFurnaceActive.registerItemModel(Item.getItemFromBlock(shulkerFurnaceActive));
//shulkerFurnaceIdle.registerItemModel(Item.getItemFromBlock(shulkerFurnaceIdle));
//shulkerFurnaceActive.registerItemModel(Item.getItemFromBlock(shulkerFurnaceActive));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,13 @@ public void update()

keepInventory = true;

if (flag1) {
world.setBlockState(pos, IFBlocks.shulkerFurnaceActive.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
world.setBlockState(pos, IFBlocks.shulkerFurnaceActive.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
} else {
world.setBlockState(pos, IFBlocks.shulkerFurnaceIdle.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
world.setBlockState(pos, IFBlocks.shulkerFurnaceIdle.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
}
// if (flag1) {
// world.setBlockState(pos, IFBlocks.shulkerFurnaceActive.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
// world.setBlockState(pos, IFBlocks.shulkerFurnaceActive.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
// } else {
// world.setBlockState(pos, IFBlocks.shulkerFurnaceIdle.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
// world.setBlockState(pos, IFBlocks.shulkerFurnaceIdle.getDefaultState().withProperty(FACING, iblockstate.getValue(FACING)), 3);
// }

keepInventory = false;

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "ironfurnaces",
"name": "Iron Furnaces",
"description": "A mod based off cpw's Iron Chests mod. This mod adds tiers to the already existing block known as the furnace, with different burn speeds.",
"version": "1.3.3",
"version": "1.3.5",
"mcversion": "1.12.2",
"url": "https://minecraft.curseforge.com/projects/iron-furnaces",
"updateUrl": "",
Expand Down

0 comments on commit c126b6b

Please sign in to comment.