diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/issue_report.md similarity index 77% rename from .github/ISSUE_TEMPLATE/bug_report.md rename to .github/ISSUE_TEMPLATE/issue_report.md index c679cb8f8..9095acc8f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/issue_report.md @@ -1,8 +1,8 @@ --- -name: Bug report +name: Issue report about: Visit the forum first for issues with crashes. title: '' -labels: Bug +labels: Triage assignees: '' --- @@ -16,11 +16,11 @@ assignees: '' **Forge Version:** {Forge version. *Version number, not latest/rb*} -**Full Log:** {Link to GitHub Gist with full latest.log} +**Logs:** {Link(s) to GitHub Gist with full latest.log and/or crash report} **Steps to Reproduce:** 1. Do this 2. Then do that 3. ... -**Description of bug:** +**Description of issue:** diff --git a/docs/README.md b/docs/README.md index cbbd45c09..51879d96e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,8 +7,8 @@ Forge is a free, open-source modding API all of your favourite mods use! | Version | Support | | ------------- | ------------- | -| 1.14.2 | Active (latest) | -| 1.12.2 | Active (stable) | +| 1.14.x | Active (latest) | +| 1.12.x | Active (stable) | * [Download] * [Forum] diff --git a/mdk/build.gradle b/mdk/build.gradle index 1978015a9..ff823f9ff 100644 --- a/mdk/build.gradle +++ b/mdk/build.gradle @@ -28,7 +28,7 @@ minecraft { mappings channel: '@MAPPING_CHANNEL@', version: '@MAPPING_VERSION@' // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. - // accessTransformer = file('build/resources/main/META-INF/accesstransformer.cfg') + // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. // These can be tweaked, removed, or duplicated as needed. diff --git a/patches/minecraft/net/minecraft/client/MouseHelper.java.patch b/patches/minecraft/net/minecraft/client/MouseHelper.java.patch index ce8f495be..5dbc87c5c 100644 --- a/patches/minecraft/net/minecraft/client/MouseHelper.java.patch +++ b/patches/minecraft/net/minecraft/client/MouseHelper.java.patch @@ -49,3 +49,29 @@ }, "mouseDragged event handler", iguieventlistener.getClass().getCanonicalName()); } } +@@ -233,6 +241,10 @@ + return this.field_198039_d; + } + ++ public boolean isMiddleDown() { ++ return this.field_198038_c; ++ } ++ + public double func_198024_e() { + return this.field_198040_e; + } +@@ -241,6 +253,14 @@ + return this.field_198041_f; + } + ++ public double getXVelocity() { ++ return this.field_198048_m; ++ } ++ ++ public double getYVelocity() { ++ return this.field_198049_n; ++ } ++ + public void func_198021_g() { + this.field_198043_h = true; + } diff --git a/patches/minecraft/net/minecraft/entity/monster/EndermanEntity.java.patch b/patches/minecraft/net/minecraft/entity/monster/EndermanEntity.java.patch index ffbee3415..5ee8bf20a 100644 --- a/patches/minecraft/net/minecraft/entity/monster/EndermanEntity.java.patch +++ b/patches/minecraft/net/minecraft/entity/monster/EndermanEntity.java.patch @@ -1,5 +1,21 @@ --- a/net/minecraft/entity/monster/EndermanEntity.java +++ b/net/minecraft/entity/monster/EndermanEntity.java +@@ -92,7 +92,6 @@ + } + + public void func_70624_b(@Nullable LivingEntity p_70624_1_) { +- super.func_70624_b(p_70624_1_); + IAttributeInstance iattributeinstance = this.func_110148_a(SharedMonsterAttributes.field_111263_d); + if (p_70624_1_ == null) { + this.field_184721_by = 0; +@@ -106,6 +105,7 @@ + } + } + ++ super.func_70624_b(p_70624_1_); //Forge: Moved down to allow event handlers to write data manager values. + } + + protected void func_70088_a() { @@ -226,7 +226,9 @@ if (!this.field_70170_p.func_180495_p(blockpos$mutableblockpos).func_185904_a().func_76230_c()) { return false; diff --git a/patches/minecraft/net/minecraft/inventory/container/GrindstoneContainer.java.patch b/patches/minecraft/net/minecraft/inventory/container/GrindstoneContainer.java.patch new file mode 100644 index 000000000..bf8a2ac64 --- /dev/null +++ b/patches/minecraft/net/minecraft/inventory/container/GrindstoneContainer.java.patch @@ -0,0 +1,17 @@ +--- a/net/minecraft/inventory/container/GrindstoneContainer.java ++++ b/net/minecraft/inventory/container/GrindstoneContainer.java +@@ -141,10 +141,10 @@ + } + + Item item = itemstack.func_77973_b(); +- int k = item.func_77612_l() - itemstack.func_77952_i(); +- int l = item.func_77612_l() - itemstack1.func_77952_i(); +- int i1 = k + l + item.func_77612_l() * 5 / 100; +- i = Math.max(item.func_77612_l() - i1, 0); ++ int k = itemstack.func_77958_k() - itemstack.func_77952_i(); ++ int l = itemstack.func_77958_k() - itemstack1.func_77952_i(); ++ int i1 = k + l + itemstack.func_77958_k() * 5 / 100; ++ i = Math.max(itemstack.func_77958_k() - i1, 0); + itemstack2 = this.func_217011_b(itemstack, itemstack1); + if (!itemstack2.func_77984_f()) { + if (!ItemStack.func_77989_b(itemstack, itemstack1)) { diff --git a/patches/minecraft/net/minecraft/world/ServerWorld.java.patch b/patches/minecraft/net/minecraft/world/ServerWorld.java.patch index eecc8235c..f453e4b24 100644 --- a/patches/minecraft/net/minecraft/world/ServerWorld.java.patch +++ b/patches/minecraft/net/minecraft/world/ServerWorld.java.patch @@ -189,7 +189,15 @@ if (entityclassification != EntityClassification.MISC && this.func_72863_F().func_223435_b(entity)) { object2intmap.mergeInt(entityclassification, 1, Integer::sum); } -@@ -838,6 +857,7 @@ +@@ -814,6 +833,7 @@ + } + + private void func_217448_f(ServerPlayerEntity p_217448_1_) { ++ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.EntityJoinWorldEvent(p_217448_1_, this))) return; + Entity entity = this.field_175741_N.get(p_217448_1_.func_110124_au()); + if (entity != null) { + field_147491_a.warn("Force-added player with duplicate UUID {}", (Object)p_217448_1_.func_110124_au().toString()); +@@ -838,6 +858,7 @@ } else if (this.func_217478_l(p_72838_1_)) { return false; } else { @@ -197,7 +205,7 @@ IChunk ichunk = this.func_217353_a(MathHelper.func_76128_c(p_72838_1_.field_70165_t / 16.0D), MathHelper.func_76128_c(p_72838_1_.field_70161_v / 16.0D), ChunkStatus.field_222617_m, p_72838_1_.field_98038_p); if (!(ichunk instanceof Chunk)) { return false; -@@ -853,6 +873,7 @@ +@@ -853,6 +874,7 @@ if (this.func_217478_l(p_217440_1_)) { return false; } else { @@ -205,7 +213,7 @@ this.func_217465_m(p_217440_1_); return true; } -@@ -889,11 +910,15 @@ +@@ -889,11 +911,15 @@ } public void func_217484_g(Entity p_217484_1_) { @@ -222,7 +230,7 @@ this.field_175741_N.remove(p_217484_1_.func_110124_au()); this.func_72863_F().func_217226_b(p_217484_1_); -@@ -907,6 +932,7 @@ +@@ -907,6 +933,7 @@ this.field_217495_I.remove(((MobEntity)p_217484_1_).func_70661_as()); } @@ -230,7 +238,7 @@ } private void func_217465_m(Entity p_217465_1_) { -@@ -927,9 +953,13 @@ +@@ -927,9 +954,13 @@ } } @@ -244,7 +252,7 @@ if (this.field_217492_a) { throw new IllegalStateException("Removing entity while ticking!"); } else { -@@ -948,7 +978,10 @@ +@@ -948,7 +979,10 @@ } public void func_217434_e(ServerPlayerEntity p_217434_1_) { @@ -256,7 +264,7 @@ this.func_217467_h(p_217434_1_); this.func_72854_c(); } -@@ -973,10 +1006,20 @@ +@@ -973,10 +1007,20 @@ } public void func_184148_a(@Nullable PlayerEntity p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_) { @@ -277,7 +285,7 @@ this.field_73061_a.func_184103_al().func_148543_a(p_217384_1_, p_217384_2_.field_70165_t, p_217384_2_.field_70163_u, p_217384_2_.field_70161_v, p_217384_5_ > 1.0F ? (double)(16.0F * p_217384_5_) : 16.0D, this.field_73011_w.func_186058_p(), new SSpawnMovingSoundEffectPacket(p_217384_3_, p_217384_4_, p_217384_2_, p_217384_5_, p_217384_6_)); } -@@ -1012,6 +1055,7 @@ +@@ -1012,6 +1056,7 @@ public Explosion func_217401_a(@Nullable Entity p_217401_1_, DamageSource p_217401_2_, double p_217401_3_, double p_217401_5_, double p_217401_7_, float p_217401_9_, boolean p_217401_10_, Explosion.Mode p_217401_11_) { Explosion explosion = new Explosion(this, p_217401_1_, p_217401_3_, p_217401_5_, p_217401_7_, p_217401_9_, p_217401_10_, p_217401_11_); @@ -285,7 +293,7 @@ if (p_217401_2_ != null) { explosion.func_199592_a(p_217401_2_); } -@@ -1261,4 +1305,15 @@ +@@ -1261,4 +1306,15 @@ public void func_217489_a(IReputationType p_217489_1_, Entity p_217489_2_, IReputationTracking p_217489_3_) { p_217489_3_.func_213739_a(p_217489_1_, p_217489_2_); } diff --git a/src/main/java/net/minecraftforge/client/ForgeIngameGui.java b/src/main/java/net/minecraftforge/client/ForgeIngameGui.java index fc463f918..385ccbb7d 100644 --- a/src/main/java/net/minecraftforge/client/ForgeIngameGui.java +++ b/src/main/java/net/minecraftforge/client/ForgeIngameGui.java @@ -88,6 +88,10 @@ public class ForgeIngameGui extends IngameGui public static int left_height = 39; public static int right_height = 39; + /* + * If the Euclidian distance to the moused-over block in meters is less than this value, the "Looking at" text will appear on the debug overlay. + */ + public static double rayTraceDistance = 20.0D; private FontRenderer fontrenderer = null; private RenderGameOverlayEvent eventParent; @@ -842,8 +846,8 @@ public class ForgeIngameGui extends IngameGui public void update() { Entity entity = this.mc.getRenderViewEntity(); - this.rayTraceBlock = entity.func_213324_a(20.0D, 0.0F, false); - this.rayTraceFluid = entity.func_213324_a(20.0D, 0.0F, true); + this.rayTraceBlock = entity.func_213324_a(rayTraceDistance, 0.0F, false); + this.rayTraceFluid = entity.func_213324_a(rayTraceDistance, 0.0F, true); } @Override protected void renderDebugInfoLeft(){} @Override protected void renderDebugInfoRight(){} diff --git a/src/main/java/net/minecraftforge/items/wrapper/SidedInvWrapper.java b/src/main/java/net/minecraftforge/items/wrapper/SidedInvWrapper.java index eba132e87..282c75d79 100644 --- a/src/main/java/net/minecraftforge/items/wrapper/SidedInvWrapper.java +++ b/src/main/java/net/minecraftforge/items/wrapper/SidedInvWrapper.java @@ -27,10 +27,12 @@ import net.minecraftforge.items.IItemHandlerModifiable; import net.minecraftforge.items.ItemHandlerHelper; import javax.annotation.Nonnull; +import javax.annotation.Nullable; public class SidedInvWrapper implements IItemHandlerModifiable { protected final ISidedInventory inv; + @Nullable protected final Direction side; @SuppressWarnings("unchecked") @@ -43,13 +45,13 @@ public class SidedInvWrapper implements IItemHandlerModifiable return ret; } - public SidedInvWrapper(ISidedInventory inv, Direction side) + public SidedInvWrapper(ISidedInventory inv, @Nullable Direction side) { this.inv = inv; this.side = side; } - public static int getSlot(ISidedInventory inv, int slot, Direction side) + public static int getSlot(ISidedInventory inv, int slot, @Nullable Direction side) { int[] slots = inv.getSlotsForFace(side); if (slot < slots.length) @@ -74,7 +76,7 @@ public class SidedInvWrapper implements IItemHandlerModifiable public int hashCode() { int result = inv.hashCode(); - result = 31 * result + side.hashCode(); + result = 31 * result + (side == null ? 0 : side.hashCode()); return result; } diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg index 76b86fa54..5bb8d57ad 100644 --- a/src/main/resources/META-INF/accesstransformer.cfg +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -417,3 +417,7 @@ public net.minecraft.world.gen.IChunkGeneratorFactory #ParticleType ctors public net.minecraft.particles.ParticleType (ZLnet/minecraft/particles/IParticleData$IDeserializer;)V public net.minecraft.particles.BasicParticleType (Z)V + +# ParticleManager +public net.minecraft.client.particle.ParticleManager func_199283_a(Lnet/minecraft/particles/ParticleType;Lnet/minecraft/client/particle/IParticleFactory;)V # registerFactory +public net.minecraft.client.particle.ParticleManager func_215234_a(Lnet/minecraft/particles/ParticleType;Lnet/minecraft/client/particle/ParticleManager$IParticleMetaFactory;)V # registerFactory \ No newline at end of file