-
create a personal fork if you don't yet have one
-
clone the main repository to your pc, and add your personal fork as a secondary remote (after cloning) -- if you did it the other way around, it's fine, you just have to make sure you pull tags from the main repository, and not your fork!
if you already have a local clone, fetch from the main repository to make sure you have the latest commit
-
create a new work branch based off the correct branch, eg like, upstream/1.15.x
-
run gradlew setup and gradlew gen*Runs
-
do the thing and the changes, and test that it works as expected. write or update a test mod if the feature calls for it (as RenderNameplateEvent would)
-
run gradlew build to make sure it doesn't error when building, and gradlew genPatches to update the patch files with your changes (I recommend doing that often, as a backup strategy)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gigaherz.survivalist.rack; | |
import com.google.common.collect.Lists; | |
import net.minecraft.client.renderer.block.model.BakedQuad; | |
import net.minecraft.client.renderer.vertex.VertexFormat; | |
import net.minecraft.client.renderer.vertex.VertexFormatElement; | |
import javax.vecmath.Matrix4f; | |
import javax.vecmath.Vector4f; | |
import java.util.Arrays; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 0e33e41ca6e711812d0a38fd20703bce74792545 Mon Sep 17 00:00:00 2001 | |
From: David Quintana <[email protected]> | |
Date: Mon, 5 Aug 2019 01:40:44 +0200 | |
Subject: [PATCH] Netty logging | |
--- | |
src/fmllauncher/resources/log4j2.xml | 1 + | |
.../logging/ForgeNettyLogger.java | 504 ++++++++++++++++++ | |
.../minecraftforge/userdev/LaunchTesting.java | 4 + | |
3 files changed, 509 insertions(+) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gigaherz.survivalist.util; | |
import net.minecraft.nbt.*; | |
import net.minecraftforge.common.util.Constants; | |
import java.io.FileInputStream; | |
import java.io.IOException; | |
public class ReaderNBTLE | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ModelLoaderRegistry.registerLoader(new ResourceLocation(MODID, "separate_perspective"), SeparatePerspectiveModel.Loader.INSTANCE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gigaherz.survivalist.util; | |
import com.google.common.collect.ImmutableMap; | |
import com.google.common.collect.Maps; | |
import net.minecraft.client.renderer.BufferBuilder; | |
import net.minecraft.client.renderer.IRenderTypeBuffer; | |
import net.minecraft.client.renderer.Matrix4f; | |
import net.minecraft.client.renderer.RenderType; | |
import net.minecraft.client.renderer.vertex.VertexBuffer; | |
import net.minecraft.client.renderer.vertex.VertexFormat; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<migrationMap> | |
<name value="1.15.2 to 1.16.1" /> | |
<description value="1.15.2 to 1.16.1 MCPConfig changes" /> | |
<entry oldName="net.minecraft.entity.item.minecart.MinecartCommandBlockEntity" newName="net.minecraft.entity.item.minecart.CommandBlockMinecartEntity" type="class" /> | |
<entry oldName="net.minecraft.util.math.Matrix3f" newName="net.minecraft.util.math.vector.Matrix3f" type="class" /> | |
<entry oldName="net.minecraft.util.math.Matrix4f" newName="net.minecraft.util.math.vector.Matrix4f" type="class" /> | |
<entry oldName="net.minecraft.util.math.Vector3f" newName="net.minecraft.util.math.vector.Vector3f" type="class" /> | |
<entry oldName="net.minecraft.util.math.Vector4f" newName="net.minecraft.util.math.vector.Vector4f" type="class" /> | |
<entry oldName="net.minecraft.util.math.Vec2f" newName="net.minecraft.util.math.vector.Vector2f" type="class" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package gigaherz.signbutton; | |
import com.mojang.blaze3d.vertex.IVertexBuilder; | |
import net.minecraft.client.renderer.IRenderTypeBuffer; | |
import net.minecraft.client.renderer.RenderType; | |
public class MultiplyAlphaRenderTypeBuffer implements IRenderTypeBuffer | |
{ | |
private final IRenderTypeBuffer inner; | |
private final float constantAlpha; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static <T extends IModPacket> void registerPacket(SimpleChannel channel, int discriminator, PacketHandler<T> handler) | |
{ | |
channel.registerMessage(discriminator, handler.getPacketClass(), handler::encode, handler::decode, handler::handle); | |
} | |
public static abstract class PacketHandler<T extends IModPacket> | |
{ | |
private final Class<T> tClass; |