use of com.minecolonies.coremod.client.gui.WindowRequestDetail in project minecolonies by ldtteam.
the class RequestBasedInteraction method onClientResponseTriggered.
@Override
@OnlyIn(Dist.CLIENT)
public boolean onClientResponseTriggered(final ITextComponent response, final PlayerEntity player, final ICitizenDataView data, final Window window) {
if (response.equals(new TranslationTextComponent("com.minecolonies.coremod.gui.chat.fulfill"))) {
final IColony colony = IColonyManager.getInstance().getColonyView(data.getColonyId(), player.level.dimension());
if (colony != null) {
final IRequest<?> request = colony.getRequestManager().getRequestForToken(token);
if (request != null) {
final RequestWindowCitizen windowCitizen = new RequestWindowCitizen(data);
windowCitizen.open();
final WindowRequestDetail windowRequestDetail = new WindowRequestDetail(windowCitizen, request, data.getColonyId());
windowRequestDetail.open();
return false;
}
}
} else {
return super.onClientResponseTriggered(response, player, data, window);
}
return true;
}
use of com.minecolonies.coremod.client.gui.WindowRequestDetail in project minecolonies by Minecolonies.
the class RequestBasedInteraction method onClientResponseTriggered.
@Override
@OnlyIn(Dist.CLIENT)
public boolean onClientResponseTriggered(final ITextComponent response, final PlayerEntity player, final ICitizenDataView data, final Window window) {
if (response.equals(new TranslationTextComponent("com.minecolonies.coremod.gui.chat.fulfill"))) {
final IColony colony = IColonyManager.getInstance().getColonyView(data.getColonyId(), player.level.dimension());
if (colony != null) {
final IRequest<?> request = colony.getRequestManager().getRequestForToken(token);
if (request != null) {
final RequestWindowCitizen windowCitizen = new RequestWindowCitizen(data);
windowCitizen.open();
final WindowRequestDetail windowRequestDetail = new WindowRequestDetail(windowCitizen, request, data.getColonyId());
windowRequestDetail.open();
return false;
}
}
} else {
return super.onClientResponseTriggered(response, player, data, window);
}
return true;
}
Aggregations