This is in the error reporting plugin report:
"Furnace Splitter: Forced Unloaded
Due to excessive error spams discord error logger has forced unloaded this plugin.
Total Errors: 46x
Open a support ticket"
Really needs an update.
Throws errors, forced unloading
The specific errors:
Failed to call hook 'OnTick' on plugin 'FurnaceSplitter v2.5.3' (NullReferenceException: Object reference not set to an instance of an object)
at Oxide.Plugins.FurnaceSplitter.GetOvenInfo (BaseOven oven) [0x0002a] in <73eaab3967994f88a9b7bb97dac04592>:0
at Oxide.Plugins.FurnaceSplitter.OnTick () [0x0003a] in <73eaab3967994f88a9b7bb97dac04592>:0
at Oxide.Plugins.FurnaceSplitter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x002a7] in <73eaab3967994f88a9b7bb97dac04592>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <15f61ddda771464d8246ebdce8ff4811>:0
at (wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Oxide.Core.Plugins.Plugin.CallHook_Patch0(Oxide.Core.Plugins.Plugin,string,object[]) Failed to call hook 'CanMoveItem' on plugin 'FurnaceSplitter v2.5.3' (NullReferenceException: Object reference not set to an instance of an object)
Sameat Oxide.Plugins.FurnaceSplitter.GetOvenInfo (BaseOven oven) [0x0002a] in <1c6c025834ee403f9a3d3fcd0445e8cf>:0
at Oxide.Plugins.FurnaceSplitter.AutoAddFuel (PlayerInventory playerInventory, BaseOven oven) [0x0000d] in <1c6c025834ee403f9a3d3fcd0445e8cf>:0
at Oxide.Plugins.FurnaceSplitter.CanMoveItem (Item item, PlayerInventory inventory, ItemContainerId targetContainerId, System.Int32 targetSlotIndex, System.Int32 splitAmount) [0x001b8] in <1c6c025834ee403f9a3d3fcd0445e8cf>:0
at Oxide.Plugins.FurnaceSplitter.DirectCallHook (System.String name, System.Object& ret, System.Object[] args) [0x008a5] in <1c6c025834ee403f9a3d3fcd0445e8cf>:0
at Oxide.Plugins.CSharpPlugin.InvokeMethod (Oxide.Core.Plugins.HookMethod method, System.Object[] args) [0x00079] in <42f9bedc659b4f4786eb778d3cd58968>:0
at Oxide.Core.Plugins.CSPlugin.OnCallHook (System.String name, System.Object[] args) [0x000de] in <15f61ddda771464d8246ebdce8ff4811>:0
at Oxide.Core.Plugins.Plugin.CallHook (System.String hook, System.Object[] args) [0x00060] in <15f61ddda771464d8246ebdce8ff4811>:0 I also have this issue
same here
yep same issue here. right clicking ore into electric furnaces also ends up duplicating the ore
I think it happens when you have all in config like:
"*": {
"enabled": true,
"fuelMultiplier": 1.0
},
Or if you enable the apartment. Disabling apartments probably fixes it w/o all, but if you use all (*), you can use this temporary measure to stop the errors (search for //trader):
private void OnTick()
{
while (queuedUiUpdates.Count > 0)
{
BaseOven oven = queuedUiUpdates.Pop();
if (!oven || oven.IsDestroyed)
continue;
OvenInfo ovenInfo = GetOvenInfo(oven);
if (ovenInfo == null) //trader apartments added
continue;
GetLooters(oven)?.ForEach(player =>
{
if (player != null && !player.IsDestroyed && HasPermission(player) && GetEnabled(player))
{
CreateUi(player, oven, ovenInfo);
}
});
}
}
//Trader apartments
public OvenInfo GetOvenInfo(BaseOven oven)
{
if (oven == null || oven.IsDestroyed)
return null;
if (oven.fuelType == null)
return null;
var burnable = oven.fuelType.GetComponent<ItemModBurnable>();
if (burnable == null)
return null;
OvenInfo result = new OvenInfo();
PluginConfig.OvenConfig ovenCfg = GetOvenConfig(oven.ShortPrefabName);
float fuelMultiplier = ovenCfg?.fuelMultiplier ?? 1f;
float ETA = GetTotalSmeltTime(oven) / oven.smeltSpeed;
float fuelUnits = burnable.fuelAmount;
float neededFuel = (float)Math.Ceiling(ETA * (oven.cookingTemperature / 200f) / fuelUnits);
result.FuelNeeded = neededFuel * fuelMultiplier;
result.ETA = ETA;
return result;
}
/*public OvenInfo GetOvenInfo(BaseOven oven)
{
OvenInfo result = new OvenInfo();
PluginConfig.OvenConfig ovenCfg = GetOvenConfig(oven.ShortPrefabName);
float fuelMultiplier = ovenCfg != null ? ovenCfg.fuelMultiplier : 1.0f;
float ETA = GetTotalSmeltTime(oven) / oven.smeltSpeed;
float fuelUnits = oven.fuelType.GetComponent<ItemModBurnable>().fuelAmount;
float neededFuel = (float)Math.Ceiling(ETA * (oven.cookingTemperature / 200.0f) / fuelUnits);
result.FuelNeeded = neededFuel * fuelMultiplier;
result.ETA = ETA;
return result;
}*/Then at the start of AutoAddFuel:
private void AutoAddFuel(PlayerInventory playerInventory, BaseOven oven)
{
//trader apartments mod starts
var ovenInfo = GetOvenInfo(oven);
if (ovenInfo == null)
return;
int neededFuel = (int)Math.Ceiling(ovenInfo.FuelNeeded);
//trader int neededFuel = (int)Math.Ceiling(GetOvenInfo(oven).FuelNeeded);
//trader apartments mod ends
neededFuel -= oven.inventory.GetAmount(oven.fuelType.itemid, false);