From 9c8633bd280ee9fcefe695be78649c71111b8fed Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Thu, 29 Jan 2015 02:08:21 -0500 Subject: [PATCH] Updated the cast error fix by Lertsenem for 1.7.5a --- src/com/watabou/pixeldungeon/actors/mobs/Mimic.java | 2 +- src/com/watabou/pixeldungeon/items/Heap.java | 2 +- src/com/watabou/pixeldungeon/levels/RegularLevel.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/com/watabou/pixeldungeon/actors/mobs/Mimic.java b/src/com/watabou/pixeldungeon/actors/mobs/Mimic.java index 0cfdf5146a..fd327a4650 100644 --- a/src/com/watabou/pixeldungeon/actors/mobs/Mimic.java +++ b/src/com/watabou/pixeldungeon/actors/mobs/Mimic.java @@ -64,7 +64,7 @@ public void storeInBundle( Bundle bundle ) { @Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); - items = new ArrayList( (Collection) bundle.getCollection( ITEMS ) ); + items = new ArrayList( (Collection) ((Collection) bundle.getCollection( ITEMS )) ); adjustStats( bundle.getInt( LEVEL ) ); } diff --git a/src/com/watabou/pixeldungeon/items/Heap.java b/src/com/watabou/pixeldungeon/items/Heap.java index 70c9d8c6ef..1b10acf3b8 100644 --- a/src/com/watabou/pixeldungeon/items/Heap.java +++ b/src/com/watabou/pixeldungeon/items/Heap.java @@ -360,7 +360,7 @@ public void destroy() { public void restoreFromBundle( Bundle bundle ) { pos = bundle.getInt( POS ); type = Type.valueOf( bundle.getString( TYPE ) ); - items = new LinkedList( (Collection) bundle.getCollection( ITEMS ) ); + items = new LinkedList( (Collection) ((Collection) bundle.getCollection( ITEMS )) ); } @Override diff --git a/src/com/watabou/pixeldungeon/levels/RegularLevel.java b/src/com/watabou/pixeldungeon/levels/RegularLevel.java index fa86652c1f..9d5d102362 100644 --- a/src/com/watabou/pixeldungeon/levels/RegularLevel.java +++ b/src/com/watabou/pixeldungeon/levels/RegularLevel.java @@ -682,7 +682,7 @@ public void storeInBundle( Bundle bundle ) { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); - rooms = new HashSet( (Collection) bundle.getCollection( "rooms" ) ); + rooms = new HashSet( (Collection) ((Collection) bundle.getCollection( "rooms" )) ); for (Room r : rooms) { if (r.type == Type.WEAK_FLOOR) { weakFloorCreated = true;