Zeroth pass on 1.13

This commit is contained in:
cpw authored and LexManos committed 2018-09-05 12:56:01 -07:00
1 parent 6e99f84e91
commit 77c3310711
176 files changed
+603 -16145

No files matched your search

@@ -46,7 +46,7 @@ import static net.minecraft.util.text.TextFormatting.*;
* client, the client takes precedence!
*
*/
public class ClientCommandHandler extends CommandHandler
public class ClientCommandHandler {} /*extends CommandHandler
{
public static final ClientCommandHandler instance = new ClientCommandHandler();
@@ -55,7 +55,7 @@ public class ClientCommandHandler extends CommandHandler
/**
* @return 1 if successfully executed, -1 if no permission or wrong usage,
* 0 if it doesn't exist or it was canceled (it's sent to the server)
*/
* /
@Override
public int executeCommand(ICommandSender sender, String message)
{
@@ -165,3 +165,4 @@ public class ClientCommandHandler extends CommandHandler
return Minecraft.getMinecraft().getIntegratedServer();
}
}
*/
@@ -26,11 +26,9 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.InventoryEffectRenderer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import org.lwjgl.input.Mouse;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
@@ -178,6 +176,7 @@ public class GuiScreenEvent extends Event
* This event fires at the end of {@link GuiScreen#drawDefaultBackground()} and before the rest of the Gui draws.
* This allows drawing next to Guis, above the background but below any tooltips.
*/
/*
public static class BackgroundDrawnEvent extends GuiScreenEvent
{
private final int mouseX;
@@ -193,22 +192,27 @@ public class GuiScreenEvent extends Event
this.mouseY = scaledHeight - Mouse.getY() * scaledHeight / gui.mc.displayHeight - 1;
}
/**
*/
/**
* The x coordinate of the mouse pointer on the screen.
*/
*//*
public int getMouseX()
{
return mouseX;
}
/**
*/
/**
* The y coordinate of the mouse pointer on the screen.
*/
*//*
public int getMouseY()
{
return mouseY;
}
}
*/
/**
* This event fires in {@link InventoryEffectRenderer#updateActivePotionEffects()}
@@ -1,63 +0,0 @@
/*
* Minecraft Forge
* Copyright (c) 2016-2018.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.client.event;
import org.lwjgl.input.Mouse;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
/**
* Author: MachineMuse (Claire Semple)
* Created: 2:46 PM, 9/4/13
*/
@net.minecraftforge.eventbus.api.Cancelable
public class MouseEvent extends net.minecraftforge.eventbus.api.Event
{
private final int x;
private final int y;
private final int dx;
private final int dy;
private final int dwheel;
private final int button;
private final boolean buttonstate;
private final long nanoseconds;
public MouseEvent()
{
this.x = Mouse.getEventX();
this.y = Mouse.getEventY();
this.dx = Mouse.getEventDX();
this.dy = Mouse.getEventDY();
this.dwheel = Mouse.getEventDWheel();
this.button = Mouse.getEventButton();
this.buttonstate = Mouse.getEventButtonState();
this.nanoseconds = Mouse.getEventNanoseconds();
}
public int getX() { return x; }
public int getY() { return y; }
public int getDx() { return dx; }
public int getDy() { return dy; }
public int getDwheel() { return dwheel; }
public int getButton() { return button; }
public boolean isButtonstate() { return buttonstate; }
public long getNanoseconds() { return nanoseconds; }
}
@@ -24,9 +24,8 @@ import java.util.ArrayList;
import net.minecraftforge.eventbus.api.Cancelable;
import net.minecraftforge.eventbus.api.Event;
import net.minecraft.client.gui.BossInfoClient;
import net.minecraft.client.gui.ScaledResolution;
@net.minecraftforge.eventbus.api.Cancelable
@Cancelable
public class RenderGameOverlayEvent extends Event
{
public float getPartialTicks()
@@ -34,11 +33,6 @@ public class RenderGameOverlayEvent extends Event
return partialTicks;
}
public ScaledResolution getResolution()
{
return resolution;
}
public ElementType getType()
{
return type;
@@ -71,20 +65,17 @@ public class RenderGameOverlayEvent extends Event
}
private final float partialTicks;
private final ScaledResolution resolution;
private final ElementType type;
public RenderGameOverlayEvent(float partialTicks, ScaledResolution resolution)
public RenderGameOverlayEvent(float partialTicks, Void resolution)
{
this.partialTicks = partialTicks;
this.resolution = resolution;
this.type = null;
}
private RenderGameOverlayEvent(RenderGameOverlayEvent parent, ElementType type)
{
this.partialTicks = parent.getPartialTicks();
this.resolution = parent.getResolution();
this.type = type;
}
@@ -38,7 +38,7 @@ public class PlaySoundEvent extends SoundEvent
{
super(manager);
this.sound = sound;
this.name = sound.getSoundLocation().getResourcePath();
this.name = sound.getSoundLocation().getPath();
this.setResultSound(sound);
}
@@ -45,7 +45,7 @@ public class SoundEvent extends net.minecraftforge.eventbus.api.Event
public SoundSourceEvent(SoundManager manager, ISound sound, String uuid)
{
super(manager);
this.name = sound.getSoundLocation().getResourcePath();
this.name = sound.getSoundLocation().getPath();
this.sound = sound;
this.uuid = uuid;
}
@@ -223,12 +223,14 @@ public class ForgeGuiFactory implements IModGuiFactory
Property global = ForgeMod.getConfig().get(VERSION_CHECK_CAT, "Global", true);
List<Property> props = new ArrayList<Property>();
// TODO
/*
for (ModContainer mod : ForgeVersion.gatherMods().keySet())
{
values.remove(mod.getModId());
props.add(ForgeMod.getConfig().get(VERSION_CHECK_CAT, mod.getModId(), true)); //Get or make the value in the config
}
*/
props.addAll(values.values()); // Add any left overs from the config
props.sort(Comparator.comparing(Property::getName));
@@ -378,12 +380,15 @@ public class ForgeGuiFactory implements IModGuiFactory
private static Map<Object, String> getSelectableValues()
{
Map<Object, String> selectableValues = new TreeMap<Object, String>();
// TODO
/*
for (ModContainer mod : Loader.instance().getActiveModList())
// only add mods to the list that have a non-immutable ModContainer
if (!mod.isImmutable() && mod.getMod() != null)
selectableValues.put(mod.getModId(), mod.getName());
*/
return selectableValues;
}
@@ -28,7 +28,6 @@ import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.common.ForgeMod;
import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.common.ForgeVersion.Status;
import net.minecraftforge.fml.VersionChecker;
import net.minecraftforge.fml.client.ClientModLoader;
import net.minecraftforge.api.distmarker.Dist;
@@ -85,7 +84,7 @@ public class NotificationModUpdateScreen extends GuiScreen
public static NotificationModUpdateScreen init(GuiMainMenu guiMainMenu, GuiButton modButton)
{
NotificationModUpdateScreen notificationModUpdateScreen = new NotificationModUpdateScreen(modButton);
notificationModUpdateScreen.setGuiSize(guiMainMenu.width, guiMainMenu.height);
notificationModUpdateScreen.setWorldAndResolution(guiMainMenu.mc, guiMainMenu.width, guiMainMenu.height);
notificationModUpdateScreen.initGui();
return notificationModUpdateScreen;
}
@@ -108,15 +108,17 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Multimaps;
import com.google.common.collect.Sets;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import static net.minecraftforge.fml.Logging.MODELLOADING;
import static net.minecraftforge.fml.Logging.fmlLog;
public final class ModelLoader extends ModelBakery
{
private static final Logger LOGGER = LogManager.getLogger();
private final Map<ModelResourceLocation, IModel> stateModels = Maps.newHashMap();
private final Map<ModelResourceLocation, ModelBlockDefinition> multipartDefinitions = Maps.newHashMap();
private final Map<ModelBlockDefinition, IModel> multipartModels = Maps.newHashMap();
@@ -939,7 +941,7 @@ public final class ModelLoader extends ModelBakery
// ignoring pure ResourceLocation arguments, all things we care about pass ModelResourceLocation
if(entry.getKey() instanceof ModelResourceLocation)
{
fmlLog.debug(MODELLOADING, ()-> new ModelLoaderErrorMessage((ModelResourceLocation)entry.getKey(), entry.getValue(), modelRegistry, this.blockModelShapes, this::getVariantNames));
LOGGER.debug(MODELLOADING, ()-> new ModelLoaderErrorMessage((ModelResourceLocation)entry.getKey(), entry.getValue(), modelRegistry, this.blockModelShapes, this::getVariantNames));
final ModelResourceLocation location = (ModelResourceLocation)entry.getKey();
final IBakedModel model = modelRegistry.getObject(location);
if(model == null)
@@ -953,7 +955,7 @@ public final class ModelLoader extends ModelBakery
IBakedModel model = modelRegistry.getObject(missing);
if(model == null || model == missingModel)
{
fmlLog.debug(MODELLOADING, ()-> new ModelLoaderErrorMessage(missing, null, modelRegistry, this.blockModelShapes, this::getVariantNames));
LOGGER.debug(MODELLOADING, ()-> new ModelLoaderErrorMessage(missing, null, modelRegistry, this.blockModelShapes, this::getVariantNames));
}
if(model == null)
{