Changing the blockstate server side is not needed
This commit is contained in:
@@ -6,7 +6,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import refinedstorage.RefinedStorageUtils;
|
import refinedstorage.RefinedStorageUtils;
|
||||||
import refinedstorage.block.BlockMachine;
|
|
||||||
import refinedstorage.network.MessageMachineConnectedUpdate;
|
import refinedstorage.network.MessageMachineConnectedUpdate;
|
||||||
import refinedstorage.tile.config.IRedstoneModeConfig;
|
import refinedstorage.tile.config.IRedstoneModeConfig;
|
||||||
import refinedstorage.tile.config.RedstoneMode;
|
import refinedstorage.tile.config.RedstoneMode;
|
||||||
@@ -67,10 +66,6 @@ public abstract class TileMachine extends TileBase implements ISynchronizedConta
|
|||||||
this.controller = controller;
|
this.controller = controller;
|
||||||
this.connected = true;
|
this.connected = true;
|
||||||
|
|
||||||
if (world.getBlockState(pos).getBlock() == block) {
|
|
||||||
world.setBlockState(pos, world.getBlockState(pos).withProperty(BlockMachine.CONNECTED, true));
|
|
||||||
}
|
|
||||||
|
|
||||||
world.notifyNeighborsOfStateChange(pos, block);
|
world.notifyNeighborsOfStateChange(pos, block);
|
||||||
|
|
||||||
controller.addMachine(this);
|
controller.addMachine(this);
|
||||||
@@ -79,10 +74,6 @@ public abstract class TileMachine extends TileBase implements ISynchronizedConta
|
|||||||
public void onDisconnected(World world) {
|
public void onDisconnected(World world) {
|
||||||
this.connected = false;
|
this.connected = false;
|
||||||
|
|
||||||
if (world.getBlockState(pos).getBlock() == block) {
|
|
||||||
world.setBlockState(pos, world.getBlockState(pos).withProperty(BlockMachine.CONNECTED, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.controller != null) {
|
if (this.controller != null) {
|
||||||
this.controller.removeMachine(this);
|
this.controller.removeMachine(this);
|
||||||
this.controller = null;
|
this.controller = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user