Combine all versions into a single tree

This commit is contained in:
Jonas Herzig
2018-02-10 23:35:57 +01:00
parent ec50efec10
commit 748b9da443
95 changed files with 2731 additions and 644 deletions

View File

@@ -21,12 +21,17 @@ import de.johni0702.minecraft.gui.utils.Colors;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.init.MobEffects;
import net.minecraft.init.SoundEvents;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.util.Dimension;
import org.lwjgl.util.ReadableDimension;
//#if MC>=10904
import net.minecraft.init.MobEffects;
import net.minecraft.init.SoundEvents;
//#else
//$$ import net.minecraft.potion.Potion;
//#endif
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@@ -47,14 +52,22 @@ public class PlayerOverviewGui extends GuiScreen implements Closeable {
public final GuiCheckbox checkAll = new GuiCheckbox(contentPanel){
@Override
public void onClick() {
//#if MC>=10904
getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0F));
//#else
//$$ getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(BUTTON_SOUND, 1.0F));
//#endif
playersScrollable.forEach(IGuiCheckbox.class).setChecked(true);
}
}.setLabel("").setChecked(true).setTooltip(new GuiTooltip().setI18nText("replaymod.gui.playeroverview.showall"));
public final GuiCheckbox uncheckAll = new GuiCheckbox(contentPanel){
@Override
public void onClick() {
//#if MC>=10904
getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.getMasterRecord(SoundEvents.UI_BUTTON_CLICK, 1.0F));
//#else
//$$ getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(BUTTON_SOUND, 1.0F));
//#endif
playersScrollable.forEach(IGuiCheckbox.class).setChecked(false);
}
}.setLabel("").setChecked(false).setTooltip(new GuiTooltip().setI18nText("replaymod.gui.playeroverview.hideall"));
@@ -97,7 +110,11 @@ public class PlayerOverviewGui extends GuiScreen implements Closeable {
public void draw(GuiRenderer renderer, ReadableDimension size, RenderInfo renderInfo) {
renderer.bindTexture(texture);
renderer.drawTexturedRect(0, 0, 8, 8, 16, 16, 8, 8, 64, 64);
//#if MC>=10809
if (p.isWearing(EnumPlayerModelParts.HAT)) {
//#else
//$$ if (p.func_175148_a(EnumPlayerModelParts.HAT)) {
//#endif
renderer.drawTexturedRect(0, 0, 40, 8, size.getWidth(), size.getHeight(), 8, 8, 64, 64);
}
}
@@ -146,7 +163,11 @@ public class PlayerOverviewGui extends GuiScreen implements Closeable {
}
private static boolean isSpectator(EntityPlayer e) {
//#if MC>=10904
return e.isInvisible() && e.getActivePotionEffect(MobEffects.INVISIBILITY) == null;
//#else
//$$ return e.isInvisible() && e.getActivePotionEffect(Potion.invisibility) == null;
//#endif
}
private static final class PlayerComparator implements Comparator<EntityPlayer> {