Tough As Nails

Tough As Nails

21M Downloads

Crash when getting near configured heat source

IdrisQe opened this issue ยท 2 comments

commented
Time: 2018-09-23 15:42:57 PDT
Description: Ticking player

java.lang.ClassCastException: com.google.common.collect.RegularImmutableList cannot be cast to com.google.common.collect.ImmutableSet
    at toughasnails.util.BlockStateUtils.getPropertyValueByName(BlockStateUtils.java:119)
    at toughasnails.config.json.BlockStatePredicate.apply(BlockStatePredicate.java:62)
    at toughasnails.temperature.modifier.ObjectProximityModifier.getBlockTemperature(ObjectProximityModifier.java:75)
    at toughasnails.temperature.modifier.ObjectProximityModifier.applyEnvironmentModifiers(ObjectProximityModifier.java:41)
    at toughasnails.api.temperature.TemperatureHelper.getTargetAtPosUnclamped(TemperatureHelper.java:106)
    at toughasnails.temperature.TemperatureHandler.getPlayerTarget(TemperatureHandler.java:114)
    at toughasnails.temperature.TemperatureHandler.update(TemperatureHandler.java:69)
    at toughasnails.handler.ExtendedStatHandler.onPlayerTick(ExtendedStatHandler.java:69)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_627_ExtendedStatHandler_onPlayerTick_PlayerTickEvent.invoke(.dynamic)
    at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90)
    at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182)
    at net.minecraftforge.fml.common.FMLCommonHandler.onPlayerPostTick(FMLCommonHandler.java:370)
    at net.minecraft.entity.player.EntityPlayer.updateSize(EntityPlayer.java:378)
    at net.minecraft.entity.player.EntityPlayer.onUpdate(EntityPlayer.java:288)
    at net.minecraft.entity.player.EntityPlayerMP.onUpdateEntity(EntityPlayerMP.java:382)
    at net.minecraft.network.NetHandlerPlayServer.update(NetHandlerPlayServer.java:173)
    at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.update(NetworkDispatcher.java:209)
    at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:285)
    at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:180)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:790)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:668)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:252)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526)
    at java.lang.Thread.run(Unknown Source)

I configured the block_temperatures.json adding the following:

  {
    "state": {
      "block": "giacomosfoundry:foundry_res",
      "properties": {}
    },
    "temperature": 2.0
  },
  {
    "state": {
      "block": "giacomosfoundry:foundry_lit",
      "properties": {}
    },
    "temperature": 10.0
  },
  {
    "state": {
      "block": "quark:smoker",
      "properties": {}
    },
    "temperature": 1.0
  },
  {
    "state": {
      "block": "cookingforblockheads:oven",
      "properties": {
	    "powered": "true"
	  }
    },
    "temperature": 3.0
  },
  {
    "state": {
      "block": "chisel:lavastone",
      "properties": {}
    },
    "temperature": 2.0
  },
  {
    "state": {
      "block": "cathedral:dwemer_light_normal",
      "properties": {
	    "variant": "vent"
	  }
    },
    "temperature": 2.0
  },
  {
    "state": {
      "block": "immersiveengineering:metal_device1",
      "properties": {
	    "boolean0": "true",
        "type": "furnace_heater"
      }
    },
    "temperature": 2.0
  }

I loaded back into my creative test world where i had a number of these blocks set up and after taking a few steps toward the Immersive Engineering External Heater (single block, not multiblock) I crashed.

Edit: This also applies to the unpowered variant of the External Heater, despite not listing it as a heat source. It does not happen with any of the other blocks I've added to the config.

commented

Hi,

I'm having the same problem described here with:

  • Forge 1.12.2 14.23.5.2796
  • ImmersiveEngineering 0.12-87
  • ToughAsNails 1.12.2-3.1.0.139
  • SereneSeasons 1.12.2-1.2.13

I've modified block_temperature.json to add the Electric Lamp/Advanced Lantern from Immersive Engineering as a heat source, when powered. Now, when someone is getting nearby to this block (powered or not) he getting disconnected, and the server print this error message : https://pastebin.com/raw/SEbwtihF .

My block_temperature.json version can be found here: https://pastebin.com/raw/n2RygKze .

commented

Have you figured this out?