mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 06:24:43 +00:00
Update forge mappings to 20201028-1.16.3 (#7435)
This commit is contained in:
1 parent
6e0e67b14d
commit
53eedb0f10
93 files changed
+598
-588
No files matched your search
@@ -293,7 +293,7 @@ public class BiomeDictionary
|
||||
addTypes(Biomes.TAIGA, COLD, CONIFEROUS, FOREST, OVERWORLD);
|
||||
addTypes(Biomes.SWAMP, WET, SWAMP, OVERWORLD);
|
||||
addTypes(Biomes.RIVER, RIVER, OVERWORLD);
|
||||
addTypes(Biomes.field_235254_j_, HOT, DRY, NETHER);
|
||||
addTypes(Biomes.NETHER_WASTES, HOT, DRY, NETHER);
|
||||
addTypes(Biomes.THE_END, COLD, DRY, END);
|
||||
addTypes(Biomes.FROZEN_OCEAN, COLD, OCEAN, SNOWY, OVERWORLD);
|
||||
addTypes(Biomes.FROZEN_RIVER, COLD, RIVER, SNOWY, OVERWORLD);
|
||||
@@ -360,10 +360,10 @@ public class BiomeDictionary
|
||||
addTypes(Biomes.MODIFIED_BADLANDS_PLATEAU, HOT, DRY, SPARSE, MOUNTAIN, RARE, OVERWORLD, PLATEAU, MODIFIED);
|
||||
addTypes(Biomes.BAMBOO_JUNGLE, HOT, WET, RARE, JUNGLE, OVERWORLD);
|
||||
addTypes(Biomes.BAMBOO_JUNGLE_HILLS, HOT, WET, RARE, JUNGLE, HILLS, OVERWORLD);
|
||||
addTypes(Biomes.field_235252_ay_, HOT, DRY, NETHER);
|
||||
addTypes(Biomes.field_235253_az_, HOT, DRY, NETHER, FOREST);
|
||||
addTypes(Biomes.field_235250_aA_, HOT, DRY, NETHER, FOREST);
|
||||
addTypes(Biomes.field_235251_aB_, HOT, DRY, NETHER);
|
||||
addTypes(Biomes.SOUL_SAND_VALLEY, HOT, DRY, NETHER);
|
||||
addTypes(Biomes.CRIMSON_FOREST, HOT, DRY, NETHER, FOREST);
|
||||
addTypes(Biomes.WARPED_FOREST, HOT, DRY, NETHER, FOREST);
|
||||
addTypes(Biomes.BASALT_DELTAS, HOT, DRY, NETHER);
|
||||
|
||||
if (DEBUG)
|
||||
{
|
||||
@@ -372,7 +372,7 @@ public class BiomeDictionary
|
||||
Type.byName.forEach((name, type) ->
|
||||
buf.append(" ").append(type.name).append(": ")
|
||||
.append(type.biomes.stream()
|
||||
.map(RegistryKey::func_240901_a_)
|
||||
.map(RegistryKey::getLocation)
|
||||
.sorted((a,b) -> a.compareNamespaced(b))
|
||||
.map(Object::toString)
|
||||
.collect(Collectors.joining(", "))
|
||||
@@ -382,7 +382,7 @@ public class BiomeDictionary
|
||||
|
||||
boolean missing = false;
|
||||
List<RegistryKey<Biome>> all = StreamSupport.stream(ForgeRegistries.BIOMES.spliterator(), false)
|
||||
.map(b -> RegistryKey.func_240903_a_(Registry.field_239720_u_, b.getRegistryName()))
|
||||
.map(b -> RegistryKey.getOrCreateKey(Registry.BIOME_KEY, b.getRegistryName()))
|
||||
.sorted().collect(Collectors.toList());
|
||||
|
||||
for (RegistryKey<Biome> key : all) {
|
||||
@@ -391,7 +391,7 @@ public class BiomeDictionary
|
||||
buf.append("Missing:\n");
|
||||
missing = true;
|
||||
}
|
||||
buf.append(" ").append(key.func_240901_a_()).append('\n');
|
||||
buf.append(" ").append(key.getLocation()).append('\n');
|
||||
}
|
||||
}
|
||||
LOGGER.debug(buf.toString());
|
||||
|
||||
@@ -176,7 +176,7 @@ public class ForgeHooks
|
||||
public static boolean canHarvestBlock(@Nonnull BlockState state, @Nonnull PlayerEntity player, @Nonnull IBlockReader world, @Nonnull BlockPos pos)
|
||||
{
|
||||
//state = state.getActualState(world, pos);
|
||||
if (!state.func_235783_q_())
|
||||
if (!state.getRequiresTool())
|
||||
return true;
|
||||
|
||||
ItemStack stack = player.getHeldItemMainhand();
|
||||
@@ -225,7 +225,7 @@ public class ForgeHooks
|
||||
blocks.forEach(block -> blockToolSetter.accept(block, ToolType.HOE, 0));
|
||||
|
||||
//This is taken from PickaxeItem, if that changes update here.
|
||||
for (Block block : new Block[]{Blocks.OBSIDIAN, Blocks.field_235399_ni_, Blocks.field_235397_ng_, Blocks.field_235400_nj_, Blocks.field_235398_nh_})
|
||||
for (Block block : new Block[]{Blocks.OBSIDIAN, Blocks.CRYING_OBSIDIAN, Blocks.NETHERITE_BLOCK, Blocks.RESPAWN_ANCHOR, Blocks.ANCIENT_DEBRIS})
|
||||
blockToolSetter.accept(block, ToolType.PICKAXE, 3);
|
||||
for (Block block : new Block[]{Blocks.DIAMOND_BLOCK, Blocks.DIAMOND_ORE, Blocks.EMERALD_ORE, Blocks.EMERALD_BLOCK, Blocks.GOLD_BLOCK, Blocks.GOLD_ORE, Blocks.REDSTONE_ORE})
|
||||
blockToolSetter.accept(block, ToolType.PICKAXE, 2);
|
||||
@@ -251,7 +251,7 @@ public class ForgeHooks
|
||||
if (state.isAir(world, pos))
|
||||
return false;
|
||||
|
||||
if (isCreative && Screen.func_231172_r_() && state.hasTileEntity())
|
||||
if (isCreative && Screen.hasControlDown() && state.hasTileEntity())
|
||||
te = world.getTileEntity(pos);
|
||||
|
||||
result = state.getPickBlock(target, world, pos, player);
|
||||
@@ -479,7 +479,7 @@ public class ForgeHooks
|
||||
if (ichat == null)
|
||||
ichat = new StringTextComponent(part);
|
||||
else
|
||||
ichat.func_240702_b_(part);
|
||||
ichat.appendString(part);
|
||||
}
|
||||
lastEnd = end;
|
||||
String url = string.substring(start, end);
|
||||
@@ -495,7 +495,7 @@ public class ForgeHooks
|
||||
if (ichat == null)
|
||||
ichat = new StringTextComponent(url);
|
||||
else
|
||||
ichat.func_240702_b_(url);
|
||||
ichat.appendString(url);
|
||||
continue;
|
||||
}
|
||||
url = "http://" + url;
|
||||
@@ -505,16 +505,16 @@ public class ForgeHooks
|
||||
{
|
||||
// Bad syntax bail out!
|
||||
if (ichat == null) ichat = new StringTextComponent(url);
|
||||
else ichat.func_240702_b_(url);
|
||||
else ichat.appendString(url);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Set the click event and append the link.
|
||||
ClickEvent click = new ClickEvent(ClickEvent.Action.OPEN_URL, url);
|
||||
link.func_230530_a_(link.getStyle().func_240715_a_(click).setUnderlined(true).func_240718_a_(Color.func_240744_a_(TextFormatting.BLUE)));
|
||||
link.setStyle(link.getStyle().setClickEvent(click).setUnderlined(true).setColor(Color.fromTextFormatting(TextFormatting.BLUE)));
|
||||
if (ichat == null)
|
||||
ichat = new StringTextComponent("");
|
||||
ichat.func_230529_a_(link);
|
||||
ichat.append(link);
|
||||
}
|
||||
|
||||
// Append the rest of the message.
|
||||
@@ -522,7 +522,7 @@ public class ForgeHooks
|
||||
if (ichat == null)
|
||||
ichat = new StringTextComponent(end);
|
||||
else if (end.length() > 0)
|
||||
ichat.func_230529_a_(new StringTextComponent(string.substring(lastEnd)));
|
||||
ichat.append(new StringTextComponent(string.substring(lastEnd)));
|
||||
return ichat;
|
||||
}
|
||||
|
||||
@@ -881,7 +881,7 @@ public class ForgeHooks
|
||||
MobSpawnInfoBuilder spawnBuilder = new MobSpawnInfoBuilder(spawns);
|
||||
BiomeLoadingEvent event = new BiomeLoadingEvent(name, climate, category, depth, scale, effects, genBuilder, spawnBuilder);
|
||||
MinecraftForge.EVENT_BUS.post(event);
|
||||
return callback.apply(event.getClimate(), event.getCategory(), event.getDepth(), event.getScale(), event.getEffects(), event.getGeneration().func_242508_a(), event.getSpawns().func_242577_b()).setRegistryName(name);
|
||||
return callback.apply(event.getClimate(), event.getCategory(), event.getDepth(), event.getScale(), event.getEffects(), event.getGeneration().build(), event.getSpawns().copy()).setRegistryName(name);
|
||||
}
|
||||
|
||||
private static class LootTableContext
|
||||
@@ -1133,7 +1133,7 @@ public class ForgeHooks
|
||||
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));
|
||||
allList.removeIf(e -> e.getEntry().equals(dummy));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,11 +86,11 @@ public class ForgeMod implements WorldPersistenceHooks.WorldPersistenceHook
|
||||
|
||||
private static final DeferredRegister<Attribute> ATTRIBUTES = DeferredRegister.create(Attribute.class, "forge");
|
||||
|
||||
public static final RegistryObject<Attribute> SWIM_SPEED = ATTRIBUTES.register("swim_speed", () -> new RangedAttribute("forge.swimSpeed", 1.0D, 0.0D, 1024.0D).func_233753_a_(true));
|
||||
public static final RegistryObject<Attribute> NAMETAG_DISTANCE = ATTRIBUTES.register("nametag_distance", () -> new RangedAttribute("forge.nameTagDistance", 64.0D, 0.0D, 64.0).func_233753_a_(true));
|
||||
public static final RegistryObject<Attribute> ENTITY_GRAVITY = ATTRIBUTES.register("entity_gravity", () -> new RangedAttribute("forge.entity_gravity", 0.08D, -8.0D, 8.0D).func_233753_a_(true));
|
||||
public static final RegistryObject<Attribute> SWIM_SPEED = ATTRIBUTES.register("swim_speed", () -> new RangedAttribute("forge.swimSpeed", 1.0D, 0.0D, 1024.0D).setShouldWatch(true));
|
||||
public static final RegistryObject<Attribute> NAMETAG_DISTANCE = ATTRIBUTES.register("nametag_distance", () -> new RangedAttribute("forge.nameTagDistance", 64.0D, 0.0D, 64.0).setShouldWatch(true));
|
||||
public static final RegistryObject<Attribute> ENTITY_GRAVITY = ATTRIBUTES.register("entity_gravity", () -> new RangedAttribute("forge.entity_gravity", 0.08D, -8.0D, 8.0D).setShouldWatch(true));
|
||||
|
||||
public static final RegistryObject<Attribute> REACH_DISTANCE = ATTRIBUTES.register("reach_distance", () -> new RangedAttribute("generic.reachDistance", 5.0D, 0.0D, 1024.0D).func_233753_a_(true));
|
||||
public static final RegistryObject<Attribute> REACH_DISTANCE = ATTRIBUTES.register("reach_distance", () -> new RangedAttribute("generic.reachDistance", 5.0D, 0.0D, 1024.0D).setShouldWatch(true));
|
||||
|
||||
private static ForgeMod INSTANCE;
|
||||
public static ForgeMod getInstance()
|
||||
|
||||
@@ -93,7 +93,7 @@ public class ForgeTagHandler
|
||||
{
|
||||
TagRegistry<T> tagRegistry = getTagRegistry(registry);
|
||||
if (tagRegistry == null) throw new IllegalArgumentException("Registry " + registry.getRegistryName() + " does not support tag types.");
|
||||
return tagRegistry.func_232937_a_(name.toString());
|
||||
return tagRegistry.createTag(name.toString());
|
||||
}
|
||||
return TagRegistry.createDelayedTag(registry.getRegistryName(), name);
|
||||
}
|
||||
@@ -264,13 +264,13 @@ public class ForgeTagHandler
|
||||
if (makeEmpty)
|
||||
{
|
||||
if (withOptional)
|
||||
builder.put(registryName, tagRegistry.reinjectOptionalTags(ITagCollection.func_242202_a(Collections.emptyMap())));
|
||||
builder.put(registryName, tagRegistry.reinjectOptionalTags(ITagCollection.getTagCollectionFromMap(Collections.emptyMap())));
|
||||
else
|
||||
builder.put(registryName, ITagCollection.func_242202_a(Collections.emptyMap()));
|
||||
builder.put(registryName, ITagCollection.getTagCollectionFromMap(Collections.emptyMap()));
|
||||
}
|
||||
else
|
||||
{
|
||||
builder.put(registryName, ITagCollection.func_242202_a(tagRegistry.func_241288_c_().stream().distinct().collect(Collectors.toMap(INamedTag::func_230234_a_, namedTag -> namedTag))));
|
||||
builder.put(registryName, ITagCollection.getTagCollectionFromMap(tagRegistry.getTags().stream().distinct().collect(Collectors.toMap(INamedTag::getName, namedTag -> namedTag))));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -290,7 +290,7 @@ public class ForgeTagHandler
|
||||
{
|
||||
LOGGER.debug("Populated the TagCollectionManager with {} extra types", customTagTypes.size());
|
||||
}
|
||||
return ITagCollectionSupplier.func_242209_a(blockTags, itemTags, fluidTags, entityTypeTags);
|
||||
return ITagCollectionSupplier.getTagCollectionSupplier(blockTags, itemTags, fluidTags, entityTypeTags);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -303,7 +303,7 @@ public class ForgeTagHandler
|
||||
ImmutableMap.Builder<ResourceLocation, ITagCollection<?>> builder = ImmutableMap.builder();
|
||||
for (TagCollectionReaderInfo info : tagCollectionReaders)
|
||||
{
|
||||
builder.put(info.tagType, info.reader.func_242226_a(info.tagBuilders));
|
||||
builder.put(info.tagType, info.reader.buildTagCollectionFromMap(info.tagBuilders));
|
||||
}
|
||||
customTagTypes = builder.build();
|
||||
}
|
||||
@@ -329,7 +329,7 @@ public class ForgeTagHandler
|
||||
CompletableFuture<List<TagCollectionReaderInfo>> customResults = CompletableFuture.completedFuture(new ArrayList<>());
|
||||
for (Map.Entry<ResourceLocation, TagCollectionReader<?>> entry : readers.entrySet())
|
||||
{
|
||||
customResults = customResults.thenCombine(entry.getValue().func_242224_a(resourceManager, backgroundExecutor), (results, result) -> {
|
||||
customResults = customResults.thenCombine(entry.getValue().readTagsFromManager(resourceManager, backgroundExecutor), (results, result) -> {
|
||||
results.add(new TagCollectionReaderInfo(entry.getKey(), entry.getValue(), result));
|
||||
return results;
|
||||
});
|
||||
@@ -368,7 +368,7 @@ public class ForgeTagHandler
|
||||
TagRegistry<?> tagRegistry = TagRegistryManager.get(registryName);
|
||||
if (tagRegistry != null)
|
||||
{
|
||||
builder.put(registryName, ITagCollection.func_242202_a(Collections.emptyMap()));
|
||||
builder.put(registryName, ITagCollection.getTagCollectionFromMap(Collections.emptyMap()));
|
||||
}
|
||||
}
|
||||
return withSpecificCustom(tagCollectionSupplier, builder.build());
|
||||
@@ -384,27 +384,27 @@ public class ForgeTagHandler
|
||||
return new ITagCollectionSupplier()
|
||||
{
|
||||
@Override
|
||||
public ITagCollection<Block> func_241835_a()
|
||||
public ITagCollection<Block> getBlockTags()
|
||||
{
|
||||
return tagCollectionSupplier.func_241835_a();
|
||||
return tagCollectionSupplier.getBlockTags();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITagCollection<Item> func_241836_b()
|
||||
public ITagCollection<Item> getItemTags()
|
||||
{
|
||||
return tagCollectionSupplier.func_241836_b();
|
||||
return tagCollectionSupplier.getItemTags();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITagCollection<Fluid> func_241837_c()
|
||||
public ITagCollection<Fluid> getFluidTags()
|
||||
{
|
||||
return tagCollectionSupplier.func_241837_c();
|
||||
return tagCollectionSupplier.getFluidTags();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITagCollection<EntityType<?>> func_241838_d()
|
||||
public ITagCollection<EntityType<?>> getEntityTypeTags()
|
||||
{
|
||||
return tagCollectionSupplier.func_241838_d();
|
||||
return tagCollectionSupplier.getEntityTypeTags();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -55,9 +55,9 @@ public interface IExtensibleEnum
|
||||
default void init() {}
|
||||
|
||||
/**
|
||||
* Use this instead of {@link IStringSerializable#func_233023_a_(Supplier, Function)} for extensible enums because this not cache the enum values on construction
|
||||
* Use this instead of {@link IStringSerializable#createEnumCodec(Supplier, Function)} for extensible enums because this not cache the enum values on construction
|
||||
*/
|
||||
static <E extends Enum<E> & IStringSerializable> Codec<E> createCodecForExtensibleEnum(Supplier<E[]> valuesSupplier, Function<? super String, ? extends E> enumValueFromNameFunction) {
|
||||
return IStringSerializable.func_233024_a_(Enum::ordinal, (id) -> valuesSupplier.get()[id], enumValueFromNameFunction);
|
||||
return IStringSerializable.createCodec(Enum::ordinal, (id) -> valuesSupplier.get()[id], enumValueFromNameFunction);
|
||||
}
|
||||
}
|
||||
@@ -52,7 +52,7 @@ public final class TimeValues
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_176610_l()
|
||||
public String getString()
|
||||
{
|
||||
return "identity";
|
||||
}
|
||||
@@ -244,7 +244,7 @@ public final class TimeValues
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_176610_l()
|
||||
public String getString()
|
||||
{
|
||||
return parameterName;
|
||||
}
|
||||
@@ -346,7 +346,7 @@ public final class TimeValues
|
||||
}
|
||||
else if(parameter instanceof IStringSerializable)
|
||||
{
|
||||
out.value("#" + ((IStringSerializable)parameter).func_176610_l());
|
||||
out.value("#" + ((IStringSerializable)parameter).getString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ public class TagEmptyCondition implements ICondition
|
||||
@Override
|
||||
public boolean test()
|
||||
{
|
||||
ITag<Item> tag = TagCollectionManager.func_242178_a().func_241836_b().get(tag_name);
|
||||
return tag == null || tag.func_230236_b_().isEmpty();
|
||||
ITag<Item> tag = TagCollectionManager.getManager().getItemTags().get(tag_name);
|
||||
return tag == null || tag.getAllElements().isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,57 +46,57 @@ public class ForgeBlockTagsProvider extends BlockTagsProvider
|
||||
@Override
|
||||
public void registerTags()
|
||||
{
|
||||
func_240522_a_(CHESTS).addTags(CHESTS_ENDER, CHESTS_TRAPPED, CHESTS_WOODEN);
|
||||
func_240522_a_(CHESTS_ENDER).func_240534_a_(Blocks.ENDER_CHEST);
|
||||
func_240522_a_(CHESTS_TRAPPED).func_240534_a_(Blocks.TRAPPED_CHEST);
|
||||
func_240522_a_(CHESTS_WOODEN).func_240534_a_(Blocks.CHEST, Blocks.TRAPPED_CHEST);
|
||||
func_240522_a_(COBBLESTONE).func_240534_a_(Blocks.COBBLESTONE, Blocks.INFESTED_COBBLESTONE, Blocks.MOSSY_COBBLESTONE);
|
||||
func_240522_a_(DIRT).func_240534_a_(Blocks.DIRT, Blocks.GRASS_BLOCK, Blocks.COARSE_DIRT, Blocks.PODZOL, Blocks.MYCELIUM);
|
||||
func_240522_a_(END_STONES).func_240534_a_(Blocks.END_STONE);
|
||||
func_240522_a_(FENCE_GATES).addTags(FENCE_GATES_WOODEN);
|
||||
func_240522_a_(FENCE_GATES_WOODEN).func_240534_a_(Blocks.OAK_FENCE_GATE, Blocks.SPRUCE_FENCE_GATE, Blocks.BIRCH_FENCE_GATE, Blocks.JUNGLE_FENCE_GATE, Blocks.ACACIA_FENCE_GATE, Blocks.DARK_OAK_FENCE_GATE, Blocks.field_235354_mM_, Blocks.field_235355_mN_);
|
||||
func_240522_a_(FENCES).addTags(FENCES_NETHER_BRICK, FENCES_WOODEN);
|
||||
func_240522_a_(FENCES_NETHER_BRICK).func_240534_a_(Blocks.NETHER_BRICK_FENCE);
|
||||
func_240522_a_(FENCES_WOODEN).func_240534_a_(Blocks.OAK_FENCE, Blocks.SPRUCE_FENCE, Blocks.BIRCH_FENCE, Blocks.JUNGLE_FENCE, Blocks.ACACIA_FENCE, Blocks.DARK_OAK_FENCE, Blocks.field_235350_mI_, Blocks.field_235351_mJ_);
|
||||
func_240522_a_(GLASS).addTags(GLASS_COLORLESS, STAINED_GLASS);
|
||||
func_240522_a_(GLASS_COLORLESS).func_240534_a_(Blocks.GLASS);
|
||||
addColored(func_240522_a_(STAINED_GLASS)::func_240534_a_, GLASS, "{color}_stained_glass");
|
||||
func_240522_a_(GLASS_PANES).addTags(GLASS_PANES_COLORLESS, STAINED_GLASS_PANES);
|
||||
func_240522_a_(GLASS_PANES_COLORLESS).func_240534_a_(Blocks.GLASS_PANE);
|
||||
addColored(func_240522_a_(STAINED_GLASS_PANES)::func_240534_a_, GLASS_PANES, "{color}_stained_glass_pane");
|
||||
func_240522_a_(GRAVEL).func_240534_a_(Blocks.GRAVEL);
|
||||
func_240522_a_(NETHERRACK).func_240534_a_(Blocks.NETHERRACK);
|
||||
func_240522_a_(OBSIDIAN).func_240534_a_(Blocks.OBSIDIAN);
|
||||
func_240522_a_(ORES).addTags(ORES_COAL, ORES_DIAMOND, ORES_EMERALD, ORES_GOLD, ORES_IRON, ORES_LAPIS, ORES_REDSTONE, ORES_QUARTZ, ORES_NETHERITE_SCRAP);
|
||||
func_240522_a_(ORES_COAL).func_240534_a_(Blocks.COAL_ORE);
|
||||
func_240522_a_(ORES_DIAMOND).func_240534_a_(Blocks.DIAMOND_ORE);
|
||||
func_240522_a_(ORES_EMERALD).func_240534_a_(Blocks.EMERALD_ORE);
|
||||
func_240522_a_(ORES_GOLD).func_240531_a_(BlockTags.field_232866_P_);
|
||||
func_240522_a_(ORES_IRON).func_240534_a_(Blocks.IRON_ORE);
|
||||
func_240522_a_(ORES_LAPIS).func_240534_a_(Blocks.LAPIS_ORE);
|
||||
func_240522_a_(ORES_QUARTZ).func_240534_a_(Blocks.NETHER_QUARTZ_ORE);
|
||||
func_240522_a_(ORES_REDSTONE).func_240534_a_(Blocks.REDSTONE_ORE);
|
||||
func_240522_a_(ORES_NETHERITE_SCRAP).func_240534_a_(Blocks.field_235398_nh_);
|
||||
func_240522_a_(SAND).addTags(SAND_COLORLESS, SAND_RED);
|
||||
func_240522_a_(SAND_COLORLESS).func_240534_a_(Blocks.SAND);
|
||||
func_240522_a_(SAND_RED).func_240534_a_(Blocks.RED_SAND);
|
||||
func_240522_a_(SANDSTONE).func_240534_a_(Blocks.SANDSTONE, Blocks.CUT_SANDSTONE, Blocks.CHISELED_SANDSTONE, Blocks.SMOOTH_SANDSTONE, Blocks.RED_SANDSTONE, Blocks.CUT_RED_SANDSTONE, Blocks.CHISELED_RED_SANDSTONE, Blocks.SMOOTH_RED_SANDSTONE);
|
||||
func_240522_a_(STONE).func_240534_a_(Blocks.ANDESITE, Blocks.DIORITE, Blocks.GRANITE, Blocks.INFESTED_STONE, Blocks.STONE, Blocks.POLISHED_ANDESITE, Blocks.POLISHED_DIORITE, Blocks.POLISHED_GRANITE);
|
||||
func_240522_a_(STORAGE_BLOCKS).addTags(STORAGE_BLOCKS_COAL, STORAGE_BLOCKS_DIAMOND, STORAGE_BLOCKS_EMERALD, STORAGE_BLOCKS_GOLD, STORAGE_BLOCKS_IRON, STORAGE_BLOCKS_LAPIS, STORAGE_BLOCKS_QUARTZ, STORAGE_BLOCKS_REDSTONE, STORAGE_BLOCKS_NETHERITE);
|
||||
func_240522_a_(STORAGE_BLOCKS_COAL).func_240534_a_(Blocks.COAL_BLOCK);
|
||||
func_240522_a_(STORAGE_BLOCKS_DIAMOND).func_240534_a_(Blocks.DIAMOND_BLOCK);
|
||||
func_240522_a_(STORAGE_BLOCKS_EMERALD).func_240534_a_(Blocks.EMERALD_BLOCK);
|
||||
func_240522_a_(STORAGE_BLOCKS_GOLD).func_240534_a_(Blocks.GOLD_BLOCK);
|
||||
func_240522_a_(STORAGE_BLOCKS_IRON).func_240534_a_(Blocks.IRON_BLOCK);
|
||||
func_240522_a_(STORAGE_BLOCKS_LAPIS).func_240534_a_(Blocks.LAPIS_BLOCK);
|
||||
func_240522_a_(STORAGE_BLOCKS_QUARTZ).func_240534_a_(Blocks.QUARTZ_BLOCK);
|
||||
func_240522_a_(STORAGE_BLOCKS_REDSTONE).func_240534_a_(Blocks.REDSTONE_BLOCK);
|
||||
func_240522_a_(STORAGE_BLOCKS_NETHERITE).func_240534_a_(Blocks.field_235397_ng_);
|
||||
getOrCreateBuilder(CHESTS).addTags(CHESTS_ENDER, CHESTS_TRAPPED, CHESTS_WOODEN);
|
||||
getOrCreateBuilder(CHESTS_ENDER).add(Blocks.ENDER_CHEST);
|
||||
getOrCreateBuilder(CHESTS_TRAPPED).add(Blocks.TRAPPED_CHEST);
|
||||
getOrCreateBuilder(CHESTS_WOODEN).add(Blocks.CHEST, Blocks.TRAPPED_CHEST);
|
||||
getOrCreateBuilder(COBBLESTONE).add(Blocks.COBBLESTONE, Blocks.INFESTED_COBBLESTONE, Blocks.MOSSY_COBBLESTONE);
|
||||
getOrCreateBuilder(DIRT).add(Blocks.DIRT, Blocks.GRASS_BLOCK, Blocks.COARSE_DIRT, Blocks.PODZOL, Blocks.MYCELIUM);
|
||||
getOrCreateBuilder(END_STONES).add(Blocks.END_STONE);
|
||||
getOrCreateBuilder(FENCE_GATES).addTags(FENCE_GATES_WOODEN);
|
||||
getOrCreateBuilder(FENCE_GATES_WOODEN).add(Blocks.OAK_FENCE_GATE, Blocks.SPRUCE_FENCE_GATE, Blocks.BIRCH_FENCE_GATE, Blocks.JUNGLE_FENCE_GATE, Blocks.ACACIA_FENCE_GATE, Blocks.DARK_OAK_FENCE_GATE, Blocks.CRIMSON_FENCE_GATE, Blocks.WARPED_FENCE_GATE);
|
||||
getOrCreateBuilder(FENCES).addTags(FENCES_NETHER_BRICK, FENCES_WOODEN);
|
||||
getOrCreateBuilder(FENCES_NETHER_BRICK).add(Blocks.NETHER_BRICK_FENCE);
|
||||
getOrCreateBuilder(FENCES_WOODEN).add(Blocks.OAK_FENCE, Blocks.SPRUCE_FENCE, Blocks.BIRCH_FENCE, Blocks.JUNGLE_FENCE, Blocks.ACACIA_FENCE, Blocks.DARK_OAK_FENCE, Blocks.CRIMSON_FENCE, Blocks.WARPED_FENCE);
|
||||
getOrCreateBuilder(GLASS).addTags(GLASS_COLORLESS, STAINED_GLASS);
|
||||
getOrCreateBuilder(GLASS_COLORLESS).add(Blocks.GLASS);
|
||||
addColored(getOrCreateBuilder(STAINED_GLASS)::add, GLASS, "{color}_stained_glass");
|
||||
getOrCreateBuilder(GLASS_PANES).addTags(GLASS_PANES_COLORLESS, STAINED_GLASS_PANES);
|
||||
getOrCreateBuilder(GLASS_PANES_COLORLESS).add(Blocks.GLASS_PANE);
|
||||
addColored(getOrCreateBuilder(STAINED_GLASS_PANES)::add, GLASS_PANES, "{color}_stained_glass_pane");
|
||||
getOrCreateBuilder(GRAVEL).add(Blocks.GRAVEL);
|
||||
getOrCreateBuilder(NETHERRACK).add(Blocks.NETHERRACK);
|
||||
getOrCreateBuilder(OBSIDIAN).add(Blocks.OBSIDIAN);
|
||||
getOrCreateBuilder(ORES).addTags(ORES_COAL, ORES_DIAMOND, ORES_EMERALD, ORES_GOLD, ORES_IRON, ORES_LAPIS, ORES_REDSTONE, ORES_QUARTZ, ORES_NETHERITE_SCRAP);
|
||||
getOrCreateBuilder(ORES_COAL).add(Blocks.COAL_ORE);
|
||||
getOrCreateBuilder(ORES_DIAMOND).add(Blocks.DIAMOND_ORE);
|
||||
getOrCreateBuilder(ORES_EMERALD).add(Blocks.EMERALD_ORE);
|
||||
getOrCreateBuilder(ORES_GOLD).addTag(BlockTags.GOLD_ORES);
|
||||
getOrCreateBuilder(ORES_IRON).add(Blocks.IRON_ORE);
|
||||
getOrCreateBuilder(ORES_LAPIS).add(Blocks.LAPIS_ORE);
|
||||
getOrCreateBuilder(ORES_QUARTZ).add(Blocks.NETHER_QUARTZ_ORE);
|
||||
getOrCreateBuilder(ORES_REDSTONE).add(Blocks.REDSTONE_ORE);
|
||||
getOrCreateBuilder(ORES_NETHERITE_SCRAP).add(Blocks.ANCIENT_DEBRIS);
|
||||
getOrCreateBuilder(SAND).addTags(SAND_COLORLESS, SAND_RED);
|
||||
getOrCreateBuilder(SAND_COLORLESS).add(Blocks.SAND);
|
||||
getOrCreateBuilder(SAND_RED).add(Blocks.RED_SAND);
|
||||
getOrCreateBuilder(SANDSTONE).add(Blocks.SANDSTONE, Blocks.CUT_SANDSTONE, Blocks.CHISELED_SANDSTONE, Blocks.SMOOTH_SANDSTONE, Blocks.RED_SANDSTONE, Blocks.CUT_RED_SANDSTONE, Blocks.CHISELED_RED_SANDSTONE, Blocks.SMOOTH_RED_SANDSTONE);
|
||||
getOrCreateBuilder(STONE).add(Blocks.ANDESITE, Blocks.DIORITE, Blocks.GRANITE, Blocks.INFESTED_STONE, Blocks.STONE, Blocks.POLISHED_ANDESITE, Blocks.POLISHED_DIORITE, Blocks.POLISHED_GRANITE);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS).addTags(STORAGE_BLOCKS_COAL, STORAGE_BLOCKS_DIAMOND, STORAGE_BLOCKS_EMERALD, STORAGE_BLOCKS_GOLD, STORAGE_BLOCKS_IRON, STORAGE_BLOCKS_LAPIS, STORAGE_BLOCKS_QUARTZ, STORAGE_BLOCKS_REDSTONE, STORAGE_BLOCKS_NETHERITE);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_COAL).add(Blocks.COAL_BLOCK);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_DIAMOND).add(Blocks.DIAMOND_BLOCK);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_EMERALD).add(Blocks.EMERALD_BLOCK);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_GOLD).add(Blocks.GOLD_BLOCK);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_IRON).add(Blocks.IRON_BLOCK);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_LAPIS).add(Blocks.LAPIS_BLOCK);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_QUARTZ).add(Blocks.QUARTZ_BLOCK);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_REDSTONE).add(Blocks.REDSTONE_BLOCK);
|
||||
getOrCreateBuilder(STORAGE_BLOCKS_NETHERITE).add(Blocks.NETHERITE_BLOCK);
|
||||
}
|
||||
|
||||
private void addColored(Consumer<Block> consumer, ITag.INamedTag<Block> group, String pattern)
|
||||
{
|
||||
String prefix = group.func_230234_a_().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
String prefix = group.getName().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
for (DyeColor color : DyeColor.values())
|
||||
{
|
||||
ResourceLocation key = new ResourceLocation("minecraft", pattern.replace("{color}", color.getTranslationKey()));
|
||||
@@ -104,7 +104,7 @@ public class ForgeBlockTagsProvider extends BlockTagsProvider
|
||||
Block block = ForgeRegistries.BLOCKS.getValue(key);
|
||||
if (block == null || block == Blocks.AIR)
|
||||
throw new IllegalStateException("Unknown vanilla block: " + key.toString());
|
||||
func_240522_a_(tag).func_240534_a_(block);
|
||||
getOrCreateBuilder(tag).add(block);
|
||||
consumer.accept(block);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,103 +45,103 @@ public class ForgeItemTagsProvider extends ItemTagsProvider
|
||||
@Override
|
||||
public void registerTags()
|
||||
{
|
||||
func_240522_a_(Tags.Items.BONES).func_240534_a_(Items.BONE);
|
||||
func_240522_a_(Tags.Items.BOOKSHELVES).func_240534_a_(Items.BOOKSHELF);
|
||||
func_240521_a_(Tags.Blocks.CHESTS, Tags.Items.CHESTS);
|
||||
func_240521_a_(Tags.Blocks.CHESTS_ENDER, Tags.Items.CHESTS_ENDER);
|
||||
func_240521_a_(Tags.Blocks.CHESTS_TRAPPED, Tags.Items.CHESTS_TRAPPED);
|
||||
func_240521_a_(Tags.Blocks.CHESTS_WOODEN, Tags.Items.CHESTS_WOODEN);
|
||||
func_240521_a_(Tags.Blocks.COBBLESTONE, Tags.Items.COBBLESTONE);
|
||||
func_240522_a_(Tags.Items.CROPS).addTags(Tags.Items.CROPS_BEETROOT, Tags.Items.CROPS_CARROT, Tags.Items.CROPS_NETHER_WART, Tags.Items.CROPS_POTATO, Tags.Items.CROPS_WHEAT);
|
||||
func_240522_a_(Tags.Items.CROPS_BEETROOT).func_240534_a_(Items.BEETROOT);
|
||||
func_240522_a_(Tags.Items.CROPS_CARROT).func_240534_a_(Items.CARROT);
|
||||
func_240522_a_(Tags.Items.CROPS_NETHER_WART).func_240534_a_(Items.NETHER_WART);
|
||||
func_240522_a_(Tags.Items.CROPS_POTATO).func_240534_a_(Items.POTATO);
|
||||
func_240522_a_(Tags.Items.CROPS_WHEAT).func_240534_a_(Items.WHEAT);
|
||||
func_240522_a_(Tags.Items.DUSTS).addTags(Tags.Items.DUSTS_GLOWSTONE, Tags.Items.DUSTS_PRISMARINE, Tags.Items.DUSTS_REDSTONE);
|
||||
func_240522_a_(Tags.Items.DUSTS_GLOWSTONE).func_240534_a_(Items.GLOWSTONE_DUST);
|
||||
func_240522_a_(Tags.Items.DUSTS_PRISMARINE).func_240534_a_(Items.PRISMARINE_SHARD);
|
||||
func_240522_a_(Tags.Items.DUSTS_REDSTONE).func_240534_a_(Items.REDSTONE);
|
||||
addColored(func_240522_a_(Tags.Items.DYES)::addTags, Tags.Items.DYES, "{color}_dye");
|
||||
func_240522_a_(Tags.Items.EGGS).func_240534_a_(Items.EGG);
|
||||
func_240521_a_(Tags.Blocks.END_STONES, Tags.Items.END_STONES);
|
||||
func_240522_a_(Tags.Items.ENDER_PEARLS).func_240534_a_(Items.ENDER_PEARL);
|
||||
func_240522_a_(Tags.Items.FEATHERS).func_240534_a_(Items.FEATHER);
|
||||
func_240521_a_(Tags.Blocks.FENCE_GATES, Tags.Items.FENCE_GATES);
|
||||
func_240521_a_(Tags.Blocks.FENCE_GATES_WOODEN, Tags.Items.FENCE_GATES_WOODEN);
|
||||
func_240521_a_(Tags.Blocks.FENCES, Tags.Items.FENCES);
|
||||
func_240521_a_(Tags.Blocks.FENCES_NETHER_BRICK, Tags.Items.FENCES_NETHER_BRICK);
|
||||
func_240521_a_(Tags.Blocks.FENCES_WOODEN, Tags.Items.FENCES_WOODEN);
|
||||
func_240522_a_(Tags.Items.GEMS).addTags(Tags.Items.GEMS_DIAMOND, Tags.Items.GEMS_EMERALD, Tags.Items.GEMS_LAPIS, Tags.Items.GEMS_PRISMARINE, Tags.Items.GEMS_QUARTZ);
|
||||
func_240522_a_(Tags.Items.GEMS_DIAMOND).func_240534_a_(Items.DIAMOND);
|
||||
func_240522_a_(Tags.Items.GEMS_EMERALD).func_240534_a_(Items.EMERALD);
|
||||
func_240522_a_(Tags.Items.GEMS_LAPIS).func_240534_a_(Items.LAPIS_LAZULI);
|
||||
func_240522_a_(Tags.Items.GEMS_PRISMARINE).func_240534_a_(Items.PRISMARINE_CRYSTALS);
|
||||
func_240522_a_(Tags.Items.GEMS_QUARTZ).func_240534_a_(Items.QUARTZ);
|
||||
func_240521_a_(Tags.Blocks.GLASS, Tags.Items.GLASS);
|
||||
getOrCreateBuilder(Tags.Items.BONES).add(Items.BONE);
|
||||
getOrCreateBuilder(Tags.Items.BOOKSHELVES).add(Items.BOOKSHELF);
|
||||
copy(Tags.Blocks.CHESTS, Tags.Items.CHESTS);
|
||||
copy(Tags.Blocks.CHESTS_ENDER, Tags.Items.CHESTS_ENDER);
|
||||
copy(Tags.Blocks.CHESTS_TRAPPED, Tags.Items.CHESTS_TRAPPED);
|
||||
copy(Tags.Blocks.CHESTS_WOODEN, Tags.Items.CHESTS_WOODEN);
|
||||
copy(Tags.Blocks.COBBLESTONE, Tags.Items.COBBLESTONE);
|
||||
getOrCreateBuilder(Tags.Items.CROPS).addTags(Tags.Items.CROPS_BEETROOT, Tags.Items.CROPS_CARROT, Tags.Items.CROPS_NETHER_WART, Tags.Items.CROPS_POTATO, Tags.Items.CROPS_WHEAT);
|
||||
getOrCreateBuilder(Tags.Items.CROPS_BEETROOT).add(Items.BEETROOT);
|
||||
getOrCreateBuilder(Tags.Items.CROPS_CARROT).add(Items.CARROT);
|
||||
getOrCreateBuilder(Tags.Items.CROPS_NETHER_WART).add(Items.NETHER_WART);
|
||||
getOrCreateBuilder(Tags.Items.CROPS_POTATO).add(Items.POTATO);
|
||||
getOrCreateBuilder(Tags.Items.CROPS_WHEAT).add(Items.WHEAT);
|
||||
getOrCreateBuilder(Tags.Items.DUSTS).addTags(Tags.Items.DUSTS_GLOWSTONE, Tags.Items.DUSTS_PRISMARINE, Tags.Items.DUSTS_REDSTONE);
|
||||
getOrCreateBuilder(Tags.Items.DUSTS_GLOWSTONE).add(Items.GLOWSTONE_DUST);
|
||||
getOrCreateBuilder(Tags.Items.DUSTS_PRISMARINE).add(Items.PRISMARINE_SHARD);
|
||||
getOrCreateBuilder(Tags.Items.DUSTS_REDSTONE).add(Items.REDSTONE);
|
||||
addColored(getOrCreateBuilder(Tags.Items.DYES)::addTags, Tags.Items.DYES, "{color}_dye");
|
||||
getOrCreateBuilder(Tags.Items.EGGS).add(Items.EGG);
|
||||
copy(Tags.Blocks.END_STONES, Tags.Items.END_STONES);
|
||||
getOrCreateBuilder(Tags.Items.ENDER_PEARLS).add(Items.ENDER_PEARL);
|
||||
getOrCreateBuilder(Tags.Items.FEATHERS).add(Items.FEATHER);
|
||||
copy(Tags.Blocks.FENCE_GATES, Tags.Items.FENCE_GATES);
|
||||
copy(Tags.Blocks.FENCE_GATES_WOODEN, Tags.Items.FENCE_GATES_WOODEN);
|
||||
copy(Tags.Blocks.FENCES, Tags.Items.FENCES);
|
||||
copy(Tags.Blocks.FENCES_NETHER_BRICK, Tags.Items.FENCES_NETHER_BRICK);
|
||||
copy(Tags.Blocks.FENCES_WOODEN, Tags.Items.FENCES_WOODEN);
|
||||
getOrCreateBuilder(Tags.Items.GEMS).addTags(Tags.Items.GEMS_DIAMOND, Tags.Items.GEMS_EMERALD, Tags.Items.GEMS_LAPIS, Tags.Items.GEMS_PRISMARINE, Tags.Items.GEMS_QUARTZ);
|
||||
getOrCreateBuilder(Tags.Items.GEMS_DIAMOND).add(Items.DIAMOND);
|
||||
getOrCreateBuilder(Tags.Items.GEMS_EMERALD).add(Items.EMERALD);
|
||||
getOrCreateBuilder(Tags.Items.GEMS_LAPIS).add(Items.LAPIS_LAZULI);
|
||||
getOrCreateBuilder(Tags.Items.GEMS_PRISMARINE).add(Items.PRISMARINE_CRYSTALS);
|
||||
getOrCreateBuilder(Tags.Items.GEMS_QUARTZ).add(Items.QUARTZ);
|
||||
copy(Tags.Blocks.GLASS, Tags.Items.GLASS);
|
||||
func_240521_a_Colored(Tags.Blocks.GLASS, Tags.Items.GLASS);
|
||||
func_240521_a_(Tags.Blocks.GLASS_PANES, Tags.Items.GLASS_PANES);
|
||||
copy(Tags.Blocks.GLASS_PANES, Tags.Items.GLASS_PANES);
|
||||
func_240521_a_Colored(Tags.Blocks.GLASS_PANES, Tags.Items.GLASS_PANES);
|
||||
func_240521_a_(Tags.Blocks.GRAVEL, Tags.Items.GRAVEL);
|
||||
func_240522_a_(Tags.Items.GUNPOWDER).func_240534_a_(Items.GUNPOWDER);
|
||||
func_240522_a_(Tags.Items.HEADS).func_240534_a_(Items.CREEPER_HEAD, Items.DRAGON_HEAD, Items.PLAYER_HEAD, Items.SKELETON_SKULL, Items.WITHER_SKELETON_SKULL, Items.ZOMBIE_HEAD);
|
||||
func_240522_a_(Tags.Items.INGOTS).addTags(Tags.Items.INGOTS_IRON, Tags.Items.INGOTS_GOLD, Tags.Items.INGOTS_BRICK, Tags.Items.INGOTS_NETHER_BRICK, Tags.Items.INGOTS_NETHERITE);
|
||||
func_240522_a_(Tags.Items.INGOTS_BRICK).func_240534_a_(Items.BRICK);
|
||||
func_240522_a_(Tags.Items.INGOTS_GOLD).func_240534_a_(Items.GOLD_INGOT);
|
||||
func_240522_a_(Tags.Items.INGOTS_IRON).func_240534_a_(Items.IRON_INGOT);
|
||||
func_240522_a_(Tags.Items.INGOTS_NETHERITE).func_240534_a_(Items.field_234759_km_);
|
||||
func_240522_a_(Tags.Items.INGOTS_NETHER_BRICK).func_240534_a_(Items.NETHER_BRICK);
|
||||
func_240522_a_(Tags.Items.LEATHER).func_240534_a_(Items.LEATHER);
|
||||
func_240522_a_(Tags.Items.MUSHROOMS).func_240534_a_(Items.BROWN_MUSHROOM, Items.RED_MUSHROOM);
|
||||
func_240522_a_(Tags.Items.NETHER_STARS).func_240534_a_(Items.NETHER_STAR);
|
||||
func_240521_a_(Tags.Blocks.NETHERRACK, Tags.Items.NETHERRACK);
|
||||
func_240522_a_(Tags.Items.NUGGETS).addTags(Tags.Items.NUGGETS_IRON, Tags.Items.NUGGETS_GOLD);
|
||||
func_240522_a_(Tags.Items.NUGGETS_IRON).func_240534_a_(Items.IRON_NUGGET);
|
||||
func_240522_a_(Tags.Items.NUGGETS_GOLD).func_240534_a_(Items.GOLD_NUGGET);
|
||||
func_240521_a_(Tags.Blocks.OBSIDIAN, Tags.Items.OBSIDIAN);
|
||||
func_240521_a_(Tags.Blocks.ORES, Tags.Items.ORES);
|
||||
func_240521_a_(Tags.Blocks.ORES_COAL, Tags.Items.ORES_COAL);
|
||||
func_240521_a_(Tags.Blocks.ORES_DIAMOND, Tags.Items.ORES_DIAMOND);
|
||||
func_240521_a_(Tags.Blocks.ORES_EMERALD, Tags.Items.ORES_EMERALD);
|
||||
func_240521_a_(Tags.Blocks.ORES_GOLD, Tags.Items.ORES_GOLD);
|
||||
func_240521_a_(Tags.Blocks.ORES_IRON, Tags.Items.ORES_IRON);
|
||||
func_240521_a_(Tags.Blocks.ORES_LAPIS, Tags.Items.ORES_LAPIS);
|
||||
func_240521_a_(Tags.Blocks.ORES_QUARTZ, Tags.Items.ORES_QUARTZ);
|
||||
func_240521_a_(Tags.Blocks.ORES_REDSTONE, Tags.Items.ORES_REDSTONE);
|
||||
func_240521_a_(Tags.Blocks.ORES_NETHERITE_SCRAP, Tags.Items.ORES_NETHERITE_SCRAP);
|
||||
func_240522_a_(Tags.Items.RODS).addTags(Tags.Items.RODS_BLAZE, Tags.Items.RODS_WOODEN);
|
||||
func_240522_a_(Tags.Items.RODS_BLAZE).func_240534_a_(Items.BLAZE_ROD);
|
||||
func_240522_a_(Tags.Items.RODS_WOODEN).func_240534_a_(Items.STICK);
|
||||
func_240521_a_(Tags.Blocks.SAND, Tags.Items.SAND);
|
||||
func_240521_a_(Tags.Blocks.SAND_COLORLESS, Tags.Items.SAND_COLORLESS);
|
||||
func_240521_a_(Tags.Blocks.SAND_RED, Tags.Items.SAND_RED);
|
||||
func_240521_a_(Tags.Blocks.SANDSTONE, Tags.Items.SANDSTONE);
|
||||
func_240522_a_(Tags.Items.SEEDS).addTags(Tags.Items.SEEDS_BEETROOT, Tags.Items.SEEDS_MELON, Tags.Items.SEEDS_PUMPKIN, Tags.Items.SEEDS_WHEAT);
|
||||
func_240522_a_(Tags.Items.SEEDS_BEETROOT).func_240534_a_(Items.BEETROOT_SEEDS);
|
||||
func_240522_a_(Tags.Items.SEEDS_MELON).func_240534_a_(Items.MELON_SEEDS);
|
||||
func_240522_a_(Tags.Items.SEEDS_PUMPKIN).func_240534_a_(Items.PUMPKIN_SEEDS);
|
||||
func_240522_a_(Tags.Items.SEEDS_WHEAT).func_240534_a_(Items.WHEAT_SEEDS);
|
||||
func_240522_a_(Tags.Items.SHEARS).func_240534_a_(Items.SHEARS);
|
||||
func_240522_a_(Tags.Items.SLIMEBALLS).func_240534_a_(Items.SLIME_BALL);
|
||||
func_240521_a_(Tags.Blocks.STAINED_GLASS, Tags.Items.STAINED_GLASS);
|
||||
func_240521_a_(Tags.Blocks.STAINED_GLASS_PANES, Tags.Items.STAINED_GLASS_PANES);
|
||||
func_240521_a_(Tags.Blocks.STONE, Tags.Items.STONE);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS, Tags.Items.STORAGE_BLOCKS);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_COAL, Tags.Items.STORAGE_BLOCKS_COAL);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_DIAMOND, Tags.Items.STORAGE_BLOCKS_DIAMOND);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_EMERALD, Tags.Items.STORAGE_BLOCKS_EMERALD);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_GOLD, Tags.Items.STORAGE_BLOCKS_GOLD);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_IRON, Tags.Items.STORAGE_BLOCKS_IRON);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_LAPIS, Tags.Items.STORAGE_BLOCKS_LAPIS);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_QUARTZ, Tags.Items.STORAGE_BLOCKS_QUARTZ);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_REDSTONE, Tags.Items.STORAGE_BLOCKS_REDSTONE);
|
||||
func_240521_a_(Tags.Blocks.STORAGE_BLOCKS_NETHERITE, Tags.Items.STORAGE_BLOCKS_NETHERITE);
|
||||
func_240522_a_(Tags.Items.STRING).func_240534_a_(Items.STRING);
|
||||
copy(Tags.Blocks.GRAVEL, Tags.Items.GRAVEL);
|
||||
getOrCreateBuilder(Tags.Items.GUNPOWDER).add(Items.GUNPOWDER);
|
||||
getOrCreateBuilder(Tags.Items.HEADS).add(Items.CREEPER_HEAD, Items.DRAGON_HEAD, Items.PLAYER_HEAD, Items.SKELETON_SKULL, Items.WITHER_SKELETON_SKULL, Items.ZOMBIE_HEAD);
|
||||
getOrCreateBuilder(Tags.Items.INGOTS).addTags(Tags.Items.INGOTS_IRON, Tags.Items.INGOTS_GOLD, Tags.Items.INGOTS_BRICK, Tags.Items.INGOTS_NETHER_BRICK, Tags.Items.INGOTS_NETHERITE);
|
||||
getOrCreateBuilder(Tags.Items.INGOTS_BRICK).add(Items.BRICK);
|
||||
getOrCreateBuilder(Tags.Items.INGOTS_GOLD).add(Items.GOLD_INGOT);
|
||||
getOrCreateBuilder(Tags.Items.INGOTS_IRON).add(Items.IRON_INGOT);
|
||||
getOrCreateBuilder(Tags.Items.INGOTS_NETHERITE).add(Items.NETHERITE_INGOT);
|
||||
getOrCreateBuilder(Tags.Items.INGOTS_NETHER_BRICK).add(Items.NETHER_BRICK);
|
||||
getOrCreateBuilder(Tags.Items.LEATHER).add(Items.LEATHER);
|
||||
getOrCreateBuilder(Tags.Items.MUSHROOMS).add(Items.BROWN_MUSHROOM, Items.RED_MUSHROOM);
|
||||
getOrCreateBuilder(Tags.Items.NETHER_STARS).add(Items.NETHER_STAR);
|
||||
copy(Tags.Blocks.NETHERRACK, Tags.Items.NETHERRACK);
|
||||
getOrCreateBuilder(Tags.Items.NUGGETS).addTags(Tags.Items.NUGGETS_IRON, Tags.Items.NUGGETS_GOLD);
|
||||
getOrCreateBuilder(Tags.Items.NUGGETS_IRON).add(Items.IRON_NUGGET);
|
||||
getOrCreateBuilder(Tags.Items.NUGGETS_GOLD).add(Items.GOLD_NUGGET);
|
||||
copy(Tags.Blocks.OBSIDIAN, Tags.Items.OBSIDIAN);
|
||||
copy(Tags.Blocks.ORES, Tags.Items.ORES);
|
||||
copy(Tags.Blocks.ORES_COAL, Tags.Items.ORES_COAL);
|
||||
copy(Tags.Blocks.ORES_DIAMOND, Tags.Items.ORES_DIAMOND);
|
||||
copy(Tags.Blocks.ORES_EMERALD, Tags.Items.ORES_EMERALD);
|
||||
copy(Tags.Blocks.ORES_GOLD, Tags.Items.ORES_GOLD);
|
||||
copy(Tags.Blocks.ORES_IRON, Tags.Items.ORES_IRON);
|
||||
copy(Tags.Blocks.ORES_LAPIS, Tags.Items.ORES_LAPIS);
|
||||
copy(Tags.Blocks.ORES_QUARTZ, Tags.Items.ORES_QUARTZ);
|
||||
copy(Tags.Blocks.ORES_REDSTONE, Tags.Items.ORES_REDSTONE);
|
||||
copy(Tags.Blocks.ORES_NETHERITE_SCRAP, Tags.Items.ORES_NETHERITE_SCRAP);
|
||||
getOrCreateBuilder(Tags.Items.RODS).addTags(Tags.Items.RODS_BLAZE, Tags.Items.RODS_WOODEN);
|
||||
getOrCreateBuilder(Tags.Items.RODS_BLAZE).add(Items.BLAZE_ROD);
|
||||
getOrCreateBuilder(Tags.Items.RODS_WOODEN).add(Items.STICK);
|
||||
copy(Tags.Blocks.SAND, Tags.Items.SAND);
|
||||
copy(Tags.Blocks.SAND_COLORLESS, Tags.Items.SAND_COLORLESS);
|
||||
copy(Tags.Blocks.SAND_RED, Tags.Items.SAND_RED);
|
||||
copy(Tags.Blocks.SANDSTONE, Tags.Items.SANDSTONE);
|
||||
getOrCreateBuilder(Tags.Items.SEEDS).addTags(Tags.Items.SEEDS_BEETROOT, Tags.Items.SEEDS_MELON, Tags.Items.SEEDS_PUMPKIN, Tags.Items.SEEDS_WHEAT);
|
||||
getOrCreateBuilder(Tags.Items.SEEDS_BEETROOT).add(Items.BEETROOT_SEEDS);
|
||||
getOrCreateBuilder(Tags.Items.SEEDS_MELON).add(Items.MELON_SEEDS);
|
||||
getOrCreateBuilder(Tags.Items.SEEDS_PUMPKIN).add(Items.PUMPKIN_SEEDS);
|
||||
getOrCreateBuilder(Tags.Items.SEEDS_WHEAT).add(Items.WHEAT_SEEDS);
|
||||
getOrCreateBuilder(Tags.Items.SHEARS).add(Items.SHEARS);
|
||||
getOrCreateBuilder(Tags.Items.SLIMEBALLS).add(Items.SLIME_BALL);
|
||||
copy(Tags.Blocks.STAINED_GLASS, Tags.Items.STAINED_GLASS);
|
||||
copy(Tags.Blocks.STAINED_GLASS_PANES, Tags.Items.STAINED_GLASS_PANES);
|
||||
copy(Tags.Blocks.STONE, Tags.Items.STONE);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS, Tags.Items.STORAGE_BLOCKS);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_COAL, Tags.Items.STORAGE_BLOCKS_COAL);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_DIAMOND, Tags.Items.STORAGE_BLOCKS_DIAMOND);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_EMERALD, Tags.Items.STORAGE_BLOCKS_EMERALD);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_GOLD, Tags.Items.STORAGE_BLOCKS_GOLD);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_IRON, Tags.Items.STORAGE_BLOCKS_IRON);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_LAPIS, Tags.Items.STORAGE_BLOCKS_LAPIS);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_QUARTZ, Tags.Items.STORAGE_BLOCKS_QUARTZ);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_REDSTONE, Tags.Items.STORAGE_BLOCKS_REDSTONE);
|
||||
copy(Tags.Blocks.STORAGE_BLOCKS_NETHERITE, Tags.Items.STORAGE_BLOCKS_NETHERITE);
|
||||
getOrCreateBuilder(Tags.Items.STRING).add(Items.STRING);
|
||||
}
|
||||
|
||||
private void addColored(Consumer<ITag.INamedTag<Item>> consumer, ITag.INamedTag<Item> group, String pattern)
|
||||
{
|
||||
String prefix = group.func_230234_a_().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
String prefix = group.getName().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
for (DyeColor color : DyeColor.values())
|
||||
{
|
||||
ResourceLocation key = new ResourceLocation("minecraft", pattern.replace("{color}", color.getTranslationKey()));
|
||||
@@ -149,22 +149,22 @@ public class ForgeItemTagsProvider extends ItemTagsProvider
|
||||
Item item = ForgeRegistries.ITEMS.getValue(key);
|
||||
if (item == null || item == Items.AIR)
|
||||
throw new IllegalStateException("Unknown vanilla item: " + key.toString());
|
||||
func_240522_a_(tag).func_240534_a_(item);
|
||||
getOrCreateBuilder(tag).add(item);
|
||||
consumer.accept(tag);
|
||||
}
|
||||
}
|
||||
|
||||
private void func_240521_a_Colored(ITag.INamedTag<Block> blockGroup, ITag.INamedTag<Item> itemGroup)
|
||||
{
|
||||
String blockPre = blockGroup.func_230234_a_().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
String itemPre = itemGroup.func_230234_a_().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
String blockPre = blockGroup.getName().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
String itemPre = itemGroup.getName().getPath().toUpperCase(Locale.ENGLISH) + '_';
|
||||
for (DyeColor color : DyeColor.values())
|
||||
{
|
||||
ITag.INamedTag<Block> from = getForgeBlockTag(blockPre + color.getTranslationKey());
|
||||
ITag.INamedTag<Item> to = getForgeItemTag(itemPre + color.getTranslationKey());
|
||||
func_240521_a_(from, to);
|
||||
copy(from, to);
|
||||
}
|
||||
func_240521_a_(getForgeBlockTag(blockPre + "colorless"), getForgeItemTag(itemPre + "colorless"));
|
||||
copy(getForgeBlockTag(blockPre + "colorless"), getForgeItemTag(itemPre + "colorless"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ForgeRecipeProvider extends RecipeProvider
|
||||
replace(Items.STICK, Tags.Items.RODS_WOODEN);
|
||||
replace(Items.GOLD_INGOT, Tags.Items.INGOTS_GOLD);
|
||||
replace(Items.IRON_INGOT, Tags.Items.INGOTS_IRON);
|
||||
replace(Items.field_234759_km_, Tags.Items.INGOTS_NETHERITE);
|
||||
replace(Items.NETHERITE_INGOT, Tags.Items.INGOTS_NETHERITE);
|
||||
replace(Items.DIAMOND, Tags.Items.GEMS_DIAMOND);
|
||||
replace(Items.EMERALD, Tags.Items.GEMS_EMERALD);
|
||||
replace(Items.CHEST, Tags.Items.CHESTS_WOODEN);
|
||||
@@ -88,7 +88,7 @@ public class ForgeRecipeProvider extends RecipeProvider
|
||||
exclude(Items.IRON_NUGGET);
|
||||
exclude(Blocks.DIAMOND_BLOCK);
|
||||
exclude(Blocks.EMERALD_BLOCK);
|
||||
exclude(Blocks.field_235397_ng_);
|
||||
exclude(Blocks.NETHERITE_BLOCK);
|
||||
|
||||
exclude(Blocks.COBBLESTONE_STAIRS);
|
||||
exclude(Blocks.COBBLESTONE_SLAB);
|
||||
|
||||
@@ -110,7 +110,7 @@ public interface IForgeBlock
|
||||
*/
|
||||
default boolean isLadder(BlockState state, IWorldReader world, BlockPos pos, LivingEntity entity)
|
||||
{
|
||||
return state.getBlock().isIn(BlockTags.field_232878_as_);
|
||||
return state.getBlock().isIn(BlockTags.CLIMBABLE);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -303,7 +303,7 @@ public interface IForgeBlock
|
||||
*/
|
||||
default boolean canBeReplacedByLeaves(BlockState state, IWorldReader world, BlockPos pos)
|
||||
{
|
||||
return isAir(state, world, pos) || state.func_235714_a_(BlockTags.LEAVES);
|
||||
return isAir(state, world, pos) || state.isIn(BlockTags.LEAVES);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -316,7 +316,7 @@ public interface IForgeBlock
|
||||
*/
|
||||
default boolean canBeReplacedByLogs(BlockState state, IWorldReader world, BlockPos pos)
|
||||
{
|
||||
return (isAir(state, world, pos) || state.func_235714_a_(BlockTags.LEAVES)) || this == Blocks.GRASS_BLOCK || state.func_235714_a_(Tags.Blocks.DIRT)
|
||||
return (isAir(state, world, pos) || state.isIn(BlockTags.LEAVES)) || this == Blocks.GRASS_BLOCK || state.isIn(Tags.Blocks.DIRT)
|
||||
|| getBlock().isIn(BlockTags.LOGS) || getBlock().isIn(BlockTags.SAPLINGS) || this == Blocks.VINE;
|
||||
}
|
||||
|
||||
@@ -465,7 +465,7 @@ public interface IForgeBlock
|
||||
*/
|
||||
default void onPlantGrow(BlockState state, IWorld world, BlockPos pos, BlockPos source)
|
||||
{
|
||||
if (state.func_235714_a_(Tags.Blocks.DIRT))
|
||||
if (state.isIn(Tags.Blocks.DIRT))
|
||||
world.setBlockState(pos, Blocks.DIRT.getDefaultState(), 2);
|
||||
}
|
||||
|
||||
@@ -750,7 +750,7 @@ public interface IForgeBlock
|
||||
*/
|
||||
default int getFlammability(BlockState state, IBlockReader world, BlockPos pos, Direction face)
|
||||
{
|
||||
return ((FireBlock)Blocks.FIRE).func_220274_q(state);
|
||||
return ((FireBlock)Blocks.FIRE).getFlammability(state);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -791,7 +791,7 @@ public interface IForgeBlock
|
||||
*/
|
||||
default int getFireSpreadSpeed(BlockState state, IBlockReader world, BlockPos pos, Direction face)
|
||||
{
|
||||
return ((FireBlock)Blocks.FIRE).func_220275_r(state);
|
||||
return ((FireBlock)Blocks.FIRE).getFireSpreadSpeed(state);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -807,7 +807,7 @@ public interface IForgeBlock
|
||||
*/
|
||||
default boolean isFireSource(BlockState state, IWorldReader world, BlockPos pos, Direction side)
|
||||
{
|
||||
return state.func_235714_a_(world.func_230315_m_().func_241515_q_());
|
||||
return state.isIn(world.getDimensionType().isInfiniBurn());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -822,7 +822,7 @@ public interface IForgeBlock
|
||||
{
|
||||
if (entity instanceof EnderDragonEntity)
|
||||
{
|
||||
return !BlockTags.DRAGON_IMMUNE.func_230235_a_(this.getBlock());
|
||||
return !BlockTags.DRAGON_IMMUNE.contains(this.getBlock());
|
||||
}
|
||||
else if ((entity instanceof WitherEntity) ||
|
||||
(entity instanceof WitherSkullEntity))
|
||||
|
||||
@@ -808,6 +808,6 @@ public interface IForgeBlockState
|
||||
*/
|
||||
default boolean isScaffolding(LivingEntity entity)
|
||||
{
|
||||
return getBlockState().getBlock().isScaffolding(getBlockState(), entity.world, entity.func_233580_cy_(), entity);
|
||||
return getBlockState().getBlock().isScaffolding(getBlockState(), entity.world, entity.getPosition(), entity);
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ public interface IForgeEntityMinecart
|
||||
int y = MathHelper.floor(getMinecart().getPosY());
|
||||
int z = MathHelper.floor(getMinecart().getPosZ());
|
||||
BlockPos pos = new BlockPos(x, y, z);
|
||||
if (getMinecart().world.getBlockState(pos.down()).func_235714_a_(BlockTags.RAILS)) pos = pos.down();
|
||||
if (getMinecart().world.getBlockState(pos.down()).isIn(BlockTags.RAILS)) pos = pos.down();
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public interface IForgeStructure
|
||||
default boolean getDefaultRestrictsSpawnsToInside()
|
||||
{
|
||||
//The Pillager Outpost and Ocean Monument check the full structure by default instead of limiting themselves to being within the structure's bounds
|
||||
return getStructure() != Structure.field_236366_b_ && getStructure() != Structure.field_236376_l_;
|
||||
return getStructure() != Structure.PILLAGER_OUTPOST && getStructure() != Structure.MONUMENT;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ public interface IForgeTagBuilder<T>
|
||||
default TagsProvider.Builder<T> addTags(ITag.INamedTag<T>... values) {
|
||||
TagsProvider.Builder<T> builder = getBuilder();
|
||||
for (ITag.INamedTag<T> value : values) {
|
||||
builder.func_240531_a_(value);
|
||||
builder.addTag(value);
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
@@ -44,7 +44,7 @@ public interface IForgeTagBuilder<T>
|
||||
default TagsProvider.Builder<T> add(RegistryKey<T>... keys) {
|
||||
TagsProvider.Builder<T> builder = getBuilder();
|
||||
for (RegistryKey<T> key : keys) {
|
||||
builder.getInternalBuilder().func_232961_a_(key.func_240901_a_(), getBuilder().getModID());
|
||||
builder.getInternalBuilder().addItemEntry(key.getLocation(), getBuilder().getModID());
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ public interface IForgeTileEntity extends ICapabilitySerializable<CompoundNBT>
|
||||
// @Override TODO re-evaluate
|
||||
default void deserializeNBT(BlockState state, CompoundNBT nbt)
|
||||
{
|
||||
getTileEntity().func_230337_a_(state, nbt);
|
||||
getTileEntity().read(state, nbt);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,7 +82,7 @@ public interface IForgeTileEntity extends ICapabilitySerializable<CompoundNBT>
|
||||
*/
|
||||
default void handleUpdateTag(BlockState state, CompoundNBT tag)
|
||||
{
|
||||
getTileEntity().func_230337_a_(state, tag);
|
||||
getTileEntity().read(state, tag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -82,7 +82,7 @@ public final class Clips
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_176610_l()
|
||||
public String getString()
|
||||
{
|
||||
return "identity";
|
||||
}
|
||||
@@ -416,7 +416,7 @@ public final class Clips
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_176610_l()
|
||||
public String getString()
|
||||
{
|
||||
return clipName;
|
||||
}
|
||||
@@ -475,7 +475,7 @@ public final class Clips
|
||||
// IdentityClip + ClipReference
|
||||
if(clip instanceof IStringSerializable)
|
||||
{
|
||||
out.value("#" + ((IStringSerializable)clip).func_176610_l());
|
||||
out.value("#" + ((IStringSerializable)clip).getString());
|
||||
return;
|
||||
}
|
||||
else if(clip instanceof TimeClip)
|
||||
|
||||
@@ -112,7 +112,7 @@ public class BlockSnapshot
|
||||
@Nullable
|
||||
public TileEntity getTileEntity()
|
||||
{
|
||||
return getNbt() != null ? TileEntity.func_235657_b_(getReplacedBlock(), getNbt()) : null;
|
||||
return getNbt() != null ? TileEntity.readTileEntity(getReplacedBlock(), getNbt()) : null;
|
||||
}
|
||||
|
||||
public boolean restore()
|
||||
@@ -155,7 +155,7 @@ public class BlockSnapshot
|
||||
te = world.getTileEntity(pos);
|
||||
if (te != null)
|
||||
{
|
||||
te.func_230337_a_(getReplacedBlock(), getNbt());
|
||||
te.read(getReplacedBlock(), getNbt());
|
||||
te.markDirty();
|
||||
}
|
||||
}
|
||||
@@ -200,7 +200,7 @@ public class BlockSnapshot
|
||||
{
|
||||
this.toString =
|
||||
"BlockSnapshot[" +
|
||||
"World:" + this.dim.func_240901_a_() + ',' +
|
||||
"World:" + this.dim.getLocation() + ',' +
|
||||
"Pos: " + this.pos + ',' +
|
||||
"State: " + this.block + ',' +
|
||||
"Flags: " + this.flags + ',' +
|
||||
|
||||
@@ -48,9 +48,9 @@ public class FakePlayer extends ServerPlayerEntity
|
||||
}
|
||||
|
||||
@Override public Vector3d getPositionVec(){ return new Vector3d(0, 0, 0); }
|
||||
@Override public BlockPos func_233580_cy_(){ return BlockPos.ZERO; }
|
||||
@Override public BlockPos getPosition(){ return BlockPos.ZERO; }
|
||||
@Override public void sendStatusMessage(ITextComponent chatComponent, boolean actionBar){}
|
||||
@Override public void sendMessage(ITextComponent component, UUID p_145747_2_) {}
|
||||
@Override public void sendMessage(ITextComponent component, UUID senderUUID) {}
|
||||
@Override public void addStat(Stat par1StatBase, int par2){}
|
||||
//@Override public void openGui(Object mod, int modGuiId, World world, int x, int y, int z){}
|
||||
@Override public boolean isInvulnerableTo(DamageSource source){ return true; }
|
||||
|
||||
@@ -47,10 +47,10 @@ public class ReverseTagWrapper<T>
|
||||
public Set<ResourceLocation> getTagNames()
|
||||
{
|
||||
ITagCollection<T> collection = colSupplier.get();
|
||||
if (cache == null || colCache != collection.func_241833_a()) // Identity equals.
|
||||
if (cache == null || colCache != collection.getIDTagMap()) // Identity equals.
|
||||
{
|
||||
this.cache = Collections.unmodifiableSet(new HashSet<>(collection.getOwningTags(target)));
|
||||
this.colCache = collection.func_241833_a();
|
||||
this.colCache = collection.getIDTagMap();
|
||||
}
|
||||
return this.cache;
|
||||
}
|
||||
|
||||
@@ -37,26 +37,26 @@ public class BiomeGenerationSettingsBuilder extends BiomeGenerationSettings.Buil
|
||||
{
|
||||
public BiomeGenerationSettingsBuilder(BiomeGenerationSettings orig)
|
||||
{
|
||||
field_242504_a = Optional.of(orig.func_242500_d());
|
||||
orig.getCarvingStages().forEach(k -> field_242505_b.put(k, new ArrayList<>(orig.func_242489_a(k))));
|
||||
orig.func_242498_c().forEach(l -> field_242506_c.add(new ArrayList<>(l)));
|
||||
field_242507_d.addAll(orig.func_242487_a());
|
||||
surfaceBuilder = Optional.of(orig.getSurfaceBuilder());
|
||||
orig.getCarvingStages().forEach(k -> carvers.put(k, new ArrayList<>(orig.getCarvers(k))));
|
||||
orig.getFeatures().forEach(l -> features.add(new ArrayList<>(l)));
|
||||
structures.addAll(orig.getStructures());
|
||||
}
|
||||
|
||||
public List<Supplier<ConfiguredFeature<?, ?>>> getFeatures(GenerationStage.Decoration stage) {
|
||||
func_242509_a(stage.ordinal());
|
||||
return field_242506_c.get(stage.ordinal());
|
||||
populateStageEntries(stage.ordinal());
|
||||
return features.get(stage.ordinal());
|
||||
}
|
||||
|
||||
public Optional<Supplier<ConfiguredSurfaceBuilder<?>>> getSurfaceBuilder() {
|
||||
return field_242504_a;
|
||||
return surfaceBuilder;
|
||||
}
|
||||
|
||||
public List<Supplier<ConfiguredCarver<?>>> getCarvers(GenerationStage.Carving stage) {
|
||||
return field_242505_b.computeIfAbsent(stage, key -> new ArrayList<>());
|
||||
return carvers.computeIfAbsent(stage, key -> new ArrayList<>());
|
||||
}
|
||||
|
||||
public List<Supplier<StructureFeature<?, ?>>> getStructures() {
|
||||
return field_242507_d;
|
||||
return structures;
|
||||
}
|
||||
}
|
||||
@@ -31,18 +31,18 @@ import net.minecraft.world.biome.MobSpawnInfo;
|
||||
|
||||
public class MobSpawnInfoBuilder extends MobSpawnInfo.Builder
|
||||
{
|
||||
private final Set<EntityClassification> typesView = Collections.unmodifiableSet(this.field_242567_a.keySet());
|
||||
private final Set<EntityType<?>> costView = Collections.unmodifiableSet(this.field_242568_b.keySet());
|
||||
private final Set<EntityClassification> typesView = Collections.unmodifiableSet(this.spawners.keySet());
|
||||
private final Set<EntityType<?>> costView = Collections.unmodifiableSet(this.spawnCosts.keySet());
|
||||
|
||||
public MobSpawnInfoBuilder(MobSpawnInfo orig)
|
||||
{
|
||||
orig.getSpawnerTypes().forEach(k -> {
|
||||
field_242567_a.get(k).clear();
|
||||
field_242567_a.get(k).addAll(new java.util.ArrayList<>(orig.func_242559_a(k)));
|
||||
spawners.get(k).clear();
|
||||
spawners.get(k).addAll(new java.util.ArrayList<>(orig.getSpawners(k)));
|
||||
});
|
||||
orig.getEntityTypes().forEach(k -> field_242568_b.put(k, orig.func_242558_a(k)));
|
||||
field_242569_c = orig.func_242557_a();
|
||||
field_242570_d = orig.func_242562_b();
|
||||
orig.getEntityTypes().forEach(k -> spawnCosts.put(k, orig.getSpawnCost(k)));
|
||||
creatureSpawnProbability = orig.getCreatureSpawnProbability();
|
||||
validSpawnBiomeForPlayer = orig.isValidSpawnBiomeForPlayer();
|
||||
}
|
||||
|
||||
public Set<EntityClassification> getSpawnerTypes()
|
||||
@@ -52,7 +52,7 @@ public class MobSpawnInfoBuilder extends MobSpawnInfo.Builder
|
||||
|
||||
public List<MobSpawnInfo.Spawners> getSpawner(EntityClassification type)
|
||||
{
|
||||
return this.field_242567_a.get(type);
|
||||
return this.spawners.get(type);
|
||||
}
|
||||
|
||||
public Set<EntityType<?>> getEntityTypes()
|
||||
@@ -63,17 +63,17 @@ public class MobSpawnInfoBuilder extends MobSpawnInfo.Builder
|
||||
@Nullable
|
||||
public MobSpawnInfo.SpawnCosts getCost(EntityType<?> type)
|
||||
{
|
||||
return this.field_242568_b.get(type);
|
||||
return this.spawnCosts.get(type);
|
||||
}
|
||||
|
||||
public float getProbability()
|
||||
{
|
||||
return this.field_242569_c;
|
||||
return this.creatureSpawnProbability;
|
||||
}
|
||||
|
||||
public MobSpawnInfoBuilder disablePlayerSpawn()
|
||||
{
|
||||
this.field_242570_d = false;
|
||||
this.validSpawnBiomeForPlayer = false;
|
||||
return this;
|
||||
}
|
||||
}
|
||||
@@ -53,14 +53,14 @@ public class StructureSpawnManager
|
||||
// then we have the same behavior as vanilla as vanilla checks, swamp huts, pillager outposts, ocean monuments, and nether fortresses in
|
||||
// that order.
|
||||
Map<Structure<?>, StructureSpawnInfo> structuresWithSpawns = new LinkedHashMap<>();
|
||||
gatherEntitySpawns(structuresWithSpawns, Structure.field_236374_j_);
|
||||
gatherEntitySpawns(structuresWithSpawns, Structure.field_236366_b_);
|
||||
gatherEntitySpawns(structuresWithSpawns, Structure.field_236376_l_);
|
||||
gatherEntitySpawns(structuresWithSpawns, Structure.field_236378_n_);
|
||||
gatherEntitySpawns(structuresWithSpawns, Structure.SWAMP_HUT);
|
||||
gatherEntitySpawns(structuresWithSpawns, Structure.PILLAGER_OUTPOST);
|
||||
gatherEntitySpawns(structuresWithSpawns, Structure.MONUMENT);
|
||||
gatherEntitySpawns(structuresWithSpawns, Structure.FORTRESS);
|
||||
for (Structure<?> structure : ForgeRegistries.STRUCTURE_FEATURES.getValues())
|
||||
{
|
||||
if (structure != Structure.field_236374_j_ && structure != Structure.field_236366_b_ && structure != Structure.field_236376_l_ &&
|
||||
structure != Structure.field_236378_n_)
|
||||
if (structure != Structure.SWAMP_HUT && structure != Structure.PILLAGER_OUTPOST && structure != Structure.MONUMENT &&
|
||||
structure != Structure.FORTRESS)
|
||||
{
|
||||
//If we didn't already gather the spawns already to ensure we do vanilla ones already
|
||||
// gather the spawns for this structure
|
||||
@@ -99,7 +99,7 @@ public class StructureSpawnManager
|
||||
Structure<?> structure = entry.getKey();
|
||||
StructureSpawnInfo spawnInfo = entry.getValue();
|
||||
//Note: We check if the structure has spawns for a type first before looking at the world as it should be a cheaper check
|
||||
if (spawnInfo.spawns.containsKey(classification) && structureManager.func_235010_a_(pos, spawnInfo.insideOnly, structure).isValid())
|
||||
if (spawnInfo.spawns.containsKey(classification) && structureManager.getStructureStart(pos, spawnInfo.insideOnly, structure).isValid())
|
||||
return spawnInfo.spawns.get(classification);
|
||||
}
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user