Clean up global state for cable render mode (#4539)
* Clean up the global state used to hack part interaction into respecting the player's facade render mode. Make the name more indicative of what is actually happening. * Fun.
This commit is contained in:
@@ -330,11 +330,12 @@ public class PartPlacement {
|
||||
}
|
||||
|
||||
private static SelectedPart selectPart(final PlayerEntity player, final IPartHost host, final Vector3d pos) {
|
||||
AppEng.proxy.updateRenderMode(player);
|
||||
final SelectedPart sp = host.selectPart(pos);
|
||||
AppEng.proxy.updateRenderMode(null);
|
||||
|
||||
return sp;
|
||||
AppEng.proxy.setPartInteractionPlayer(player);
|
||||
try {
|
||||
return host.selectPart(pos);
|
||||
} finally {
|
||||
AppEng.proxy.setPartInteractionPlayer(null);
|
||||
}
|
||||
}
|
||||
|
||||
public static IFacadePart isFacade(final ItemStack held, final AEPartLocation side) {
|
||||
|
||||
Reference in New Issue
Block a user