use of com.minecolonies.coremod.colony.requestsystem.resolvers.PrivateWorkerCraftingProductionResolver in project minecolonies by ldtteam.
the class PrivateWorkerCraftingProductionResolverFactory method deserialize.
@Override
public PrivateWorkerCraftingProductionResolver deserialize(IFactoryController controller, PacketBuffer buffer) throws Throwable {
final IToken<?> token = controller.deserialize(buffer);
final ILocation location = controller.deserialize(buffer);
final JobEntry entry = buffer.readRegistryId();
return new PrivateWorkerCraftingProductionResolver(location, token, entry);
}
use of com.minecolonies.coremod.colony.requestsystem.resolvers.PrivateWorkerCraftingProductionResolver in project minecolonies by Minecolonies.
the class PrivateWorkerCraftingProductionResolverFactory method deserialize.
@NotNull
@Override
public PrivateWorkerCraftingProductionResolver deserialize(@NotNull final IFactoryController controller, @NotNull final CompoundNBT nbt) {
final IToken<?> token = controller.deserialize(nbt.getCompound(NBT_TOKEN));
final ILocation location = controller.deserialize(nbt.getCompound(NBT_LOCATION));
final JobEntry entry = IJobRegistry.getInstance().getValue(new ResourceLocation(nbt.getString(NBT_JOB)));
return new PrivateWorkerCraftingProductionResolver(location, token, entry);
}
use of com.minecolonies.coremod.colony.requestsystem.resolvers.PrivateWorkerCraftingProductionResolver in project minecolonies by Minecolonies.
the class WorkerBuildingModule method createResolvers.
@Override
public List<IRequestResolver<?>> createResolvers() {
final ImmutableList.Builder<IRequestResolver<?>> builder = ImmutableList.builder();
builder.add(new BuildingRequestResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN)), new PrivateWorkerCraftingRequestResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN), jobEntry), new PrivateWorkerCraftingProductionResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN), jobEntry));
return builder.build();
}
use of com.minecolonies.coremod.colony.requestsystem.resolvers.PrivateWorkerCraftingProductionResolver in project minecolonies by Minecolonies.
the class PrivateWorkerCraftingProductionResolverFactory method deserialize.
@Override
public PrivateWorkerCraftingProductionResolver deserialize(IFactoryController controller, PacketBuffer buffer) throws Throwable {
final IToken<?> token = controller.deserialize(buffer);
final ILocation location = controller.deserialize(buffer);
final JobEntry entry = buffer.readRegistryId();
return new PrivateWorkerCraftingProductionResolver(location, token, entry);
}
use of com.minecolonies.coremod.colony.requestsystem.resolvers.PrivateWorkerCraftingProductionResolver in project minecolonies by ldtteam.
the class WorkerBuildingModule method createResolvers.
@Override
public List<IRequestResolver<?>> createResolvers() {
final ImmutableList.Builder<IRequestResolver<?>> builder = ImmutableList.builder();
builder.add(new BuildingRequestResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN)), new PrivateWorkerCraftingRequestResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN), jobEntry), new PrivateWorkerCraftingProductionResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN), jobEntry));
return builder.build();
}
Aggregations