Search in sources :

Example 1 with ClientConfiguration

use of network.rs485.logisticspipes.config.ClientConfiguration in project LogisticsPipes by RS485.

the class PlayerConfigToServerPacket method readData.

@Override
public void readData(LPDataInput input) {
    config = new ClientConfiguration();
    config.read(input);
}
Also used : ClientConfiguration(network.rs485.logisticspipes.config.ClientConfiguration)

Example 2 with ClientConfiguration

use of network.rs485.logisticspipes.config.ClientConfiguration in project LogisticsPipes by RS485.

the class LogisticsEventListener method onPlayerLogin.

@SubscribeEvent
public void onPlayerLogin(PlayerLoggedInEvent event) {
    if (MainProxy.isServer(event.player.world)) {
        SimpleServiceLocator.securityStationManager.sendClientAuthorizationList(event.player);
    }
    SimpleServiceLocator.serverBufferHandler.clear(event.player);
    ClientConfiguration config = LogisticsPipes.getServerConfigManager().getPlayerConfiguration(PlayerIdentifier.get(event.player));
    MainProxy.sendPacketToPlayer(PacketHandler.getPacket(PlayerConfigToClientPacket.class).setConfig(config), event.player);
}
Also used : ClientConfiguration(network.rs485.logisticspipes.config.ClientConfiguration) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Example 3 with ClientConfiguration

use of network.rs485.logisticspipes.config.ClientConfiguration in project LogisticsPipes by RS485.

the class LogisticsBlockGenericPipe method addDestroyEffects.

@SideOnly(Side.CLIENT)
@Override
public boolean addDestroyEffects(World world, BlockPos pos, ParticleManager effectRenderer) {
    if (super.addDestroyEffects(world, pos, effectRenderer))
        return true;
    CoreUnroutedPipe pipe = LogisticsBlockGenericPipe.getPipe(world, pos);
    if (pipe == null) {
        return false;
    }
    ClientConfiguration config = LogisticsPipes.getClientPlayerConfig();
    // if (config.isUseNewRenderer()) {
    LogisticsNewRenderPipe.renderDestruction(pipe, world, pos.getX(), pos.getY(), pos.getZ(), effectRenderer);
    /*} else {
			TextureAtlasSprite icon = pipe.getIconProvider().getIcon(pipe.getIconIndexForItem());

			byte its = 4;
			for (int i = 0; i < its; ++i) {
				for (int j = 0; j < its; ++j) {
					for (int k = 0; k < its; ++k) {
						if (pipe.isMultiBlock()) {
							LPPositionSet<DoubleCoordinatesType<CoreMultiBlockPipe.SubBlockTypeForShare>> set = ((CoreMultiBlockPipe) pipe).getRotatedSubBlocks();
							set.add(new DoubleCoordinatesType<>(0, 0, 0, CoreMultiBlockPipe.SubBlockTypeForShare.NON_SHARE));
							for (DoubleCoordinates pos : set) {
								int localx = x + pos.getXInt();
								int localy = y + pos.getYInt();
								int localz = z + pos.getZInt();
								double px = localx + (i + 0.5D) / its;
								double py = localy + (j + 0.5D) / its;
								double pz = localz + (k + 0.5D) / its;
								int random = rand.nextInt(6);
								EntityDiggingFX fx = new EntityDiggingFX(world, px, py, pz, px - localx - 0.5D, py - localy - 0.5D, pz - localz - 0.5D, LogisticsPipes.LogisticsPipeBlock, random, meta);
								fx.setParticleIcon(icon);
								effectRenderer.addEffect(fx.applyColourMultiplier(pos));
							}
						} else {
							double px = x + (i + 0.5D) / its;
							double py = y + (j + 0.5D) / its;
							double pz = z + (k + 0.5D) / its;
							int random = rand.nextInt(6);
							EntityDiggingFX fx = new EntityDiggingFX(world, px, py, pz, px - x - 0.5D, py - y - 0.5D, pz - z - 0.5D, LogisticsPipes.LogisticsPipeBlock, random, meta);
							fx.setParticleIcon(icon);
							effectRenderer.addEffect(fx.applyColourMultiplier(pos));
						}
					}
				}
			}
		}
		*/
    return true;
}
Also used : ClientConfiguration(network.rs485.logisticspipes.config.ClientConfiguration) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

ClientConfiguration (network.rs485.logisticspipes.config.ClientConfiguration)3 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1