mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-10-18 21:42:29 +00:00
Use IBlockState instead of Block methods
There was a crash in RedstoneUtil when redstone state was changing next to a full block due to the incorrect state being passed. By using IBlockState methods we ensure that this cannot happen again. The old IBlockState methods were also deprecated, so this reduces the warning count a little. I've also moved string translation into StringUtils, to reduce the number of deprecation warnings from there.
This commit is contained in:
@@ -119,7 +119,7 @@ public class CommandAPI implements ILuaAPI
|
||||
table.put( "metadata", metadata );
|
||||
|
||||
Map<Object, Object> stateTable = new HashMap<Object, Object>();
|
||||
for( Object o : block.getActualState( state, world, pos ).getProperties().entrySet() )
|
||||
for( Object o : state.getActualState( world, pos ).getProperties().entrySet() )
|
||||
{
|
||||
ImmutableMap.Entry<IProperty, Object> entry = (ImmutableMap.Entry<IProperty, Object>)o;
|
||||
String propertyName = entry.getKey().getName();
|
||||
|
||||
Reference in New Issue
Block a user