IWandBindables are now responsible for syncing themselves after a binding instead of the wand doing it

This commit is contained in:
Vincent Lee committed 2020-06-12 08:46:22 -05:00
1 parent fbba1ffe7e
commit 6da5699efb
4 files changed
+4 -1

No files matched your search

@@ -279,6 +279,7 @@ public class TileEntityGeneratingFlower extends TileEntitySpecialFlower {
TileEntity tile = player.world.getTileEntity(pos);
if (tile instanceof IManaCollector) {
linkedCollector = tile;
sync();
return true;
}
}
@@ -36,6 +36,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.network.NetworkHooks;
import net.minecraftforge.registries.ObjectHolder;
import vazkii.botania.api.internal.VanillaPacketDispatcher;
import vazkii.botania.api.wand.IWandBindable;
import vazkii.botania.client.fx.SparkleParticleData;
import vazkii.botania.client.fx.WispParticleData;
@@ -233,6 +234,7 @@ public class TileLightRelay extends TileMod implements ITickableTileEntity, IWan
}
bindPos = pos;
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
return true;
}
@@ -696,6 +696,7 @@ public class TileSpreader extends TileSimpleInventory implements IManaCollector,
rotationY = (float) angle;
checkForReceiver();
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(this);
return true;
}
@@ -94,7 +94,6 @@ public class ItemTwigWand extends Item implements ICoordBoundItem {
if (srcTile instanceof IWandBindable) {
if (((IWandBindable) srcTile).bindTo(ctx.getPlayer(), stack, dest, ctx.getFace())) {
doParticleBeamWithOffset(ctx.getWorld(), src, dest);
VanillaPacketDispatcher.dispatchTEToNearbyPlayers(ctx.getWorld(), src);
setBindingAttempt(stack, UNBOUND_POS);
}
return true;