Disabled capability logs. Using build mode enum name to get icon.

This commit is contained in:
Christian
2023-01-28 22:46:49 +01:00
parent 22644195f0
commit 9115254afb
5 changed files with 9 additions and 5 deletions

View File

@@ -12,7 +12,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse' apply plugin: 'eclipse'
apply plugin: 'maven-publish' apply plugin: 'maven-publish'
version = '1.18-2.38' version = '1.18-2.40'
group = 'nl.requios.effortlessbuilding' // http://maven.apache.org/guides/mini/guide-naming-conventions.html group = 'nl.requios.effortlessbuilding' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'effortlessbuilding' archivesBaseName = 'effortlessbuilding'
@@ -137,4 +137,4 @@ publishing {
url "file:///${project.projectDir}/mcmodsrepo" url "file:///${project.projectDir}/mcmodsrepo"
} }
} }
} }

View File

@@ -273,6 +273,10 @@ public class BuildModes {
this.category = category; this.category = category;
this.options = options; this.options = options;
} }
public String getName() {
return name;
}
public String getNameKey() { public String getNameKey() {
return "effortlessbuilding.mode." + name; return "effortlessbuilding.mode." + name;

View File

@@ -31,7 +31,7 @@ public class ModeSettingsManager {
return capability.getModeData(); return capability.getModeData();
} }
EffortlessBuilding.logger.warn("Player does not have modeCapability: " + player); // EffortlessBuilding.logger.warn("Player does not have modeCapability: " + player);
//Return dummy settings //Return dummy settings
return new ModeSettings(); return new ModeSettings();
} }

View File

@@ -33,7 +33,7 @@ public class ModifierSettingsManager {
return capability.getModifierData(); return capability.getModifierData();
} }
EffortlessBuilding.logger.warn("Player does not have modifierCapability: " + player); // EffortlessBuilding.logger.warn("Player does not have modifierCapability: " + player);
//Return dummy settings //Return dummy settings
return new ModifierSettings(); return new ModifierSettings();
} }

View File

@@ -288,7 +288,7 @@ public class RadialMenu extends Screen {
final double x = (menuRegion.x1 + menuRegion.x2) * 0.5 * (ringOuterEdge * 0.55 + 0.45 * ringInnerEdge); final double x = (menuRegion.x1 + menuRegion.x2) * 0.5 * (ringOuterEdge * 0.55 + 0.45 * ringInnerEdge);
final double y = (menuRegion.y1 + menuRegion.y2) * 0.5 * (ringOuterEdge * 0.55 + 0.45 * ringInnerEdge); final double y = (menuRegion.y1 + menuRegion.y2) * 0.5 * (ringOuterEdge * 0.55 + 0.45 * ringInnerEdge);
RenderSystem.setShaderTexture(0, new ResourceLocation(EffortlessBuilding.MODID, "textures/icons/" + menuRegion.mode.name().toLowerCase() + ".png")); RenderSystem.setShaderTexture(0, new ResourceLocation(EffortlessBuilding.MODID, "textures/icons/" + menuRegion.mode.getName() + ".png"));
blit(ms, (int) (middleX + x - 8), (int) (middleY + y - 8), 16, 16, 0, 0, 18, 18, 18, 18); blit(ms, (int) (middleX + x - 8), (int) (middleY + y - 8), 16, 16, 0, 0, 18, 18, 18, 18);
} }