Updated ForgeDev MCP Mapping Version (#6532)

This commit is contained in:
DaemonUmbra authored and GitHub committed 2020-02-25 19:45:14 -08:00
1 parent aca45340bf
commit 2ce4f5ece5
83 files changed
+392 -379

No files matched your search

@@ -93,7 +93,7 @@ public class ClientModLoader
SidedProvider.setClient(()->minecraft);
LogicalSidedProvider.setClient(()->minecraft);
LanguageHook.loadForgeAndMCLangs();
earlyLoaderGUI = new EarlyLoaderGUI(minecraft.func_228018_at_());
earlyLoaderGUI = new EarlyLoaderGUI(minecraft.getMainWindow());
createRunnableWithCatch(() -> ModLoader.get().gatherAndInitializeMods(earlyLoaderGUI::renderTick)).run();
ResourcePackLoader.loadResourcePacks(defaultResourcePacks, ClientModLoader::buildPackFinder);
mcResourceManager.addReloadListener(ClientModLoader::onreload);
@@ -95,7 +95,7 @@ public class EarlyLoaderGUI {
}
void renderMessage(final String message, final float[] colour, int line, float alpha) {
GlStateManager.func_227770_y_(GL11.GL_VERTEX_ARRAY);
GlStateManager.enableClientState(GL11.GL_VERTEX_ARRAY);
ByteBuffer charBuffer = MemoryUtil.memAlloc(message.length() * 270);
int quads = STBEasyFont.stb_easy_font_print(0, 0, message, null, charBuffer);
GL14.glVertexPointer(2, GL11.GL_FLOAT, 16, charBuffer);
@@ -208,10 +208,10 @@ public class GuiUtils
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder wr = tessellator.getBuffer();
wr.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX);
wr.func_225582_a_(x , y + height, zLevel).func_225583_a_( u * uScale, ((v + height) * vScale)).endVertex();
wr.func_225582_a_(x + width, y + height, zLevel).func_225583_a_((u + width) * uScale, ((v + height) * vScale)).endVertex();
wr.func_225582_a_(x + width, y , zLevel).func_225583_a_((u + width) * uScale, ( v * vScale)).endVertex();
wr.func_225582_a_(x , y , zLevel).func_225583_a_( u * uScale, ( v * vScale)).endVertex();
wr.pos(x , y + height, zLevel).tex( u * uScale, ((v + height) * vScale)).endVertex();
wr.pos(x + width, y + height, zLevel).tex((u + width) * uScale, ((v + height) * vScale)).endVertex();
wr.pos(x + width, y , zLevel).tex((u + width) * uScale, ( v * vScale)).endVertex();
wr.pos(x , y , zLevel).tex( u * uScale, ( v * vScale)).endVertex();
tessellator.draw();
}
@@ -374,10 +374,10 @@ public class GuiUtils
MinecraftForge.EVENT_BUS.post(new RenderTooltipEvent.PostBackground(stack, textLines, tooltipX, tooltipY, font, tooltipTextWidth, tooltipHeight));
IRenderTypeBuffer.Impl renderType = IRenderTypeBuffer.func_228455_a_(Tessellator.getInstance().getBuffer());
IRenderTypeBuffer.Impl renderType = IRenderTypeBuffer.getImpl(Tessellator.getInstance().getBuffer());
MatrixStack textStack = new MatrixStack();
textStack.func_227861_a_(0.0D, 0.0D, (double)zLevel);
Matrix4f textLocation = textStack.func_227866_c_().func_227870_a_();
textStack.translate(0.0D, 0.0D, (double)zLevel);
Matrix4f textLocation = textStack.getLast().getMatrix();
int tooltipTop = tooltipY;
@@ -385,7 +385,7 @@ public class GuiUtils
{
String line = textLines.get(lineNumber);
if (line != null)
font.func_228079_a_(line, (float)tooltipX, (float)tooltipY, -1, true, textLocation, renderType, false, 0, 15728880);
font.renderString(line, (float)tooltipX, (float)tooltipY, -1, true, textLocation, renderType, false, 0, 15728880);
if (lineNumber + 1 == titleLinesCount)
tooltipY += 2;
@@ -393,7 +393,7 @@ public class GuiUtils
tooltipY += 10;
}
renderType.func_228461_a_();
renderType.finish();
MinecraftForge.EVENT_BUS.post(new RenderTooltipEvent.PostText(stack, textLines, tooltipX, tooltipTop, font, tooltipTextWidth, tooltipHeight));
@@ -422,10 +422,10 @@ public class GuiUtils
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder buffer = tessellator.getBuffer();
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_COLOR);
buffer.func_225582_a_(right, top, zLevel).func_227885_a_(startRed, startGreen, startBlue, startAlpha).endVertex();
buffer.func_225582_a_( left, top, zLevel).func_227885_a_(startRed, startGreen, startBlue, startAlpha).endVertex();
buffer.func_225582_a_( left, bottom, zLevel).func_227885_a_( endRed, endGreen, endBlue, endAlpha).endVertex();
buffer.func_225582_a_(right, bottom, zLevel).func_227885_a_( endRed, endGreen, endBlue, endAlpha).endVertex();
buffer.pos(right, top, zLevel).color(startRed, startGreen, startBlue, startAlpha).endVertex();
buffer.pos( left, top, zLevel).color(startRed, startGreen, startBlue, startAlpha).endVertex();
buffer.pos( left, bottom, zLevel).color( endRed, endGreen, endBlue, endAlpha).endVertex();
buffer.pos(right, bottom, zLevel).color( endRed, endGreen, endBlue, endAlpha).endVertex();
tessellator.draw();
RenderSystem.shadeModel(GL11.GL_FLAT);
@@ -437,10 +437,10 @@ public class ModListScreen extends Screen
@Override
public void updateDynamicTexture() {
this.func_229148_d_();
this.bindTexture();
NativeImage td = this.getTextureData();
// Use custom "blur" value which controls texture filtering (nearest-neighbor vs linear)
this.getTextureData().func_227789_a_(0, 0, 0, 0, 0, td.getWidth(), td.getHeight(), selectedMod.getLogoBlur(), false, false, false);
this.getTextureData().uploadTextureSub(0, 0, 0, 0, 0, td.getWidth(), td.getHeight(), selectedMod.getLogoBlur(), false, false, false);
}
}), new Size2i(logo.getWidth(), logo.getHeight()));
}
@@ -53,6 +53,6 @@ public class RenderingRegistry
@SuppressWarnings("unchecked")
private static <T extends Entity> void register(EntityRendererManager manager, EntityType<T> entityType, IRenderFactory<?> renderFactory)
{
manager.func_229087_a_(entityType, ((IRenderFactory<T>)renderFactory).createRenderFor(manager));
manager.register(entityType, ((IRenderFactory<T>)renderFactory).createRenderFor(manager));
}
}
@@ -73,9 +73,9 @@ public class FMLPlayMessages
this.typeId = Registry.ENTITY_TYPE.getId(e.getType());
this.entityId = e.getEntityId();
this.uuid = e.getUniqueID();
this.posX = e.func_226277_ct_();
this.posY = e.func_226278_cu_();
this.posZ = e.func_226281_cx_();
this.posX = e.getPosX();
this.posY = e.getPosY();
this.posZ = e.getPosZ();
this.pitch = (byte) MathHelper.floor(e.rotationPitch * 256.0F / 360.0F);
this.yaw = (byte) MathHelper.floor(e.rotationYaw * 256.0F / 360.0F);
this.headYaw = (byte) (e.getRotationYawHead() * 256.0F / 360.0F);
@@ -158,7 +158,7 @@ public class FMLPlayMessages
return;
}
e.func_213312_b(msg.posX, msg.posY, msg.posZ);
e.setPacketCoordinates(msg.posX, msg.posY, msg.posZ);
e.setPositionAndRotation(msg.posX, msg.posY, msg.posZ, (msg.yaw * 360) / 256.0F, (msg.pitch * 360) / 256.0F);
e.setRotationYawHead((msg.headYaw * 360) / 256.0F);
e.setRenderYawOffset((msg.headYaw * 360) / 256.0F);
@@ -323,7 +323,7 @@ public class FMLPlayMessages
id = type.getId() + 1;
dimName = type.getRegistryName();
modDimensionName = type.getModType().getRegistryName();
skylight = type.func_218272_d();
skylight = type.hasSkyLight();
extraData = new PacketBuffer(Unpooled.buffer());
type.getModType().write(extraData, true);
}
@@ -82,12 +82,12 @@ public class DelegatingResourcePack extends ResourcePack
}
@Override
public Collection<ResourceLocation> func_225637_a_(ResourcePackType type, String pathIn, String pathIn2, int maxDepth, Predicate<String> filter)
public Collection<ResourceLocation> getAllResourceLocations(ResourcePackType type, String pathIn, String pathIn2, int maxDepth, Predicate<String> filter)
{
synchronized(delegates)
{
return delegates.stream()
.flatMap(r -> r.func_225637_a_(type, pathIn, pathIn2, maxDepth, filter).stream())
.flatMap(r -> r.getAllResourceLocations(type, pathIn, pathIn2, maxDepth, filter).stream())
.collect(Collectors.toList());
}
}
@@ -74,7 +74,7 @@ public class ModFileResourcePack extends DelegatableResourcePack
@Override
public Collection<ResourceLocation> func_225637_a_(ResourcePackType type, String resourceNamespace, String pathIn, int maxDepth, Predicate<String> filter)
public Collection<ResourceLocation> getAllResourceLocations(ResourcePackType type, String resourceNamespace, String pathIn, int maxDepth, Predicate<String> filter)
{
try
{