mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
Code cleanup (#5468)
* remove direct guava predicates from BlockStateMachine * cleanup blockstatebasic * fix a large number of e.printStacktrace calls, narrow ComputerIntegration exception signature * fix simple todos, remove invalid todos, unify some duplicate rendering code * use a generic method to get around unchecked warning * remove some redundant uses of hasCapability * experimental OptionalCapability class. not in use yet * nullable checks/annotations & remove duplicate field controlType in factory TE * Inline various redundant variables * Remove unused list * Cleanup BlockStateGenerator * Replace string constants with pointers to the proper mod id constant * As 9.7.5 breaks backwards compat API wise for the DynamicNetwork this is as good a time as any to remove this deprecated method * Use two argument constructor instead of appending a ':' inbetween * Convert other BlockState type classes to using suppliers for tile entity creation
This commit is contained in:
1 parent
40620ec23b
commit
80b07bc4b3
115 files changed
+583
-633
No files matched your search
@@ -121,18 +121,16 @@ public class ItemBlockEnergyCube extends ItemBlock implements IEnergizedItem, IS
|
||||
if (tileEntity.tier == EnergyCubeTier.CREATIVE) {
|
||||
tileEntity.configComponent.fillConfig(TransmissionType.ENERGY, tileEntity.getEnergy() > 0 ? 2 : 1);
|
||||
}
|
||||
ISecurityTile security = tileEntity;
|
||||
security.getSecurity().setOwnerUUID(getOwnerUUID(stack));
|
||||
((ISecurityTile) tileEntity).getSecurity().setOwnerUUID(getOwnerUUID(stack));
|
||||
if (hasSecurity(stack)) {
|
||||
security.getSecurity().setMode(getSecurity(stack));
|
||||
((ISecurityTile) tileEntity).getSecurity().setMode(getSecurity(stack));
|
||||
}
|
||||
if (getOwnerUUID(stack) == null) {
|
||||
security.getSecurity().setOwnerUUID(player.getUniqueID());
|
||||
((ISecurityTile) tileEntity).getSecurity().setOwnerUUID(player.getUniqueID());
|
||||
}
|
||||
ISideConfiguration config = tileEntity;
|
||||
if (ItemDataUtils.hasData(stack, "sideDataStored")) {
|
||||
config.getConfig().read(ItemDataUtils.getDataMap(stack));
|
||||
config.getEjector().read(ItemDataUtils.getDataMap(stack));
|
||||
((ISideConfiguration) tileEntity).getConfig().read(ItemDataUtils.getDataMap(stack));
|
||||
((ISideConfiguration) tileEntity).getEjector().read(ItemDataUtils.getDataMap(stack));
|
||||
}
|
||||
((ISustainedInventory) tileEntity).setInventory(getInventory(stack));
|
||||
if (!world.isRemote) {
|
||||
|
||||
Reference in new issue
Block a user