Search in sources :

Example 1 with DeliveryRequestResolver

use of com.minecolonies.coremod.colony.requestsystem.resolvers.DeliveryRequestResolver in project minecolonies by Minecolonies.

the class DeliveryRequestResolverFactory method deserialize.

@NotNull
@Override
public DeliveryRequestResolver deserialize(@NotNull final IFactoryController controller, @NotNull final NBTTagCompound nbt) {
    final IToken token = controller.deserialize(nbt.getCompoundTag(NBT_TOKEN));
    final ILocation location = controller.deserialize(nbt.getCompoundTag(NBT_LOCATION));
    return new DeliveryRequestResolver(location, token);
}
Also used : DeliveryRequestResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.DeliveryRequestResolver) ILocation(com.minecolonies.api.colony.requestsystem.location.ILocation) IToken(com.minecolonies.api.colony.requestsystem.token.IToken) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with DeliveryRequestResolver

use of com.minecolonies.coremod.colony.requestsystem.resolvers.DeliveryRequestResolver in project minecolonies by Minecolonies.

the class BuildingDeliveryman method getResolvers.

@Override
public ImmutableCollection<IRequestResolver<?>> getResolvers() {
    final ImmutableCollection<IRequestResolver<?>> supers = super.getResolvers();
    final ImmutableList.Builder<IRequestResolver<?>> builder = ImmutableList.builder();
    builder.addAll(supers);
    builder.add(new DeliveryRequestResolver(getRequester().getRequesterLocation(), getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN)));
    return builder.build();
}
Also used : DeliveryRequestResolver(com.minecolonies.coremod.colony.requestsystem.resolvers.DeliveryRequestResolver) ImmutableList(com.google.common.collect.ImmutableList) IRequestResolver(com.minecolonies.api.colony.requestsystem.resolver.IRequestResolver)

Aggregations

DeliveryRequestResolver (com.minecolonies.coremod.colony.requestsystem.resolvers.DeliveryRequestResolver)2 ImmutableList (com.google.common.collect.ImmutableList)1 ILocation (com.minecolonies.api.colony.requestsystem.location.ILocation)1 IRequestResolver (com.minecolonies.api.colony.requestsystem.resolver.IRequestResolver)1 IToken (com.minecolonies.api.colony.requestsystem.token.IToken)1 NotNull (org.jetbrains.annotations.NotNull)1