use of com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver in project minecolonies by Minecolonies.
the class PublicWorkerCraftingProductionResolverFactory method deserialize.
@Override
public PublicWorkerCraftingProductionResolver 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 PublicWorkerCraftingProductionResolver(location, token, entry);
}
use of com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver in project minecolonies by Minecolonies.
the class AbstractCraftingBuildingModule method createResolvers.
@Override
public List<IRequestResolver<?>> createResolvers() {
final List<IRequestResolver<?>> resolvers = new ArrayList<>();
resolvers.add(new PublicWorkerCraftingRequestResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN), jobEntry));
resolvers.add(new PublicWorkerCraftingProductionResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN), jobEntry));
return resolvers;
}
use of com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver in project minecolonies by Minecolonies.
the class PublicWorkerCraftingProductionResolverFactory method deserialize.
@NotNull
@Override
public PublicWorkerCraftingProductionResolver 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 PublicWorkerCraftingProductionResolver(location, token, entry);
}
use of com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver in project minecolonies by ldtteam.
the class AbstractCraftingBuildingModule method createResolvers.
@Override
public List<IRequestResolver<?>> createResolvers() {
final List<IRequestResolver<?>> resolvers = new ArrayList<>();
resolvers.add(new PublicWorkerCraftingRequestResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN), jobEntry));
resolvers.add(new PublicWorkerCraftingProductionResolver(building.getRequester().getLocation(), building.getColony().getRequestManager().getFactoryController().getNewInstance(TypeConstants.ITOKEN), jobEntry));
return resolvers;
}
use of com.minecolonies.coremod.colony.requestsystem.resolvers.PublicWorkerCraftingProductionResolver in project minecolonies by ldtteam.
the class PublicWorkerCraftingProductionResolverFactory method deserialize.
@Override
public PublicWorkerCraftingProductionResolver 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 PublicWorkerCraftingProductionResolver(location, token, entry);
}
Aggregations