mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
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:
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();
|
||||
|
||||
Reference in new issue
Block a user