mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 19:15:32 +00:00
Fix typo causing potential error in vine growth. Closes #7406
Sort missing registry dumps by name, making it easier to read.
This commit is contained in:
1 parent
59b4affbe7
commit
37f226eda5
6 files changed
+53
-20
No files matched your search
@@ -20,8 +20,6 @@
|
||||
package net.minecraftforge.common.extensions;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.*;
|
||||
@@ -33,8 +31,6 @@ import net.minecraft.entity.EntitySpawnPlacementRegistry.PlacementType;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.item.DyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.pathfinding.PathNodeType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -239,7 +235,12 @@ public interface IForgeBlockState
|
||||
* @param world The current world
|
||||
* @param pos Block position in world
|
||||
* @return True if the block considered air
|
||||
* @deprecated TODO: Remove in 1.17, in favor of state only version. This is a old hook from before
|
||||
* block states were unlimited and people used TileEntities. If you still use the location
|
||||
* information in your TileEntity please explain why and how you can't use BlockState only version
|
||||
* here: https://github.com/MinecraftForge/MinecraftForge/issues/7409
|
||||
*/
|
||||
@Deprecated
|
||||
default boolean isAir(IBlockReader world, BlockPos pos)
|
||||
{
|
||||
return getBlockState().getBlock().isAir(getBlockState(), world, pos);
|
||||
|
||||
@@ -164,7 +164,7 @@ public class RegistryEvent<T extends IForgeRegistryEntry<T>> extends GenericEven
|
||||
REMAP
|
||||
}
|
||||
|
||||
public static class Mapping<T extends IForgeRegistryEntry<T>>
|
||||
public static class Mapping<T extends IForgeRegistryEntry<T>> implements Comparable<Mapping<T>>
|
||||
{
|
||||
public final IForgeRegistry<T> registry;
|
||||
private final IForgeRegistry<T> pool;
|
||||
@@ -231,6 +231,14 @@ public class RegistryEvent<T extends IForgeRegistryEntry<T>> extends GenericEven
|
||||
{
|
||||
return target;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(Mapping<T> o)
|
||||
{
|
||||
int ret = this.registry.getRegistryName().compareNamespaced(o.registry.getRegistryName());
|
||||
if (ret ==0) ret = this.key.compareNamespaced(o.key);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -355,7 +355,7 @@ public class GameData
|
||||
fr.unfreeze();
|
||||
}, executor).thenApply(v->Collections.emptyList());
|
||||
}
|
||||
|
||||
|
||||
public static CompletableFuture<List<Throwable>> postRegistryEventDispatch(final Executor executor, final ModLoadingStage.EventGenerator<? extends RegistryEvent.Register<?>> eventGenerator) {
|
||||
return CompletableFuture.runAsync(()-> {
|
||||
final RegistryEvent.Register<?> event = eventGenerator.apply(null);
|
||||
@@ -727,7 +727,7 @@ public class GameData
|
||||
{
|
||||
LOGGER.error(REGISTRIES,()->new AdvancedLogMessageAdapter(sb->{
|
||||
sb.append("Unidentified mapping from registry ").append(name).append('\n');
|
||||
lst.forEach(map->sb.append('\t').append(map.key).append(": ").append(map.id).append('\n'));
|
||||
lst.stream().sorted().forEach(map->sb.append('\t').append(map.key).append(": ").append(map.id).append('\n'));
|
||||
}));
|
||||
}
|
||||
event.getAllMappings().stream().filter(e -> e.getAction() == MissingMappings.Action.FAIL).forEach(fail -> failed.put(name, fail.key));
|
||||
@@ -750,7 +750,7 @@ public class GameData
|
||||
defaulted.asMap().forEach((name, entries) ->
|
||||
{
|
||||
buf.append("Missing ").append(name).append(":\n");
|
||||
entries.forEach(rl -> buf.append(" ").append(rl).append("\n"));
|
||||
entries.stream().sorted((o1, o2) -> o1.compareNamespaced(o2)).forEach(rl -> buf.append(" ").append(rl).append("\n"));
|
||||
buf.append("\n");
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user