Fix the rest of the "easy" compile errors (#5151)

* Add Entity.changeDimension patch and transitively required patches

* Fix throws declaration on CommandSetDimension#execute

* Fix rest of errors in fluid package

* Add PLAYER_REACH attribute

* Fix compile errors in fml.client.config and add GuiButton patch

* Delete unnecessary client.config classes, fix all config errors

* Comment some fluid errors in models

* Fix all errors in common package root, except ForgeHooks

* Mass comment network package

* Experimental conversion of extended states to generic base class

* Fix errors in common.util

* Remove config annotation stuff cuz lex said so

* Make extended state stuff compile fully
This commit is contained in:
tterrag authored and GitHub committed 2018-09-18 00:04:02 -04:00
1 parent 6814cbf0df
commit c4cf950863
72 files changed
+610 -5996

No files matched your search

@@ -18,7 +18,7 @@
*/
package net.minecraftforge.client.gui;
/*
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
@@ -93,6 +93,7 @@ import static net.minecraftforge.common.ForgeMod.VERSION_CHECK_CAT;
* ForgeChunkManager.syncConfigDefaults()
* ForgeChunkManager.loadConfiguration()
*/
/* TODO Config gui
public class ForgeGuiFactory implements IModGuiFactory
{
@Override
@@ -125,10 +126,10 @@ public class ForgeGuiFactory implements IModGuiFactory
return list;
}
/**
*//**
* This custom list entry provides the General Settings entry on the Minecraft Forge Configuration screen.
* It extends the base Category entry class and defines the IConfigElement objects that will be used to build the child screen.
*/
*//*
public static class GeneralEntry extends CategoryEntry
{
public GeneralEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
@@ -149,10 +150,10 @@ public class ForgeGuiFactory implements IModGuiFactory
}
}
/**
*//**
* This custom list entry provides the Client only Settings entry on the Minecraft Forge Configuration screen.
* It extends the base Category entry class and defines the IConfigElement objects that will be used to build the child screen.
*/
*//*
public static class ClientEntry extends CategoryEntry
{
public ClientEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
@@ -173,10 +174,10 @@ public class ForgeGuiFactory implements IModGuiFactory
}
}
/**
*//**
* This custom list entry provides the Forge Chunk Manager Config entry on the Minecraft Forge Configuration screen.
* It extends the base Category entry class and defines the IConfigElement objects that will be used to build the child screen.
*/
*//*
public static class ChunkLoaderEntry extends CategoryEntry
{
public ChunkLoaderEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
@@ -203,10 +204,10 @@ public class ForgeGuiFactory implements IModGuiFactory
}
}
/**
*//**
* This custom list entry provides the Forge Version Checking Config entry on the Minecraft Forge Configuration screen.
* It extends the base Category entry class and defines the IConfigElement objects that will be used to build the child screen.
*/
*//*
public static class VersionCheckEntry extends CategoryEntry
{
public VersionCheckEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
@@ -225,13 +226,13 @@ public class ForgeGuiFactory implements IModGuiFactory
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));
@@ -251,11 +252,11 @@ public class ForgeGuiFactory implements IModGuiFactory
}
}
/**
*//**
* This custom list entry provides the Mod Overrides entry on the Forge Chunk Loading config screen.
* It extends the base Category entry class and defines the IConfigElement objects that will be used to build the child screen.
* In this case it adds the custom entry for adding a new mod override and lists the existing mod overrides.
*/
*//*
public static class ModOverridesEntry extends CategoryEntry
{
public ModOverridesEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
@@ -263,9 +264,9 @@ public class ForgeGuiFactory implements IModGuiFactory
super(owningScreen, owningEntryList, prop);
}
/**
*//**
* This method is called in the constructor and is used to set the childScreen field.
*/
*//*
@Override
protected GuiScreen buildChildScreen()
{
@@ -282,10 +283,10 @@ public class ForgeGuiFactory implements IModGuiFactory
I18n.format("forge.configgui.ctgy.forgeChunkLoadingModConfig"));
}
/**
*//**
* By overriding the enabled() method and checking the value of the "enabled" entry this entry is enabled/disabled based on the value of
* the other entry.
*/
*//*
@Override
public boolean enabled()
{
@@ -300,9 +301,9 @@ public class ForgeGuiFactory implements IModGuiFactory
return true;
}
/**
*//**
* Check to see if the child screen's entry list has changed.
*/
*//*
@Override
public boolean isChanged()
{
@@ -314,10 +315,10 @@ public class ForgeGuiFactory implements IModGuiFactory
return false;
}
/**
*//**
* Since adding a new entry to the child screen is what constitutes a change here, reset the child
* screen listEntries to the saved list.
*/
*//*
@Override
public void undoChanges()
{
@@ -333,9 +334,9 @@ public class ForgeGuiFactory implements IModGuiFactory
}
}
/**
*//**
* This custom list entry provides a button that will open to a screen that will allow a user to define a new mod override.
*/
*//*
public static class AddModOverrideEntry extends CategoryEntry
{
public AddModOverrideEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
@@ -365,10 +366,10 @@ public class ForgeGuiFactory implements IModGuiFactory
}
}
/**
*//**
* This custom list entry provides a Mod ID selector. The control is a button that opens a list of values to select from.
* This entry also overrides onGuiClosed() to run code to save the data to a new ConfigCategory when the user is done.
*/
*//*
public static class ModIDEntry extends SelectValueEntry
{
public ModIDEntry(GuiConfig owningScreen, GuiConfigEntries owningEntryList, IConfigElement prop)
@@ -382,21 +383,21 @@ public class ForgeGuiFactory implements IModGuiFactory
{
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;
}
/**
*//**
* By overriding onGuiClosed() for this entry we can perform additional actions when the user is done such as saving
* a new ConfigCategory object to the Configuration object.
*/
*//*
@Override
public void onGuiClosed()
{
@@ -437,4 +438,4 @@ public class ForgeGuiFactory implements IModGuiFactory
}
}
}
}
}*/
@@ -198,7 +198,7 @@ public final class ModelDynBucket implements IUnbakedModel
public ModelDynBucket process(ImmutableMap<String, String> customData)
{
String fluidName = customData.get("fluid");
Fluid fluid = FluidRegistry.getFluid(fluidName);
Fluid fluid = null; // TODO fluids FluidRegistry.getFluid(fluidName);
if (fluid == null) fluid = this.fluid;
@@ -49,7 +49,6 @@ import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.common.model.IModelState;
import net.minecraftforge.common.model.TRSRTransformation;
import net.minecraftforge.common.property.IExtendedBlockState;
import net.minecraftforge.fluids.BlockFluidBase;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidRegistry;
@@ -69,8 +68,8 @@ import com.google.gson.JsonParser;
public final class ModelFluid implements IUnbakedModel
{
private static final Logger LOGGER = LogManager.getLogger();
public static final ModelFluid WATER = new ModelFluid(FluidRegistry.WATER);
public static final ModelFluid LAVA = new ModelFluid(FluidRegistry.LAVA);
public static final ModelFluid WATER = null; // TODO fluids new ModelFluid(FluidRegistry.WATER);
public static final ModelFluid LAVA = null; // TODO fluids new ModelFluid(FluidRegistry.LAVA);
private final Fluid fluid;
@@ -180,7 +179,7 @@ public final class ModelFluid implements IUnbakedModel
IExtendedBlockState state = stateOption.get();
for (int i = 0; i < 4; i++)
{
Float level = state.getValue(BlockFluidBase.LEVEL_CORNERS[i]);
Float level = null; // TODO fluids state.getValue(BlockFluidBase.LEVEL_CORNERS[i]);
cornerRound[i] = Math.round((level == null ? 8f / 9f : level) * 864);
}
}
@@ -199,7 +198,7 @@ public final class ModelFluid implements IUnbakedModel
Float flow = -1000f;
if (stateOption.isPresent())
{
flow = stateOption.get().getValue(BlockFluidBase.FLOW_DIRECTION);
flow = null; // TODO fluids stateOption.get().getValue(BlockFluidBase.FLOW_DIRECTION);
if (flow == null) flow = -1000f;
}
int flowRound = (int) Math.round(Math.toDegrees(flow));
@@ -222,7 +221,7 @@ public final class ModelFluid implements IUnbakedModel
IExtendedBlockState state = stateOption.get();
for (int i = 0; i < 4; i++)
{
Boolean overlay = state.getValue(BlockFluidBase.SIDE_OVERLAYS[i]);
Boolean overlay = null; // TODO fluids state.getValue(BlockFluidBase.SIDE_OVERLAYS[i]);
if (overlay != null) overlaySides[i] = overlay;
}
}
@@ -510,12 +509,13 @@ public final class ModelFluid implements IUnbakedModel
String fluidStr = customData.get("fluid");
JsonElement e = new JsonParser().parse(fluidStr);
String fluid = e.getAsString();
String fluid = e.getAsString();/* TODO fluids
if(!FluidRegistry.isFluidRegistered(fluid))
{
LOGGER.fatal("fluid '{}' not found", fluid);
return WATER;
}
return new ModelFluid(FluidRegistry.getFluid(fluid));
return new ModelFluid(FluidRegistry.getFluid(fluid));*/
return this;
}
}
@@ -523,7 +523,7 @@ public final class ModelLoader extends ModelBakery
if(exState.getUnlistedNames().contains(Properties.AnimationProperty))
{
IModelState newState = exState.getValue(Properties.AnimationProperty);
IExtendedBlockState newExState = exState.withProperty(Properties.AnimationProperty, null);
IExtendedBlockState newExState = (IExtendedBlockState) exState.withProperty(Properties.AnimationProperty, null);
if(newState != null)
{
return VanillaModelWrapper.this.bake(modelGetter, bakedTextureGetter, new ModelStateComposition(modelState, newState), uvlock, format).func_200117_a(newExState, side, rand);
@@ -77,7 +77,7 @@ public class AnimationTESR<T extends TileEntity> extends FastTESR<T> implements
// TODO: caching?
IBakedModel model = blockRenderer.getBlockModelShapes().getModelForState(exState.getClean());
IExtendedBlockState animState = exState.withProperty(Properties.AnimationProperty, pair.getLeft());
IExtendedBlockState animState = (IExtendedBlockState) exState.withProperty(Properties.AnimationProperty, pair.getLeft());
renderer.setTranslation(x - pos.getX(), y - pos.getY(), z - pos.getZ());
@@ -67,7 +67,6 @@ import net.minecraftforge.common.model.TRSRTransformation;
import net.minecraftforge.common.model.animation.IClip;
import net.minecraftforge.common.model.animation.IJoint;
import net.minecraftforge.common.property.IExtendedBlockState;
import net.minecraftforge.common.property.IUnlistedProperty;
import net.minecraftforge.common.property.Properties;
import org.apache.commons.io.IOUtils;
@@ -81,7 +80,6 @@ import com.google.common.base.Objects;
import java.util.Optional;
import java.util.Random;
import com.google.common.base.Predicate;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;