mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 07:35:47 +00:00
Replace !Proxies.common.isSimulating(world) with standard world.isRemote
This commit is contained in:
1 parent
1e89bab556
commit
4234c38d69
44 files changed
+66
-102
No files matched your search
@@ -67,7 +67,7 @@ public class ContainerCatalogue extends Container implements IGuiSelectable {
|
||||
public ContainerCatalogue(EntityPlayer player) {
|
||||
this.player = player;
|
||||
|
||||
if (Proxies.common.isSimulating(player.worldObj)) {
|
||||
if (!player.worldObj.isRemote) {
|
||||
rebuildStationsList();
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ public class ContainerCatalogue extends Container implements IGuiSelectable {
|
||||
}
|
||||
|
||||
public void nextPage() {
|
||||
if (!Proxies.common.isSimulating(player.worldObj)) {
|
||||
if (player.worldObj.isRemote) {
|
||||
sendSelection(true);
|
||||
return;
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public class ContainerCatalogue extends Container implements IGuiSelectable {
|
||||
}
|
||||
|
||||
public void previousPage() {
|
||||
if (!Proxies.common.isSimulating(player.worldObj)) {
|
||||
if (player.worldObj.isRemote) {
|
||||
sendSelection(false);
|
||||
return;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ public class ContainerCatalogue extends Container implements IGuiSelectable {
|
||||
}
|
||||
|
||||
public void cycleFilter() {
|
||||
if (!Proxies.common.isSimulating(player.worldObj)) {
|
||||
if (player.worldObj.isRemote) {
|
||||
PacketGuiSelect packet = new PacketGuiSelect(PacketId.GUI_SELECTION_CHANGE, 2, 0);
|
||||
Proxies.net.sendToServer(packet);
|
||||
return;
|
||||
@@ -150,7 +150,7 @@ public class ContainerCatalogue extends Container implements IGuiSelectable {
|
||||
/* Managing Trade info */
|
||||
private void updateTradeInfo() {
|
||||
// Updating is done by the server.
|
||||
if (!Proxies.common.isSimulating(player.worldObj)) {
|
||||
if (player.worldObj.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ public class ContainerLetter extends ContainerItemInventory<LetterInventory> {
|
||||
}
|
||||
|
||||
// Rip open delivered mails
|
||||
if (Proxies.common.isSimulating(player.worldObj)) {
|
||||
if (!player.worldObj.isRemote) {
|
||||
if (inventory.getLetter().isProcessed()) {
|
||||
inventory.onLetterOpened();
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class ContainerLetter extends ContainerItemInventory<LetterInventory> {
|
||||
@Override
|
||||
public void onContainerClosed(EntityPlayer entityplayer) {
|
||||
|
||||
if (Proxies.common.isSimulating(entityplayer.worldObj)) {
|
||||
if (!entityplayer.worldObj.isRemote) {
|
||||
ILetter letter = inventory.getLetter();
|
||||
if (!letter.isProcessed()) {
|
||||
IMailAddress sender = PostManager.postRegistry.getMailAddress(entityplayer.getGameProfile());
|
||||
@@ -183,7 +183,7 @@ public class ContainerLetter extends ContainerItemInventory<LetterInventory> {
|
||||
/* Managing Trade info */
|
||||
private void updateTradeInfo(World world, IMailAddress address) {
|
||||
// Updating is done by the server.
|
||||
if (!Proxies.common.isSimulating(world)) {
|
||||
if (world.isRemote) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ public class ContainerMailbox extends ContainerTile<TileMailbox> {
|
||||
ItemStack stack = super.slotClick(slotIndex, button, par3, player);
|
||||
|
||||
if (SlotUtil.isSlotInRange(slotIndex, SLOT_LETTERS, SLOT_LETTERS_COUNT)) {
|
||||
if (Proxies.common.isSimulating(player.worldObj) && mailInventory != null) {
|
||||
if (!player.worldObj.isRemote && mailInventory != null) {
|
||||
POBoxInfo info = mailInventory.getPOBoxInfo();
|
||||
Proxies.net.sendToPlayer(new PacketPOBoxInfo(info), player);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user