Final patching

Signed-off-by: cpw <[email protected]>
This commit is contained in:
Anthony Anderson authored and cpw committed 2020-06-25 17:55:54 -04:00
1 parent 80eb12e59d
commit ca2ed1ff7a
139 files changed
+1034 -4067

No files matched your search

@@ -70,12 +70,6 @@ public class ModAnnotation
this.asmType = asmType;
this.member = member;
}
@Deprecated // TODO 1.16 remove this
public ModAnnotation(ElementType type, Type asmType, ModAnnotation parent)
{
this(asmType, parent);
}
public ModAnnotation(Type asmType, ModAnnotation parent)
{
@@ -225,72 +225,6 @@ public class GuiScreenEvent extends Event
}
}
@Deprecated // Remove in 1.16
public static class ActionPerformedEvent extends GuiScreenEvent
{
private Button button;
private List<Button> buttonList;
public ActionPerformedEvent(Screen gui, Button button, List<Button> buttonList)
{
super(gui);
this.setButton(button);
this.setButtonList(new ArrayList<Button>(buttonList));
}
/**
* The button that was clicked.
*/
public Button getButton()
{
return button;
}
public void setButton(Button button)
{
this.button = button;
}
/**
* A COPY of the {@link #buttonList} field from the GuiScreen referenced by {@link #gui}.
*/
public List<Button> getButtonList()
{
return buttonList;
}
public void setButtonList(List<Button> buttonList)
{
this.buttonList = buttonList;
}
/**
* This event fires once it has been determined that a GuiButton object has been clicked.
* Cancel this event to bypass {@link GuiScreen#actionPerformed(GuiButton)}.
* Replace button with a different button from buttonList to have that button's action executed.
*/
@Cancelable
public static class Pre extends ActionPerformedEvent
{
public Pre(Screen gui, Button button, List<Button> buttonList)
{
super(gui, button, buttonList);
}
}
/**
* This event fires after {@link GuiScreen#actionPerformed(GuiButton)} provided that the active
* screen has not been changed as a result of {@link GuiScreen#actionPerformed(GuiButton)}.
*/
public static class Post extends ActionPerformedEvent
{
public Post(Screen gui, Button button, List<Button> buttonList)
{
super(gui, button, buttonList);
}
}
}
public static abstract class MouseInputEvent extends GuiScreenEvent
{
private final double mouseX;
@@ -28,6 +28,8 @@ import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.util.InputMappings;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import org.lwjgl.glfw.GLFW;
public enum KeyModifier {
@@ -53,11 +55,10 @@ public enum KeyModifier {
}
@Override
public String getLocalizedComboName(InputMappings.Input key, Supplier<String> defaultLogic)
public ITextComponent getCombinedName(InputMappings.Input key, Supplier<ITextComponent> defaultLogic)
{
String keyName = defaultLogic.get();
String localizationFormatKey = Minecraft.IS_RUNNING_ON_MAC ? "forge.controlsgui.control.mac" : "forge.controlsgui.control";
return I18n.format(localizationFormatKey, keyName);
return new TranslationTextComponent(localizationFormatKey).func_240702_b_(" + ").func_230529_a_(defaultLogic.get());
}
},
SHIFT {
@@ -74,9 +75,9 @@ public enum KeyModifier {
}
@Override
public String getLocalizedComboName(InputMappings.Input key, Supplier<String> defaultLogic)
public ITextComponent getCombinedName(InputMappings.Input key, Supplier<ITextComponent> defaultLogic)
{
return I18n.format("forge.controlsgui.shift", defaultLogic.get());
return new TranslationTextComponent("forge.controlsgui.shift").func_240702_b_(" + ").func_230529_a_(defaultLogic.get());
}
},
ALT {
@@ -93,9 +94,9 @@ public enum KeyModifier {
}
@Override
public String getLocalizedComboName(InputMappings.Input keyCode, Supplier<String> defaultLogic)
public ITextComponent getCombinedName(InputMappings.Input keyCode, Supplier<ITextComponent> defaultLogic)
{
return I18n.format("forge.controlsgui.alt", defaultLogic.get());
return new TranslationTextComponent("forge.controlsgui.alt").func_240702_b_(" + ").func_230529_a_(defaultLogic.get());
}
},
NONE {
@@ -122,7 +123,7 @@ public enum KeyModifier {
}
@Override
public String getLocalizedComboName(InputMappings.Input key, Supplier<String> defaultLogic)
public ITextComponent getCombinedName(InputMappings.Input key, Supplier<ITextComponent> defaultLogic)
{
return defaultLogic.get();
}
@@ -170,5 +171,5 @@ public enum KeyModifier {
public abstract boolean isActive(@Nullable IKeyConflictContext conflictContext);
public abstract String getLocalizedComboName(InputMappings.Input key, Supplier<String> defaultLogic);
public abstract ITextComponent getCombinedName(InputMappings.Input key, Supplier<ITextComponent> defaultLogic);
}
@@ -29,8 +29,9 @@ import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Objects;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -39,6 +40,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
@@ -50,6 +52,7 @@ import net.minecraft.fluid.*;
import net.minecraft.loot.LootContext;
import net.minecraft.loot.LootTable;
import net.minecraft.loot.LootTableManager;
import net.minecraft.tags.ITag;
import net.minecraft.util.*;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft;
@@ -87,7 +90,6 @@ import net.minecraft.network.play.server.SChangeBlockPacket;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionUtils;
import net.minecraft.stats.Stats;
import net.minecraft.tags.Tag;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.util.text.*;
import net.minecraft.world.spawner.AbstractSpawner;
@@ -106,8 +108,7 @@ import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import net.minecraftforge.common.loot.IGlobalLootModifier;
import net.minecraftforge.common.loot.LootModifierManager;
import net.minecraftforge.common.data.IOptionalTagEntry;
import net.minecraftforge.common.util.BlockSnapshot;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.DifficultyChangeEvent;
@@ -1074,9 +1075,7 @@ public class ForgeHooks
return res == Result.DEFAULT ? 0 : res == Result.DENY ? -1 : 1;
}
/*
@SuppressWarnings("deprecation")
public static <T> void deserializeTagAdditions(Tag.Builder<T> builder, Function<ResourceLocation, Optional<T>> valueGetter, JsonObject json)
public static <T> void deserializeTagAdditions(List<ITag.ITagEntry> list, JsonObject json, List<ITag.Proxy> allList)
{
if (json.has("optional"))
{
@@ -1084,9 +1083,9 @@ public class ForgeHooks
{
String s = JSONUtils.getString(entry, "value");
if (!s.startsWith("#"))
builder.addOptional(valueGetter, Collections.singleton(new ResourceLocation(s)));
list.add(ForgeHooks.makeOptionalTag(true, Collections.singleton(new ResourceLocation(s))));
else
builder.addOptionalTag(new ResourceLocation(s.substring(1)));
list.add(ForgeHooks.makeOptionalTag(false, Collections.singleton(new ResourceLocation(s.substring(1)))));
}
}
@@ -1095,23 +1094,15 @@ public class ForgeHooks
for (JsonElement entry : JSONUtils.getJsonArray(json, "remove"))
{
String s = JSONUtils.getString(entry, "value");
ITag.ITagEntry dummy;
if (!s.startsWith("#"))
{
T value = valueGetter.apply(new ResourceLocation(s)).orElse(null);
if (value != null)
{
Tag.ITagEntry<T> dummyEntry = new Tag.ListEntry<>(Collections.singleton(value));
builder.remove(dummyEntry);
}
} else
{
Tag.ITagEntry<T> dummyEntry = new Tag.TagEntry<>(new ResourceLocation(s.substring(1)));
builder.remove(dummyEntry);
}
dummy = new ITag.ItemEntry(new ResourceLocation(s));
else
dummy = new ITag.TagEntry(new ResourceLocation(s.substring(1)));
allList.removeIf(e -> e.func_232968_a_().equals(dummy));
}
}
}
*/
private static final Map<IDataSerializer<?>, DataSerializerEntry> serializerEntries = GameData.getSerializerMap();
//private static final ForgeRegistry<DataSerializerEntry> serializerRegistry = (ForgeRegistry<DataSerializerEntry>) ForgeRegistries.DATA_SERIALIZERS;
@@ -1189,4 +1180,61 @@ public class ForgeHooks
return list;
}
@Deprecated//INTERNAL
public static IOptionalTagEntry makeOptionalTag(boolean items, Collection<ResourceLocation> locations) {
return items ? new OptionalItemTarget(locations) : new OptionalTagTarget(locations);
}
private static class OptionalTagTarget implements IOptionalTagEntry
{
private final Collection<ResourceLocation> referents;
public OptionalTagTarget(Collection<ResourceLocation> referents)
{
this.referents = referents;
}
@Override
public <T> boolean func_230238_a_(Function<ResourceLocation, ITag<T>> tagLookup, Function<ResourceLocation, T> itemLookup, Consumer<T> collector)
{
referents.stream()
.map(tagLookup)
.filter(Objects::nonNull)
.map(ITag::func_230236_b_)
.flatMap(List::stream)
.forEach(collector);
return true;
}
@Override
public void func_230237_a_(JsonArray array)
{
referents.stream().map(e -> "#" + e).forEach(array::add);
}
}
private static class OptionalItemTarget implements IOptionalTagEntry
{
private final Collection<ResourceLocation> locations;
public OptionalItemTarget(Collection<ResourceLocation> locations)
{
this.locations = locations;
}
@Override
public <T> boolean func_230238_a_(Function<ResourceLocation, ITag<T>> tagLookup, Function<ResourceLocation, T> itemLookup, Consumer<T> collector)
{
locations.stream().map(itemLookup).filter(Objects::nonNull).forEach(collector);
return true;
}
@Override
public void func_230237_a_(JsonArray array)
{
locations.stream().map(ResourceLocation::toString).forEach(array::add);
}
}
}
@@ -19,15 +19,16 @@
package net.minecraftforge.common;
import java.util.Collections;
import java.util.List;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.IWorldReader;
import net.minecraft.world.World;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
*
@@ -37,11 +38,7 @@ import javax.annotation.Nonnull;
* to support mod-shears as well.
*
*/
//TODO Change to World, not IWorldReader and make Implementor responsible for removing itself from the world.
//Better mimics vanilla behavior and allows more control for the user.
@Deprecated //TODO: Reevaluate the entire thing, loot from blocks is now a loot table. So this is just a marker now.
public interface IShearable
public interface IForgeShearable
{
/**
* Checks if the object is currently shearable
@@ -52,7 +49,8 @@ public interface IShearable
* @param pos Block's position in world.
* @return If this is shearable, and onSheared should be called.
*/
default boolean isShearable(@Nonnull ItemStack item, IWorldReader world, BlockPos pos) {
default boolean isShearable(@Nonnull ItemStack item, World world, BlockPos pos)
{
return true;
}
@@ -75,7 +73,8 @@ public interface IShearable
* @return A List containing all items from this shearing. May be empty.
*/
@Nonnull
default List<ItemStack> onSheared(@Nonnull ItemStack item, IWorld world, BlockPos pos, int fortune) {
return NonNullList.create();
default List<ItemStack> onSheared(@Nullable PlayerEntity player, @Nonnull ItemStack item, World world, BlockPos pos, int fortune)
{
return Collections.emptyList();
}
}
@@ -30,16 +30,16 @@ import net.minecraft.world.IBlockReader;
public interface IPlantable
{
default PlantType getPlantType(IBlockReader world, BlockPos pos) {
if (this instanceof CropsBlock) return PlantType.Crop;
if (this instanceof SaplingBlock) return PlantType.Plains;
if (this instanceof FlowerBlock) return PlantType.Plains;
if (this == Blocks.DEAD_BUSH) return PlantType.Desert;
if (this == Blocks.LILY_PAD) return PlantType.Water;
if (this == Blocks.RED_MUSHROOM) return PlantType.Cave;
if (this == Blocks.BROWN_MUSHROOM) return PlantType.Cave;
if (this == Blocks.NETHER_WART) return PlantType.Nether;
if (this == Blocks.TALL_GRASS) return PlantType.Plains;
return net.minecraftforge.common.PlantType.Plains;
if (this instanceof CropsBlock) return PlantType.CROP;
if (this instanceof SaplingBlock) return PlantType.PLAINS;
if (this instanceof FlowerBlock) return PlantType.PLAINS;
if (this == Blocks.DEAD_BUSH) return PlantType.DESERT;
if (this == Blocks.LILY_PAD) return PlantType.WATER;
if (this == Blocks.RED_MUSHROOM) return PlantType.CAVE;
if (this == Blocks.BROWN_MUSHROOM) return PlantType.CAVE;
if (this == Blocks.NETHER_WART) return PlantType.NETHER;
if (this == Blocks.TALL_GRASS) return PlantType.PLAINS;
return net.minecraftforge.common.PlantType.PLAINS;
}
BlockState getPlant(IBlockReader world, BlockPos pos);
@@ -22,16 +22,22 @@ package net.minecraftforge.common;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorldReader;
// TODO 1.16: This should not be an enum. Change it to something that functions similarly to ToolType
public enum PlantType implements IExtensibleEnum
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
public final class PlantType
{
Plains,
Desert,
Beach,
Cave,
Water,
Nether,
Crop;
private static final Pattern INVALID_CHARACTERS = Pattern.compile("[^a-z_]"); //Only a-z and _ are allowed, meaning names must be lower case. And use _ to separate words.
private static final Map<String, PlantType> VALUES = new HashMap<>();
public static final PlantType PLAINS = get("plains");
public static final PlantType DESERT = get("desert");
public static final PlantType BEACH = get("beach");
public static final PlantType CAVE = get("cave");
public static final PlantType WATER = get("water");
public static final PlantType NETHER = get("nether");
public static final PlantType CROP = get("crop");
/**
* Getting a custom {@link PlantType}, or an existing one if it has the same name as that one. Your plant should implement {@link IPlantable}
@@ -46,9 +52,25 @@ public enum PlantType implements IExtensibleEnum
* @param name the name of the type of plant, you had better follow the style above
* @return the acquired {@link PlantType}, a new one if not found.
*/
public static PlantType create(String name)
public static PlantType get(String name)
{
throw new IllegalStateException("Enum not extended");
return VALUES.computeIfAbsent(name, e -> {
if (INVALID_CHARACTERS.matcher(e).find())
throw new IllegalArgumentException("PlantType.get() called with invalid name: " + name);
return new PlantType(e);
});
}
private final String name;
private PlantType(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
}
@@ -37,7 +37,7 @@ public final class ToolType
public static ToolType get(String name)
{
if (VALID_NAME.matcher(name).find())
throw new IllegalArgumentException("ToolType.create() called with invalid name: " + name);
throw new IllegalArgumentException("ToolType.get() called with invalid name: " + name);
return values.computeIfAbsent(name, k -> new ToolType(name));
}
@@ -17,11 +17,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
//package net.minecraftforge.common.data;
package net.minecraftforge.common.data;
//import net.minecraft.tags.Tag.ITagEntry;
import net.minecraft.tags.ITag;
/**
* Marker class used by Forge to make a tag entry optional at runtime
*/
//public interface IOptionalTagEntry<T> extends ITagEntry<T> {}
public interface IOptionalTagEntry extends ITag.ITagEntry {}
@@ -1059,6 +1059,6 @@ public interface IForgeBlock
*/
default boolean shouldDisplayFluidOverlay(BlockState state, IBlockDisplayReader world, BlockPos pos, FluidState fluidState)
{
return state.getBlock() instanceof BreakableBlock || state.getBlock() instanceof StainedGlassBlock;
return state.getBlock() instanceof BreakableBlock || state.getBlock() instanceof LeavesBlock;
}
}
@@ -21,7 +21,13 @@ package net.minecraftforge.common.extensions;
import net.minecraft.data.TagsProvider;
import net.minecraft.tags.ITag;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.ForgeHooks;
import java.util.Arrays;
import java.util.Collection;
//TODO, Tag removal support.
public interface IForgeTagBuilder<T>
{
@@ -37,73 +43,32 @@ public interface IForgeTagBuilder<T>
return builder;
}
/*default Tag.Builder<T> addOptional(final TagCollection<T> collection, final ResourceLocation... locations)
{
return addOptional(collection, Arrays.asList(locations));
default TagsProvider.Builder<T> replace() {
return replace(true);
}
default Tag.Builder<T> addOptional(final TagCollection<T> collection, final Collection<ResourceLocation> locations)
{
return addOptional(collection.getEntryLookup(), locations);
default TagsProvider.Builder<T> replace(boolean value) {
getBuilder().getInternalBuilder().replace(value);
return getBuilder();
}
@Deprecated //Use the TagCollection version
default Tag.Builder<T> addOptional(final Function<ResourceLocation, Optional<T>> entryLookup, final Collection<ResourceLocation> locations)
default TagsProvider.Builder<T> addOptional(final ResourceLocation... locations)
{
return ((Tag.Builder<T>)this).add(new IOptionalTagEntry<T>() {
@Override
public void populate(Collection<T> itemsIn)
{
locations.stream().map(entryLookup).forEach(e -> e.ifPresent(itemsIn::add));
}
@Override
public void serialize(JsonArray array, Function<T, ResourceLocation> getNameForObject)
{
locations.stream().map(ResourceLocation::toString).forEach(array::add);
}
});
return addOptional(Arrays.asList(locations));
}
default Tag.Builder<T> addOptionalTag(final TagCollection<T> collection, @SuppressWarnings("unchecked") final Tag<T>... tags)
default TagsProvider.Builder<T> addOptional(final Collection<ResourceLocation> locations)
{
for (Tag<T> tag : tags)
addOptionalTag(tag.getId());
return ((Tag.Builder<T>)this);
return getBuilder().add(ForgeHooks.makeOptionalTag(true, locations));
}
default Tag.Builder<T> addOptionalTag(final ResourceLocation... tags)
default TagsProvider.Builder<T> addOptionalTag(final ResourceLocation... locations)
{
for (ResourceLocation rl : tags)
addOptionalTag(rl);
return ((Tag.Builder<T>)this);
return addOptionalTag(Arrays.asList(locations));
}
default Tag.Builder<T> addOptionalTag(ResourceLocation tag)
default TagsProvider.Builder<T> addOptionalTag(final Collection<ResourceLocation> locations)
{
class TagTarget<U> extends Tag.TagEntry<U> implements IOptionalTagEntry<U>
{
private Tag<U> resolvedTag = null;
protected TagTarget(ResourceLocation referent) {
super(referent);
}
@Override
public boolean resolve(@Nonnull Function<ResourceLocation, Tag<U>> resolver)
{
if (this.resolvedTag == null)
this.resolvedTag = resolver.apply(this.getSerializedId());
return true; // never fail if resolver returns null
}
@Override
public void populate(@Nonnull Collection<U> items)
{
if (this.resolvedTag != null)
items.addAll(this.resolvedTag.getAllElements());
}
};
return ((Tag.Builder<T>)this).add(new TagTarget<>(tag));
}*/
return getBuilder().add(ForgeHooks.makeOptionalTag(false, locations));
}
}
@@ -99,12 +99,6 @@ public class ChunkDataEvent extends ChunkEvent
**/
public static class Save extends ChunkDataEvent
{
@Deprecated // remove in 1.16
public Save(IChunk chunk, CompoundNBT data)
{
super(chunk, data);
}
public Save(IChunk chunk, IWorld world, CompoundNBT data)
{
super(chunk, world, data);
@@ -111,7 +111,7 @@ public final class FMLWorldPersistenceHook implements WorldPersistenceHooks.Worl
if (tag.contains("ModItemData") || tag.contains("ItemData")) // Pre 1.7
{
StartupQuery.notify("This save predates 1.7.10, it can no longer be loaded here. Please load in 1.7.10 or 1.8 first");
StartupQuery.builder().text("This save predates 1.7.10, it can no longer be loaded here. Please load in 1.7.10 or 1.8 first").notification();
StartupQuery.abort();
}
else if (tag.contains("Registries")) // 1.8, genericed out the 'registries' list
@@ -138,7 +138,7 @@ public final class FMLWorldPersistenceHook implements WorldPersistenceHooks.Worl
entries.forEach(rl -> buf.append(" ").append(rl).append("\n"));
});
StartupQuery.notify(buf.toString());
StartupQuery.builder().text(buf.toString()).notification();
StartupQuery.abort();
}
}
@@ -99,20 +99,8 @@ public class StartupQuery {
return new QueryBuilder();
}
@Deprecated // TODO 1.16 remove
public static boolean confirm(String text)
{
return builder().text(text).confirm();
}
private InterruptedException exception;
@Deprecated // TODO 1.16 remove
public static void notify(String text)
{
builder().text(text).notification();
}
public static void abort()
{
MinecraftServer server = ServerLifecycleHooks.getCurrentServer();
@@ -66,10 +66,6 @@ public class GatherDataEvent extends ModLifecycleEvent
private final boolean flat;
private List<DataGenerator> generators = new ArrayList<>();
@Deprecated //Remove in 1.16
public DataGeneratorConfig(final Set<String> mods, final Path path, final Collection<Path> inputs, final boolean server, final boolean client, final boolean dev, final boolean reports, final boolean validate) {
this(mods, path, inputs, server, client, dev, reports, validate, false);
}
public DataGeneratorConfig(final Set<String> mods, final Path path, final Collection<Path> inputs, final boolean server, final boolean client, final boolean dev, final boolean reports, final boolean validate, final boolean flat) {
this.mods = mods;
this.path = path;
@@ -90,8 +90,7 @@ public class DeferredRegister<T extends IForgeRegistryEntry<T>>
this.modid = modid;
}
@Deprecated // Make private in 1.16, Use create. Constructors are an implementation detail.
public DeferredRegister(IForgeRegistry<T> reg, String modid)
private DeferredRegister(IForgeRegistry<T> reg, String modid)
{
this(reg.getRegistrySuperType(), modid);
this.type = reg;
@@ -47,6 +47,7 @@ import net.minecraft.world.gen.blockplacer.BlockPlacerType;
import net.minecraft.world.gen.blockstateprovider.BlockStateProviderType;
import net.minecraft.world.gen.carver.WorldCarver;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.structure.Structure;
import net.minecraft.world.gen.foliageplacer.FoliagePlacerType;
import net.minecraft.world.gen.placement.Placement;
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
@@ -96,6 +97,7 @@ public class ForgeRegistries
public static final IForgeRegistry<Placement<?>> DECORATORS = RegistryManager.ACTIVE.getRegistry(Placement.class);
// public static final IForgeRegistry<ChunkGeneratorType<?, ?>> CHUNK_GENERATOR_TYPES = RegistryManager.ACTIVE.getRegistry(ChunkGeneratorType.class);
public static final IForgeRegistry<ChunkStatus> CHUNK_STATUS = RegistryManager.ACTIVE.getRegistry(ChunkStatus.class);
public static final IForgeRegistry<Structure<?>> STRUCTURE_FEATURES = RegistryManager.ACTIVE.getRegistry(Structure.class);
public static final IForgeRegistry<BlockStateProviderType<?>> BLOCK_STATE_PROVIDER_TYPES = RegistryManager.ACTIVE.getRegistry(BlockStateProviderType.class);
public static final IForgeRegistry<BlockPlacerType<?>> BLOCK_PLACER_TYPES = RegistryManager.ACTIVE.getRegistry(BlockPlacerType.class);
public static final IForgeRegistry<FoliagePlacerType<?>> FOLIAGE_PLACER_TYPES = RegistryManager.ACTIVE.getRegistry(FoliagePlacerType.class);
@@ -142,6 +142,7 @@ public class GameData
public static final ResourceLocation DECORATORS = new ResourceLocation("decorator");
public static final ResourceLocation BIOME_PROVIDER_TYPES = new ResourceLocation("biome_source_type");
public static final ResourceLocation CHUNK_STATUS = new ResourceLocation("chunk_status");
public static final ResourceLocation STRUCTURE_FEATURES = new ResourceLocation("structure_feature");
public static final ResourceLocation BLOCK_STATE_PROVIDER_TYPES = new ResourceLocation("block_state_provider_type");
public static final ResourceLocation BLOCK_PLACER_TYPES = new ResourceLocation("block_placer_type");
public static final ResourceLocation FOLIAGE_PLACER_TYPES = new ResourceLocation("foliage_placer_type");
@@ -156,7 +157,6 @@ public class GameData
private static final ResourceLocation BLOCK_TO_ITEM = new ResourceLocation("minecraft:blocktoitemmap");
private static final ResourceLocation BLOCKSTATE_TO_ID = new ResourceLocation("minecraft:blockstatetoid");
private static final ResourceLocation SERIALIZER_TO_ENTRY = new ResourceLocation("forge:serializer_to_entry");
//private static final ResourceLocation STRUCTURE_FEATURES = new ResourceLocation("minecraft:structure_feature");
private static final ResourceLocation STRUCTURES = new ResourceLocation("minecraft:structures");
private static boolean hasInit = false;
@@ -211,6 +211,7 @@ public class GameData
makeRegistry(FEATURES, Feature.class).addCallback(FeatureCallbacks.INSTANCE).disableSaving().create();
makeRegistry(DECORATORS, Placement.class).disableSaving().disableSync().create();
makeRegistry(CHUNK_STATUS, ChunkStatus.class, new ResourceLocation("empty")).disableSaving().disableSync().create();
makeRegistry(STRUCTURE_FEATURES, Structure.class).disableSaving().disableSync().create();
makeRegistry(BLOCK_STATE_PROVIDER_TYPES, BlockStateProviderType.class).disableSaving().disableSync().create();
makeRegistry(BLOCK_PLACER_TYPES, BlockPlacerType.class).disableSaving().disableSync().create();
makeRegistry(FOLIAGE_PLACER_TYPES, FoliagePlacerType.class).disableSaving().disableSync().create();
@@ -272,14 +273,6 @@ public class GameData
return RegistryManager.ACTIVE.getRegistry(DataSerializerEntry.class).getSlaveMap(SERIALIZER_TO_ENTRY, Map.class);
}
/*
@SuppressWarnings("unchecked")
public static Registry<Structure<?>> getStructureFeatures()
{
return (Registry<Structure<?>>) RegistryManager.ACTIVE.getRegistry(Feature.class).getSlaveMap(STRUCTURE_FEATURES, Registry.class);
}
*/
@SuppressWarnings("unchecked")
public static BiMap<String, Structure<?>> getStructureMap()
{
@@ -570,42 +563,19 @@ public class GameData
}
}
private static class FeatureCallbacks implements IForgeRegistry.AddCallback<Feature<?>>, IForgeRegistry.ClearCallback<Feature<?>>, IForgeRegistry.CreateCallback<Feature<?>>
private static class FeatureCallbacks implements IForgeRegistry.ClearCallback<Feature<?>>, IForgeRegistry.CreateCallback<Feature<?>>
{
static final FeatureCallbacks INSTANCE = new FeatureCallbacks();
@Override
public void onAdd(IForgeRegistryInternal<Feature<?>> owner, RegistryManager stage, int id, Feature<?> obj, Feature<?> oldObj)
{
/*TODO, Structures arent Features anymore.
if (obj instanceof Structure)
{
Structure<?> structure = (Structure<?>) obj;
String key = structure.getStructureName().toLowerCase(Locale.ROOT);
@SuppressWarnings("unchecked")
Registry<Structure<?>> reg = owner.getSlaveMap(STRUCTURE_FEATURES, Registry.class);
Registry.register(reg, key, structure);
@SuppressWarnings("unchecked")
BiMap<String, Structure<?>> map = owner.getSlaveMap(STRUCTURES, BiMap.class);
if (oldObj != null && oldObj instanceof Structure) map.remove(((Structure<?>)oldObj).getStructureName());
map.put(key, structure);
}
*/
}
@Override
public void onClear(IForgeRegistryInternal<Feature<?>> owner, RegistryManager stage)
{
//owner.getSlaveMap(STRUCTURE_FEATURES, ClearableRegistry.class).clear();
owner.getSlaveMap(STRUCTURES, BiMap.class).clear();
}
@Override
public void onCreate(IForgeRegistryInternal<Feature<?>> owner, RegistryManager stage)
{
//owner.setSlaveMap(STRUCTURE_FEATURES, new ClearableRegistry<>(owner.getRegistryName()));
owner.setSlaveMap(STRUCTURES, HashBiMap.create());
}
}
@@ -1,11 +1,10 @@
public net.minecraft.advancements.CriteriaTriggers func_192118_a(Lnet/minecraft/advancements/ICriterionTrigger;)Lnet/minecraft/advancements/ICriterionTrigger; # register
public net.minecraft.block.AbstractBlock$Properties func_200943_b(F)Lnet/minecraft/block/AbstractBlock$Properties; # hardnessAndResistance
public net.minecraft.block.AbstractBlock$Properties func_200944_c()Lnet/minecraft/block/AbstractBlock$Properties; # needsRandomTick
public net.minecraft.block.AbstractBlock$Properties func_200947_a(Lnet/minecraft/block/SoundType;)Lnet/minecraft/block/AbstractBlock$Properties; # sound
public net.minecraft.block.AbstractBlock$Properties func_208770_d()Lnet/minecraft/block/AbstractBlock$Properties; # variableOpacity
public net.minecraft.block.AbstractBlock$Properties func_222380_e()Lnet/minecraft/block/AbstractBlock$Properties; # noDrops
public net.minecraft.block.Block func_180637_b(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;I)V # dropXpOnBlockBreak
public net.minecraft.block.Block$Properties func_200943_b(F)Lnet/minecraft/block/Block$Properties; # hardnessAndResistance
public net.minecraft.block.Block$Properties func_200944_c()Lnet/minecraft/block/Block$Properties; # needsRandomTick
public net.minecraft.block.Block$Properties func_200947_a(Lnet/minecraft/block/SoundType;)Lnet/minecraft/block/Block$Properties; # sound
public net.minecraft.block.Block$Properties func_200951_a(I)Lnet/minecraft/block/Block$Properties; # lightValue
public net.minecraft.block.Block$Properties func_208770_d()Lnet/minecraft/block/Block$Properties; # variableOpacity
public net.minecraft.block.Block$Properties func_222380_e()Lnet/minecraft/block/Block$Properties; # noDrops
public net.minecraft.block.FireBlock func_220274_q(Lnet/minecraft/block/BlockState;)I # func_220274_q
public net.minecraft.block.FireBlock func_220275_r(Lnet/minecraft/block/BlockState;)I # func_220275_r
public-f net.minecraft.client.GameSettings field_74324_K # keyBindings
@@ -14,17 +13,17 @@ public net.minecraft.client.Minecraft func_184119_a(Lnet/minecraft/item/ItemStac
public net.minecraft.client.Minecraft func_193986_ar()V # populateSearchTreeManager
public net.minecraft.client.audio.SoundEngine field_148622_c #sndHandler
protected net.minecraft.client.gui.IngameGui *
protected net.minecraft.client.gui.IngameGui func_238456_d_(Lcom/mojang/blaze3d/matrix/MatrixStack;)V # renderAttackIndicator
protected net.minecraft.client.gui.IngameGui func_238447_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/scoreboard/ScoreObjective;)V
protected net.minecraft.client.gui.IngameGui func_194805_e(F)V
protected net.minecraft.client.gui.IngameGui func_194808_p()V
protected net.minecraft.client.gui.IngameGui func_212303_b(Lnet/minecraft/entity/Entity;)V
protected net.minecraft.client.gui.IngameGui func_238447_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/scoreboard/ScoreObjective;)V
protected net.minecraft.client.gui.IngameGui func_238448_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/gui/FontRenderer;III)V # renderTextBackground
protected net.minecraft.client.gui.IngameGui func_238456_d_(Lcom/mojang/blaze3d/matrix/MatrixStack;)V # renderAttackIndicator
public net.minecraft.client.gui.ScreenManager func_216911_a(Lnet/minecraft/inventory/container/ContainerType;Lnet/minecraft/client/gui/ScreenManager$IScreenFactory;)V # registerFactory
public net.minecraft.client.gui.ScreenManager$IScreenFactory
protected net.minecraft.client.gui.overlay.DebugOverlayGui field_211537_g # rayTraceBlock
protected net.minecraft.client.gui.overlay.DebugOverlayGui field_211538_h # rayTraceFluid
protected net.minecraft.client.gui.widget.list.AbstractList$AbstractListEntry list # list
protected net.minecraft.client.gui.widget.list.AbstractList$AbstractListEntry field_230666_a_ # list
public net.minecraft.client.particle.ParticleManager func_199283_a(Lnet/minecraft/particles/ParticleType;Lnet/minecraft/client/particle/IParticleFactory;)V # registerFactory
public net.minecraft.client.particle.ParticleManager func_215234_a(Lnet/minecraft/particles/ParticleType;Lnet/minecraft/client/particle/ParticleManager$IParticleMetaFactory;)V # registerFactory
public net.minecraft.client.particle.ParticleManager$IParticleMetaFactory
@@ -67,9 +66,10 @@ protected net.minecraft.data.RecipeProvider func_200403_a(Lnet/minecraft/util/II
protected net.minecraft.data.RecipeProvider func_200404_a(Ljava/util/function/Consumer;)V # registerRecipes
protected net.minecraft.data.RecipeProvider func_200405_a([Lnet/minecraft/advancements/criterion/ItemPredicate;)Lnet/minecraft/advancements/criterion/InventoryChangeTrigger$Instance; # hasItem
protected net.minecraft.data.RecipeProvider func_200407_a(Lnet/minecraft/block/Block;)Lnet/minecraft/advancements/criterion/EnterBlockTrigger$Instance; # enteredBlock
protected net.minecraft.data.RecipeProvider func_200409_a(Lnet/minecraft/tags/Tag;)Lnet/minecraft/advancements/criterion/InventoryChangeTrigger$Instance; # hasItem
protected net.minecraft.data.RecipeProvider func_200409_a(Lnet/minecraft/tags/ITag;)Lnet/minecraft/advancements/criterion/InventoryChangeTrigger$Instance; # hasItem
protected net.minecraft.data.RecipeProvider func_208310_b(Lnet/minecraft/data/DirectoryCache;Lcom/google/gson/JsonObject;Ljava/nio/file/Path;)V # saveRecipeAdvancement
public net.minecraft.data.ShapedRecipeBuilder$Result
protected net.minecraft.data.TagsProvider field_200434_b # tagToBuilder
protected net.minecraft.data.loot.BlockLootTables func_218463_a(Lnet/minecraft/util/IItemProvider;Lnet/minecraft/loot/IRandomRange;)Lnet/minecraft/loot/LootTable$Builder; # droppingRandomly
protected net.minecraft.data.loot.BlockLootTables func_218475_b(Lnet/minecraft/block/Block;Lnet/minecraft/item/Item;)Lnet/minecraft/loot/LootTable$Builder; # droppingByAge
protected net.minecraft.data.loot.BlockLootTables func_218476_a(Lnet/minecraft/block/Block;Lnet/minecraft/item/Item;)Lnet/minecraft/loot/LootTable$Builder; # droppingItemWithFortune
@@ -95,7 +95,7 @@ protected net.minecraft.data.loot.BlockLootTables func_218552_a(Lnet/minecraft/u
protected net.minecraft.data.loot.BlockLootTables func_218559_g(Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder; # droppingWithPatterns
protected net.minecraft.data.loot.BlockLootTables func_218560_a(Lnet/minecraft/util/IItemProvider;Lnet/minecraft/loot/ILootConditionConsumer;)Ljava/lang/Object; # withSurvivesExplosion
protected net.minecraft.data.loot.BlockLootTables func_218561_b(Lnet/minecraft/util/IItemProvider;)Lnet/minecraft/loot/LootTable$Builder; # onlyWithSilkTouch
protected net.minecraft.data.loot.BlockLootTables func_218562_a(Lnet/minecraft/block/Block;Lnet/minecraft/state/IProperty;Ljava/lang/Comparable;)Lnet/minecraft/loot/LootTable$Builder; # droppingWhen
protected net.minecraft.data.loot.BlockLootTables func_218562_a(Lnet/minecraft/block/Block;Lnet/minecraft/state/Property;Ljava/lang/Comparable;)Lnet/minecraft/loot/LootTable$Builder; # droppingWhen
protected net.minecraft.data.loot.BlockLootTables func_218570_h(Lnet/minecraft/block/Block;)Lnet/minecraft/loot/LootTable$Builder; # droppingSeeds
protected net.minecraft.data.loot.EntityLootTables field_218586_a # ON_FIRE
protected net.minecraft.data.loot.EntityLootTables func_218582_a(Lnet/minecraft/entity/EntityType;Lnet/minecraft/loot/LootTable$Builder;)V # registerLootTable
@@ -109,13 +109,11 @@ public net.minecraft.entity.ai.brain.schedule.Activity <init>(Ljava/lang/String;
public net.minecraft.entity.ai.brain.sensor.SensorType <init>(Ljava/util/function/Supplier;)V
public net.minecraft.entity.item.ExperienceOrbEntity field_70530_e # xpValue
protected net.minecraft.entity.item.TNTEntity func_70515_d()V # explode - make it easier to extend TNTEntity with custom explosion logic
public net.minecraft.entity.merchant.villager.VillagerProcession <init>(Ljava/lang/String;Lnet/minecraft/village/PointOfInterestType;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;Lnet/minecraft/util/SoundEvent;)V
public net.minecraft.entity.merchant.villager.VillagerProfession <init>(Ljava/lang/String;Lnet/minecraft/village/PointOfInterestType;Lcom/google/common/collect/ImmutableSet;Lcom/google/common/collect/ImmutableSet;Lnet/minecraft/util/SoundEvent;)V
protected net.minecraft.entity.monster.AbstractSkeletonEntity func_190727_o()Lnet/minecraft/util/SoundEvent; # getStepSound - make AbstractSkeletonEntity implementable
protected net.minecraft.entity.monster.SkeletonEntity func_190727_o()Lnet/minecraft/util/SoundEvent; # getStepSound - make AbstractSkeletonEntity implementable
protected net.minecraft.entity.monster.StrayEntity func_190727_o()Lnet/minecraft/util/SoundEvent; # getStepSound - make AbstractSkeletonEntity implementable
protected net.minecraft.entity.monster.WitherSkeletonEntity func_190727_o()Lnet/minecraft/util/SoundEvent; # getStepSound - make AbstractSkeletonEntity implementable
protected net.minecraft.entity.player.PlayerEntity field_71077_c # spawnPos
protected net.minecraft.entity.player.PlayerEntity field_82248_d # spawnForced
public net.minecraft.entity.player.PlayerEntity func_71053_j()V #closeScreen
public net.minecraft.entity.player.ServerPlayerEntity field_71139_cq
public net.minecraft.entity.player.ServerPlayerEntity func_71117_bO()V
@@ -123,20 +121,21 @@ public net.minecraft.inventory.container.ContainerType <init>(Lnet/minecraft/inv
public net.minecraft.inventory.container.ContainerType$IFactory
public net.minecraft.inventory.container.RepairContainer field_82856_l #RepairContainer/stackSizeToBeUsedInRepair
public net.minecraft.item.AxeItem <init>(Lnet/minecraft/item/IItemTier;FFLnet/minecraft/item/Item$Properties;)V
public net.minecraft.item.Item field_185051_m # properties
public-f net.minecraft.item.ItemGroup field_78032_a # group array
public net.minecraft.item.PickaxeItem <init>(Lnet/minecraft/item/IItemTier;IFLnet/minecraft/item/Item$Properties;)V
public-f net.minecraft.item.crafting.Ingredient
protected net.minecraft.item.crafting.Ingredient <init>(Ljava/util/stream/Stream;)V
public+f net.minecraft.item.crafting.Ingredient func_199564_a(Lnet/minecraft/network/PacketBuffer;)V
public net.minecraft.item.crafting.Ingredient func_209357_a(Ljava/util/stream/Stream;)Lnet/minecraft/item/crafting/Ingredient;
public net.minecraft.item.crafting.Ingredient func_199803_a(Lcom/google/gson/JsonObject;)Lnet/minecraft/item/crafting/Ingredient$IItemList; # deserializeItemList
public net.minecraft.item.crafting.Ingredient func_209357_a(Ljava/util/stream/Stream;)Lnet/minecraft/item/crafting/Ingredient;
public net.minecraft.item.crafting.Ingredient$IItemList
public net.minecraft.item.crafting.Ingredient$SingleItemList
public net.minecraft.item.crafting.Ingredient$SingleItemList <init>(Lnet/minecraft/item/ItemStack;)V
public net.minecraft.item.crafting.Ingredient$TagList
public net.minecraft.item.crafting.Ingredient$TagList <init>(Lnet/minecraft/tags/ITag;)V
public net.minecraft.item.crafting.TippedArrowRecipe
private-f net.minecraft.loot.LootPool field_186455_c # rolls
private-f net.minecraft.loot.LootPool field_186456_d # bonusRolls
public net.minecraft.nbt.NumberNBT
public net.minecraft.network.status.server.SServerInfoPacket field_149297_a # GSON
public net.minecraft.particles.BasicParticleType <init>(Z)V
@@ -145,7 +144,6 @@ public net.minecraft.resources.FallbackResourceManager field_199023_a # resource
public net.minecraft.resources.ResourcePack field_195771_a # file
protected net.minecraft.server.MinecraftServer field_211151_aa # serverTime
public net.minecraft.server.dedicated.DedicatedServer field_71341_l # pendingCommandList
public net.minecraft.tags.BlockTags$Wrapper
public net.minecraft.tileentity.HopperTileEntity func_145896_c(I)V # setTransferCooldown
public net.minecraft.tileentity.HopperTileEntity func_174914_o()Z # mayTransfer
public net.minecraft.util.DamageSource *() #All methods public, most are already
@@ -154,10 +152,10 @@ protected net.minecraft.util.ObjectIntIdentityMap field_148749_a # internal map
protected net.minecraft.util.ObjectIntIdentityMap field_195868_a # nextId
public net.minecraft.util.WeightedRandom$Item field_76292_a #probability
public net.minecraft.util.concurrent.ThreadTaskExecutor func_213165_a(Ljava/lang/Runnable;)Ljava/util/concurrent/CompletableFuture; # func_213165_a
public net.minecraft.village.PointOfInterestType func_221042_a(Lnet/minecraft/block/Block;)Ljava/util/Set; # getAllStates
public net.minecraft.village.PointOfInterestType <init>(Ljava/lang/String;Ljava/util/Set;ILjava/util/function/Predicate;I)V
public net.minecraft.village.PointOfInterestType <init>(Ljava/lang/String;Ljava/util/Set;II)V
public net.minecraft.world.GameRules func_223595_a(Ljava/lang/String;Lnet/minecraft/world/GameRules$RuleType;)Lnet/minecraft/world/GameRules$RuleKey; # register
public net.minecraft.village.PointOfInterestType <init>(Ljava/lang/String;Ljava/util/Set;ILjava/util/function/Predicate;I)V
public net.minecraft.village.PointOfInterestType func_221042_a(Lnet/minecraft/block/Block;)Ljava/util/Set; # getAllStates
public net.minecraft.world.GameRules func_234903_a_(Ljava/lang/String;Lnet/minecraft/world/GameRules$Category;Lnet/minecraft/world/GameRules$RuleType;)Lnet/minecraft/world/GameRules$RuleKey; # register
protected net.minecraft.world.Teleporter field_77187_a # random
protected net.minecraft.world.Teleporter field_85192_a # world
public net.minecraft.world.World field_73003_n #prevRainingStrength
@@ -166,23 +164,13 @@ public net.minecraft.world.World field_73017_q #thunderingStrength
public net.minecraft.world.World field_73018_p #prevThunderingStrength
public net.minecraft.world.World func_175701_a(Lnet/minecraft/util/math/BlockPos;)Z # isValid
public net.minecraft.world.World func_189509_E(Lnet/minecraft/util/math/BlockPos;)Z # isOutsideBuildHeight
public-f net.minecraft.world.WorldType field_77139_a #worldTypes
public net.minecraft.world.biome.Biome func_180626_a(Lnet/minecraft/util/math/BlockPos;)F # getTemperature
public net.minecraft.world.biome.DeepFrozenOceanBiome func_180626_a(Lnet/minecraft/util/math/BlockPos;)F # getTemperature
public net.minecraft.world.biome.FrozenOceanBiome func_180626_a(Lnet/minecraft/util/math/BlockPos;)F # getTemperature
public net.minecraft.world.biome.provider.BiomeProvider field_201540_a # BIOMES_TO_SPAWN_IN
public net.minecraft.world.biome.provider.BiomeProviderType <init>(Ljava/util/function/Function;Ljava/util/function/Function;)V
public net.minecraft.world.chunk.ChunkStatus <init>(Ljava/lang/String;Lnet/minecraft/world/chunk/ChunkStatus;ILjava/util/EnumSet;Lnet/minecraft/world/chunk/ChunkStatus$Type;Lnet/minecraft/world/chunk/ChunkStatus$IGenerationWorker;Lnet/minecraft/world/chunk/ChunkStatus$ILoadingWorker;)V
public net.minecraft.world.gen.IChunkGeneratorFactory
public net.minecraft.world.gen.layer.LayerUtil func_202829_a(JLnet/minecraft/world/gen/layer/traits/IAreaTransformer1;Lnet/minecraft/world/gen/area/IAreaFactory;ILjava/util/function/LongFunction;)Lnet/minecraft/world/gen/area/IAreaFactory; # repeat
public net.minecraft.world.gen.blockplacer.BlockPlacerType <init>(Ljava/util/function/Function;)V
public net.minecraft.world.gen.blockstateprovider.BlockStateProviderType <init>(Ljava/util/function/Function;)V
public net.minecraft.world.gen.foliageplacer.FoliagePlacerType <init>(Ljava/util/function/Function;)V
public net.minecraft.world.gen.treedecorator.TreeDecoratorType <init>(Ljava/util/function/Function;)V
private-f net.minecraft.world.server.ChunkHolder field_219320_o # block update location
public net.minecraft.world.server.ServerChunkProvider field_186029_c # chunkGenerator
public net.minecraft.world.server.ServerChunkProvider field_73251_h # worldObj
private-f net.minecraft.loot.LootPool field_186455_c # rolls
private-f net.minecraft.loot.LootPool field_186456_d # bonusRolls
public net.minecraft.world.storage.FolderName <init>(Ljava/lang/String;)V # constructor
protected net.minecraft.data.TagsProvider field_200434_b # tagToBuilder
public net.minecraft.world.storage.FolderName <init>(Ljava/lang/String;)V # constructor
@@ -148,10 +148,10 @@
"forge.configgui.disableVersionCheck.tooltip": "Set to true to disable Forge version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.",
"forge.configgui.disableVersionCheck": "Disable Forge Version Check",
"forge.controlsgui.shift": "SHIFT + %s",
"forge.controlsgui.control": "CTRL + %s",
"forge.controlsgui.control.mac": "CMD + %s",
"forge.controlsgui.alt": "ALT + %s",
"forge.controlsgui.shift": "SHIFT",
"forge.controlsgui.control": "CTRL",
"forge.controlsgui.control.mac": "CMD",
"forge.controlsgui.alt": "ALT",
"forge.container.enchant.limitedEnchantability": "Limited Enchantability",
"attribute.name.generic.reachDistance": "Reach Distance",
+8 -6
View File
@@ -8,6 +8,7 @@
# Block.getItem called from Block.getPickBlock.
net/minecraft/block/Block func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/AbstractBannerBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/AbstractBodyPlantBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/AttachedStemBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/BambooSaplingBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/CropsBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
@@ -15,7 +16,6 @@ net/minecraft/block/Block func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/m
net/minecraft/block/EndPortalBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/FlowerPotBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/FrostedIceBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/KelpBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/MovingPistonBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/NetherPortalBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/NetherWartBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
@@ -46,6 +46,7 @@ net/minecraft/item/crafting/IRecipe func_222128_h()Lnet/minecraft/item/ItemStack
net/minecraft/item/crafting/BlastingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/CampfireCookingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/FurnaceRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/SmithingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/SmokingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/StonecuttingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/IRecipe func_194133_a(II)Z # canFit
@@ -63,6 +64,7 @@ net/minecraft/item/crafting/IRecipe func_194133_a(II)Z # canFit
net/minecraft/item/crafting/ShieldRecipes func_194133_a(II)Z
net/minecraft/item/crafting/ShulkerBoxColoringRecipe func_194133_a(II)Z
net/minecraft/item/crafting/SingleItemRecipe func_194133_a(II)Z
net/minecraft/item/crafting/SmithingRecipe func_194133_a(II)Z
net/minecraft/item/crafting/SuspiciousStewRecipe func_194133_a(II)Z
net/minecraft/item/crafting/TippedArrowRecipe func_194133_a(II)Z
net/minecraft/item/crafting/IRecipe func_193358_e()Ljava/lang/String; # getGroup
@@ -72,21 +74,21 @@ net/minecraft/item/crafting/IRecipe func_193358_e()Ljava/lang/String; # getGroup
net/minecraft/item/crafting/SingleItemRecipe func_193358_e()Ljava/lang/String;
net/minecraft/nbt/CompressedStreamTools func_74797_a(Ljava/io/File;)Lnet/minecraft/nbt/CompoundNBT; # read
net/minecraft/nbt/CompressedStreamTools func_74795_b(Lnet/minecraft/nbt/CompoundNBT;Ljava/io/File;)V # write
net/minecraft/nbt/CompressedStreamTools func_74793_a(Lnet/minecraft/nbt/CompoundNBT;Ljava/io/File;)V # safeWrite
net/minecraft/potion/Effect func_220303_e()Lnet/minecraft/potion/EffectType; # getEffectType
net/minecraft/potion/Effect func_111186_k()Ljava/util/Map; # getAttributeModifierMap
net/minecraft/potion/Effect func_188408_i()Z # isBeneficial
net/minecraft/potion/EffectType func_220306_a()Lnet/minecraft/util/text/TextFormatting; # getColor
net/minecraft/resources/IResourceManager func_199001_a()Ljava/util/Set; # getResourceNamespaces
net/minecraft/resources/FallbackResourceManager func_199001_a()Ljava/util/Set;
net/minecraft/resources/IResourceManager$Instance func_199001_a()Ljava/util/Set;
net/minecraft/resources/SimpleReloadableResourceManager func_199001_a()Ljava/util/Set;
net/minecraft/resources/IResourceManager func_219533_b(Lnet/minecraft/util/ResourceLocation;)Z # hasResource
net/minecraft/resources/FallbackResourceManager func_219533_b(Lnet/minecraft/util/ResourceLocation;)Z
net/minecraft/resources/IResourceManager$Instance func_219533_b(Lnet/minecraft/util/ResourceLocation;)Z
net/minecraft/resources/SimpleReloadableResourceManager func_219533_b(Lnet/minecraft/util/ResourceLocation;)Z
net/minecraft/tags/TagCollection func_199913_a(Ljava/lang/Object;)Ljava/util/Collection; # getOwningTags
net/minecraft/tileentity/TileEntity func_145835_a(DDD)D # getDistanceSq
net/minecraft/util/Direction func_176739_a(Ljava/lang/String;)Lnet/minecraft/util/Direction; # byName
net/minecraft/util/Direction$Axis func_176717_a(Ljava/lang/String;)Lnet/minecraft/util/Direction$Axis; # byName
net/minecraft/util/math/Vec3d func_216371_e()Lnet/minecraft/util/math/Vec3d;
net/minecraft/util/math/Vec3d func_189984_a(Lnet/minecraft/util/math/Vec2f;)Lnet/minecraft/util/math/Vec3d; # fromPitchYaw
net/minecraft/util/math/Vec3d func_189986_a(FF)Lnet/minecraft/util/math/Vec3d; # fromPitchYaw
net/minecraft/util/math/vector/Vector3d func_216371_e()Lnet/minecraft/util/math/vector/Vector3d;
net/minecraft/util/math/vector/Vector3d func_189984_a(Lnet/minecraft/util/math/vector/Vector2f;)Lnet/minecraft/util/math/vector/Vector3d; # fromPitchYaw
net/minecraft/util/math/vector/Vector3d func_189986_a(FF)Lnet/minecraft/util/math/vector/Vector3d; # fromPitchYaw
@@ -191,7 +191,7 @@ public class DataGeneratorTest
func_240522_a_(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "test").toString()))
.func_240532_a_(Blocks.DIAMOND_BLOCK)
.func_240531_a_(BlockTags.STONE_BRICKS)
.addOptional(BlockTags.getCollection(), new ResourceLocation("chisel", "marble/raw"))
.addOptional(new ResourceLocation("chisel", "marble/raw"))
.addOptionalTag(new ResourceLocation("forge", "storage_blocks/ruby"));
// Hopefully sorting issues
@@ -87,7 +87,7 @@ public class CustomPlantTypeTest
public static class CustomPlantBlock extends FlowerBlock implements IPlantable
{
public static PlantType pt = PlantType.create("CustomPlantType");
public static PlantType pt = PlantType.get("CustomPlantType");
public CustomPlantBlock()
{
@@ -41,8 +41,8 @@ public class FlowerPotTest
static final String MODID = "flower_pot_test";
static final String BLOCK_ID = "test_flower_pot";
private static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID);
private static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID);
private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
public static final RegistryObject<FlowerPotBlock> EMPTY_FLOWER_POT = BLOCKS.register(BLOCK_ID, () -> new FlowerPotBlock(null, Blocks.AIR.delegate, Block.Properties.from(Blocks.FLOWER_POT)));
public static final RegistryObject<FlowerPotBlock> OAK_FLOWER_POT = BLOCKS.<FlowerPotBlock>register(
@@ -49,8 +49,8 @@ import javax.annotation.Nullable;
public class CompositeModelTest
{
public static final String MODID = "composite_model_test";
public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID);
public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID);
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
public static RegistryObject<Block> composite_block = BLOCKS.register("composite_block", () ->
new Block(Block.Properties.create(Material.WOOD).hardnessAndResistance(10)) {
@@ -29,6 +29,7 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.model.RenderMaterial;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.renderer.vertex.VertexFormatElement;
@@ -68,8 +69,8 @@ import java.util.function.Function;
public class NewModelLoaderTest
{
public static final String MODID = "new_model_loader_test";
public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID);
public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID);
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
public static RegistryObject<Block> obj_block = BLOCKS.register("obj_block", () ->
new Block(Block.Properties.create(Material.WOOD).hardnessAndResistance(10)) {
@@ -154,7 +155,7 @@ public class NewModelLoaderTest
static class TestModel implements ISimpleModelGeometry<TestModel>
{
@Override
public void addQuads(IModelConfiguration owner, IModelBuilder<?> modelBuilder, ModelBakery bakery, Function<net.minecraft.client.renderer.model.Material, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation)
public void addQuads(IModelConfiguration owner, IModelBuilder<?> modelBuilder, ModelBakery bakery, Function<RenderMaterial, TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation)
{
TextureAtlasSprite texture = spriteGetter.apply(owner.resolveTexture("particle"));
@@ -198,7 +199,7 @@ public class NewModelLoaderTest
}
@Override
public Collection<net.minecraft.client.renderer.model.Material> getTextures(IModelConfiguration owner, Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors)
public Collection<RenderMaterial> getTextures(IModelConfiguration owner, Function<ResourceLocation, IUnbakedModel> modelGetter, Set<Pair<String, String>> missingTextureErrors)
{
return Collections.singleton(owner.resolveTexture("particle"));
}
@@ -59,8 +59,8 @@ import net.minecraftforge.registries.ForgeRegistries;
@Mod(TRSRTransformerTest.MODID)
public class TRSRTransformerTest {
public static final String MODID = "trsr_transformer_test";
private static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID);
private static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID);
private static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
private static final RegistryObject<Block> TEST_BLOCK = BLOCKS.register("test", () -> new Block(Block.Properties.create(Material.ROCK)));
@SuppressWarnings("unused")
@@ -21,6 +21,7 @@ package net.minecraftforge.debug.client.rendering;
import net.minecraft.entity.passive.CowEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.util.text.StringTextComponent;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderNameplateEvent;
import net.minecraftforge.eventbus.api.Event;
@@ -47,13 +48,13 @@ public class NameplateRenderingEventTest
if(event.getEntity() instanceof CowEntity)
{
event.setContent(TextFormatting.RED + "Evil Cow");
event.setContent(new StringTextComponent("Evil Cow").func_240699_a_(TextFormatting.RED));
event.setResult(Event.Result.ALLOW);
}
if(event.getEntity() instanceof PlayerEntity)
{
event.setContent(TextFormatting.GOLD + "" + (event.getEntity()).getDisplayName().getString());
event.setContent(event.getEntity().getDisplayName().func_230532_e_().func_240701_a_(TextFormatting.GOLD));
}
}
}
@@ -25,6 +25,8 @@ import java.util.UUID;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import net.minecraft.entity.ai.attributes.ModifiableAttributeInstance;
import net.minecraftforge.common.ForgeMod;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -36,7 +38,6 @@ import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.ai.attributes.Attribute;
import net.minecraft.entity.ai.attributes.AttributeModifier;
import net.minecraft.entity.ai.attributes.AttributeModifier.Operation;
import net.minecraft.entity.ai.attributes.IAttributeInstance;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
@@ -58,7 +59,7 @@ public class GravityAttributeTest
private static Logger logger = LogManager.getLogger();
private int ticks;
private static final UUID REDUCED_GRAVITY_ID = UUID.fromString("DEB06000-7979-4242-8888-00000DEB0600");
private static final AttributeModifier REDUCED_GRAVITY = (new AttributeModifier(REDUCED_GRAVITY_ID, "Reduced gravity", (double)-0.80, Operation.MULTIPLY_TOTAL)).setSaved(false);
private static final AttributeModifier REDUCED_GRAVITY = (new AttributeModifier(REDUCED_GRAVITY_ID, "Reduced gravity", (double)-0.80, Operation.MULTIPLY_TOTAL));
public GravityAttributeTest()
@@ -99,12 +100,12 @@ public class GravityAttributeTest
for(LivingEntity liv : list)
{
IAttributeInstance grav = liv.getAttribute(LivingEntity.ENTITY_GRAVITY);
boolean inPlains = liv.world.getBiome(liv.getPosition()).getCategory() == Category.PLAINS;
ModifiableAttributeInstance grav = liv.getAttribute(ForgeMod.ENTITY_GRAVITY.get());
boolean inPlains = liv.world.getBiome(liv.func_233580_cy_()).getCategory() == Category.PLAINS;
if (inPlains && !grav.hasModifier(REDUCED_GRAVITY))
{
logger.info("Granted low gravity to Entity: {}", liv);
grav.applyModifier(REDUCED_GRAVITY);
grav.func_233767_b_(REDUCED_GRAVITY);
}
else if (!inPlains && grav.hasModifier(REDUCED_GRAVITY))
{
@@ -138,7 +139,7 @@ public class GravityAttributeTest
@SuppressWarnings("deprecation")
Multimap<Attribute, AttributeModifier> multimap = super.getAttributeModifiers(slot);
if (slot == EquipmentSlotType.MAINHAND)
multimap.put(LivingEntity.ENTITY_GRAVITY.func_233754_c_(), new AttributeModifier(GRAVITY_MODIFIER, "More Gravity", 1.0D, Operation.ADDITION));
multimap.put(ForgeMod.ENTITY_GRAVITY.get(), new AttributeModifier(GRAVITY_MODIFIER, "More Gravity", 1.0D, Operation.ADDITION));
return multimap;
}
@@ -56,9 +56,9 @@ public class NewFluidTest
public static final ResourceLocation FLUID_FLOWING = new ResourceLocation("minecraft:block/mushroom_stem");
public static final ResourceLocation FLUID_OVERLAY = new ResourceLocation("minecraft:block/obsidian");
public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, MODID);
public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, MODID);
public static final DeferredRegister<Fluid> FLUIDS = new DeferredRegister<>(ForgeRegistries.FLUIDS, MODID);
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
public static final DeferredRegister<Fluid> FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, MODID);
private static ForgeFlowingFluid.Properties makeProperties()
{
@@ -37,8 +37,8 @@ public class MusicDiscTest
{
static final String MOD_ID = "music_disc_test";
private static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, MOD_ID);
private static final DeferredRegister<SoundEvent> SOUND_EVENTS = new DeferredRegister<>(ForgeRegistries.SOUND_EVENTS, MOD_ID);
private static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MOD_ID);
private static final DeferredRegister<SoundEvent> SOUND_EVENTS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, MOD_ID);
private static final RegistryObject<SoundEvent> TEST_SOUND_EVENT = SOUND_EVENTS.register("test_sound_event",
() -> new SoundEvent(new ResourceLocation(MOD_ID, "test_sound_event")));
@@ -19,6 +19,7 @@
package net.minecraftforge.debug.misc;
import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.block.Blocks;
import net.minecraft.client.gui.ScreenManager;
import net.minecraft.client.gui.screen.inventory.ContainerScreen;
@@ -85,9 +86,9 @@ public class ContainerTypeTest
}
@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
protected void func_230450_a_(MatrixStack mStack, float partialTicks, int mouseX, int mouseY)
{
drawString(this.font, getContainer().text, mouseX, mouseY, -1);
func_238476_c_(mStack, this.field_230712_o_, getContainer().text, mouseX, mouseY, -1);
}
}
@@ -75,7 +75,8 @@ public class ChunkWatchEventTest
}
@Nullable
private static ResourceLocation getDimensionName(World w) {
return w.getDimension().getType().getRegistryName();
private static ResourceLocation getDimensionName(World w)
{
return w.func_234923_W_().func_240901_a_();
}
}