Skip to content

Some fixes #10617

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@
"com.minecolonies.research.effects.sifterflintunlock.description": "Stonemason Learns How to Make Flint Meshes for the Sifter",
"com.minecolonies.research.effects.sifterironunlock.description": "Blacksmith Learns How to Make Iron Meshes for the Sifter",
"com.minecolonies.research.effects.sifterstringunlock.description": "Fletcher Learns How to Make String Meshes for the Sifter",
"com.minecolonies.research.effects.sleeplessmultiplier.description": "Guards Need %3$s%% Less Sleep",
"com.minecolonies.research.effects.sleeplessmultiplier.description": "Guards Need Less Sleep",
"com.minecolonies.research.effects.softshoesunlock.description": "Farmers will no longer trample crops",
"com.minecolonies.research.effects.standard.description": "Place Rallying Banner at location",
"com.minecolonies.research.effects.teachingmultiplier.description": "XP Gain When Studying +%3$s%%",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class DamageSourceKeys
public static ResourceKey<DamageType> CAMP_NORSEMENARCHER = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Constants.MOD_ID, "campnorsemenarcher"));
public static ResourceKey<DamageType> CAMP_SHIELDMAIDEN = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Constants.MOD_ID, "campshieldmaiden"));
public static ResourceKey<DamageType> CAMP_BARBARIAN = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Constants.MOD_ID, "campbarbarian"));
public static ResourceKey<DamageType> CAMP_CHIEFBARBARIAN = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Constants.MOD_ID, "ccamphiefbarbarian"));
public static ResourceKey<DamageType> CAMP_CHIEFBARBARIAN = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Constants.MOD_ID, "campchiefbarbarian"));
public static ResourceKey<DamageType> CAMP_ARCHERBARBARIAN = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Constants.MOD_ID, "camparcherbarbarian"));
public static ResourceKey<DamageType> CAMP_PIRATE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Constants.MOD_ID, "camppirate"));
public static ResourceKey<DamageType> CAMP_CHIEFPIRATE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(Constants.MOD_ID, "campchiefpirate"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
*/
public class WindowMainPage extends AbstractWindowTownHall
{

/**
* Is the special feature unlocked.
*/
Expand Down Expand Up @@ -77,8 +76,6 @@ public class WindowMainPage extends AbstractWindowTownHall
*/
private int initialNamePackIndex;



/**
* Label for the colony name.
*/
Expand Down Expand Up @@ -261,8 +258,8 @@ public void onUpdate()
final Pane textPane = findPaneByID(DROPDOWN_TEXT_ID);
final Pane namePane = findPaneByID(DROPDOWN_NAME_ID);
final Pane resetButton = findPaneByID(BUTTON_RESET_TEXTURE);

if (isFeatureUnlocked.get())
final boolean isOwner = building.getColony().getPermissions().getOwner().equals(Minecraft.getInstance().player.getUUID());
if (isFeatureUnlocked.get() && isOwner)
{
findPaneByID(BUTTON_PATREON).hide();
textPane.enable();
Expand All @@ -286,7 +283,6 @@ public void onUpdate()
textPane.show();
}


final AbstractTextBuilder.TooltipBuilder textPaneToolTipBuilder = PaneBuilders.tooltipBuilder().hoverPane(textPane).append(Component.translatable("com.minecolonies.core.townhall.patreon.textures"))
.paragraphBreak()
.appendNL(Component.empty())
Expand All @@ -299,7 +295,7 @@ public void onUpdate()
.appendNL(Component.empty())
.appendNL(Component.translatable("com.minecolonies.core.townhall.patreon")).paragraphBreak();

if (isFeatureUnlocked.get() && !building.getColony().getPermissions().getOwner().equals(Minecraft.getInstance().player.getUUID()))
if (isFeatureUnlocked.get() && !isOwner)
{
textPaneToolTipBuilder.appendNL(Component.empty());
namePaneToolTipBuilder.appendNL(Component.empty());
Expand All @@ -316,7 +312,7 @@ public void onUpdate()
*/
public void checkFeatureUnlock()
{
if (isFeatureUnlocked.get() || !building.getColony().getPermissions().getOwner().equals(Minecraft.getInstance().player.getUUID()))
if (isFeatureUnlocked.get())
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ else if (!progressPos.equals(NULL_POS))
protected BlockPos getPosToWorkAt()
{
final BlockPos progressPos = getProgressPos() == null ? NULL_POS : getProgressPos().getA();
if (progressPos == NULL_POS)
if (progressPos.equals(NULL_POS))
{
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public Collection<ResearchEffect> getResearchEffectCollection()
effects.add(new ResearchEffect(VINES).setTranslatedName("Citizens can climb Vines"));
effects.add(new ResearchEffect(RETREAT).setTranslatedName("Guards Flee Under 20% HP"));
effects.add(new ResearchEffect(SHIELD_USAGE).setTranslatedName("Knights Unlock Shield Use"));
effects.add(new ResearchEffect(SLEEP_LESS).setTranslatedName("Guards Need %3$s%% Less Sleep"));
effects.add(new ResearchEffect(SLEEP_LESS).setTranslatedName("Guards Need Less Sleep"));
effects.add(new ResearchEffect(GUARD_CRIT).setTranslatedName("Guards have a chance to score critical hits").setLevels(new double[] {0.2, 0.3, 0.4, 0.5}));
effects.add(new ResearchEffect(KNIGHT_WHIRLWIND).setTranslatedName("Knights Learn Special Attack That Damages and Knocks Back Nearby Enemies"));
effects.add(new ResearchEffect(WORKING_IN_RAIN).setTranslatedName("Citizens Work in Rain"));
Expand Down
Loading