From f4cc6ef6f57bfd19aa9fa78d669522464bf46c63 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 4 Dec 2016 16:03:47 +0100 Subject: [PATCH] Fix a crash with Laser Relays on certain machiens Closes #445 --- .../ellpeck/actuallyadditions/mod/util/compat/TeslaUtil.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/TeslaUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/TeslaUtil.java index 977fb8253..8a6f05581 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/TeslaUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/compat/TeslaUtil.java @@ -67,9 +67,10 @@ public final class TeslaUtil{ TESLA_MAP.put(tile, handlers); } - int side = facing == null ? 0 : facing.ordinal(); + EnumFacing properFacing = facing == null ? EnumFacing.DOWN : facing; + int side = properFacing.ordinal(); if(handlers[side] == null){ - handlers[side] = new TileTeslaWrapper(tile, facing); + handlers[side] = new TileTeslaWrapper(tile, properFacing); } return handlers[side]; }