diff --git a/changelog b/changelog index d827dcc27..b16a63a42 100644 --- a/changelog +++ b/changelog @@ -10,6 +10,8 @@ * Updated russian and chinese localization * AUTOCAL's `first` and `last` instructions now support variable substitution * Spy satellites now have the `getsmog` command, checking for soot pollution on the current target coordinate +* The research reactor and breeding reactor have been deprecated + * The reactors and the plate fuel no longer have recipes, but existing ones will continue to function until they run out of fuel ## Fixed * Fixed pile fuel loader temperature reading not working @@ -19,4 +21,6 @@ * Fixed xenium resonator item mapping being incorrect, creating a relay satellite instead * Fixed a potential crash caused by accessing out-of-range data on the radar satellite * Fixed QMAW manual pages not being able to be overwritten by resource packs - * This feature was a major pain in the ass to actually make, and it apparently never even worked until now \ No newline at end of file + * This feature was a major pain in the ass to actually make, and it apparently never even worked until now +* Fixed satellite groundstation losing its frequency on relog +* Added extra safeguarding preventing crashes caused by multiblock door tile entities not bound to the correct block \ No newline at end of file diff --git a/src/main/java/com/hbm/handler/nei/BreederRecipeHandler.java b/src/main/java/com/hbm/handler/nei/BreederRecipeHandler.java deleted file mode 100644 index 0fc3f70d2..000000000 --- a/src/main/java/com/hbm/handler/nei/BreederRecipeHandler.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.hbm.handler.nei; - -import java.awt.Rectangle; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - -import com.hbm.blocks.ModBlocks; -import com.hbm.handler.imc.ICompatNHNEI; -import com.hbm.inventory.gui.GUIMachineReactorBreeding; -import com.hbm.inventory.recipes.BreederRecipes; -import com.hbm.inventory.recipes.BreederRecipes.BreederRecipe; - -import codechicken.lib.gui.GuiDraw; -import codechicken.nei.NEIServerUtils; -import codechicken.nei.PositionedStack; -import codechicken.nei.recipe.TemplateRecipeHandler; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.item.ItemStack; - -public class BreederRecipeHandler extends TemplateRecipeHandler implements ICompatNHNEI { - - @Override - public ItemStack[] getMachinesForRecipe() { - return new ItemStack[]{ - new ItemStack(ModBlocks.machine_reactor_breeding)}; - } - - @Override - public String getRecipeID() { - return "breeding"; - } - public class BreedingSet extends TemplateRecipeHandler.CachedRecipe { - - PositionedStack input; - PositionedStack result; - public int flux; - - public BreedingSet(ItemStack input, ItemStack result, int flux) { - input.stackSize = 1; - this.input = new PositionedStack(input, 30, 24); - this.result = new PositionedStack(result, 120, 24); - this.flux = flux; - } - - @Override - public List getIngredients() { - return getCycledIngredients(cycleticks / 48, Arrays.asList(new PositionedStack[] { input })); - } - - @Override - public PositionedStack getResult() { - return result; - } - } - - @Override - public String getRecipeName() { - return "Breeding Reactor"; - } - - @Override - public String getGuiTexture() { - return GUIMachineReactorBreeding.texture.toString(); - } - - @Override - public void loadCraftingRecipes(String outputId, Object... results) { - - if((outputId.equals("breeding")) && getClass() == BreederRecipeHandler.class) { - - Map recipes = BreederRecipes.getAllRecipes(); - - for(Map.Entry recipe : recipes.entrySet()) { - this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().flux)); - } - } else { - super.loadCraftingRecipes(outputId, results); - } - } - - @Override - public void loadCraftingRecipes(ItemStack result) { - - Map recipes = BreederRecipes.getAllRecipes(); - - for(Map.Entry recipe : recipes.entrySet()) { - if(NEIServerUtils.areStacksSameType(recipe.getValue().output, result)) - this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().flux)); - } - } - - @Override - public void loadUsageRecipes(String inputId, Object... ingredients) { - if((inputId.equals("breeding")) && getClass() == BreederRecipeHandler.class) { - loadCraftingRecipes("breeding", new Object[0]); - } else { - super.loadUsageRecipes(inputId, ingredients); - } - } - - @Override - public void loadUsageRecipes(ItemStack ingredient) { - - Map recipes = BreederRecipes.getAllRecipes(); - - for(Map.Entry recipe : recipes.entrySet()) { - if(NEIServerUtils.areStacksSameType(ingredient, (ItemStack) recipe.getKey())) - this.arecipes.add(new BreedingSet(recipe.getKey(), recipe.getValue().output, recipe.getValue().flux)); - } - } - - @Override - public Class getGuiClass() { - return GUIMachineReactorBreeding.class; - } - - @Override - public void loadTransferRects() { - transferRects.add(new RecipeTransferRect(new Rectangle(68, 9, 30, 37), "breeding")); - } - - @Override - public void drawExtras(int recipe) { - drawProgressBar(48, 21, 176, 0, 70, 20, 50, 0); - - String flux = ((BreedingSet) this.arecipes.get(recipe)).flux + ""; - GuiDraw.drawString(flux, 83 - GuiDraw.fontRenderer.getStringWidth(flux) / 2, 10, 0x08FF00); - } -} diff --git a/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java b/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java index 34ff7cb6a..028e3d398 100644 --- a/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/AssemblyMachineRecipes.java @@ -511,12 +511,6 @@ public class AssemblyMachineRecipes extends GenericRecipes { .inputItemsEx(new OreDictStack(KEY_PLANKS, 1), new OreDictStack(GRAPHITE.ingot(), 8), new OreDictStack(STEEL.plate(), 1))); // reactors - this.register(new GenericRecipe("ass.breedingreactor").setup(200, 100).outputItems(new ItemStack(ModBlocks.machine_reactor_breeding, 1)) - .inputItems(new ComparableStack(ModItems.reactor_core, 1), new OreDictStack(STEEL.ingot(), 12), new OreDictStack(PB.plate(), 16), new ComparableStack(ModBlocks.reinforced_glass, 4), new OreDictStack(ASBESTOS.ingot(), 4), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.crt_display, 1)) - .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.LEAD_PLATING), new ComparableStack(ModItems.reactor_core, 1), new OreDictStack(ASBESTOS.ingot(), 16), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.crt_display, 1))); - this.register(new GenericRecipe("ass.researchreactor").setup(200, 100).outputItems(new ItemStack(ModBlocks.reactor_research, 1)) - .inputItems(new OreDictStack(STEEL.ingot(), 8), new OreDictStack(ANY_RESISTANTALLOY.ingot(), 4), new ComparableStack(ModItems.motor_desh, 2), new OreDictStack(B.ingot(), 5), new OreDictStack(PB.plate(), 8), new ComparableStack(ModItems.crt_display, 3), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)) - .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.FERRO_PLATING), new ComparableStack(ModItems.motor_desh, 2), new ComparableStack(ModItems.crt_display, 3), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.CIRCUIT))); this.register(new GenericRecipe("ass.cirnox").setup(600, 100).outputItems(new ItemStack(ModBlocks.reactor_zirnox, 1)) .inputItems(new OreDictStack(STEEL.shell(), 4), new OreDictStack(STEEL.pipe(), 8), new OreDictStack(B.ingot(), 8), new OreDictStack(GRAPHITE.ingot(), 16), new OreDictStack(RUBBER.ingot(), 16), new OreDictStack(ANY_CONCRETE.any(), 16), new ComparableStack(ModItems.circuit, 4, EnumCircuitType.BASIC)) .inputItemsEx(new ComparableStack(ModItems.item_expensive, 4, EnumExpensiveType.LEAD_PLATING), new OreDictStack(GRAPHITE.ingot(), 16), new OreDictStack(RUBBER.ingot(), 16), new OreDictStack(ANY_CONCRETE.any(), 16), new ComparableStack(ModItems.item_expensive, 2, EnumExpensiveType.CIRCUIT))); diff --git a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java index 799702a84..6fc588db3 100644 --- a/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java +++ b/src/main/java/com/hbm/inventory/recipes/anvil/AnvilRecipes.java @@ -553,14 +553,6 @@ public class AnvilRecipes extends SerializableRecipe { new OreDictStack(PU239.billet(), 3) }, new AnvilOutput(new ItemStack(ModItems.missile_doomsday))).setTier(5)); - constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u233, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u233))).setTier(4)); - constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_u235, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_u235))).setTier(4)); - constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_mox_fuel, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_mox))).setTier(4)); - constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_pu239, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_pu239))).setTier(4)); - constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.ingot_schrabidium, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_sa326))).setTier(4)); - constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.billet_ra226be, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_ra226be))).setTier(4)); - constructionRecipes.add(new AnvilConstructionRecipe(new ComparableStack(ModItems.billet_pu238be, 1), new AnvilOutput(new ItemStack(ModItems.plate_fuel_pu238be))).setTier(4)); - for(int i = 0; i < 15; i += 3) { constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(IRON.plate(), 1), new AnvilOutput(new ItemStack(ModBlocks.fluid_duct_box, 1, i))).setTier(2).setOverlay(OverlayType.CONSTRUCTION)); constructionRecipes.add(new AnvilConstructionRecipe(new OreDictStack(CU.plate(), 1), new AnvilOutput(new ItemStack(ModBlocks.fluid_duct_box, 1, i + 1))).setTier(2).setOverlay(OverlayType.CONSTRUCTION)); diff --git a/src/main/java/com/hbm/items/ModItems.java b/src/main/java/com/hbm/items/ModItems.java index 6f01e5de3..3fb3c1433 100644 --- a/src/main/java/com/hbm/items/ModItems.java +++ b/src/main/java/com/hbm/items/ModItems.java @@ -959,13 +959,13 @@ public class ModItems { public static Item waste_schrabidium; public static Item waste_zfb_mox; - public static Item waste_plate_u233; - public static Item waste_plate_u235; - public static Item waste_plate_mox; - public static Item waste_plate_pu239; - public static Item waste_plate_sa326; - public static Item waste_plate_ra226be; - public static Item waste_plate_pu238be; + @Deprecated public static Item waste_plate_u233; + @Deprecated public static Item waste_plate_u235; + @Deprecated public static Item waste_plate_mox; + @Deprecated public static Item waste_plate_pu239; + @Deprecated public static Item waste_plate_sa326; + @Deprecated public static Item waste_plate_ra226be; + @Deprecated public static Item waste_plate_pu238be; @Deprecated public static Item pile_rod_uranium; @Deprecated public static Item pile_rod_pu239; @@ -977,13 +977,13 @@ public class ModItems { public static Item pile_rod; - public static Item plate_fuel_u233; - public static Item plate_fuel_u235; - public static Item plate_fuel_mox; - public static Item plate_fuel_pu239; - public static Item plate_fuel_sa326; - public static Item plate_fuel_ra226be; - public static Item plate_fuel_pu238be; + @Deprecated public static Item plate_fuel_u233; + @Deprecated public static Item plate_fuel_u235; + @Deprecated public static Item plate_fuel_mox; + @Deprecated public static Item plate_fuel_pu239; + @Deprecated public static Item plate_fuel_sa326; + @Deprecated public static Item plate_fuel_ra226be; + @Deprecated public static Item plate_fuel_pu238be; public static Item pwr_fuel; public static Item pwr_fuel_hot; @@ -2998,13 +2998,13 @@ public class ModItems { pile_rod = new ItemPileRodMK2().setUnlocalizedName("pile_rod").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pile_rod"); - plate_fuel_u233 = new ItemPlateFuel(2200000).setFunction(FunctionEnum.SQUARE_ROOT, 50).setUnlocalizedName("plate_fuel_u233").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u233"); - plate_fuel_u235 = new ItemPlateFuel(2200000).setFunction(FunctionEnum.SQUARE_ROOT, 40).setUnlocalizedName("plate_fuel_u235").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_u235"); - plate_fuel_mox = new ItemPlateFuel(2400000).setFunction(FunctionEnum.LOGARITHM, 50).setUnlocalizedName("plate_fuel_mox").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_mox"); - plate_fuel_pu239 = new ItemPlateFuel(2000000).setFunction(FunctionEnum.NEGATIVE_QUADRATIC, 50).setUnlocalizedName("plate_fuel_pu239").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_pu239"); - plate_fuel_sa326 = new ItemPlateFuel(2000000).setFunction(FunctionEnum.LINEAR, 80).setUnlocalizedName("plate_fuel_sa326").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_sa326"); - plate_fuel_ra226be = new ItemPlateFuel(1300000).setFunction(FunctionEnum.PASSIVE, 30).setUnlocalizedName("plate_fuel_ra226be").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_ra226be"); - plate_fuel_pu238be = new ItemPlateFuel(1000000).setFunction(FunctionEnum.PASSIVE, 50).setUnlocalizedName("plate_fuel_pu238be").setMaxStackSize(1).setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":plate_fuel_pu238be"); + plate_fuel_u233 = new ItemPlateFuel(2200000).setFunction(FunctionEnum.SQUARE_ROOT, 50).setUnlocalizedName("plate_fuel_u233").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":plate_fuel_u233"); + plate_fuel_u235 = new ItemPlateFuel(2200000).setFunction(FunctionEnum.SQUARE_ROOT, 40).setUnlocalizedName("plate_fuel_u235").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":plate_fuel_u235"); + plate_fuel_mox = new ItemPlateFuel(2400000).setFunction(FunctionEnum.LOGARITHM, 50).setUnlocalizedName("plate_fuel_mox").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":plate_fuel_mox"); + plate_fuel_pu239 = new ItemPlateFuel(2000000).setFunction(FunctionEnum.NEGATIVE_QUADRATIC, 50).setUnlocalizedName("plate_fuel_pu239").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":plate_fuel_pu239"); + plate_fuel_sa326 = new ItemPlateFuel(2000000).setFunction(FunctionEnum.LINEAR, 80).setUnlocalizedName("plate_fuel_sa326").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":plate_fuel_sa326"); + plate_fuel_ra226be = new ItemPlateFuel(1300000).setFunction(FunctionEnum.PASSIVE, 30).setUnlocalizedName("plate_fuel_ra226be").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":plate_fuel_ra226be"); + plate_fuel_pu238be = new ItemPlateFuel(1000000).setFunction(FunctionEnum.PASSIVE, 50).setUnlocalizedName("plate_fuel_pu238be").setMaxStackSize(1).setCreativeTab(null).setTextureName(RefStrings.MODID + ":plate_fuel_pu238be"); pwr_fuel = new ItemPWRFuel().setUnlocalizedName("pwr_fuel").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pwr_fuel"); pwr_fuel_hot = new ItemEnumMulti(EnumPWRFuel.class, true, false).setUnlocalizedName("pwr_fuel_hot").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pwr_fuel_hot"); diff --git a/src/main/java/com/hbm/main/NEIRegistry.java b/src/main/java/com/hbm/main/NEIRegistry.java index c792185dd..a7f260e83 100644 --- a/src/main/java/com/hbm/main/NEIRegistry.java +++ b/src/main/java/com/hbm/main/NEIRegistry.java @@ -33,7 +33,6 @@ public class NEIRegistry { handlers.add(new RefineryRecipeHandler()); handlers.add(new CentrifugeRecipeHandler()); handlers.add(new GasCentrifugeRecipeHandler()); - handlers.add(new BreederRecipeHandler()); handlers.add(new CyclotronRecipeHandler()); handlers.add(new VacuumRecipeHandler()); handlers.add(new CrackingHandler()); diff --git a/src/main/java/com/hbm/tileentity/TileEntityDoorGeneric.java b/src/main/java/com/hbm/tileentity/TileEntityDoorGeneric.java index ffda38e6b..f3263d14b 100644 --- a/src/main/java/com/hbm/tileentity/TileEntityDoorGeneric.java +++ b/src/main/java/com/hbm/tileentity/TileEntityDoorGeneric.java @@ -49,6 +49,11 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase { public void updateEntity() { if(this.getBlockMetadata() < 12) return; + if(this.getDoorType() == null) { + this.invalidate(); + return; + } + if(getDoorType().onDoorUpdate() != null) { getDoorType().onDoorUpdate().accept(this); } @@ -191,7 +196,7 @@ public class TileEntityDoorGeneric extends TileEntityLockableBase { public DoorDecl getDoorType() { if(this.doorType == null && this.getBlockType() instanceof BlockDoorGeneric) - this.doorType = ((BlockDoorGeneric)this.getBlockType()).type; + this.doorType = ((BlockDoorGeneric) this.getBlockType()).type; return this.doorType; } diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSatLink.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSatLink.java index f2807dc53..444e49f6e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSatLink.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineSatLink.java @@ -85,7 +85,7 @@ public class TileEntityMachineSatLink extends TileEntityTickingBase implements I @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); - nbt.setInteger("power", freq); + nbt.setInteger("freq", freq); } AxisAlignedBB bb = null; diff --git a/src/main/resources/assets/hbm/lang/de_DE.lang b/src/main/resources/assets/hbm/lang/de_DE.lang index 4cdd2f904..4afb5b568 100644 --- a/src/main/resources/assets/hbm/lang/de_DE.lang +++ b/src/main/resources/assets/hbm/lang/de_DE.lang @@ -3303,6 +3303,7 @@ item.satellite.miner_astro.name=Asteroiden-Förderschiff item.satellite.miner_lunar.name=Mond-Förderschiff item.satellite.precision_laser.name=Orbitaler Präzisionslaser item.satellite.radar.name=Radar-Überwachungssatellit +item.satellite.ray_scan.name=Schmalband-Emissionsscan-Satellit item.satellite.relay.name=Relais-Satellit item.satellite.scanner.name=Tiefenscan-Satellit item.satellite.spy.name=Spionagesatellit @@ -4533,9 +4534,8 @@ tile.machine_pyrooven.name=Pyrolyseofen tile.machine_radar.name=Radar tile.machine_radar_large.name=Großes Radar tile.machine_radgen.name=Strahlenbetriebener Generator -tile.machine_reactor.name=Brutreaktor -tile.machine_reactor_on.name=Brutreaktor -tile.machine_reactor_small.name=Atomreaktor +tile.machine_reactor.name=Brutreaktor (LEGACY) +tile.machine_reactor_small.name=Atomreaktor (LEGACY) tile.machine_refinery.name=Ölraffinerie tile.machine_reix_mainframe.name=Rei-X Hauptrechner (WIP) tile.machine_rotary_furnace.name=Rotationshochofen diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index a4ece5490..d14837744 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -5821,8 +5821,8 @@ tile.machine_radar.name=Radar tile.machine_radar_large.name=Large Radar tile.machine_radgen.name=Radiation-Powered Engine tile.machine_radiolysis.name=Radioisotope Thermoelectric Generator and Radiolysis Chamber -tile.machine_reactor.name=Breeding Reactor -tile.machine_reactor_small.name=Research Reactor +tile.machine_reactor.name=Breeding Reactor (LEGACY) +tile.machine_reactor_small.name=Research Reactor (LEGACY) tile.machine_refinery.name=Oil Refinery tile.machine_reix_mainframe.name=Rei-X Mainframe (WIP) tile.machine_rotary_furnace.name=Rotary Furnace