Update forge mappings to 20201028-1.16.3 (#7435)

This commit is contained in:
David Quintana 2020-10-29 01:11:57 +01:00 committed by GitHub
parent 6e0e67b14d
commit 53eedb0f10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
93 changed files with 598 additions and 588 deletions

View File

@ -10,7 +10,7 @@ buildscript {
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.179'
classpath 'net.minecraftforge.gradle:ForgeGradle:3.0.187'
classpath 'org.ow2.asm:asm:7.2'
classpath 'org.ow2.asm:asm-tree:7.2'
}
@ -53,9 +53,9 @@ ext {
]
}
MAPPING_CHANNEL = 'snapshot'
MAPPING_VERSION = '20200514-1.16.3'
MAPPING_VERSION = '20201028-1.16.3'
MC_VERSION = '1.16.3'
MCP_VERSION = '20200911.084530'
MCP_VERSION = '20201025.185957'
}
project(':mcp') {

View File

@ -20,7 +20,7 @@
+ * flower pots from altering vanilla behavior.
+ *
+ * @param emptyPot The empty pot for this pot, or null for self.
+ * @param p_i48395_1_ The flower block.
+ * @param block The flower block.
+ * @param properties
+ */
+ public FlowerPotBlock(@javax.annotation.Nullable java.util.function.Supplier<FlowerPotBlock> emptyPot, java.util.function.Supplier<? extends Block> p_i48395_1_, AbstractBlock.Properties properties) {

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/network/rcon/ClientThread.java
+++ b/net/minecraft/network/rcon/ClientThread.java
@@ -115,13 +115,14 @@
@@ -116,13 +116,14 @@
}
private void func_72655_a(int p_72655_1_, String p_72655_2_) throws IOException {

View File

@ -19,7 +19,7 @@
+ return add(new TagRegistry.OptionalNamedTag<>(key, defaults));
+ }
+
+ /** Call via ForgeTagHandler#makeWrapperTag to avoid any exceptions due to calling this after it is safe to call {@link #func_232937_a_(String)} */
+ /** Call via ForgeTagHandler#makeWrapperTag to avoid any exceptions due to calling this after it is safe to call {@link #createTag(String)} */
+ public static <T> ITag.INamedTag<T> createDelayedTag(ResourceLocation tagRegistry, ResourceLocation name) {
+ return delayedAdd(tagRegistry, new TagRegistry.NamedTag<>(name));
+ }

View File

@ -17,7 +17,7 @@
+ throw new IllegalStateException("Enum not extended");
+ }
+
+ public static BannerPattern create(String enumName, String fileNameIn, String hashNameIn, boolean p_i231861_5_) {
+ public static BannerPattern create(String enumName, String fileNameIn, String hashNameIn, boolean hasPatternItem) {
+ throw new IllegalStateException("Enum not extended");
+ }
+

View File

@ -241,10 +241,10 @@ public class ForgeHooksClient
if (status == BETA || status == BETA_OUTDATED)
{
// render a warning at the top of the screen,
ITextComponent line = new TranslationTextComponent("forge.update.beta.1", TextFormatting.RED, TextFormatting.RESET).func_240699_a_(TextFormatting.RED);
AbstractGui.func_238472_a_(mStack, font, line, width / 2, 4 + (0 * (font.FONT_HEIGHT + 1)), -1);
ITextComponent line = new TranslationTextComponent("forge.update.beta.1", TextFormatting.RED, TextFormatting.RESET).mergeStyle(TextFormatting.RED);
AbstractGui.drawCenteredString(mStack, font, line, width / 2, 4 + (0 * (font.FONT_HEIGHT + 1)), -1);
line = new TranslationTextComponent("forge.update.beta.2");
AbstractGui.func_238472_a_(mStack, font, line, width / 2, 4 + (1 * (font.FONT_HEIGHT + 1)), -1);
AbstractGui.drawCenteredString(mStack, font, line, width / 2, 4 + (1 * (font.FONT_HEIGHT + 1)), -1);
}
String line = null;
@ -280,7 +280,7 @@ public class ForgeHooksClient
public static void drawScreen(Screen screen, MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
{
if (!MinecraftForge.EVENT_BUS.post(new GuiScreenEvent.DrawScreenEvent.Pre(screen, mStack, mouseX, mouseY, partialTicks)))
screen.func_230430_a_(mStack, mouseX, mouseY, partialTicks);
screen.render(mStack, mouseX, mouseY, partialTicks);
MinecraftForge.EVENT_BUS.post(new GuiScreenEvent.DrawScreenEvent.Post(screen, mStack, mouseX, mouseY, partialTicks));
}
@ -751,7 +751,7 @@ public class ForgeHooksClient
IVertexBuilder ivertexbuilder;
if (fabulous)
{
ivertexbuilder = ItemRenderer.func_239391_c_(bufferIn, rendertype, true, itemStackIn.hasEffect());
ivertexbuilder = ItemRenderer.getEntityGlintVertexBuilder(bufferIn, rendertype, true, itemStackIn.hasEffect());
} else {
ivertexbuilder = ItemRenderer.getBuffer(bufferIn, rendertype, true, itemStackIn.hasEffect());
}

View File

@ -195,9 +195,9 @@ public enum ForgeRenderTypes
return makeType("forge_item_entity_cutout_mipped", DefaultVertexFormats.ENTITY, 7, 256, true, false, rendertype$state);
}
public static RenderType layeredItemTranslucent(ResourceLocation p_239268_0_) {
public static RenderType layeredItemTranslucent(ResourceLocation locationIn) {
RenderType.State rendertype$state = RenderType.State.getBuilder()
.texture(new RenderState.TextureState(p_239268_0_, false, false))
.texture(new RenderState.TextureState(locationIn, false, false))
.transparency(TRANSLUCENT_TRANSPARENCY)
.diffuseLighting(DIFFUSE_LIGHTING_ENABLED)
.alpha(DEFAULT_ALPHA)

View File

@ -64,7 +64,7 @@ public class ClientChatReceivedEvent extends Event
/**
* The UUID of the player or entity that sent this message, or null if not known.
* This will be equal to {@link net.minecraft.util.Util#field_240973_b_} for system messages.
* This will be equal to {@link net.minecraft.util.Util#DUMMY_UUID} for system messages.
*/
@Nullable
public UUID getSenderUUID()

View File

@ -34,7 +34,7 @@ public class FOVUpdateEvent extends Event
{
this.entity = entity;
this.fov = fov;
this.setNewfov(MathHelper.lerp(Minecraft.getInstance().gameSettings.field_243227_aN, 1.0F, fov));
this.setNewfov(MathHelper.lerp(Minecraft.getInstance().gameSettings.fovScaleEffect, 1.0F, fov));
}
public PlayerEntity getEntity()

View File

@ -106,7 +106,7 @@ public class ForgeIngameGui extends IngameGui
}
@Override
public void func_238445_a_(MatrixStack mStack, float partialTicks)
public void renderIngameGui(MatrixStack mStack, float partialTicks)
{
this.scaledWidth = this.mc.getMainWindow().getScaledWidth();
this.scaledHeight = this.mc.getMainWindow().getScaledHeight();
@ -146,12 +146,12 @@ public class ForgeIngameGui extends IngameGui
}
else if (!this.mc.gameSettings.hideGUI)
{
if (renderHotbar) func_238443_a_(partialTicks, mStack);
if (renderHotbar) renderHotbar(partialTicks, mStack);
}
if (!this.mc.gameSettings.hideGUI) {
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
func_230926_e_(-90);
setBlitOffset(-90);
rand.setSeed((long)(ticks * 312871));
if (renderCrosshairs) func_238456_d_(mStack);
@ -169,7 +169,7 @@ public class ForgeIngameGui extends IngameGui
if (renderJumpBar)
{
func_238446_a_(mStack, this.scaledWidth / 2 - 91);
renderHorseJumpBar(mStack, this.scaledWidth / 2 - 91);
}
else if (renderExperiance)
{
@ -186,7 +186,7 @@ public class ForgeIngameGui extends IngameGui
renderHUDText(this.scaledWidth, this.scaledHeight, mStack);
renderFPSGraph(mStack);
func_238444_a_(mStack);
renderPotionIcons(mStack);
if (!mc.gameSettings.hideGUI) {
renderRecordOverlay(this.scaledWidth, this.scaledHeight, partialTicks, mStack);
renderSubtitles(mStack);
@ -226,7 +226,7 @@ public class ForgeIngameGui extends IngameGui
protected void func_238456_d_(MatrixStack mStack)
{
if (pre(CROSSHAIRS, mStack)) return;
bind(AbstractGui.field_230665_h_);
bind(AbstractGui.GUI_ICONS_LOCATION);
RenderSystem.enableBlend();
RenderSystem.enableAlphaTest();
super.func_238456_d_(mStack);
@ -234,10 +234,10 @@ public class ForgeIngameGui extends IngameGui
}
@Override
protected void func_238444_a_(MatrixStack mStack)
protected void renderPotionIcons(MatrixStack mStack)
{
if (pre(POTION_ICONS, mStack)) return;
super.func_238444_a_(mStack);
super.renderPotionIcons(mStack);
post(POTION_ICONS, mStack);
}
@ -251,7 +251,7 @@ public class ForgeIngameGui extends IngameGui
protected void renderBossHealth(MatrixStack mStack)
{
if (pre(BOSSHEALTH, mStack)) return;
bind(AbstractGui.field_230665_h_);
bind(AbstractGui.GUI_ICONS_LOCATION);
RenderSystem.defaultBlendFunc();
mc.getProfiler().startSection("bossHealth");
RenderSystem.enableBlend();
@ -283,7 +283,7 @@ public class ForgeIngameGui extends IngameGui
ItemStack itemstack = this.mc.player.inventory.armorItemInSlot(3);
if (this.mc.gameSettings.func_243230_g().func_243192_a() && !itemstack.isEmpty())
if (this.mc.gameSettings.getPointOfView().func_243192_a() && !itemstack.isEmpty())
{
Item item = itemstack.getItem();
if (item == Blocks.CARVED_PUMPKIN.asItem())
@ -313,15 +313,15 @@ public class ForgeIngameGui extends IngameGui
{
if (i < level)
{
func_238474_b_(mStack, left, top, 34, 9, 9, 9);
blit(mStack, left, top, 34, 9, 9, 9);
}
else if (i == level)
{
func_238474_b_(mStack, left, top, 25, 9, 9, 9);
blit(mStack, left, top, 25, 9, 9, 9);
}
else if (i > level)
{
func_238474_b_(mStack, left, top, 16, 9, 9, 9);
blit(mStack, left, top, 16, 9, 9, 9);
}
left += 8;
}
@ -349,7 +349,7 @@ public class ForgeIngameGui extends IngameGui
}
@Override
protected void func_238443_a_(float partialTicks, MatrixStack mStack)
protected void renderHotbar(float partialTicks, MatrixStack mStack)
{
if (pre(HOTBAR, mStack)) return;
@ -359,7 +359,7 @@ public class ForgeIngameGui extends IngameGui
}
else
{
super.func_238443_a_(partialTicks, mStack);
super.renderHotbar(partialTicks, mStack);
}
post(HOTBAR, mStack);
@ -382,7 +382,7 @@ public class ForgeIngameGui extends IngameGui
for (int i = 0; i < full + partial; ++i)
{
func_238474_b_(mStack, left - i * 8 - 9, top, (i < full ? 16 : 25), 18, 9, 9);
blit(mStack, left - i * 8 - 9, top, (i < full ? 16 : 25), 18, 9, 9);
}
right_height += 10;
}
@ -394,7 +394,7 @@ public class ForgeIngameGui extends IngameGui
public void renderHealth(int width, int height, MatrixStack mStack)
{
bind(field_230665_h_);
bind(GUI_ICONS_LOCATION);
if (pre(HEALTH, mStack)) return;
mc.getProfiler().startSection("health");
RenderSystem.enableBlend();
@ -424,7 +424,7 @@ public class ForgeIngameGui extends IngameGui
this.playerHealth = health;
int healthLast = this.lastPlayerHealth;
ModifiableAttributeInstance attrMaxHealth = player.getAttribute(Attributes.field_233818_a_);
ModifiableAttributeInstance attrMaxHealth = player.getAttribute(Attributes.MAX_HEALTH);
float healthMax = (float)attrMaxHealth.getValue();
float absorb = MathHelper.ceil(player.getAbsorptionAmount());
@ -461,35 +461,35 @@ public class ForgeIngameGui extends IngameGui
if (health <= 4) y += rand.nextInt(2);
if (i == regen) y -= 2;
func_238474_b_(mStack, x, y, BACKGROUND, TOP, 9, 9);
blit(mStack, x, y, BACKGROUND, TOP, 9, 9);
if (highlight)
{
if (i * 2 + 1 < healthLast)
func_238474_b_(mStack, x, y, MARGIN + 54, TOP, 9, 9); //6
blit(mStack, x, y, MARGIN + 54, TOP, 9, 9); //6
else if (i * 2 + 1 == healthLast)
func_238474_b_(mStack, x, y, MARGIN + 63, TOP, 9, 9); //7
blit(mStack, x, y, MARGIN + 63, TOP, 9, 9); //7
}
if (absorbRemaining > 0.0F)
{
if (absorbRemaining == absorb && absorb % 2.0F == 1.0F)
{
func_238474_b_(mStack, x, y, MARGIN + 153, TOP, 9, 9); //17
blit(mStack, x, y, MARGIN + 153, TOP, 9, 9); //17
absorbRemaining -= 1.0F;
}
else
{
func_238474_b_(mStack, x, y, MARGIN + 144, TOP, 9, 9); //16
blit(mStack, x, y, MARGIN + 144, TOP, 9, 9); //16
absorbRemaining -= 2.0F;
}
}
else
{
if (i * 2 + 1 < health)
func_238474_b_(mStack, x, y, MARGIN + 36, TOP, 9, 9); //4
blit(mStack, x, y, MARGIN + 36, TOP, 9, 9); //4
else if (i * 2 + 1 == health)
func_238474_b_(mStack, x, y, MARGIN + 45, TOP, 9, 9); //5
blit(mStack, x, y, MARGIN + 45, TOP, 9, 9); //5
}
}
@ -533,12 +533,12 @@ public class ForgeIngameGui extends IngameGui
y = top + (rand.nextInt(3) - 1);
}
func_238474_b_(mStack, x, y, 16 + background * 9, 27, 9, 9);
blit(mStack, x, y, 16 + background * 9, 27, 9, 9);
if (idx < level)
func_238474_b_(mStack, x, y, icon + 36, 27, 9, 9);
blit(mStack, x, y, icon + 36, 27, 9, 9);
else if (idx == level)
func_238474_b_(mStack, x, y, icon + 45, 27, 9, 9);
blit(mStack, x, y, icon + 45, 27, 9, 9);
}
RenderSystem.disableBlend();
mc.getProfiler().endSection();
@ -561,7 +561,7 @@ public class ForgeIngameGui extends IngameGui
}
int color = (int)(220.0F * opacity) << 24 | 1052704;
func_238467_a_(mStack, 0, 0, width, height, color);
fill(mStack, 0, 0, width, height, color);
RenderSystem.enableAlphaTest();
RenderSystem.enableDepthTest();
mc.getProfiler().endSection();
@ -570,7 +570,7 @@ public class ForgeIngameGui extends IngameGui
protected void renderExperience(int x, MatrixStack mStack)
{
bind(field_230665_h_);
bind(GUI_ICONS_LOCATION);
if (pre(EXPERIENCE, mStack)) return;
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.disableBlend();
@ -586,14 +586,14 @@ public class ForgeIngameGui extends IngameGui
}
@Override
public void func_238446_a_(MatrixStack mStack, int x)
public void renderHorseJumpBar(MatrixStack mStack, int x)
{
bind(field_230665_h_);
bind(GUI_ICONS_LOCATION);
if (pre(JUMPBAR, mStack)) return;
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
RenderSystem.disableBlend();
super.func_238446_a_(mStack, x);
super.renderHorseJumpBar(mStack, x);
RenderSystem.enableBlend();
mc.getProfiler().endSection();
@ -637,8 +637,8 @@ public class ForgeIngameGui extends IngameGui
for (String msg : listL)
{
if (msg == null) continue;
func_238467_a_(mStack, 1, top - 1, 2 + fontrenderer.getStringWidth(msg) + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
fontrenderer.func_238421_b_(mStack, msg, 2, top, 14737632);
fill(mStack, 1, top - 1, 2 + fontrenderer.getStringWidth(msg) + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
fontrenderer.drawString(mStack, msg, 2, top, 14737632);
top += fontrenderer.FONT_HEIGHT;
}
@ -648,8 +648,8 @@ public class ForgeIngameGui extends IngameGui
if (msg == null) continue;
int w = fontrenderer.getStringWidth(msg);
int left = width - 2 - w;
func_238467_a_(mStack, left - 1, top - 1, left + w + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
fontrenderer.func_238421_b_(mStack, msg, left, top, 14737632);
fill(mStack, left - 1, top - 1, left + w + 1, top + fontrenderer.FONT_HEIGHT - 1, -1873784752);
fontrenderer.drawString(mStack, msg, left, top, 14737632);
top += fontrenderer.FONT_HEIGHT;
}
}
@ -683,8 +683,8 @@ public class ForgeIngameGui extends IngameGui
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
int color = (animateOverlayMessageColor ? MathHelper.hsvToRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
func_238448_a_(mStack, fontrenderer, -4, fontrenderer.func_238414_a_(overlayMessage), 16777215 | (opacity << 24));
fontrenderer.func_238422_b_(mStack, overlayMessage.func_241878_f(), -fontrenderer.func_238414_a_(overlayMessage) / 2, -4, color | (opacity << 24));
func_238448_a_(mStack, fontrenderer, -4, fontrenderer.getStringPropertyWidth(overlayMessage), 16777215 | (opacity << 24));
fontrenderer.func_238422_b_(mStack, overlayMessage.func_241878_f(), -fontrenderer.getStringPropertyWidth(overlayMessage) / 2, -4, color | (opacity << 24));
RenderSystem.disableBlend();
RenderSystem.popMatrix();
}
@ -719,13 +719,13 @@ public class ForgeIngameGui extends IngameGui
RenderSystem.pushMatrix();
RenderSystem.scalef(4.0F, 4.0F, 4.0F);
int l = opacity << 24 & -16777216;
this.getFontRenderer().func_238407_a_(mStack, this.displayedTitle.func_241878_f(), (float)(-this.getFontRenderer().func_238414_a_(this.displayedTitle) / 2), -10.0F, 16777215 | l);
this.getFontRenderer().func_238407_a_(mStack, this.displayedTitle.func_241878_f(), (float)(-this.getFontRenderer().getStringPropertyWidth(this.displayedTitle) / 2), -10.0F, 16777215 | l);
RenderSystem.popMatrix();
if (this.displayedSubTitle != null)
{
RenderSystem.pushMatrix();
RenderSystem.scalef(2.0F, 2.0F, 2.0F);
this.getFontRenderer().func_238407_a_(mStack, this.displayedSubTitle.func_241878_f(), (float)(-this.getFontRenderer().func_238414_a_(this.displayedSubTitle) / 2), 5.0F, 16777215 | l);
this.getFontRenderer().func_238407_a_(mStack, this.displayedSubTitle.func_241878_f(), (float)(-this.getFontRenderer().getStringPropertyWidth(this.displayedSubTitle) / 2), 5.0F, 16777215 | l);
RenderSystem.popMatrix();
}
RenderSystem.disableBlend();
@ -777,7 +777,7 @@ public class ForgeIngameGui extends IngameGui
Entity tmp = player.getRidingEntity();
if (!(tmp instanceof LivingEntity)) return;
bind(field_230665_h_);
bind(GUI_ICONS_LOCATION);
if (pre(HEALTHMOUNT, mStack)) return;
@ -808,12 +808,12 @@ public class ForgeIngameGui extends IngameGui
for (int i = 0; i < rowCount; ++i)
{
int x = left_align - i * 8 - 9;
func_238474_b_(mStack, x, top, BACKGROUND, 9, 9, 9);
blit(mStack, x, top, BACKGROUND, 9, 9, 9);
if (i * 2 + 1 + heart < health)
func_238474_b_(mStack, x, top, FULL, 9, 9, 9);
blit(mStack, x, top, FULL, 9, 9, 9);
else if (i * 2 + 1 + heart == health)
func_238474_b_(mStack, x, top, HALF, 9, 9, 9);
blit(mStack, x, top, HALF, 9, 9, 9);
}
right_height += 10;

View File

@ -52,7 +52,7 @@ public class NotificationModUpdateScreen extends Screen
}
@Override
public void func_231160_c_()
public void init()
{
if (!hasCheckedForUpdates)
{
@ -66,7 +66,7 @@ public class NotificationModUpdateScreen extends Screen
@SuppressWarnings("deprecation")
@Override
public void func_230430_a_(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
public void render(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
{
if (showNotification == null || !showNotification.shouldDraw() || !FMLConfig.runVersionCheck())
{
@ -76,19 +76,19 @@ public class NotificationModUpdateScreen extends Screen
Minecraft.getInstance().getTextureManager().bindTexture(VERSION_CHECK_ICONS);
RenderSystem.color4f(1, 1, 1, 1);
int x = modButton.field_230690_l_;
int y = modButton.field_230691_m_;
int w = modButton.func_230998_h_();
int h = modButton.func_238483_d_();
int x = modButton.x;
int y = modButton.y;
int w = modButton.getWidth();
int h = modButton.getHeightRealms();
func_238463_a_(mStack, x + w - (h / 2 + 4), y + (h / 2 - 4), showNotification.getSheetOffset() * 8, (showNotification.isAnimated() && ((System.currentTimeMillis() / 800 & 1) == 1)) ? 8 : 0, 8, 8, 64, 16);
blit(mStack, x + w - (h / 2 + 4), y + (h / 2 - 4), showNotification.getSheetOffset() * 8, (showNotification.isAnimated() && ((System.currentTimeMillis() / 800 & 1) == 1)) ? 8 : 0, 8, 8, 64, 16);
}
public static NotificationModUpdateScreen init(MainMenuScreen guiMainMenu, Button modButton)
{
NotificationModUpdateScreen notificationModUpdateScreen = new NotificationModUpdateScreen(modButton);
notificationModUpdateScreen.func_231152_a_(guiMainMenu.getMinecraft(), guiMainMenu.field_230708_k_, guiMainMenu.field_230709_l_);
notificationModUpdateScreen.func_231160_c_();
notificationModUpdateScreen.resize(guiMainMenu.getMinecraft(), guiMainMenu.width, guiMainMenu.height);
notificationModUpdateScreen.init();
return notificationModUpdateScreen;
}

View File

@ -106,7 +106,7 @@ public abstract class ScrollPanel extends FocusableGui implements IRenderable
}
@Override
public boolean func_231043_a_(double mouseX, double mouseY, double scroll)
public boolean mouseScrolled(double mouseX, double mouseY, double scroll)
{
if (scroll != 0)
{
@ -123,15 +123,15 @@ public abstract class ScrollPanel extends FocusableGui implements IRenderable
}
@Override
public boolean func_231047_b_(double mouseX, double mouseY)
public boolean isMouseOver(double mouseX, double mouseY)
{
return mouseX >= this.left && mouseX <= this.left + this.width &&
mouseY >= this.top && mouseY <= this.bottom;
}
@Override
public boolean func_231044_a_(double mouseX, double mouseY, int button) {
if (super.func_231044_a_(mouseX, mouseY, button))
public boolean mouseClicked(double mouseX, double mouseY, int button) {
if (super.mouseClicked(mouseX, mouseY, button))
return true;
this.scrolling = button == 0 && mouseX >= barLeft && mouseX < barLeft + barWidth;
@ -148,8 +148,8 @@ public abstract class ScrollPanel extends FocusableGui implements IRenderable
}
@Override
public boolean func_231048_c_(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) {
if (super.func_231048_c_(p_mouseReleased_1_, p_mouseReleased_3_, p_mouseReleased_5_))
public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) {
if (super.mouseReleased(p_mouseReleased_1_, p_mouseReleased_3_, p_mouseReleased_5_))
return true;
boolean ret = this.scrolling;
this.scrolling = false;
@ -169,7 +169,7 @@ public abstract class ScrollPanel extends FocusableGui implements IRenderable
}
@Override
public boolean func_231045_a_(double mouseX, double mouseY, int button, double deltaX, double deltaY)
public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
{
if (this.scrolling)
{
@ -184,7 +184,7 @@ public abstract class ScrollPanel extends FocusableGui implements IRenderable
@SuppressWarnings("deprecation")
@Override
public void func_230430_a_(MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
public void render(MatrixStack matrix, int mouseX, int mouseY, float partialTicks)
{
this.drawBackground();
@ -204,7 +204,7 @@ public abstract class ScrollPanel extends FocusableGui implements IRenderable
{
RenderSystem.disableLighting();
RenderSystem.disableFog();
this.client.getTextureManager().bindTexture(AbstractGui.field_230663_f_);
this.client.getTextureManager().bindTexture(AbstractGui.BACKGROUND_LOCATION);
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
final float texScale = 32.0F;
worldr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
@ -265,7 +265,7 @@ public abstract class ScrollPanel extends FocusableGui implements IRenderable
}
@Override
public List<? extends IGuiEventListener> func_231039_at__()
public List<? extends IGuiEventListener> getEventListeners()
{
return Collections.emptyList();
}

View File

@ -63,7 +63,7 @@ public class BakedItemModel implements IBakedModel
@Override public boolean isAmbientOcclusion() { return true; }
@Override public boolean isGui3d() { return false; }
@Override public boolean func_230044_c_() { return isSideLit; }
@Override public boolean isSideLit() { return isSideLit; }
@Override public boolean isBuiltInRenderer() { return false; }
@Override public TextureAtlasSprite getParticleTexture() { return particle; }
@Override public ItemOverrideList getOverrides() { return overrides; }

View File

@ -70,9 +70,9 @@ public abstract class BakedModelWrapper<T extends IBakedModel> implements IBaked
}
@Override
public boolean func_230044_c_()
public boolean isSideLit()
{
return originalModel.func_230044_c_();
return originalModel.isSideLit();
}
@Override

View File

@ -112,7 +112,7 @@ public class BlockModelConfiguration implements IModelConfiguration
@Override
public boolean isSideLit()
{
return owner.func_230176_c_().func_230178_a_();
return owner.getGuiLight().isSideLit();
}
@Override

View File

@ -100,7 +100,7 @@ public class CompositeModel implements IDynamicBakedModel
}
@Override
public boolean func_230044_c_()
public boolean isSideLit()
{
return isSideLit;
}

View File

@ -259,9 +259,9 @@ public final class DynamicBucketModel implements IModelGeometry<DynamicBucketMod
}
@Override
public IBakedModel func_239290_a_(IBakedModel originalModel, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity)
public IBakedModel getOverrideModel(IBakedModel originalModel, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity)
{
IBakedModel overriden = nested.func_239290_a_(originalModel, stack, world, entity);
IBakedModel overriden = nested.getOverrideModel(originalModel, stack, world, entity);
if (overriden != originalModel) return overriden;
return FluidUtil.getFluidContained(stack)
.map(fluidStack -> {

View File

@ -439,7 +439,7 @@ public final class FluidModel implements IModelGeometry<FluidModel>
}
@Override
public boolean func_230044_c_()
public boolean isSideLit()
{
return false;
}

View File

@ -88,7 +88,7 @@ public class ItemMultiLayerBakedModel implements IDynamicBakedModel
}
@Override
public boolean func_230044_c_()
public boolean isSideLit()
{
return sideLit;
}

View File

@ -182,7 +182,7 @@ public final class MultiLayerModel implements IModelGeometry<MultiLayerModel>
}
@Override
public boolean func_230044_c_()
public boolean isSideLit()
{
return isSideLit;
}
@ -245,7 +245,7 @@ public final class MultiLayerModel implements IModelGeometry<MultiLayerModel>
.put("cutout", RenderType.getCutout())
.put("cutout_mipped", RenderType.getCutoutMipped())
.put("translucent", RenderType.getTranslucent())
.put("tripwire", RenderType.func_241715_r_())
.put("tripwire", RenderType.getTripwire())
.build();
public static final Loader INSTANCE = new Loader();

View File

@ -128,7 +128,7 @@ public class PerspectiveMapWrapper implements IDynamicBakedModel
@Override public boolean isAmbientOcclusion() { return parent.isAmbientOcclusion(); }
@Override public boolean isAmbientOcclusion(BlockState state) { return parent.isAmbientOcclusion(state); }
@Override public boolean isGui3d() { return parent.isGui3d(); }
@Override public boolean func_230044_c_() { return parent.func_230044_c_(); }
@Override public boolean isSideLit() { return parent.isSideLit(); }
@Override public boolean isBuiltInRenderer() { return parent.isBuiltInRenderer(); }
@Override public TextureAtlasSprite getParticleTexture() { return parent.getParticleTexture(); }
@SuppressWarnings("deprecation")
@ -165,9 +165,9 @@ public class PerspectiveMapWrapper implements IDynamicBakedModel
@Nullable
@Override
public IBakedModel func_239290_a_(IBakedModel model, ItemStack stack, @Nullable ClientWorld worldIn, @Nullable LivingEntity entityIn)
public IBakedModel getOverrideModel(IBakedModel model, ItemStack stack, @Nullable ClientWorld worldIn, @Nullable LivingEntity entityIn)
{
model = parent.getOverrides().func_239290_a_(parent, stack, worldIn, entityIn);
model = parent.getOverrides().getOverrideModel(parent, stack, worldIn, entityIn);
return new PerspectiveMapWrapper(model, transforms);
}

View File

@ -176,7 +176,7 @@ public class QuadTransformer
int[] outData = Arrays.copyOf(inData, inData.length);
processVertices(inData, outData);
return new BakedQuad(outData, input.getTintIndex(), input.getFace(), input.func_187508_a(), input.func_239287_f_());
return new BakedQuad(outData, input.getTintIndex(), input.getFace(), input.getSprite(), input.applyDiffuseLighting());
}
/**
@ -208,7 +208,7 @@ public class QuadTransformer
int[] outData = Arrays.copyOf(inData, inData.length);
processVertices(inData, outData);
outputs.add(new BakedQuad(outData, input.getTintIndex(), input.getFace(), input.func_187508_a(), input.func_239287_f_()));
outputs.add(new BakedQuad(outData, input.getTintIndex(), input.getFace(), input.getSprite(), input.applyDiffuseLighting()));
}
return outputs;
}

View File

@ -113,7 +113,7 @@ public class SeparatePerspectiveModel implements IModelGeometry<SeparatePerspect
}
@Override
public boolean func_230044_c_()
public boolean isSideLit()
{
return isSideLit;
}

View File

@ -63,7 +63,7 @@ public final class AnimationItemOverrideList extends ItemOverrideList
@SuppressWarnings("resource")
@Override
public IBakedModel func_239290_a_(IBakedModel originalModel, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity)
public IBakedModel getOverrideModel(IBakedModel originalModel, ItemStack stack, @Nullable ClientWorld world, @Nullable LivingEntity entity)
{
return stack.getCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null)
.map(asm ->
@ -82,6 +82,6 @@ public final class AnimationItemOverrideList extends ItemOverrideList
})
// TODO where should uvlock data come from?
.map(state -> model.bakeModel(bakery, bakedTextureGetter, new ModelTransformComposition(state, this.state), modelLoc))
.orElseGet(() -> super.func_239290_a_(originalModel, stack, world, entity));
.orElseGet(() -> super.getOverrideModel(originalModel, stack, world, entity));
}
}

View File

@ -800,7 +800,7 @@ public enum B3DLoader implements ISelectiveResourceReloadListener
}
@Override
public boolean func_230044_c_()
public boolean isSideLit()
{
return isSideLit;
}

View File

@ -425,10 +425,10 @@ public abstract class BlockStateProvider implements IDataProvider {
}
public static final ImmutableMap<Direction, Property<WallHeight>> WALL_PROPS = ImmutableMap.<Direction, Property<WallHeight>>builder()
.put(Direction.EAST, BlockStateProperties.field_235908_S_)
.put(Direction.NORTH, BlockStateProperties.field_235909_T_)
.put(Direction.SOUTH, BlockStateProperties.field_235910_U_)
.put(Direction.WEST, BlockStateProperties.field_235911_V_)
.put(Direction.EAST, BlockStateProperties.WALL_HEIGHT_EAST)
.put(Direction.NORTH, BlockStateProperties.WALL_HEIGHT_NORTH)
.put(Direction.SOUTH, BlockStateProperties.WALL_HEIGHT_SOUTH)
.put(Direction.WEST, BlockStateProperties.WALL_HEIGHT_WEST)
.build();
public void wallBlock(WallBlock block, ModelFile post, ModelFile side, ModelFile sideTall) {

View File

@ -249,7 +249,7 @@ public class ModelBuilder<T extends ModelBuilder<T>> extends ModelFile {
if (part.partRotation != null) {
JsonObject rotation = new JsonObject();
rotation.add("origin", serializeVector3f(part.partRotation.origin));
rotation.addProperty("axis", part.partRotation.axis.func_176610_l());
rotation.addProperty("axis", part.partRotation.axis.getString());
rotation.addProperty("angle", part.partRotation.angle);
if (part.partRotation.rescale) {
rotation.addProperty("rescale", part.partRotation.rescale);
@ -272,7 +272,7 @@ public class ModelBuilder<T extends ModelBuilder<T>> extends ModelFile {
faceObj.add("uv", new Gson().toJsonTree(face.blockFaceUV.uvs));
}
if (face.cullFace != null) {
faceObj.addProperty("cullface", face.cullFace.func_176610_l());
faceObj.addProperty("cullface", face.cullFace.getString());
}
if (face.blockFaceUV.rotation != 0) {
faceObj.addProperty("rotation", face.blockFaceUV.rotation);
@ -280,7 +280,7 @@ public class ModelBuilder<T extends ModelBuilder<T>> extends ModelFile {
if (face.tintIndex != -1) {
faceObj.addProperty("tintindex", face.tintIndex);
}
faces.add(dir.func_176610_l(), faceObj);
faces.add(dir.getString(), faceObj);
}
if (!part.mapFaces.isEmpty()) {
partObj.add("faces", faces);

View File

@ -87,13 +87,13 @@ public class LightUtil
public static void putBakedQuad(IVertexConsumer consumer, BakedQuad quad)
{
consumer.setTexture(quad.func_187508_a());
consumer.setTexture(quad.getSprite());
consumer.setQuadOrientation(quad.getFace());
if(quad.hasTintIndex())
{
consumer.setQuadTint(quad.getTintIndex());
}
consumer.setApplyDiffuseLighting(quad.func_239287_f_());
consumer.setApplyDiffuseLighting(quad.applyDiffuseLighting());
float[] data = new float[4];
VertexFormat formatFrom = consumer.getVertexFormat();
VertexFormat formatTo = DefaultVertexFormats.BLOCK;

View File

@ -51,7 +51,7 @@ public enum KeyModifier {
@Override
public boolean isActive(@Nullable IKeyConflictContext conflictContext)
{
return Screen.func_231172_r_();
return Screen.hasControlDown();
}
@Override
@ -71,7 +71,7 @@ public enum KeyModifier {
@Override
public boolean isActive(@Nullable IKeyConflictContext conflictContext)
{
return Screen.func_231173_s_();
return Screen.hasShiftDown();
}
@Override
@ -90,7 +90,7 @@ public enum KeyModifier {
@Override
public boolean isActive(@Nullable IKeyConflictContext conflictContext)
{
return Screen.func_231174_t_();
return Screen.hasAltDown();
}
@Override

View File

@ -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());

View File

@ -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));
}
}
}

View File

@ -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()

View File

@ -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

View File

@ -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);
}
}

View File

@ -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());
}
}

View File

@ -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

View File

@ -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);
}
}

View File

@ -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")

View File

@ -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);

View File

@ -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))

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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;
}
/**

View File

@ -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;
}

View File

@ -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);
}
/**

View File

@ -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)

View File

@ -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 + ',' +

View File

@ -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; }

View File

@ -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;
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;

View File

@ -542,13 +542,13 @@ public class ForgeEventFactory
@OnlyIn(Dist.CLIENT)
public static boolean renderFireOverlay(PlayerEntity player, MatrixStack mat)
{
return renderBlockOverlay(player, mat, OverlayType.FIRE, Blocks.FIRE.getDefaultState(), player.func_233580_cy_());
return renderBlockOverlay(player, mat, OverlayType.FIRE, Blocks.FIRE.getDefaultState(), player.getPosition());
}
@OnlyIn(Dist.CLIENT)
public static boolean renderWaterOverlay(PlayerEntity player, MatrixStack mat)
{
return renderBlockOverlay(player, mat, OverlayType.WATER, Blocks.WATER.getDefaultState(), player.func_233580_cy_());
return renderBlockOverlay(player, mat, OverlayType.WATER, Blocks.WATER.getDefaultState(), player.getPosition());
}
@OnlyIn(Dist.CLIENT)

View File

@ -78,7 +78,7 @@ public class PlayerInteractEvent extends PlayerEvent
public EntityInteractSpecific(PlayerEntity player, Hand hand, Entity target, Vector3d localPos)
{
super(player, hand, target.func_233580_cy_(), null);
super(player, hand, target.getPosition(), null);
this.localPos = localPos;
this.target = target;
}
@ -118,7 +118,7 @@ public class PlayerInteractEvent extends PlayerEvent
public EntityInteract(PlayerEntity player, Hand hand, Entity target)
{
super(player, hand, target.func_233580_cy_(), null);
super(player, hand, target.getPosition(), null);
this.target = target;
}
@ -210,7 +210,7 @@ public class PlayerInteractEvent extends PlayerEvent
{
public RightClickItem(PlayerEntity player, Hand hand)
{
super(player, hand, player.func_233580_cy_(), null);
super(player, hand, player.getPosition(), null);
}
}
@ -223,7 +223,7 @@ public class PlayerInteractEvent extends PlayerEvent
{
public RightClickEmpty(PlayerEntity player, Hand hand)
{
super(player, hand, player.func_233580_cy_(), null);
super(player, hand, player.getPosition(), null);
}
}
@ -297,7 +297,7 @@ public class PlayerInteractEvent extends PlayerEvent
{
public LeftClickEmpty(PlayerEntity player)
{
super(player, Hand.MAIN_HAND, player.func_233580_cy_(), null);
super(player, Hand.MAIN_HAND, player.getPosition(), null);
}
}

View File

@ -37,7 +37,7 @@ import net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent;
* Villagers pick two trades from their trade map, based on their level.
* Villager level is increased by successful trades.
* The map is populated for levels 1-5 (inclusive), so Map#get will never return null for those keys.
* Levels outside of this range do nothing, as specified by {@link VillagerData#func_221128_d(int)} which is called before attempting to level up.
* Levels outside of this range do nothing, as specified by {@link VillagerData#canLevelUp(int)} which is called before attempting to level up.
* To add trades to the merchant, simply add new trades to the list. {@link BasicTrade} provides a default implementation.
*/
public class VillagerTradesEvent extends Event

View File

@ -562,7 +562,7 @@ public class FluidUtil
return false; // Non-air, solid, unreplacable block. We can't put fluid here.
}
if (world.func_230315_m_().func_236040_e_() && fluid.getAttributes().doesVaporize(world, pos, resource))
if (world.getDimensionType().isUltrawarm() && fluid.getAttributes().doesVaporize(world, pos, resource))
{
FluidStack result = fluidSource.drain(resource, IFluidHandler.FluidAction.EXECUTE);
if (!result.isEmpty())

View File

@ -44,9 +44,9 @@ public class TileFluidHandler extends TileEntity
}
@Override
public void func_230337_a_(BlockState state, CompoundNBT tag)
public void read(BlockState state, CompoundNBT tag)
{
super.func_230337_a_(state, tag);
super.read(state, tag);
tank.readFromNBT(tag);
}

View File

@ -29,7 +29,7 @@ public class TextComponentMessageFormatHandler {
public static int handle(final TranslationTextComponent parent, final List<ITextProperties> children, final Object[] formatArgs, final String format) {
try {
StringTextComponent component = new StringTextComponent(ForgeI18n.parseFormat(format, formatArgs));
component.getStyle().func_240717_a_(parent.getStyle());
component.getStyle().mergeStyle(parent.getStyle());
children.add(component);
return format.length();
} catch (IllegalArgumentException ex) {

View File

@ -170,7 +170,7 @@ public class ClientHooks
}
Minecraft.getInstance().getTextureManager().bindTexture(iconSheet);
AbstractGui.func_238466_a_(mStack, x + width - 18, y + 10, 16, 16, 0, idx, 16, 16, 256, 256);
AbstractGui.blit(mStack, x + width - 18, y + 10, 16, 16, 0, idx, 16, 16, 256, 256);
if(relativeMouseX > width - 15 && relativeMouseX < width && relativeMouseY > 10 && relativeMouseY < 26)
//TODO using StringTextComponent here is a hack, we should be using TranslationTextComponents.

View File

@ -103,7 +103,7 @@ public class ClientModLoader
createRunnableWithCatch(()->ModLoader.get().gatherAndInitializeMods(ModWorkManager.syncExecutor(), ModWorkManager.parallelExecutor(), new SpacedRunnable(earlyLoaderGUI::renderTick))).run();
if (error == null) {
ResourcePackLoader.loadResourcePacks(defaultResourcePacks, ClientModLoader::buildPackFinder);
DatapackCodec.field_234880_a_.addModPacks(ResourcePackLoader.getPackNames());
DatapackCodec.VANILLA_CODEC.addModPacks(ResourcePackLoader.getPackNames());
mcResourceManager.addReloadListener(ClientModLoader::onResourceReload);
mcResourceManager.addReloadListener(BrandingControl.resourceManagerReloadListener());
ModelLoaderRegistry.init();
@ -215,7 +215,7 @@ public class ClientModLoader
IModInfo mod = e.getKey().getModInfos().get(0);
if (Objects.equals(mod.getModId(), "minecraft")) continue; // skip the minecraft "mod"
final String name = "mod:" + mod.getModId();
final ResourcePackInfo packInfo = ResourcePackInfo.createResourcePack(name, false, e::getValue, factory, ResourcePackInfo.Priority.BOTTOM, IPackNameDecorator.field_232625_a_);
final ResourcePackInfo packInfo = ResourcePackInfo.createResourcePack(name, false, e::getValue, factory, ResourcePackInfo.Priority.BOTTOM, IPackNameDecorator.PLAIN);
if (packInfo == null) {
// Vanilla only logs an error, instead of propagating, so handle null and warn that something went wrong
ModLoader.get().addWarning(new ModLoadingWarning(mod, ModLoadingStage.ERROR, "fml.modloading.brokenresources", e.getKey()));
@ -231,7 +231,7 @@ public class ClientModLoader
}
final ResourcePackInfo packInfo = ResourcePackInfo.createResourcePack("mod_resources", true, () -> new DelegatingResourcePack("mod_resources", "Mod Resources",
new PackMetadataSection(new TranslationTextComponent("fml.resources.modresources", hiddenPacks.size()), 6),
hiddenPacks), factory, ResourcePackInfo.Priority.BOTTOM, IPackNameDecorator.field_232625_a_);
hiddenPacks), factory, ResourcePackInfo.Priority.BOTTOM, IPackNameDecorator.PLAIN);
consumer.accept(packInfo);
}
}

View File

@ -469,7 +469,7 @@ public class GuiUtils
for (ITextProperties textLine : textLines)
{
int textLineWidth = font.func_238414_a_(textLine);
int textLineWidth = font.getStringPropertyWidth(textLine);
if (textLineWidth > tooltipTextWidth)
tooltipTextWidth = textLineWidth;
}
@ -504,13 +504,13 @@ public class GuiUtils
for (int i = 0; i < textLines.size(); i++)
{
ITextProperties textLine = textLines.get(i);
List<ITextProperties> wrappedLine = font.func_238420_b_().func_238362_b_(textLine, tooltipTextWidth, Style.field_240709_b_);
List<ITextProperties> wrappedLine = font.getCharacterManager().func_238362_b_(textLine, tooltipTextWidth, Style.EMPTY);
if (i == 0)
titleLinesCount = wrappedLine.size();
for (ITextProperties line : wrappedLine)
{
int lineWidth = font.func_238414_a_(line);
int lineWidth = font.getStringPropertyWidth(line);
if (lineWidth > wrappedTooltipWidth)
wrappedTooltipWidth = lineWidth;
wrappedTextLines.add(line);
@ -638,6 +638,6 @@ public class GuiUtils
if (centerX) x += (w - boundsWidth) / 2;
}
AbstractGui.func_238466_a_(mStack, x, y, boundsWidth, boundsHeight, 0.0f,0.0f, rectWidth, rectHeight, rectWidth, rectHeight);
AbstractGui.blit(mStack, x, y, boundsWidth, boundsHeight, 0.0f,0.0f, rectWidth, rectHeight, rectWidth, rectHeight);
}
}

View File

@ -70,72 +70,72 @@ public class LoadingErrorScreen extends ErrorScreen {
}
@Override
public void func_231160_c_()
public void init()
{
super.func_231160_c_();
this.field_230710_m_.clear();
this.field_230705_e_.clear();
super.init();
this.buttons.clear();
this.children.clear();
this.errorHeader = new StringTextComponent(TextFormatting.RED + ForgeI18n.parseMessage("fml.loadingerrorscreen.errorheader", this.modLoadErrors.size()) + TextFormatting.RESET);
this.warningHeader = new StringTextComponent(TextFormatting.YELLOW + ForgeI18n.parseMessage("fml.loadingerrorscreen.warningheader", this.modLoadErrors.size()) + TextFormatting.RESET);
int yOffset = 46;
this.func_230480_a_(new ExtendedButton(50, this.field_230709_l_ - yOffset, this.field_230708_k_ / 2 - 55, 20, new StringTextComponent(ForgeI18n.parseMessage("fml.button.open.mods.folder")), b -> Util.getOSType().openFile(modsDir.toFile())));
this.func_230480_a_(new ExtendedButton(this.field_230708_k_ / 2 + 5, this.field_230709_l_ - yOffset, this.field_230708_k_ / 2 - 55, 20, new StringTextComponent(ForgeI18n.parseMessage("fml.button.open.file", logFile.getFileName())), b -> Util.getOSType().openFile(logFile.toFile())));
this.addButton(new ExtendedButton(50, this.height - yOffset, this.width / 2 - 55, 20, new StringTextComponent(ForgeI18n.parseMessage("fml.button.open.mods.folder")), b -> Util.getOSType().openFile(modsDir.toFile())));
this.addButton(new ExtendedButton(this.width / 2 + 5, this.height - yOffset, this.width / 2 - 55, 20, new StringTextComponent(ForgeI18n.parseMessage("fml.button.open.file", logFile.getFileName())), b -> Util.getOSType().openFile(logFile.toFile())));
if (this.modLoadErrors.isEmpty()) {
this.func_230480_a_(new ExtendedButton(this.field_230708_k_ / 4, this.field_230709_l_ - 24, this.field_230708_k_ / 2, 20, new StringTextComponent(ForgeI18n.parseMessage("fml.button.continue.launch")), b -> {
this.addButton(new ExtendedButton(this.width / 4, this.height - 24, this.width / 2, 20, new StringTextComponent(ForgeI18n.parseMessage("fml.button.continue.launch")), b -> {
ClientHooks.logMissingTextureErrors();
this.field_230706_i_.displayGuiScreen(null);
this.minecraft.displayGuiScreen(null);
}));
} else {
this.func_230480_a_(new ExtendedButton(this.field_230708_k_ / 4, this.field_230709_l_ - 24, this.field_230708_k_ / 2, 20, new StringTextComponent(ForgeI18n.parseMessage("fml.button.open.file", dumpedLocation.getFileName())), b -> Util.getOSType().openFile(dumpedLocation.toFile())));
this.addButton(new ExtendedButton(this.width / 4, this.height - 24, this.width / 2, 20, new StringTextComponent(ForgeI18n.parseMessage("fml.button.open.file", dumpedLocation.getFileName())), b -> Util.getOSType().openFile(dumpedLocation.toFile())));
}
this.entryList = new LoadingEntryList(this, this.modLoadErrors, this.modLoadWarnings);
this.field_230705_e_.add(this.entryList);
this.func_231035_a_(this.entryList);
this.children.add(this.entryList);
this.setListener(this.entryList);
}
@Override
public void func_230430_a_(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
public void render(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
{
this.func_230446_a_(mStack);
this.entryList.func_230430_a_(mStack, mouseX, mouseY, partialTicks);
drawMultiLineCenteredString(mStack, field_230712_o_, this.modLoadErrors.isEmpty() ? warningHeader : errorHeader, this.field_230708_k_ / 2, 10);
this.field_230710_m_.forEach(button -> button.func_230430_a_(mStack, mouseX, mouseY, partialTicks));
this.renderBackground(mStack);
this.entryList.render(mStack, mouseX, mouseY, partialTicks);
drawMultiLineCenteredString(mStack, font, this.modLoadErrors.isEmpty() ? warningHeader : errorHeader, this.width / 2, 10);
this.buttons.forEach(button -> button.render(mStack, mouseX, mouseY, partialTicks));
}
private void drawMultiLineCenteredString(MatrixStack mStack, FontRenderer fr, ITextComponent str, int x, int y) {
for (IReorderingProcessor s : fr.func_238425_b_(str, this.field_230708_k_)) {
for (IReorderingProcessor s : fr.trimStringToWidth(str, this.width)) {
fr.func_238407_a_(mStack, s, (float) (x - fr.func_243245_a(s) / 2.0), y, 0xFFFFFF);
y+=fr.FONT_HEIGHT;
}
}
public static class LoadingEntryList extends ExtendedList<LoadingEntryList.LoadingMessageEntry> {
LoadingEntryList(final LoadingErrorScreen parent, final List<ModLoadingException> errors, final List<ModLoadingWarning> warnings) {
super(parent.field_230706_i_, parent.field_230708_k_, parent.field_230709_l_, 35, parent.field_230709_l_ - 50, 2 * parent.field_230706_i_.fontRenderer.FONT_HEIGHT + 8);
super(parent.minecraft, parent.width, parent.height, 35, parent.height - 50, 2 * parent.minecraft.fontRenderer.FONT_HEIGHT + 8);
boolean both = !errors.isEmpty() && !warnings.isEmpty();
if (both)
func_230513_b_(new LoadingMessageEntry(parent.errorHeader, true));
errors.forEach(e->func_230513_b_(new LoadingMessageEntry(new StringTextComponent(e.formatToString()))));
addEntry(new LoadingMessageEntry(parent.errorHeader, true));
errors.forEach(e->addEntry(new LoadingMessageEntry(new StringTextComponent(e.formatToString()))));
if (both) {
int maxChars = (this.field_230670_d_ - 10) / parent.field_230706_i_.fontRenderer.getStringWidth("-");
func_230513_b_(new LoadingMessageEntry(new StringTextComponent("\n" + Strings.repeat("-", maxChars) + "\n")));
func_230513_b_(new LoadingMessageEntry(parent.warningHeader, true));
int maxChars = (this.width - 10) / parent.minecraft.fontRenderer.getStringWidth("-");
addEntry(new LoadingMessageEntry(new StringTextComponent("\n" + Strings.repeat("-", maxChars) + "\n")));
addEntry(new LoadingMessageEntry(parent.warningHeader, true));
}
warnings.forEach(w->func_230513_b_(new LoadingMessageEntry(new StringTextComponent(w.formatToString()))));
warnings.forEach(w->addEntry(new LoadingMessageEntry(new StringTextComponent(w.formatToString()))));
}
@Override
protected int func_230952_d_()
protected int getScrollbarPosition()
{
return this.getRight() - 6;
}
@Override
public int func_230949_c_()
public int getRowWidth()
{
return this.field_230670_d_;
return this.width;
}
public class LoadingMessageEntry extends ExtendedList.AbstractListEntry<LoadingMessageEntry> {
@ -152,13 +152,13 @@ public class LoadingErrorScreen extends ErrorScreen {
}
@Override
public void func_230432_a_(MatrixStack mStack, int entryIdx, int top, int left, final int entryWidth, final int entryHeight, final int mouseX, final int mouseY, final boolean p_194999_5_, final float partialTicks) {
public void render(MatrixStack mStack, int entryIdx, int top, int left, final int entryWidth, final int entryHeight, final int mouseX, final int mouseY, final boolean p_194999_5_, final float partialTicks) {
FontRenderer font = Minecraft.getInstance().fontRenderer;
final List<IReorderingProcessor> strings = font.func_238425_b_(message, LoadingEntryList.this.field_230670_d_);
final List<IReorderingProcessor> strings = font.trimStringToWidth(message, LoadingEntryList.this.width);
int y = top + 2;
for (int i = 0; i < Math.min(strings.size(), 2); i++) {
if (center)
font.func_238422_b_(mStack, strings.get(i), left + (field_230670_d_) - font.func_243245_a(strings.get(i)) / 2F, y, 0xFFFFFF);
font.func_238422_b_(mStack, strings.get(i), left + (width) - font.func_243245_a(strings.get(i)) / 2F, y, 0xFFFFFF);
else
font.func_238422_b_(mStack, strings.get(i), left + 5, y, 0xFFFFFF);
y += font.FONT_HEIGHT;

View File

@ -167,7 +167,7 @@ public class ModListScreen extends Screen
int maxTextLength = this.width - 12;
if (maxTextLength >= 0)
{
ret.addAll(LanguageMap.getInstance().func_244260_a(field_230712_o_.func_238420_b_().func_238362_b_(chat, maxTextLength, Style.field_240709_b_)));
ret.addAll(LanguageMap.getInstance().func_244260_a(font.getCharacterManager().func_238362_b_(chat, maxTextLength, Style.EMPTY)));
}
}
return ret;
@ -177,7 +177,7 @@ public class ModListScreen extends Screen
public int getContentHeight()
{
int height = 50;
height += (lines.size() * field_230712_o_.FONT_HEIGHT);
height += (lines.size() * font.FONT_HEIGHT);
if (height < this.bottom - this.top - 8)
height = this.bottom - this.top - 8;
return height;
@ -186,7 +186,7 @@ public class ModListScreen extends Screen
@Override
protected int getScrollAmount()
{
return field_230712_o_.FONT_HEIGHT * 3;
return font.FONT_HEIGHT * 3;
}
@Override
@ -207,16 +207,16 @@ public class ModListScreen extends Screen
if (line != null)
{
RenderSystem.enableBlend();
ModListScreen.this.field_230712_o_.func_238407_a_(mStack, line, left + PADDING, relativeY, 0xFFFFFF);
ModListScreen.this.font.func_238407_a_(mStack, line, left + PADDING, relativeY, 0xFFFFFF);
RenderSystem.disableAlphaTest();
RenderSystem.disableBlend();
}
relativeY += field_230712_o_.FONT_HEIGHT;
relativeY += font.FONT_HEIGHT;
}
final Style component = findTextLine(mouseX, mouseY);
if (component!=null) {
ModListScreen.this.func_238653_a_(mStack, component, mouseX, mouseY);
ModListScreen.this.renderComponentHoverEffect(mStack, component, mouseX, mouseY);
}
}
@ -228,26 +228,26 @@ public class ModListScreen extends Screen
if (offset <= 0)
return null;
int lineIdx = (int) (offset / field_230712_o_.FONT_HEIGHT);
int lineIdx = (int) (offset / font.FONT_HEIGHT);
if (lineIdx >= lines.size() || lineIdx < 1)
return null;
IReorderingProcessor line = lines.get(lineIdx-1);
if (line != null)
{
return field_230712_o_.func_238420_b_().func_243239_a(line, mouseX);
return font.getCharacterManager().func_243239_a(line, mouseX);
}
return null;
}
@Override
public boolean func_231044_a_(final double mouseX, final double mouseY, final int button) {
public boolean mouseClicked(final double mouseX, final double mouseY, final int button) {
final Style component = findTextLine((int) mouseX, (int) mouseY);
if (component != null) {
ModListScreen.this.func_230455_a_(component);
ModListScreen.this.handleComponentClicked(component);
return true;
}
return super.func_231044_a_(mouseX, mouseY, button);
return super.mouseClicked(mouseX, mouseY, button);
}
@Override
@ -256,50 +256,50 @@ public class ModListScreen extends Screen
}
@Override
public void func_231160_c_()
public void init()
{
for (ModInfo mod : mods)
{
listWidth = Math.max(listWidth,getFontRenderer().getStringWidth(mod.getDisplayName()) + 10);
listWidth = Math.max(listWidth,getFontRenderer().getStringWidth(MavenVersionStringHelper.artifactVersionToString(mod.getVersion())) + 5);
}
listWidth = Math.max(Math.min(listWidth, field_230708_k_/3), 100);
listWidth = Math.max(Math.min(listWidth, width/3), 100);
listWidth += listWidth % numButtons != 0 ? (numButtons - listWidth % numButtons) : 0;
int modInfoWidth = this.field_230708_k_ - this.listWidth - (PADDING * 3);
int modInfoWidth = this.width - this.listWidth - (PADDING * 3);
int doneButtonWidth = Math.min(modInfoWidth, 200);
int y = this.field_230709_l_ - 20 - PADDING;
this.func_230480_a_(new Button(((listWidth + PADDING + this.field_230708_k_ - doneButtonWidth) / 2), y, doneButtonWidth, 20,
new TranslationTextComponent("gui.done"), b -> ModListScreen.this.func_231175_as__()));
this.func_230480_a_(this.openModsFolderButton = new Button(6, y, this.listWidth, 20,
int y = this.height - 20 - PADDING;
this.addButton(new Button(((listWidth + PADDING + this.width - doneButtonWidth) / 2), y, doneButtonWidth, 20,
new TranslationTextComponent("gui.done"), b -> ModListScreen.this.closeScreen()));
this.addButton(this.openModsFolderButton = new Button(6, y, this.listWidth, 20,
new TranslationTextComponent("fml.menu.mods.openmodsfolder"), b -> Util.getOSType().openFile(FMLPaths.MODSDIR.get().toFile())));
y -= 20 + PADDING;
this.func_230480_a_(this.configButton = new Button(6, y, this.listWidth, 20,
this.addButton(this.configButton = new Button(6, y, this.listWidth, 20,
new TranslationTextComponent("fml.menu.mods.config"), b -> ModListScreen.this.displayModConfig()));
this.configButton.field_230693_o_ = false;
this.configButton.active = false;
y -= 14 + PADDING + 1;
search = new TextFieldWidget(getFontRenderer(), PADDING + 1, y, listWidth - 2, 14, new TranslationTextComponent("fml.menu.mods.search"));
int fullButtonHeight = PADDING + 20 + PADDING;
this.modList = new ModListWidget(this, listWidth, fullButtonHeight, search.field_230691_m_ - getFontRenderer().FONT_HEIGHT - PADDING);
this.modList.func_230959_g_(6);
this.modList = new ModListWidget(this, listWidth, fullButtonHeight, search.y - getFontRenderer().FONT_HEIGHT - PADDING);
this.modList.setLeftPos(6);
this.modInfo = new InfoPanel(this.field_230706_i_, modInfoWidth, this.field_230709_l_ - PADDING - fullButtonHeight, PADDING);
this.modInfo = new InfoPanel(this.minecraft, modInfoWidth, this.height - PADDING - fullButtonHeight, PADDING);
field_230705_e_.add(search);
field_230705_e_.add(modList);
field_230705_e_.add(modInfo);
children.add(search);
children.add(modList);
children.add(modInfo);
search.setFocused2(false);
search.setCanLoseFocus(true);
final int width = listWidth / numButtons;
int x = PADDING;
func_230480_a_(SortType.NORMAL.button = new Button(x, PADDING, width - buttonMargin, 20, SortType.NORMAL.getButtonText(), b -> resortMods(SortType.NORMAL)));
addButton(SortType.NORMAL.button = new Button(x, PADDING, width - buttonMargin, 20, SortType.NORMAL.getButtonText(), b -> resortMods(SortType.NORMAL)));
x += width + buttonMargin;
func_230480_a_(SortType.A_TO_Z.button = new Button(x, PADDING, width - buttonMargin, 20, SortType.A_TO_Z.getButtonText(), b -> resortMods(SortType.A_TO_Z)));
addButton(SortType.A_TO_Z.button = new Button(x, PADDING, width - buttonMargin, 20, SortType.A_TO_Z.getButtonText(), b -> resortMods(SortType.A_TO_Z)));
x += width + buttonMargin;
func_230480_a_(SortType.Z_TO_A.button = new Button(x, PADDING, width - buttonMargin, 20, SortType.Z_TO_A.getButtonText(), b -> resortMods(SortType.Z_TO_A)));
addButton(SortType.Z_TO_A.button = new Button(x, PADDING, width - buttonMargin, 20, SortType.Z_TO_A.getButtonText(), b -> resortMods(SortType.Z_TO_A)));
resortMods(SortType.NORMAL);
updateCache();
}
@ -309,7 +309,7 @@ public class ModListScreen extends Screen
if (selected == null) return;
try
{
ConfigGuiHandler.getGuiFactoryFor(selected.getInfo()).map(f->f.apply(this.field_230706_i_, this)).ifPresent(newScreen -> this.field_230706_i_.displayGuiScreen(newScreen));
ConfigGuiHandler.getGuiFactoryFor(selected.getInfo()).map(f->f.apply(this.minecraft, this)).ifPresent(newScreen -> this.minecraft.displayGuiScreen(newScreen));
}
catch (final Exception e)
{
@ -318,10 +318,10 @@ public class ModListScreen extends Screen
}
@Override
public void func_231023_e_()
public void tick()
{
search.tick();
modList.func_241215_a_(selected);
modList.setSelected(selected);
if (!search.getText().equals(lastFilterText))
{
@ -336,7 +336,7 @@ public class ModListScreen extends Screen
modList.refreshList();
if (selected != null)
{
selected = modList.func_231039_at__().stream().filter(e -> e.getInfo() == selected.getInfo()).findFirst().orElse(null);
selected = modList.getEventListeners().stream().filter(e -> e.getInfo() == selected.getInfo()).findFirst().orElse(null);
updateCache();
}
sorted = true;
@ -362,33 +362,33 @@ public class ModListScreen extends Screen
for (SortType sort : SortType.values())
{
if (sort.button != null)
sort.button.field_230693_o_ = sortType != sort;
sort.button.active = sortType != sort;
}
sorted = false;
}
@Override
public void func_230430_a_(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
public void render(MatrixStack mStack, int mouseX, int mouseY, float partialTicks)
{
this.modList.func_230430_a_(mStack, mouseX, mouseY, partialTicks);
this.modList.render(mStack, mouseX, mouseY, partialTicks);
if (this.modInfo != null)
this.modInfo.func_230430_a_(mStack, mouseX, mouseY, partialTicks);
this.modInfo.render(mStack, mouseX, mouseY, partialTicks);
ITextComponent text = new TranslationTextComponent("fml.menu.mods.search");
int x = modList.getLeft() + ((modList.getRight() - modList.getLeft()) / 2) - (getFontRenderer().func_238414_a_(text) / 2);
getFontRenderer().func_238422_b_(mStack, text.func_241878_f(), x, search.field_230691_m_ - getFontRenderer().FONT_HEIGHT, 0xFFFFFF);
this.search.func_230430_a_(mStack, mouseX , mouseY, partialTicks);
super.func_230430_a_(mStack, mouseX, mouseY, partialTicks);
int x = modList.getLeft() + ((modList.getRight() - modList.getLeft()) / 2) - (getFontRenderer().getStringPropertyWidth(text) / 2);
getFontRenderer().func_238422_b_(mStack, text.func_241878_f(), x, search.y - getFontRenderer().FONT_HEIGHT, 0xFFFFFF);
this.search.render(mStack, mouseX , mouseY, partialTicks);
super.render(mStack, mouseX, mouseY, partialTicks);
}
public Minecraft getMinecraftInstance()
{
return field_230706_i_;
return minecraft;
}
public FontRenderer getFontRenderer()
{
return field_230712_o_;
return font;
}
public void setSelected(ModListWidget.ModEntry entry)
@ -400,19 +400,19 @@ public class ModListScreen extends Screen
private void updateCache()
{
if (selected == null) {
this.configButton.field_230693_o_ = false;
this.configButton.active = false;
this.modInfo.clearInfo();
return;
}
ModInfo selectedMod = selected.getInfo();
this.configButton.field_230693_o_ = ConfigGuiHandler.getGuiFactoryFor(selectedMod).isPresent();
this.configButton.active = ConfigGuiHandler.getGuiFactoryFor(selectedMod).isPresent();
List<String> lines = new ArrayList<>();
VersionChecker.CheckResult vercheck = VersionChecker.getResult(selectedMod);
@SuppressWarnings("resource")
Pair<ResourceLocation, Size2i> logoData = selectedMod.getLogoFile().map(logoFile->
{
TextureManager tm = this.field_230706_i_.getTextureManager();
TextureManager tm = this.minecraft.getTextureManager();
final ModFileResourcePack resourcePack = ResourcePackLoader.getResourcePackFor(selectedMod.getModId())
.orElse(ResourcePackLoader.getResourcePackFor("forge").
orElseThrow(()->new RuntimeException("Can't find forge, WHAT!")));
@ -486,12 +486,12 @@ public class ModListScreen extends Screen
}
@Override
public void func_231152_a_(Minecraft mc, int width, int height)
public void resize(Minecraft mc, int width, int height)
{
String s = this.search.getText();
SortType sort = this.sortType;
ModListWidget.ModEntry selected = this.selected;
this.func_231158_b_(mc, width, height);
this.init(mc, width, height);
this.search.setText(s);
this.selected = selected;
if (!this.search.getText().isEmpty())
@ -502,8 +502,8 @@ public class ModListScreen extends Screen
}
@Override
public void func_231175_as__()
public void closeScreen()
{
this.field_230706_i_.displayGuiScreen(this.parentScreen);
this.minecraft.displayGuiScreen(this.parentScreen);
}
}

View File

@ -47,25 +47,25 @@ public class ExtendedButton extends Button
* Draws this button to the screen.
*/
@Override
public void func_230431_b_(MatrixStack mStack, int mouseX, int mouseY, float partial)
public void renderButton(MatrixStack mStack, int mouseX, int mouseY, float partial)
{
if (this.field_230694_p_)
if (this.visible)
{
Minecraft mc = Minecraft.getInstance();
this.field_230692_n_ = mouseX >= this.field_230690_l_ && mouseY >= this.field_230691_m_ && mouseX < this.field_230690_l_ + this.field_230688_j_ && mouseY < this.field_230691_m_ + this.field_230689_k_;
int k = this.func_230989_a_(this.func_230449_g_());
GuiUtils.drawContinuousTexturedBox(mStack, field_230687_i_, this.field_230690_l_, this.field_230691_m_, 0, 46 + k * 20, this.field_230688_j_, this.field_230689_k_, 200, 20, 2, 3, 2, 2, this.func_230927_p_());
this.func_230441_a_(mStack, mc, mouseX, mouseY);
this.isHovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
int k = this.getYImage(this.isHovered());
GuiUtils.drawContinuousTexturedBox(mStack, WIDGETS_LOCATION, this.x, this.y, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.getBlitOffset());
this.renderBg(mStack, mc, mouseX, mouseY);
ITextComponent buttonText = this.func_230458_i_();
int strWidth = mc.fontRenderer.func_238414_a_(buttonText);
ITextComponent buttonText = this.getMessage();
int strWidth = mc.fontRenderer.getStringPropertyWidth(buttonText);
int ellipsisWidth = mc.fontRenderer.getStringWidth("...");
if (strWidth > field_230688_j_ - 6 && strWidth > ellipsisWidth)
if (strWidth > width - 6 && strWidth > ellipsisWidth)
//TODO, srg names make it hard to figure out how to append to an ITextProperties from this trim operation, wraping this in StringTextComponent is kinda dirty.
buttonText = new StringTextComponent(mc.fontRenderer.func_238417_a_(buttonText, field_230688_j_ - 6 - ellipsisWidth).getString() + "...");
buttonText = new StringTextComponent(mc.fontRenderer.func_238417_a_(buttonText, width - 6 - ellipsisWidth).getString() + "...");
func_238472_a_(mStack, mc.fontRenderer, buttonText, this.field_230690_l_ + this.field_230688_j_ / 2, this.field_230691_m_ + (this.field_230689_k_ - 8) / 2, getFGColor());
drawCenteredString(mStack, mc.fontRenderer, buttonText, this.x + this.width / 2, this.y + (this.height - 8) / 2, getFGColor());
}
}
}

View File

@ -47,33 +47,33 @@ public class ModListWidget extends ExtendedList<ModListWidget.ModEntry>
public ModListWidget(ModListScreen parent, int listWidth, int top, int bottom)
{
super(parent.getMinecraftInstance(), listWidth, parent.field_230709_l_, top, bottom, parent.getFontRenderer().FONT_HEIGHT * 2 + 8);
super(parent.getMinecraftInstance(), listWidth, parent.height, top, bottom, parent.getFontRenderer().FONT_HEIGHT * 2 + 8);
this.parent = parent;
this.listWidth = listWidth;
this.refreshList();
}
@Override
protected int func_230952_d_()
protected int getScrollbarPosition()
{
return this.listWidth;
}
@Override
public int func_230949_c_()
public int getRowWidth()
{
return this.listWidth;
}
public void refreshList() {
this.func_230963_j_();
parent.buildModList(this::func_230513_b_, mod->new ModEntry(mod, this.parent));
this.clearEntries();
parent.buildModList(this::addEntry, mod->new ModEntry(mod, this.parent));
}
@Override
protected void func_230433_a_(MatrixStack mStack)
protected void renderBackground(MatrixStack mStack)
{
this.parent.func_230446_a_(mStack);
this.parent.renderBackground(mStack);
}
public class ModEntry extends ExtendedList.AbstractListEntry<ModEntry> {
@ -86,7 +86,7 @@ public class ModListWidget extends ExtendedList<ModListWidget.ModEntry>
}
@Override
public void func_230432_a_(MatrixStack mStack, int entryIdx, int top, int left, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks)
public void render(MatrixStack mStack, int entryIdx, int top, int left, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean p_194999_5_, float partialTicks)
{
ITextComponent name = new StringTextComponent(stripControlCodes(modInfo.getDisplayName()));
ITextComponent version = new StringTextComponent(stripControlCodes(MavenVersionStringHelper.artifactVersionToString(modInfo.getVersion())));
@ -100,16 +100,16 @@ public class ModListWidget extends ExtendedList<ModListWidget.ModEntry>
Minecraft.getInstance().getTextureManager().bindTexture(VERSION_CHECK_ICONS);
RenderSystem.color4f(1, 1, 1, 1);
RenderSystem.pushMatrix();
AbstractGui.func_238463_a_(mStack, getLeft() + field_230670_d_ - 12, top + entryHeight / 4, vercheck.status.getSheetOffset() * 8, (vercheck.status.isAnimated() && ((System.currentTimeMillis() / 800 & 1)) == 1) ? 8 : 0, 8, 8, 64, 16);
AbstractGui.blit(mStack, getLeft() + width - 12, top + entryHeight / 4, vercheck.status.getSheetOffset() * 8, (vercheck.status.isAnimated() && ((System.currentTimeMillis() / 800 & 1)) == 1) ? 8 : 0, 8, 8, 64, 16);
RenderSystem.popMatrix();
}
}
@Override
public boolean func_231044_a_(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_)
public boolean mouseClicked(double p_mouseClicked_1_, double p_mouseClicked_3_, int p_mouseClicked_5_)
{
parent.setSelected(this);
ModListWidget.this.func_241215_a_(this);
ModListWidget.this.setSelected(this);
return false;
}

View File

@ -82,11 +82,11 @@ public class Slider extends ExtendedButton
precision = 0;
}
func_238482_a_(new StringTextComponent("").func_230529_a_(dispString).func_240702_b_(val).func_230529_a_(suffix));
setMessage(new StringTextComponent("").append(dispString).appendString(val).append(suffix));
drawString = drawStr;
if(!drawString)
func_238482_a_(new StringTextComponent(""));
setMessage(new StringTextComponent(""));
}
public Slider(int xPos, int yPos, ITextComponent displayStr, double minVal, double maxVal, double currentVal, IPressable handler, ISlider par)
@ -99,7 +99,7 @@ public class Slider extends ExtendedButton
* this button.
*/
@Override
public int func_230989_a_(boolean par1)
public int getYImage(boolean par1)
{
return 0;
}
@ -108,17 +108,17 @@ public class Slider extends ExtendedButton
* Fired when the mouse button is dragged. Equivalent of MouseListener.mouseDragged(MouseEvent e).
*/
@Override
protected void func_230441_a_(MatrixStack mStack, Minecraft par1Minecraft, int par2, int par3)
protected void renderBg(MatrixStack mStack, Minecraft par1Minecraft, int par2, int par3)
{
if (this.field_230694_p_)
if (this.visible)
{
if (this.dragging)
{
this.sliderValue = (par2 - (this.field_230690_l_ + 4)) / (float)(this.field_230688_j_ - 8);
this.sliderValue = (par2 - (this.x + 4)) / (float)(this.width - 8);
updateSlider();
}
GuiUtils.drawContinuousTexturedBox(mStack, field_230687_i_, this.field_230690_l_ + (int)(this.sliderValue * (float)(this.field_230688_j_ - 8)), this.field_230691_m_, 0, 66, 8, this.field_230689_k_, 200, 20, 2, 3, 2, 2, this.func_230927_p_());
GuiUtils.drawContinuousTexturedBox(mStack, WIDGETS_LOCATION, this.x + (int)(this.sliderValue * (float)(this.width - 8)), this.y, 0, 66, 8, this.height, 200, 20, 2, 3, 2, 2, this.getBlitOffset());
}
}
@ -127,9 +127,9 @@ public class Slider extends ExtendedButton
* e).
*/
@Override
public void func_230982_a_(double mouseX, double mouseY)
public void onClick(double mouseX, double mouseY)
{
this.sliderValue = (mouseX - (this.field_230690_l_ + 4)) / (this.field_230688_j_ - 8);
this.sliderValue = (mouseX - (this.x + 4)) / (this.width - 8);
updateSlider();
this.dragging = true;
}
@ -176,7 +176,7 @@ public class Slider extends ExtendedButton
if(drawString)
{
func_238482_a_(new StringTextComponent("").func_230529_a_(dispString).func_240702_b_(val).func_230529_a_(suffix));
setMessage(new StringTextComponent("").append(dispString).appendString(val).append(suffix));
}
if (parent != null)
@ -189,7 +189,7 @@ public class Slider extends ExtendedButton
* Fired when the mouse button is released. Equivalent of MouseListener.mouseReleased(MouseEvent e).
*/
@Override
public void func_231000_a__(double mouseX, double mouseY)
public void onRelease(double mouseX, double mouseY)
{
this.dragging = false;
}

View File

@ -45,37 +45,37 @@ public class UnicodeGlyphButton extends ExtendedButton
}
@Override
public void func_230430_a_(MatrixStack mStack, int mouseX, int mouseY, float partial)
public void render(MatrixStack mStack, int mouseX, int mouseY, float partial)
{
if (this.field_230694_p_)
if (this.visible)
{
Minecraft mc = Minecraft.getInstance();
this.field_230692_n_ = mouseX >= this.field_230690_l_ && mouseY >= this.field_230691_m_ && mouseX < this.field_230690_l_ + this.field_230688_j_ && mouseY < this.field_230691_m_ + this.field_230689_k_;
int k = this.func_230989_a_(this.field_230692_n_);
GuiUtils.drawContinuousTexturedBox(mStack, Button.field_230687_i_, this.field_230690_l_, this.field_230691_m_, 0, 46 + k * 20, this.field_230688_j_, this.field_230689_k_, 200, 20, 2, 3, 2, 2, this.func_230927_p_());
this.func_230441_a_(mStack, mc, mouseX, mouseY);
this.isHovered = mouseX >= this.x && mouseY >= this.y && mouseX < this.x + this.width && mouseY < this.y + this.height;
int k = this.getYImage(this.isHovered);
GuiUtils.drawContinuousTexturedBox(mStack, Button.WIDGETS_LOCATION, this.x, this.y, 0, 46 + k * 20, this.width, this.height, 200, 20, 2, 3, 2, 2, this.getBlitOffset());
this.renderBg(mStack, mc, mouseX, mouseY);
ITextComponent buttonText = this.func_230442_c_();
ITextComponent buttonText = this.getNarrationMessage();
int glyphWidth = (int) (mc.fontRenderer.getStringWidth(glyph) * glyphScale);
int strWidth = mc.fontRenderer.func_238414_a_(buttonText);
int strWidth = mc.fontRenderer.getStringPropertyWidth(buttonText);
int ellipsisWidth = mc.fontRenderer.getStringWidth("...");
int totalWidth = strWidth + glyphWidth;
if (totalWidth > field_230688_j_ - 6 && totalWidth > ellipsisWidth)
buttonText = new StringTextComponent(mc.fontRenderer.func_238417_a_(buttonText, field_230688_j_ - 6 - ellipsisWidth).getString().trim() + "...") ;
if (totalWidth > width - 6 && totalWidth > ellipsisWidth)
buttonText = new StringTextComponent(mc.fontRenderer.func_238417_a_(buttonText, width - 6 - ellipsisWidth).getString().trim() + "...") ;
strWidth = mc.fontRenderer.func_238414_a_(buttonText);
strWidth = mc.fontRenderer.getStringPropertyWidth(buttonText);
totalWidth = glyphWidth + strWidth;
mStack.push();
mStack.scale(glyphScale, glyphScale, 1.0F);
this.func_238472_a_(mStack, mc.fontRenderer, new StringTextComponent(glyph),
(int) (((this.field_230690_l_ + (this.field_230688_j_ / 2) - (strWidth / 2)) / glyphScale) - (glyphWidth / (2 * glyphScale)) + 2),
(int) (((this.field_230691_m_ + ((this.field_230689_k_ - 8) / glyphScale) / 2) - 1) / glyphScale), getFGColor());
this.drawCenteredString(mStack, mc.fontRenderer, new StringTextComponent(glyph),
(int) (((this.x + (this.width / 2) - (strWidth / 2)) / glyphScale) - (glyphWidth / (2 * glyphScale)) + 2),
(int) (((this.y + ((this.height - 8) / glyphScale) / 2) - 1) / glyphScale), getFGColor());
mStack.pop();
this.func_238472_a_(mStack, mc.fontRenderer, buttonText, (int) (this.field_230690_l_ + (this.field_230688_j_ / 2) + (glyphWidth / glyphScale)),
this.field_230691_m_ + (this.field_230689_k_ - 8) / 2, getFGColor());
this.drawCenteredString(mStack, mc.fontRenderer, buttonText, (int) (this.x + (this.width / 2) + (glyphWidth / glyphScale)),
this.y + (this.height - 8) / 2, getFGColor());
}
}

View File

@ -344,7 +344,7 @@ public class FMLPlayMessages
public static void encode(SyncCustomTagTypes msg, PacketBuffer buf)
{
buf.writeVarInt(msg.customTagTypeCollections.size());
msg.customTagTypeCollections.forEach((registryName, modded) -> forgeTagCollectionWrite(buf, registryName, modded.func_241833_a()));
msg.customTagTypeCollections.forEach((registryName, modded) -> forgeTagCollectionWrite(buf, registryName, modded.getIDTagMap()));
}
private static <T> void forgeTagCollectionWrite(PacketBuffer buf, ResourceLocation registryName, Map<ResourceLocation, ITag<T>> tags)
@ -353,7 +353,7 @@ public class FMLPlayMessages
buf.writeVarInt(tags.size());
tags.forEach((name, tag) -> {
buf.writeResourceLocation(name);
List<T> elements = tag.func_230236_b_();
List<T> elements = tag.getAllElements();
buf.writeVarInt(elements.size());
for (T element : elements)
{
@ -395,9 +395,9 @@ public class FMLPlayMessages
elementBuilder.add(element);
}
}
tags.put(name, ITag.func_232946_a_(elementBuilder.build()));
tags.put(name, ITag.getTagOf(elementBuilder.build()));
}
return ITagCollection.func_242202_a(tags);
return ITagCollection.getTagCollectionFromMap(tags);
}
public static void handle(SyncCustomTagTypes msg, Supplier<NetworkEvent.Context> ctx)
@ -412,7 +412,7 @@ public class FMLPlayMessages
//Note: We gracefully ignore any tag types the server may have that we don't as they won't be in our tag registry
// so they won't be validated
//Override and use the tags from the packet to test for validation before we actually set them
Multimap<ResourceLocation, ResourceLocation> missingTags = TagRegistryManager.func_242198_b(ForgeTagHandler.withSpecificCustom(tagCollectionSupplier, msg.customTagTypeCollections));
Multimap<ResourceLocation, ResourceLocation> missingTags = TagRegistryManager.validateTags(ForgeTagHandler.withSpecificCustom(tagCollectionSupplier, msg.customTagTypeCollections));
if (missingTags.isEmpty())
{
//If we have no missing tags, update the custom tag types

View File

@ -111,7 +111,7 @@ public class ResourcePackLoader
}
@Override
public void func_230230_a_(Consumer<ResourcePackInfo> consumer, IFactory factory)
public void findPacks(Consumer<ResourcePackInfo> consumer, IFactory factory)
{
wrapped.addPackInfos(consumer, factory);
}

View File

@ -81,7 +81,7 @@ public class LanguageHook
private static void loadLanguage(String langName, MinecraftServer server) {
String langFile = String.format("lang/%s.json", langName);
IResourceManager resourceManager = server.getDataPackRegistries().func_240970_h_();
IResourceManager resourceManager = server.getDataPackRegistries().getResourceManager();
resourceManager.getResourceNamespaces().forEach(namespace -> {
try {
ResourceLocation langResource = new ResourceLocation(namespace, langFile);

View File

@ -197,7 +197,7 @@ public class ServerLifecycleHooks
IModInfo mod = e.getKey().getModInfos().get(0);
if (Objects.equals(mod.getModId(), "minecraft")) continue; // skip the minecraft "mod"
final String name = "mod:" + mod.getModId();
final ResourcePackInfo packInfo = ResourcePackInfo.createResourcePack(name, true, e::getValue, factory, ResourcePackInfo.Priority.BOTTOM, IPackNameDecorator.field_232625_a_);
final ResourcePackInfo packInfo = ResourcePackInfo.createResourcePack(name, true, e::getValue, factory, ResourcePackInfo.Priority.BOTTOM, IPackNameDecorator.PLAIN);
if (packInfo == null) {
// Vanilla only logs an error, instead of propagating, so handle null and warn that something went wrong
ModLoader.get().addWarning(new ModLoadingWarning(mod, ModLoadingStage.ERROR, "fml.modloading.brokenresources", e.getKey()));

View File

@ -155,7 +155,7 @@ public class ForgeRegistries
private static <T> RegistryKey<Registry<T>> key(String name)
{
return RegistryKey.func_240904_a_(new ResourceLocation(name));
return RegistryKey.getOrCreateRootKey(new ResourceLocation(name));
}
private static void init() {}
}

View File

@ -104,7 +104,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
ForgeRegistry(RegistryManager stage, ResourceLocation name, RegistryBuilder<V> builder)
{
this.name = name;
this.key = RegistryKey.func_240904_a_(name);
this.key = RegistryKey.getOrCreateRootKey(name);
this.builder = builder;
this.stage = stage;
this.superType = builder.getType();
@ -373,7 +373,7 @@ public class ForgeRegistry<V extends IForgeRegistryEntry<V>> implements IForgeRe
}
this.names.put(key, value);
this.keys.put(RegistryKey.func_240903_a_(this.key, key), value);
this.keys.put(RegistryKey.getOrCreateKey(this.key, key), value);
this.ids.put(idToUse, value);
this.availabilityMap.set(idToUse);
this.owners.put(new OverrideOwner(owner == null ? key.getPath() : owner, key), value);

View File

@ -186,15 +186,15 @@ public class GameData
private static <T extends IForgeRegistryEntry<T>> RegistryBuilder<T> makeRegistry(RegistryKey<? extends Registry<T>> key, Class<T> type)
{
return new RegistryBuilder<T>().setName(key.func_240901_a_()).setType(type).setMaxID(MAX_VARINT).addCallback(new NamespacedWrapper.Factory<T>());
return new RegistryBuilder<T>().setName(key.getLocation()).setType(type).setMaxID(MAX_VARINT).addCallback(new NamespacedWrapper.Factory<T>());
}
private static <T extends IForgeRegistryEntry<T>> RegistryBuilder<T> makeRegistry(RegistryKey<? extends Registry<T>> key, Class<T> type, int min, int max)
{
return new RegistryBuilder<T>().setName(key.func_240901_a_()).setType(type).setIDRange(min, max).hasWrapper();
return new RegistryBuilder<T>().setName(key.getLocation()).setType(type).setIDRange(min, max).hasWrapper();
}
private static <T extends IForgeRegistryEntry<T>> RegistryBuilder<T> makeRegistry(RegistryKey<? extends Registry<T>> key, Class<T> type, String _default)
{
return new RegistryBuilder<T>().setName(key.func_240901_a_()).setType(type).setMaxID(MAX_VARINT).hasWrapper().setDefaultKey(new ResourceLocation(_default));
return new RegistryBuilder<T>().setName(key.getLocation()).setType(type).setMaxID(MAX_VARINT).hasWrapper().setDefaultKey(new ResourceLocation(_default));
}
public static <T extends IForgeRegistryEntry<T>> SimpleRegistry<T> getWrapper(RegistryKey<? extends Registry<T>> key, Lifecycle lifecycle)
@ -318,7 +318,7 @@ public class GameData
RegistryManager.ACTIVE.registries.forEach((name, reg) -> reg.bake());
// the id mapping has reverted, fire remap events for those that care about id changes
if (fireEvents) {
fireRemapEvent(ImmutableMap.of(), true);
fireRemapEvent(ImmutableMap.of(), true);
ObjectHolderRegistry.applyObjectHolders();
}
@ -341,11 +341,11 @@ public class GameData
keys.sort((o1, o2) -> String.valueOf(o1).compareToIgnoreCase(String.valueOf(o2)));
//Move Blocks to first, and Items to second.
keys.remove(BLOCKS.func_240901_a_());
keys.remove(ITEMS.func_240901_a_());
keys.remove(BLOCKS.getLocation());
keys.remove(ITEMS.getLocation());
keys.add(0, BLOCKS.func_240901_a_());
keys.add(1, ITEMS.func_240901_a_());
keys.add(0, BLOCKS.getLocation());
keys.add(1, ITEMS.getLocation());
final Function<ResourceLocation, ? extends RegistryEvent.Register<?>> registerEventGenerator = rl -> RegistryManager.ACTIVE.getRegistry(rl).getRegisterEvent(rl);
return keys.stream().map(rl -> ModLoadingStage.EventGenerator.fromFunction(mc -> registerEventGenerator.apply(rl)));
@ -392,7 +392,7 @@ public class GameData
{
LOGGER.debug(REGISTRIES, "Registering custom tag type for: {}", registryName);
customTagTypes.add(registryName);
TagRegistryManager.func_242196_a(registryName, tagCollectionSupplier -> tagCollectionSupplier.getCustomTypeCollection(registryName));
TagRegistryManager.create(registryName, tagCollectionSupplier -> tagCollectionSupplier.getCustomTypeCollection(registryName));
}
}
ForgeTagHandler.setCustomTagTypes(customTagTypes);
@ -565,7 +565,7 @@ public class GameData
public void onValidate(IForgeRegistryInternal<Attribute> owner, RegistryManager stage, int id, ResourceLocation key, Attribute obj)
{
// some stuff hard patched in can cause this to derp if it's JUST vanilla, so skip
if (stage!=RegistryManager.VANILLA) GlobalEntityTypeAttributes.func_233834_a_();
if (stage!=RegistryManager.VANILLA) GlobalEntityTypeAttributes.validateEntityAttributes();
}
}

View File

@ -59,7 +59,7 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
Validate.notNull(value);
if (value.getRegistryName() == null)
value.setRegistryName(key.func_240901_a_());
value.setRegistryName(key.getLocation());
int realId = this.delegate.add(id, value);
if (realId != id && id != -1)
@ -75,7 +75,7 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
}
@Override
public <V extends T> V func_241874_a(OptionalInt id, RegistryKey<T> key, V value, Lifecycle lifecycle) {
public <V extends T> V validateAndRegister(OptionalInt id, RegistryKey<T> key, V value, Lifecycle lifecycle) {
int wanted = -1;
if (id.isPresent() && getByValue(id.getAsInt()) != null)
wanted = id.getAsInt();
@ -84,7 +84,7 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
// Reading Functions
@Override
public Optional<T> func_241873_b(@Nullable ResourceLocation name)
public Optional<T> getOptional(@Nullable ResourceLocation name)
{
return Optional.ofNullable( this.delegate.getRaw(name)); //get without default
}
@ -98,9 +98,9 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
@Override
@Nullable
public T func_230516_a_(@Nullable RegistryKey<T> name)
public T getValueForKey(@Nullable RegistryKey<T> name)
{
return name == null ? null : this.delegate.getRaw(name.func_240901_a_()); //get without default
return name == null ? null : this.delegate.getRaw(name.getLocation()); //get without default
}
@Override
@ -142,7 +142,7 @@ class NamespacedDefaultedWrapper<T extends IForgeRegistryEntry<T>> extends Defau
}
@Override
public Set<Map.Entry<RegistryKey<T>, T>> func_239659_c_()
public Set<Map.Entry<RegistryKey<T>, T>> getEntries()
{
return this.delegate.getEntries();
}

View File

@ -58,7 +58,7 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
Validate.notNull(value);
if (value.getRegistryName() == null)
value.setRegistryName(key.func_240901_a_());
value.setRegistryName(key.getLocation());
int realId = this.delegate.add(id, value);
if (realId != id && id != -1)
@ -73,7 +73,7 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
}
@Override
public <V extends T> V func_241874_a(OptionalInt id, RegistryKey<T> key, V value, Lifecycle lifecycle) {
public <V extends T> V validateAndRegister(OptionalInt id, RegistryKey<T> key, V value, Lifecycle lifecycle) {
int wanted = -1;
if (id.isPresent() && getByValue(id.getAsInt()) != null)
wanted = id.getAsInt();
@ -89,16 +89,16 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
}
@Override
public Optional<T> func_241873_b(@Nullable ResourceLocation name)
public Optional<T> getOptional(@Nullable ResourceLocation name)
{
return Optional.ofNullable( this.delegate.getRaw(name)); //get without default
}
@Override
@Nullable
public T func_230516_a_(@Nullable RegistryKey<T> name)
public T getValueForKey(@Nullable RegistryKey<T> name)
{
return name == null ? null : this.delegate.getRaw(name.func_240901_a_()); //get without default
return name == null ? null : this.delegate.getRaw(name.getLocation()); //get without default
}
@Override
@ -140,7 +140,7 @@ class NamespacedWrapper<T extends IForgeRegistryEntry<T>> extends SimpleRegistry
}
@Override
public Set<Map.Entry<RegistryKey<T>, T>> func_239659_c_()
public Set<Map.Entry<RegistryKey<T>, T>> getEntries()
{
return this.delegate.getEntries();
}

View File

@ -79,7 +79,7 @@ public class RegistryManager
public <V extends IForgeRegistryEntry<V>> ForgeRegistry<V> getRegistry(RegistryKey<? extends Registry<V>> key)
{
return getRegistry(key.func_240901_a_());
return getRegistry(key.getLocation());
}
public <V extends IForgeRegistryEntry<V>> IForgeRegistry<V> getRegistry(Class<? super V> cls)

View File

@ -141,7 +141,7 @@ public class ChunkGenWorker implements IWorker
if (queue.size() == 0)
{
listener.sendFeedback(new TranslationTextComponent("commands.forge.gen.complete", genned, total, dim.func_234923_W_().func_240901_a_()), true);
listener.sendFeedback(new TranslationTextComponent("commands.forge.gen.complete", genned, total, dim.getDimensionKey().getLocation()), true);
/* TODO: Readd if/when we introduce world unloading, or get Mojang to do it.
if (keepingLoaded != null && !keepingLoaded)
DimensionManager.keepLoaded(dim, false);

View File

@ -45,11 +45,11 @@ public class CommandDimensions
.requires(cs->cs.hasPermissionLevel(0)) //permission
.executes(ctx -> {
ctx.getSource().sendFeedback(new TranslationTextComponent("commands.forge.dimensions.list"), true);
final Registry<DimensionType> reg = ctx.getSource().func_241861_q().func_243612_b(Registry.field_239698_ad_);
final Registry<DimensionType> reg = ctx.getSource().func_241861_q().getRegistry(Registry.DIMENSION_TYPE_KEY);
Map<ResourceLocation, List<ResourceLocation>> types = new HashMap<>();
for (ServerWorld dim : ctx.getSource().getServer().getWorlds()) {
types.computeIfAbsent(reg.getKey(dim.func_230315_m_()), k -> new ArrayList<>()).add(dim.func_234923_W_().func_240901_a_());
types.computeIfAbsent(reg.getKey(dim.getDimensionType()), k -> new ArrayList<>()).add(dim.getDimensionKey().getLocation());
}
types.keySet().stream().sorted().forEach(key -> {

View File

@ -69,11 +69,11 @@ class CommandEntity
.then(Commands.argument("filter", StringArgumentType.string())
.suggests((ctx, builder) -> ISuggestionProvider.suggest(ForgeRegistries.ENTITIES.getKeys().stream().map(ResourceLocation::toString).map(StringArgumentType::escapeIfRequired), builder))
.then(Commands.argument("dim", DimensionArgument.getDimension())
.executes(ctx -> execute(ctx.getSource(), StringArgumentType.getString(ctx, "filter"), DimensionArgument.getDimensionArgument(ctx, "dim").func_234923_W_()))
.executes(ctx -> execute(ctx.getSource(), StringArgumentType.getString(ctx, "filter"), DimensionArgument.getDimensionArgument(ctx, "dim").getDimensionKey()))
)
.executes(ctx -> execute(ctx.getSource(), StringArgumentType.getString(ctx, "filter"), ctx.getSource().getWorld().func_234923_W_()))
.executes(ctx -> execute(ctx.getSource(), StringArgumentType.getString(ctx, "filter"), ctx.getSource().getWorld().getDimensionKey()))
)
.executes(ctx -> execute(ctx.getSource(), "*", ctx.getSource().getWorld().func_234923_W_()));
.executes(ctx -> execute(ctx.getSource(), "*", ctx.getSource().getWorld().getDimensionKey()));
}
private static int execute(CommandSource sender, String filter, RegistryKey<World> dim) throws CommandSyntaxException
@ -92,7 +92,7 @@ class CommandEntity
Map<ResourceLocation, MutablePair<Integer, Map<ChunkPos, Integer>>> list = Maps.newHashMap();
world.getEntities().forEach(e -> {
MutablePair<Integer, Map<ChunkPos, Integer>> info = list.computeIfAbsent(e.getType().getRegistryName(), k -> MutablePair.of(0, Maps.newHashMap()));
ChunkPos chunk = new ChunkPos(e.func_233580_cy_());
ChunkPos chunk = new ChunkPos(e.getPosition());
info.left++;
info.right.put(chunk, info.right.getOrDefault(chunk, 0) + 1);
});

View File

@ -58,15 +58,15 @@ class CommandTps
private static int sendTime(CommandSource cs, ServerWorld dim) throws CommandSyntaxException
{
long[] times = cs.getServer().getTickTime(dim.func_234923_W_());
long[] times = cs.getServer().getTickTime(dim.getDimensionKey());
if (times == null) // Null means the world is unloaded. Not invalid. That's taken car of by DimensionArgument itself.
times = UNLOADED;
final Registry<DimensionType> reg = cs.func_241861_q().func_243612_b(Registry.field_239698_ad_);
final Registry<DimensionType> reg = cs.func_241861_q().getRegistry(Registry.DIMENSION_TYPE_KEY);
double worldTickTime = mean(times) * 1.0E-6D;
double worldTPS = Math.min(1000.0 / worldTickTime, 20);
cs.sendFeedback(new TranslationTextComponent("commands.forge.tps.summary.named", dim.func_234923_W_().func_240901_a_().toString(), reg.getKey(dim.func_230315_m_()), TIME_FORMATTER.format(worldTickTime), TIME_FORMATTER.format(worldTPS)), false);
cs.sendFeedback(new TranslationTextComponent("commands.forge.tps.summary.named", dim.getDimensionKey().getLocation().toString(), reg.getKey(dim.getDimensionType()), TIME_FORMATTER.format(worldTickTime), TIME_FORMATTER.format(worldTPS)), false);
return 1;
}

View File

@ -153,11 +153,11 @@ class CommandTrack
if (entity == null)
return new TranslationTextComponent("commands.forge.tracking.invalid");
BlockPos pos = entity.func_233580_cy_();
BlockPos pos = entity.getPosition();
double averageTimings = data.getAverageTimings();
String tickTime = (averageTimings > 1000 ? TIME_FORMAT.format(averageTimings / 1000) : TIME_FORMAT.format(averageTimings)) + (averageTimings < 1000 ? "\u03bcs" : "ms");
return new TranslationTextComponent("commands.forge.tracking.timing_entry", entity.getType().getRegistryName(), entity.world.func_234923_W_().func_240901_a_().toString(), pos.getX(), pos.getY(), pos.getZ(), tickTime);
return new TranslationTextComponent("commands.forge.tracking.timing_entry", entity.getType().getRegistryName(), entity.world.getDimensionKey().getLocation().toString(), pos.getX(), pos.getY(), pos.getZ(), tickTime);
})
);
}
@ -177,7 +177,7 @@ class CommandTrack
double averageTimings = data.getAverageTimings();
String tickTime = (averageTimings > 1000 ? TIME_FORMAT.format(averageTimings / 1000) : TIME_FORMAT.format(averageTimings)) + (averageTimings < 1000 ? "\u03bcs" : "ms");
return new TranslationTextComponent("commands.forge.tracking.timing_entry", te.getType().getRegistryName(), te.getWorld().func_234923_W_().func_240901_a_().toString(), pos.getX(), pos.getY(), pos.getZ(), tickTime);
return new TranslationTextComponent("commands.forge.tracking.timing_entry", te.getType().getRegistryName(), te.getWorld().getDimensionKey().getLocation().toString(), pos.getX(), pos.getY(), pos.getZ(), tickTime);
})
);
}

View File

@ -60,8 +60,8 @@ public class ConfigCommand {
File f = new File(configFileName);
context.getSource().sendFeedback(new TranslationTextComponent("commands.config.getwithtype",
modId, type,
new StringTextComponent(f.getName()).func_240701_a_(TextFormatting.UNDERLINE).
func_240700_a_((style) -> style.func_240715_a_(new ClickEvent(ClickEvent.Action.OPEN_FILE, f.getAbsolutePath())))
new StringTextComponent(f.getName()).mergeStyle(TextFormatting.UNDERLINE).
modifyStyle((style) -> style.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, f.getAbsolutePath())))
), true);
} else {
context.getSource().sendFeedback(new TranslationTextComponent("commands.config.noconfig", modId, type),

View File

@ -1,4 +1,6 @@
net/minecraft/block/FireBlock.tryCatchFire(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;ILjava/util/Random;ILnet/minecraft/util/Direction;)V=|p_176536_1_,p_176536_2_,p_176536_3_,p_176536_4_,p_176536_5_,face
net/minecraft/block/FlowerPotBlock.<init>(Ljava/util/function/Supplier;Ljava/util/function/Supplier;Lnet/minecraft/block/AbstractBlock$Properties;)V=|emptyPot,p_i48395_1_,properties
net/minecraft/block/FlowingFluidBlock.<init>(Ljava/util/function/Supplier;Lnet/minecraft/block/AbstractBlock$Properties;)V=|supplier,p_i48368_1_
net/minecraft/block/RedstoneWireBlock.canConnectTo(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/Direction;)Z=|p_176343_0_,world,pos,p_176343_1_
net/minecraft/client/gui/ScreenManager.getScreenFactory(Lnet/minecraft/inventory/container/ContainerType;Lnet/minecraft/client/Minecraft;ILnet/minecraft/util/text/ITextComponent;)Ljava/util/Optional;=|p_216909_0_,p_216909_1_,p_216909_2_,p_216909_3_
net/minecraft/client/gui/screen/Screen.renderToolTip(Lcom/mojang/blaze3d/matrix/MatrixStack;Ljava/util/List;IILnet/minecraft/client/gui/FontRenderer;)V=|p_238654_1_,p_238654_2_,p_238654_3_,p_238654_4_,font
@ -28,6 +30,7 @@ net/minecraft/data/FluidTagsProvider.<init>(Lnet/minecraft/data/DataGenerator;Lj
net/minecraft/data/ItemTagsProvider.<init>(Lnet/minecraft/data/DataGenerator;Lnet/minecraft/data/BlockTagsProvider;Ljava/lang/String;Lnet/minecraftforge/common/data/ExistingFileHelper;)V=|p_i232552_1_,p_i232552_2_,modId,existingFileHelper
net/minecraft/data/TagsProvider.<init>(Lnet/minecraft/data/DataGenerator;Lnet/minecraft/util/registry/Registry;Ljava/lang/String;Lnet/minecraftforge/common/data/ExistingFileHelper;)V=|p_i49827_1_,p_i49827_2_,modId,existingFileHelper
net/minecraft/entity/Entity.changeDimension(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraftforge/common/util/ITeleporter;)Lnet/minecraft/entity/Entity;=|p_241206_1_,teleporter
net/minecraft/entity/EntityType.<init>(Lnet/minecraft/entity/EntityType$IFactory;Lnet/minecraft/entity/EntityClassification;ZZZZLcom/google/common/collect/ImmutableSet;Lnet/minecraft/entity/EntitySize;IILjava/util/function/Predicate;Ljava/util/function/ToIntFunction;Ljava/util/function/ToIntFunction;Ljava/util/function/BiFunction;)V=|p_i231489_1_,p_i231489_2_,p_i231489_3_,p_i231489_4_,p_i231489_5_,p_i231489_6_,p_i231489_7_,p_i231489_8_,p_i231489_9_,p_i231489_10_,velocityUpdateSupplier,trackingRangeSupplier,updateIntervalSupplier,customClientFactory
net/minecraft/entity/item/EnderPearlEntity.changeDimension(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraftforge/common/util/ITeleporter;)Lnet/minecraft/entity/Entity;=|p_241206_1_,teleporter
net/minecraft/entity/item/ItemEntity.changeDimension(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraftforge/common/util/ITeleporter;)Lnet/minecraft/entity/Entity;=|p_241206_1_,teleporter
net/minecraft/entity/item/minecart/ContainerMinecartEntity.changeDimension(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraftforge/common/util/ITeleporter;)Lnet/minecraft/entity/Entity;=|p_241206_1_,teleporter
@ -35,16 +38,23 @@ net/minecraft/entity/merchant/villager/AbstractVillagerEntity.changeDimension(Ln
net/minecraft/entity/player/PlayerEntity.getDigSpeed(Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;)F=|p_184813_1_,pos
net/minecraft/entity/player/ServerPlayerEntity.changeDimension(Lnet/minecraft/world/server/ServerWorld;Lnet/minecraftforge/common/util/ITeleporter;)Lnet/minecraft/entity/Entity;=|p_241206_1_,teleporter
net/minecraft/item/BoneMealItem.applyBonemeal(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/player/PlayerEntity;)Z=|p_195966_0_,p_195966_1_,p_195966_2_,player
net/minecraft/item/DyeableHorseArmorItem.<init>(ILnet/minecraft/util/ResourceLocation;Lnet/minecraft/item/Item$Properties;)V=|p_i50047_1_,texture,p_i50047_3_
net/minecraft/item/FilledMapItem.getCustomMapData(Lnet/minecraft/item/ItemStack;Lnet/minecraft/world/World;)Lnet/minecraft/world/storage/MapData;=|p_195950_0_,p_195950_1_
net/minecraft/item/FishBucketItem.<init>(Ljava/util/function/Supplier;Ljava/util/function/Supplier;Lnet/minecraft/item/Item$Properties;)V=|fishTypeIn,p_i49022_2_,builder
net/minecraft/item/HorseArmorItem.<init>(ILnet/minecraft/util/ResourceLocation;Lnet/minecraft/item/Item$Properties;)V=|p_i50042_1_,texture,p_i50042_3_
net/minecraft/item/ItemStack.<init>(Lnet/minecraft/util/IItemProvider;ILnet/minecraft/nbt/CompoundNBT;)V=|p_i48204_1_,p_i48204_2_,capNBT
net/minecraft/item/ItemStack.onItemUse(Lnet/minecraft/item/ItemUseContext;)Lnet/minecraft/util/ActionResultType;=|p_196084_1_
net/minecraft/item/ItemStack.onItemUse(Lnet/minecraft/item/ItemUseContext;Ljava/util/function/Function;)Lnet/minecraft/util/ActionResultType;=|p_196084_1_,callback
net/minecraft/network/PacketBuffer.writeItemStack(Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/network/PacketBuffer;=|p_150788_1_,limitedTag
net/minecraft/potion/PotionBrewing$MixPredicate.<init>(Lnet/minecraftforge/registries/ForgeRegistryEntry;Lnet/minecraft/item/crafting/Ingredient;Lnet/minecraftforge/registries/ForgeRegistryEntry;)V=|p_i47570_1_,p_i47570_2_,p_i47570_3_
net/minecraft/server/dedicated/DedicatedServer.sendMessage(Lnet/minecraft/util/text/ITextComponent;Ljava/util/UUID;)V=|message,p_145747_2_
net/minecraft/server/management/PlayerInteractionManager.removeBlock(Lnet/minecraft/util/math/BlockPos;Z)Z=|p_180235_1_,canHarvest
net/minecraft/util/math/shapes/EntitySelectionContext.<init>(Lnet/minecraft/entity/Entity;ZDLnet/minecraft/item/Item;Ljava/util/function/Predicate;)V=|entity,p_i232177_1_,p_i232177_2_,p_i232177_4_,p_i232177_5_
net/minecraft/world/World.markAndNotifyBlock(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/chunk/Chunk;Lnet/minecraft/block/BlockState;Lnet/minecraft/block/BlockState;II)V=|p_241211_1_,chunk,blockstate,p_241211_2_,p_241211_3_,p_241211_4_
net/minecraft/world/gen/feature/jigsaw/JigsawPattern$PlacementBehaviour.create(Ljava/lang/String;Ljava/lang/String;Lcom/google/common/collect/ImmutableList;)Lnet/minecraft/world/gen/feature/jigsaw/JigsawPattern$PlacementBehaviour;=|enumName,p_i50487_3_,p_i50487_4_
net/minecraft/world/gen/feature/template/Template.processEntityInfos(Lnet/minecraft/world/gen/feature/template/Template;Lnet/minecraft/world/IWorld;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/gen/feature/template/PlacementSettings;Ljava/util/List;)Ljava/util/List;=|template,p_215387_0_,p_215387_1_,p_215387_2_,p_215387_3_
net/minecraft/world/server/ServerWorld.removeEntity(Lnet/minecraft/entity/Entity;Z)V=|p_217467_1_,keepData
net/minecraft/world/server/ServerWorld.removeEntityComplete(Lnet/minecraft/entity/Entity;Z)V=|p_217484_1_,keepData
net/minecraft/world/server/ServerWorld.removePlayer(Lnet/minecraft/entity/player/ServerPlayerEntity;Z)V=|p_217434_1_,keepData
net/minecraft/world/spawner/WorldEntitySpawner.canSpawnAtBody(Lnet/minecraft/entity/EntitySpawnPlacementRegistry$PlacementType;Lnet/minecraft/world/IWorldReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/EntityType;)Z=|p_209382_0_,p_209382_1_,p_209382_2_,p_209382_3_
net/minecraft/world/spawner/WorldEntitySpawner.canSpawnAtBody(Lnet/minecraft/entity/EntitySpawnPlacementRegistry$PlacementType;Lnet/minecraft/world/IWorldReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/EntityType;)Z=|p_209382_0_,p_209382_1_,p_209382_2_,p_209382_3_
net/minecraft/world/storage/SaveFormat.getReader(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/util/datafix/codec/DatapackCodec;Lnet/minecraft/world/storage/SaveFormat$LevelSave;)Ljava/util/function/BiFunction;=|p_237270_0_,p_237270_1_,levelSave

View File

@ -211,24 +211,24 @@ public class DataGeneratorTest
@Override
protected void registerTags()
{
func_240522_a_(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "test").toString()))
.func_240532_a_(Blocks.DIAMOND_BLOCK)
.func_240531_a_(BlockTags.STONE_BRICKS)
getOrCreateBuilder(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "test").toString()))
.addItemEntry(Blocks.DIAMOND_BLOCK)
.addTag(BlockTags.STONE_BRICKS)
.addOptional(new ResourceLocation("chisel", "marble/raw"))
.addOptionalTag(new ResourceLocation("forge", "storage_blocks/ruby"));
// Hopefully sorting issues
func_240522_a_(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "thing/one").toString()))
.func_240532_a_(Blocks.COBBLESTONE);
func_240522_a_(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "thing/two").toString()))
.func_240532_a_(Blocks.DIORITE);
func_240522_a_(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "thing/three").toString()))
.func_240532_a_(Blocks.ANDESITE);
getOrCreateBuilder(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "thing/one").toString()))
.addItemEntry(Blocks.COBBLESTONE);
getOrCreateBuilder(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "thing/two").toString()))
.addItemEntry(Blocks.DIORITE);
getOrCreateBuilder(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "thing/three").toString()))
.addItemEntry(Blocks.ANDESITE);
func_240522_a_(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "things").toString()))
.func_240532_a_(Blocks.COBBLESTONE)
.func_240532_a_(Blocks.DIORITE)
.func_240532_a_(Blocks.ANDESITE);
getOrCreateBuilder(BlockTags.makeWrapperTag(new ResourceLocation(MODID, "things").toString()))
.addItemEntry(Blocks.COBBLESTONE)
.addItemEntry(Blocks.DIORITE)
.addItemEntry(Blocks.ANDESITE);
}
}
@ -422,7 +422,7 @@ public class DataGeneratorTest
models().getBuilder("cube")
.parent(block)
.element()
.allFaces((dir, face) -> face.texture("#" + dir.func_176610_l()).cullface(dir));
.allFaces((dir, face) -> face.texture("#" + dir.getString()).cullface(dir));
ModelFile furnace = models().orientable("furnace", mcLoc("block/furnace_side"), mcLoc("block/furnace_front"), mcLoc("block/furnace_top"));
ModelFile furnaceLit = models().orientable("furnace_on", mcLoc("block/furnace_side"), mcLoc("block/furnace_front_on"), mcLoc("block/furnace_top"));

View File

@ -81,7 +81,7 @@ public class ScaffoldingTest
@Override
protected void registerStatesAndModels()
{
this.getVariantBuilder(SCAFFOLDING_METHOD_TEST.get()).forAllStatesExcept((state) -> ConfiguredModel.builder().modelFile(state.get(ScaffoldingBlock.field_220120_c) ? new ModelFile.ExistingModelFile(new ResourceLocation("block/scaffolding_unstable"), this.models().existingFileHelper) : new ModelFile.ExistingModelFile(new ResourceLocation("block/scaffolding_stable"), this.models().existingFileHelper)).build(), ScaffoldingBlock.field_220118_a, ScaffoldingBlock.WATERLOGGED);
this.getVariantBuilder(SCAFFOLDING_METHOD_TEST.get()).forAllStatesExcept((state) -> ConfiguredModel.builder().modelFile(state.get(ScaffoldingBlock.BOTTOM) ? new ModelFile.ExistingModelFile(new ResourceLocation("block/scaffolding_unstable"), this.models().existingFileHelper) : new ModelFile.ExistingModelFile(new ResourceLocation("block/scaffolding_stable"), this.models().existingFileHelper)).build(), ScaffoldingBlock.DISTANCE, ScaffoldingBlock.WATERLOGGED);
}
}

View File

@ -128,8 +128,8 @@ public class TRSRTransformerTest {
}
@Override
public boolean func_230044_c_() {
return base.func_230044_c_();
public boolean isSideLit() {
return base.isSideLit();
}
@Override

View File

@ -48,13 +48,13 @@ public class NameplateRenderingEventTest
if(event.getEntity() instanceof CowEntity)
{
event.setContent(new StringTextComponent("Evil Cow").func_240699_a_(TextFormatting.RED));
event.setContent(new StringTextComponent("Evil Cow").mergeStyle(TextFormatting.RED));
event.setResult(Event.Result.ALLOW);
}
if(event.getEntity() instanceof PlayerEntity)
{
event.setContent(event.getEntity().getDisplayName().func_230532_e_().func_240701_a_(TextFormatting.GOLD));
event.setContent(event.getEntity().getDisplayName().deepCopy().mergeStyle(TextFormatting.GOLD));
}
}
}

View File

@ -101,11 +101,11 @@ public class GravityAttributeTest
for(LivingEntity liv : list)
{
ModifiableAttributeInstance grav = liv.getAttribute(ForgeMod.ENTITY_GRAVITY.get());
boolean inPlains = liv.world.getBiome(liv.func_233580_cy_()).getCategory() == Category.PLAINS;
boolean inPlains = liv.world.getBiome(liv.getPosition()).getCategory() == Category.PLAINS;
if (inPlains && !grav.hasModifier(REDUCED_GRAVITY))
{
logger.info("Granted low gravity to Entity: {}", liv);
grav.func_233767_b_(REDUCED_GRAVITY);
grav.applyNonPersistentModifier(REDUCED_GRAVITY);
}
else if (!inPlains && grav.hasModifier(REDUCED_GRAVITY))
{

View File

@ -86,9 +86,9 @@ public class ContainerTypeTest
}
@Override
protected void func_230450_a_(MatrixStack mStack, float partialTicks, int mouseX, int mouseY)
protected void drawGuiContainerBackgroundLayer(MatrixStack mStack, float partialTicks, int mouseX, int mouseY)
{
func_238476_c_(mStack, this.field_230712_o_, getContainer().text, mouseX, mouseY, -1);
drawString(mStack, this.font, getContainer().text, mouseX, mouseY, -1);
}
}

View File

@ -101,7 +101,7 @@ public class CustomTagTypesTest
ItemStack itemStack = event.getItemStack();
if (!itemStack.isEmpty())
{
LOGGER.info("{} {} {}", Items.BONE.getTags(), OPTIONAL_TEST.func_230236_b_().size(), TagCollectionManager.func_242178_a().func_241836_b().get(new ResourceLocation(MODID, "optional_test")));
LOGGER.info("{} {} {}", Items.BONE.getTags(), OPTIONAL_TEST.getAllElements().size(), TagCollectionManager.getManager().getItemTags().get(new ResourceLocation(MODID, "optional_test")));
EnchantmentHelper.getEnchantments(itemStack).forEach((enchantment, level) -> logTagsIfPresent(enchantment.getTags()));
if (itemStack.getItem() instanceof PotionItem) logTagsIfPresent(PotionUtils.getPotionFromItem(itemStack).getTags());
TileEntity tileEntity = event.getWorld().getTileEntity(event.getPos());
@ -119,7 +119,7 @@ public class CustomTagTypesTest
public static class Custom extends ForgeRegistryEntry<Custom>
{
private final ReverseTagWrapper<Custom> reverseTags = new ReverseTagWrapper<>(this, () -> TagCollectionManager.func_242178_a().getCustomTypeCollection(CUSTOM_REG.get()));
private final ReverseTagWrapper<Custom> reverseTags = new ReverseTagWrapper<>(this, () -> TagCollectionManager.getManager().getCustomTypeCollection(CUSTOM_REG.get()));
public Set<ResourceLocation> getTags()
{
@ -128,7 +128,7 @@ public class CustomTagTypesTest
public boolean isIn(ITag<Custom> tag)
{
return tag.func_230235_a_(this);
return tag.contains(this);
}
}
@ -142,7 +142,7 @@ public class CustomTagTypesTest
@Override
protected void registerTags()
{
func_240522_a_(TESTS).func_240532_a_(CUSTOM.get());
getOrCreateBuilder(TESTS).addItemEntry(CUSTOM.get());
}
@Override
@ -162,7 +162,7 @@ public class CustomTagTypesTest
@Override
protected void registerTags()
{
func_240522_a_(FIRE).func_240534_a_(Enchantments.FIRE_ASPECT, Enchantments.FLAME);
getOrCreateBuilder(FIRE).add(Enchantments.FIRE_ASPECT, Enchantments.FLAME);
}
@Override
@ -182,7 +182,7 @@ public class CustomTagTypesTest
@Override
protected void registerTags()
{
func_240522_a_(DAMAGE).func_240534_a_(Potions.HARMING, Potions.STRONG_HARMING);
getOrCreateBuilder(DAMAGE).add(Potions.HARMING, Potions.STRONG_HARMING);
}
@Override
@ -202,7 +202,7 @@ public class CustomTagTypesTest
@Override
protected void registerTags()
{
func_240522_a_(STORAGE).func_240534_a_(TileEntityType.BARREL, TileEntityType.CHEST, TileEntityType.ENDER_CHEST);
getOrCreateBuilder(STORAGE).add(TileEntityType.BARREL, TileEntityType.CHEST, TileEntityType.ENDER_CHEST);
}
@Override

View File

@ -77,6 +77,6 @@ public class ChunkWatchEventTest
@Nullable
private static ResourceLocation getDimensionName(World w)
{
return w.func_234923_W_().func_240901_a_();
return w.getDimensionKey().getLocation();
}
}

View File

@ -44,12 +44,12 @@ public class StructureSpawnListGatherEventTest
private void onStructureSpawnListGather(StructureSpawnListGatherEvent event)
{
if (event.getStructure() == Structure.field_236375_k_)
if (event.getStructure() == Structure.STRONGHOLD)
{
event.addEntitySpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITHER_SKELETON, 100, 5, 15));
LOGGER.info("Adding wither skeleton spawns to strong holds");
}
else if (event.getStructure() == Structure.field_236373_i_)
else if (event.getStructure() == Structure.SHIPWRECK)
{
event.setInsideOnly(false);
event.addEntitySpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.GUARDIAN, 100, 5, 15));