|
|
|
|
@ -46,26 +46,19 @@ public abstract class MixinLOTRGuiMap extends LOTRGuiMenuBase {
|
|
|
|
|
@Shadow(remap = false)
|
|
|
|
|
public float[] transformCoords(float x, float z) { return null;}
|
|
|
|
|
|
|
|
|
|
@Inject(method = "func_73863_a", at = @At("HEAD"), remap = false)
|
|
|
|
|
public void inject_head(int mouseX, int mouseY, float partialTicks, CallbackInfo ci) {
|
|
|
|
|
System.out.println("[MixinLOTRGuiMap] Inject at HEAD");
|
|
|
|
|
}
|
|
|
|
|
@Inject(method = "func_73863_a", at = @At( value = "INVOKE", target = "renderPlayers(II)V", shift = At.Shift.AFTER), remap = false)
|
|
|
|
|
public void inject_render_warbands(int mouseX, int mouseY, float partialTicks, CallbackInfo ci) {
|
|
|
|
|
System.out.println("[MixinLOTRGuiMap] Running wrapper");
|
|
|
|
|
render_warbands(mouseX, mouseY);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Dynamic
|
|
|
|
|
private void render_warbands(int cursor_x, int cursor_y) {
|
|
|
|
|
System.out.println("[MixinLOTRGuiMap] Rendering warband icon");
|
|
|
|
|
String mouse_over_warband_name = null;
|
|
|
|
|
double mouse_over_warband_x = 0.0D;
|
|
|
|
|
double mouse_over_warband_y = 0.0D;
|
|
|
|
|
double shortest_distance_to_cursor = Double.MAX_VALUE;
|
|
|
|
|
int icon_width_half = 4;
|
|
|
|
|
for (Map.Entry<UUID, WarbandLocationInfo> entry : warband_locations.entrySet()) {
|
|
|
|
|
System.out.println("[MixinLOTRGuiMap] Iterated");
|
|
|
|
|
WarbandLocationInfo info = entry.getValue();
|
|
|
|
|
Warband warband = info.warband;
|
|
|
|
|
String warband_name = warband.faction.warband_name;
|
|
|
|
|
@ -129,7 +122,6 @@ public abstract class MixinLOTRGuiMap extends LOTRGuiMenuBase {
|
|
|
|
|
|
|
|
|
|
@Dynamic
|
|
|
|
|
private void load_warband_icon(boolean ally, int x, int y) {
|
|
|
|
|
System.out.println("[MixinLOTRGuiMap] Loading warband icon: " + (ally ? "ally" : "enemy"));
|
|
|
|
|
mc.getTextureManager().bindTexture(LOTRClientProxy.alignmentTexture);
|
|
|
|
|
GL11.glColor4f(1F, 1F, 1F, 1F);
|
|
|
|
|
int variant = ally ? 16 : 0;
|
|
|
|
|
|