Some performance-oriented refactoring of TileComponentConfig

Add new type "SideConfig" which is observable, this could come in handy
later.
Add hasSideForData method in componentConfig, which is much more
efficient than calling getSidesForData().contains.
Refactor duplicate calls to getConfig into single instances. getConfig
is a nontrivial method.
This commit is contained in:
Richard Carter committed 2017-07-23 20:14:34 -04:00
1 parent dc6312e1d3
commit bc3274825a
9 files changed
+163 -70

No files matched your search

@@ -60,7 +60,7 @@ public class PacketConfigurationUpdate implements IMessageHandler<ConfigurationU
}
else if(message.clickType == 2)
{
((ISideConfiguration)tile).getConfig().getConfig(message.transmission)[message.configIndex.ordinal()] = 0;
((ISideConfiguration)tile).getConfig().getConfig(message.transmission).set(message.configIndex, (byte) 0);
}
tile.markDirty();