Fix swim speed being incorrect. Closes #6845

Fix BreakSpeedEvent having null position. Closes #6844
Add MatrixStack to BackgroundDrawnEvent. Closes #6843
Fix some patches that should of been ATs. Closes #6839
Add getter to ServerPlayer to access client's language calue if sent. Closes #6829
Some patch cleanup.
This commit is contained in:
LexManos 2020-06-26 16:07:40 -07:00
commit af9bb9641b
19 changed files with 122 additions and 173 deletions

4
.gitignore vendored
View file

@ -43,3 +43,7 @@ changelog.txt
gradle.properties
!/mdk/gradle.properties
/projects/forge/rejects/
# Srg2Source causes import bugs on these patches. If you intentionnally change these, remove the ignore.
/patches/minecraft/net/minecraft/client/renderer/ViewFrustum.java.patch
/patches/minecraft/net/minecraft/data/BlockModelDefinition.java.patch

View file

@ -10,15 +10,7 @@
protected static final Direction[] field_212556_a = new Direction[]{Direction.WEST, Direction.EAST, Direction.NORTH, Direction.SOUTH, Direction.DOWN, Direction.UP};
protected final Material field_149764_J;
protected final boolean field_235688_at_;
@@ -71,6 +72,7 @@
protected final float field_226887_g_;
protected final boolean field_208621_p;
protected final AbstractBlock.Properties field_235684_aB_;
+
@Nullable
protected ResourceLocation field_220085_g;
@@ -86,6 +88,8 @@
@@ -86,6 +87,8 @@
this.field_226887_g_ = p_i241196_1_.field_226894_k_;
this.field_208621_p = p_i241196_1_.field_208772_j;
this.field_235684_aB_ = p_i241196_1_;
@ -27,7 +19,7 @@
}
@Deprecated
@@ -128,7 +132,7 @@
@@ -128,7 +131,7 @@
@Deprecated
public void func_196243_a(BlockState p_196243_1_, World p_196243_2_, BlockPos p_196243_3_, BlockState p_196243_4_, boolean p_196243_5_) {
@ -36,7 +28,7 @@
p_196243_2_.func_175713_t(p_196243_3_);
}
@@ -190,7 +194,7 @@
@@ -190,7 +193,7 @@
@Deprecated
public boolean func_196253_a(BlockState p_196253_1_, BlockItemUseContext p_196253_2_) {
@ -45,16 +37,18 @@
}
@Deprecated
@@ -293,7 +297,7 @@
@@ -293,8 +296,8 @@
if (f == -1.0F) {
return 0.0F;
} else {
- int i = p_180647_2_.func_234569_d_(p_180647_1_) ? 30 : 100;
- return p_180647_2_.func_184813_a(p_180647_1_) / f / (float)i;
+ int i = net.minecraftforge.common.ForgeHooks.canHarvestBlock(p_180647_1_, p_180647_2_, p_180647_3_, p_180647_4_) ? 30 : 100;
return p_180647_2_.func_184813_a(p_180647_1_) / f / (float)i;
+ return p_180647_2_.getDigSpeed(p_180647_1_, p_180647_4_) / f / (float)i;
}
}
@@ -320,14 +324,14 @@
@@ -320,14 +323,14 @@
return 0;
}
@ -71,7 +65,7 @@
}
return this.field_220085_g;
@@ -345,6 +349,10 @@
@@ -345,6 +348,10 @@
return this.field_235684_aB_.field_235800_b_.apply(this.func_230328_p_().func_176223_P());
}
@ -82,7 +76,7 @@
public abstract static class AbstractBlockState extends StateHolder<Block, BlockState> {
private final int field_215708_d;
private final boolean field_215709_e;
@@ -427,6 +435,8 @@
@@ -427,6 +434,8 @@
return this.field_215708_d;
}
@ -91,7 +85,7 @@
public boolean func_196958_f() {
return this.field_235702_f_;
}
@@ -435,6 +445,8 @@
@@ -435,6 +444,8 @@
return this.field_235704_h_;
}
@ -100,7 +94,7 @@
public BlockState func_185907_a(Rotation p_185907_1_) {
return this.func_177230_c().func_185499_a(this.func_230340_p_(), p_185907_1_);
}
@@ -786,6 +798,9 @@
@@ -786,6 +797,9 @@
private ResourceLocation field_222381_j;
private boolean field_226895_m_ = true;
private boolean field_235813_o_;
@ -110,7 +104,7 @@
private AbstractBlock.IExtendedPositionPredicate<EntityType<?>> field_235814_p_ = (p_235832_0_, p_235832_1_, p_235832_2_, p_235832_3_) -> {
return p_235832_0_.func_224755_d(p_235832_1_, p_235832_2_, Direction.UP) && p_235832_0_.func_185906_d() < 14;
};
@@ -847,6 +862,8 @@
@@ -847,6 +861,8 @@
abstractblock$properties.field_226895_m_ = p_200950_0_.field_235684_aB_.field_226895_m_;
abstractblock$properties.field_235813_o_ = p_200950_0_.field_235684_aB_.field_235813_o_;
abstractblock$properties.field_235806_h_ = p_200950_0_.field_235684_aB_.field_235806_h_;
@ -119,7 +113,7 @@
return abstractblock$properties;
}
@@ -861,6 +878,16 @@
@@ -861,6 +877,16 @@
return this;
}
@ -136,7 +130,7 @@
public AbstractBlock.Properties func_200941_a(float p_200941_1_) {
this.field_200961_i = p_200941_1_;
return this;
@@ -917,7 +944,7 @@
@@ -917,7 +943,7 @@
}
public AbstractBlock.Properties func_222379_b(Block p_222379_1_) {

View file

@ -60,7 +60,7 @@
public void func_238651_a_(MatrixStack p_238651_1_, int p_238651_2_) {
if (this.field_230706_i_.field_71441_e != null) {
this.func_238468_a_(p_238651_1_, 0, 0, this.field_230708_k_, this.field_230709_l_, -1072689136, -804253680);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this));
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this, p_238651_1_));
} else {
this.func_231165_f_(p_238651_2_);
}
@ -68,7 +68,7 @@
bufferbuilder.func_225582_a_((double)this.field_230708_k_, 0.0D, 0.0D).func_225583_a_((float)this.field_230708_k_ / 32.0F, (float)p_231165_1_).func_225586_a_(64, 64, 64, 255).func_181675_d();
bufferbuilder.func_225582_a_(0.0D, 0.0D, 0.0D).func_225583_a_(0.0F, (float)p_231165_1_).func_225586_a_(64, 64, 64, 255).func_181675_d();
tessellator.func_78381_a();
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this));
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent(this, new MatrixStack()));
}
public boolean func_231177_au__() {

View file

@ -1,14 +1,6 @@
--- a/net/minecraft/client/renderer/BufferBuilder.java
+++ b/net/minecraft/client/renderer/BufferBuilder.java
@@ -121,7 +121,6 @@
bitset.set(l);
}
-
}
private void func_227829_a_(FloatBuffer p_227829_1_, int p_227829_2_) {
@@ -297,6 +296,7 @@
@@ -297,6 +297,7 @@
}
ByteBuffer bytebuffer = this.field_179001_a.slice();
@ -16,7 +8,7 @@
((Buffer)this.field_179001_a).clear();
return Pair.of(bufferbuilder$drawstate, bytebuffer);
}
@@ -364,4 +364,15 @@
@@ -364,4 +365,15 @@
this.field_179018_e = p_i225907_2_;
}
}

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/client/renderer/ViewFrustum.java
+++ b/net/minecraft/client/renderer/ViewFrustum.java
@@ -8,6 +8,8 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
+import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher.ChunkRender;
+
@OnlyIn(Dist.CLIENT)
public class ViewFrustum {
protected final WorldRenderer field_178169_a;

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/data/BlockModelDefinition.java
+++ b/net/minecraft/data/BlockModelDefinition.java
@@ -8,6 +8,8 @@
import java.util.Map;
import java.util.function.Supplier;
+import net.minecraft.data.BlockModeInfo.Field;
+
public class BlockModelDefinition implements Supplier<JsonElement> {
private final Map<BlockModeInfo<?>, BlockModeInfo<?>.Field> field_240193_a_ = Maps.newLinkedHashMap();

View file

@ -310,7 +310,7 @@
}
protected float func_189749_co() {
@@ -1868,16 +1896,20 @@
@@ -1868,11 +1896,15 @@
public void func_213352_e(Vector3d p_213352_1_) {
if (this.func_70613_aW() || this.func_184186_bw()) {
double d0 = 0.08D;
@ -327,12 +327,6 @@
FluidState fluidstate = this.field_70170_p.func_204610_c(this.func_233580_cy_());
if (this.func_70090_H() && this.func_241208_cS_() && !this.func_230285_a_(fluidstate.func_206886_c())) {
double d8 = this.func_226278_cu_();
- float f5 = this.func_70051_ag() ? 0.9F : this.func_189749_co();
+ float f5 = this.field_70170_p.func_180495_p(this.func_226270_aj_()).getSlipperiness(field_70170_p, this.func_226270_aj_(), this);
float f6 = 0.02F;
float f7 = (float)EnchantmentHelper.func_185294_d(this);
if (f7 > 3.0F) {
@@ -1897,6 +1929,7 @@
f5 = 0.96F;
}
@ -341,6 +335,15 @@
this.func_213309_a(f6, p_213352_1_);
this.func_213315_a(MoverType.SELF, this.func_213322_ci());
Vector3d vector3d6 = this.func_213322_ci();
@@ -1975,7 +2008,7 @@
}
} else {
BlockPos blockpos = this.func_226270_aj_();
- float f3 = this.field_70170_p.func_180495_p(blockpos).func_177230_c().func_208618_m();
+ float f3 = this.field_70170_p.func_180495_p(this.func_226270_aj_()).getSlipperiness(field_70170_p, this.func_226270_aj_(), this);
float f4 = this.field_70122_E ? f3 * 0.91F : 0.91F;
Vector3d vector3d5 = this.func_233633_a_(p_213352_1_, f3);
double d2 = vector3d5.field_72448_b;
@@ -2075,6 +2108,7 @@
}

View file

@ -1,21 +1,6 @@
--- a/net/minecraft/entity/player/ServerPlayerEntity.java
+++ b/net/minecraft/entity/player/ServerPlayerEntity.java
@@ -3,12 +3,8 @@
import com.google.common.collect.Lists;
import com.mojang.authlib.GameProfile;
import com.mojang.datafixers.util.Either;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.OptionalInt;
-import java.util.Random;
-import java.util.UUID;
+
+import java.util.*;
import javax.annotation.Nullable;
import net.minecraft.advancements.CriteriaTriggers;
import net.minecraft.advancements.PlayerAdvancements;
@@ -464,6 +460,7 @@
@@ -464,6 +464,7 @@
}
public void func_70645_a(DamageSource p_70645_1_) {
@ -23,7 +8,7 @@
boolean flag = this.field_70170_p.func_82736_K().func_223586_b(GameRules.field_223609_l);
if (flag) {
ITextComponent itextcomponent = this.func_110142_aN().func_151521_b();
@@ -597,12 +594,13 @@
@@ -597,12 +598,13 @@
@Nullable
public Entity func_241206_a_(ServerWorld p_241206_1_) {
@ -38,7 +23,7 @@
if (!this.field_71136_j) {
this.field_71136_j = true;
this.field_71135_a.func_147359_a(new SChangeGameStatePacket(SChangeGameStatePacket.field_241768_e_, this.field_192040_cp ? 0.0F : 1.0F));
@@ -616,8 +614,8 @@
@@ -616,8 +618,8 @@
this.field_71135_a.func_147359_a(new SServerDifficultyPacket(iworldinfo.func_176130_y(), iworldinfo.func_176123_z()));
PlayerList playerlist = this.field_71133_b.func_184103_al();
playerlist.func_187243_f(this);
@ -49,7 +34,7 @@
double d0 = this.func_226277_ct_();
double d1 = this.func_226278_cu_();
double d2 = this.func_226281_cx_();
@@ -689,6 +687,7 @@
@@ -689,6 +691,7 @@
this.field_71144_ck = -1;
this.field_71149_ch = -1.0F;
this.field_71146_ci = -1;
@ -57,17 +42,17 @@
return this;
}
}
@@ -731,6 +730,9 @@
@@ -731,6 +734,9 @@
}
public Either<PlayerEntity.SleepResult, Unit> func_213819_a(BlockPos p_213819_1_) {
+ Optional<BlockPos> optAt = Optional.of(p_213819_1_);
+ java.util.Optional<BlockPos> optAt = java.util.Optional.of(p_213819_1_);
+ PlayerEntity.SleepResult ret = net.minecraftforge.event.ForgeEventFactory.onPlayerSleepInBed(this, optAt);
+ if (ret != null) return Either.left(ret);
Direction direction = this.field_70170_p.func_180495_p(p_213819_1_).func_177229_b(HorizontalBlock.field_185512_D);
if (!this.func_70608_bn() && this.func_70089_S()) {
if (!this.field_70170_p.func_230315_m_().func_236043_f_()) {
@@ -775,6 +777,7 @@
@@ -775,6 +781,7 @@
}
private boolean func_241147_a_(BlockPos p_241147_1_, Direction p_241147_2_) {
@ -75,7 +60,7 @@
return this.func_241158_g_(p_241147_1_) || this.func_241158_g_(p_241147_1_.func_177972_a(p_241147_2_.func_176734_d()));
}
@@ -874,6 +877,7 @@
@@ -874,6 +881,7 @@
this.field_71135_a.func_147359_a(new SOpenWindowPacket(container.field_75152_c, container.func_216957_a(), p_213829_1_.func_145748_c_()));
container.func_75132_a(this);
this.field_71070_bA = container;
@ -83,7 +68,7 @@
return OptionalInt.of(this.field_71139_cq);
}
}
@@ -892,6 +896,7 @@
@@ -892,6 +900,7 @@
this.field_71135_a.func_147359_a(new SOpenHorseWindowPacket(this.field_71139_cq, p_184826_2_.func_70302_i_(), p_184826_1_.func_145782_y()));
this.field_71070_bA = new HorseInventoryContainer(this.field_71139_cq, this.field_71071_by, p_184826_2_, p_184826_1_);
this.field_71070_bA.func_75132_a(this);
@ -91,7 +76,7 @@
}
public void func_184814_a(ItemStack p_184814_1_, Hand p_184814_2_) {
@@ -949,6 +954,7 @@
@@ -949,6 +958,7 @@
public void func_71128_l() {
this.field_71070_bA.func_75134_a(this);
@ -99,7 +84,7 @@
this.field_71070_bA = this.field_71069_bz;
}
@@ -1075,6 +1081,13 @@
@@ -1075,6 +1085,13 @@
this.field_193110_cw = p_193104_1_.field_193110_cw;
this.func_192029_h(p_193104_1_.func_192023_dk());
this.func_192031_i(p_193104_1_.func_192025_dl());
@ -113,7 +98,15 @@
}
protected void func_70670_a(EffectInstance p_70670_1_) {
@@ -1291,14 +1304,14 @@
@@ -1181,6 +1198,7 @@
this.field_71140_co = p_147100_1_.func_149520_f();
this.func_184212_Q().func_187227_b(field_184827_bp, (byte)p_147100_1_.func_149521_d());
this.func_184212_Q().func_187227_b(field_184828_bq, (byte)(p_147100_1_.func_186991_f() == HandSide.LEFT ? 0 : 1));
+ this.language = p_147100_1_.getLanguage();
}
public ChatVisibility func_147096_v() {
@@ -1291,14 +1309,14 @@
this.func_184210_p();
if (p_200619_1_ == this.field_70170_p) {
this.field_71135_a.func_147364_a(p_200619_2_, p_200619_4_, p_200619_6_, p_200619_8_, p_200619_9_);
@ -131,7 +124,7 @@
this.func_70012_b(p_200619_2_, p_200619_4_, p_200619_6_, p_200619_8_, p_200619_9_);
this.func_70029_a(p_200619_1_);
p_200619_1_.func_217446_a(this);
@@ -1307,6 +1320,7 @@
@@ -1307,6 +1325,7 @@
this.field_71134_c.func_73080_a(p_200619_1_);
this.field_71133_b.func_184103_al().func_72354_b(this, p_200619_1_);
this.field_71133_b.func_184103_al().func_72385_f(this);
@ -139,7 +132,7 @@
}
}
@@ -1375,6 +1389,8 @@
@@ -1375,6 +1394,8 @@
if (itementity == null) {
return null;
} else {
@ -148,3 +141,17 @@
this.field_70170_p.func_217376_c(itementity);
ItemStack itemstack = itementity.func_92059_d();
if (p_146097_3_) {
@@ -1388,4 +1409,13 @@
return itementity;
}
}
+
+ private String language = "en_us";
+ /**
+ * Returns the language last reported by the player as their local language.
+ * Defaults to en_us if the value is unknown.
+ */
+ public String getLanguage() {
+ return this.language;
+ }
}

View file

@ -6,16 +6,16 @@
private final boolean field_221474_e;
- private final List<Pair<EffectInstance, Float>> field_221475_f;
+ private final List<Pair<java.util.function.Supplier<EffectInstance>, Float>> field_221475_f;
+
+ private Food(Food.Builder builder) {
+ this.field_221470_a = builder.field_221458_a;
+ this.field_221471_b = builder.field_221459_b;
+ this.field_221472_c = builder.field_221460_c;
+ this.field_221473_d = builder.field_221461_d;
+ this.field_221474_e = builder.field_221462_e;
+ this.field_221475_f = builder.field_221463_f;
+ }
+ private Food(Food.Builder builder) {
+ this.field_221470_a = builder.field_221458_a;
+ this.field_221471_b = builder.field_221459_b;
+ this.field_221472_c = builder.field_221460_c;
+ this.field_221473_d = builder.field_221461_d;
+ this.field_221474_e = builder.field_221462_e;
+ this.field_221475_f = builder.field_221463_f;
+ }
+
+ // Forge: Use builder method instead
+ @Deprecated
private Food(int p_i50106_1_, float p_i50106_2_, boolean p_i50106_3_, boolean p_i50106_4_, boolean p_i50106_5_, List<Pair<EffectInstance, Float>> p_i50106_6_) {
@ -47,16 +47,15 @@
public Food.Builder func_221456_a(int p_221456_1_) {
this.field_221458_a = p_221456_1_;
@@ -78,14 +89,21 @@
this.field_221462_e = true;
@@ -79,13 +90,20 @@
return this;
}
+
+ public Food.Builder effect(java.util.function.Supplier<EffectInstance> effectIn, float probability) {
+ this.field_221463_f.add(Pair.of(effectIn, probability));
+ return this;
+ }
+
+ // Forge: Use supplier method instead
+ @Deprecated
public Food.Builder func_221452_a(EffectInstance p_221452_1_, float p_221452_2_) {

View file

@ -131,15 +131,7 @@
public Item.Properties func_221540_a(Food p_221540_1_) {
this.field_221541_f = p_221540_1_;
@@ -368,6 +414,7 @@
return this;
}
+
public Item.Properties func_208103_a(Rarity p_208103_1_) {
this.field_208104_e = p_208103_1_;
return this;
@@ -377,5 +424,20 @@
@@ -377,5 +423,20 @@
this.field_234688_g_ = true;
return this;
}

View file

@ -0,0 +1,11 @@
--- a/net/minecraft/network/play/client/CClientSettingsPacket.java
+++ b/net/minecraft/network/play/client/CClientSettingsPacket.java
@@ -67,4 +67,8 @@
public HandSide func_186991_f() {
return this.field_186992_f;
}
+
+ public String getLanguage() {
+ return this.field_149530_a;
+ }
}

View file

@ -1,18 +1,6 @@
--- a/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
@@ -12,10 +12,7 @@
import java.net.InetAddress;
import java.net.Proxy;
import java.nio.charset.StandardCharsets;
-import java.util.Collections;
-import java.util.List;
-import java.util.Locale;
-import java.util.Optional;
+import java.util.*;
import java.util.function.BooleanSupplier;
import java.util.regex.Pattern;
import javax.annotation.Nullable;
@@ -77,6 +74,7 @@
@@ -77,6 +77,7 @@
public boolean func_71197_b() throws IOException {
Thread thread = new Thread("Server console handler") {
public void run() {
@ -20,7 +8,7 @@
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8));
String s1;
@@ -98,7 +96,9 @@
@@ -98,7 +99,9 @@
field_155771_h.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
}
@ -30,7 +18,7 @@
ServerProperties serverproperties = this.field_71340_o.func_219034_a();
if (this.func_71264_H()) {
this.func_71189_e("127.0.0.1");
@@ -153,17 +153,20 @@
@@ -153,17 +156,20 @@
if (!PreYggdrasilConverter.func_219587_e(this)) {
return false;
} else {
@ -51,7 +39,7 @@
if (serverproperties.field_219027_u != null) {
this.func_200252_aR().func_223585_a(GameRules.field_223620_w).func_223570_a(serverproperties.field_219027_u, this);
}
@@ -175,6 +178,7 @@
@@ -175,6 +181,7 @@
}
if (serverproperties.field_219030_x) {
@ -59,7 +47,7 @@
field_155771_h.info("Starting remote control listener");
this.field_71339_n = new MainThread(this);
this.field_71339_n.func_72602_a();
@@ -193,7 +197,8 @@
@@ -193,7 +200,8 @@
ServerInfoMBean.func_233490_a_(this);
}
@ -69,12 +57,12 @@
}
}
@@ -506,6 +511,11 @@
@@ -506,6 +514,11 @@
return false;
}
+ @Override //Forge: Enable formated text for colors in console.
+ public void func_145747_a(net.minecraft.util.text.ITextComponent message, UUID p_145747_2_) {
+ public void func_145747_a(net.minecraft.util.text.ITextComponent message, java.util.UUID p_145747_2_) {
+ field_155771_h.info(message.getString());
+ }
+

View file

@ -1,19 +0,0 @@
--- a/net/minecraft/tags/BlockTags.java
+++ b/net/minecraft/tags/BlockTags.java
@@ -76,6 +76,7 @@
public static final ITag.INamedTag<Block> field_232873_an_ = func_199894_a("nylium");
public static final ITag.INamedTag<Block> field_232874_ao_ = func_199894_a("wart_blocks");
public static final ITag.INamedTag<Block> field_232875_ap_ = func_199894_a("beacon_base_blocks");
+
public static final ITag.INamedTag<Block> field_232876_aq_ = func_199894_a("soul_speed_blocks");
public static final ITag.INamedTag<Block> field_232877_ar_ = func_199894_a("wall_post_override");
public static final ITag.INamedTag<Block> field_232878_as_ = func_199894_a("climbable");
@@ -92,7 +93,7 @@
public static final ITag.INamedTag<Block> field_241278_aD_ = func_199894_a("infiniburn_nether");
public static final ITag.INamedTag<Block> field_241279_aE_ = func_199894_a("infiniburn_end");
- private static ITag.INamedTag<Block> func_199894_a(String p_199894_0_) {
+ public static ITag.INamedTag<Block> func_199894_a(String p_199894_0_) {
return field_199899_c.func_232937_a_(p_199894_0_);
}

View file

@ -1,11 +0,0 @@
--- a/net/minecraft/tags/ItemTags.java
+++ b/net/minecraft/tags/ItemTags.java
@@ -63,7 +63,7 @@
public static final ITag.INamedTag<Item> field_232909_aa_ = func_199901_a("stone_tool_materials");
public static final ITag.INamedTag<Item> field_232910_ab_ = func_199901_a("furnace_materials");
- private static ITag.INamedTag<Item> func_199901_a(String p_199901_0_) {
+ public static ITag.INamedTag<Item> func_199901_a(String p_199901_0_) {
return field_199906_c.func_232937_a_(p_199901_0_);
}

View file

@ -1,15 +1,11 @@
--- a/net/minecraft/world/gen/feature/structure/Structure.java
+++ b/net/minecraft/world/gen/feature/structure/Structure.java
@@ -32,10 +32,11 @@
import net.minecraft.world.gen.feature.StructureFeature;
import net.minecraft.world.gen.feature.template.TemplateManager;
import net.minecraft.world.gen.settings.StructureSeparationSettings;
+import net.minecraftforge.registries.ForgeRegistryEntry;
@@ -35,7 +35,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-public abstract class Structure<C extends IFeatureConfig> {
+public abstract class Structure<C extends IFeatureConfig> extends ForgeRegistryEntry<Structure<?>> {
+public abstract class Structure<C extends IFeatureConfig> extends net.minecraftforge.registries.ForgeRegistryEntry<Structure<?>> {
public static final BiMap<String, Structure<?>> field_236365_a_ = HashBiMap.create();
private static final Map<Structure<?>, GenerationStage.Decoration> field_236385_u_ = Maps.newHashMap();
private static final Logger field_208204_b = LogManager.getLogger();

View file

@ -7,7 +7,7 @@
- public abstract Template.BlockInfo func_230386_a_(IWorldReader p_230386_1_, BlockPos p_230386_2_, BlockPos p_230386_3_, Template.BlockInfo p_230386_4_, Template.BlockInfo p_230386_5_, PlacementSettings p_230386_6_);
+ @Deprecated //Forge: Use process below, with the Template context
+ public Template.BlockInfo func_230386_a_(IWorldReader p_230386_1_, BlockPos p_230386_2_, BlockPos p_230386_3_, Template.BlockInfo p_230386_4_, Template.BlockInfo p_230386_5_, PlacementSettings p_230386_6_) {
+ return p_230386_5_;
+ return p_230386_5_;
+ }
protected abstract IStructureProcessorType<?> func_215192_a();

View file

@ -35,7 +35,7 @@
+ @Deprecated //Use Forge version
public static List<Template.BlockInfo> func_237145_a_(IWorld p_237145_0_, BlockPos p_237145_1_, BlockPos p_237145_2_, PlacementSettings p_237145_3_, List<Template.BlockInfo> p_237145_4_) {
+ return processBlockInfos(p_237145_0_, p_237145_1_, p_237145_2_, p_237145_3_, p_237145_4_, null);
+ return processBlockInfos(p_237145_0_, p_237145_1_, p_237145_2_, p_237145_3_, p_237145_4_, null);
+ }
+
+ public static List<Template.BlockInfo> processBlockInfos(IWorld p_237145_0_, BlockPos p_237145_1_, BlockPos p_237145_2_, PlacementSettings p_237145_3_, List<Template.BlockInfo> p_237145_4_, @Nullable Template template) {

View file

@ -205,9 +205,20 @@ public class GuiScreenEvent extends Event
*/
public static class BackgroundDrawnEvent extends GuiScreenEvent
{
public BackgroundDrawnEvent(Screen gui)
private final MatrixStack mStack;
public BackgroundDrawnEvent(Screen gui, MatrixStack mStack)
{
super(gui);
this.mStack = mStack;
}
/**
* The MatrixStack to render with.
*/
public MatrixStack getMatrixStack()
{
return mStack;
}
}

View file

@ -122,6 +122,7 @@ public net.minecraft.inventory.container.ContainerType$IFactory
public net.minecraft.inventory.container.RepairContainer field_82856_l #RepairContainer/stackSizeToBeUsedInRepair
public net.minecraft.item.AxeItem <init>(Lnet/minecraft/item/IItemTier;FFLnet/minecraft/item/Item$Properties;)V
public-f net.minecraft.item.ItemGroup field_78032_a # group array
public net.minecraft.item.ItemModelsProperties func_239418_a_(Lnet/minecraft/item/Item;Lnet/minecraft/util/ResourceLocation;Lnet/minecraft/item/IItemPropertyGetter;)V
public net.minecraft.item.PickaxeItem <init>(Lnet/minecraft/item/IItemTier;IFLnet/minecraft/item/Item$Properties;)V
public-f net.minecraft.item.crafting.Ingredient
protected net.minecraft.item.crafting.Ingredient <init>(Ljava/util/stream/Stream;)V
@ -144,6 +145,10 @@ public net.minecraft.resources.FallbackResourceManager field_199023_a # resource
public net.minecraft.resources.ResourcePack field_195771_a # file
protected net.minecraft.server.MinecraftServer field_211151_aa # serverTime
public net.minecraft.server.dedicated.DedicatedServer field_71341_l # pendingCommandList
public net.minecraft.tags.BlockTags func_199894_a(Ljava/lang/String;)Lnet/minecraft/tags/ITag$INamedTag; # makeWrapperTag
public net.minecraft.tags.EntityTypeTags func_232896_a_(Ljava/lang/String;)Lnet/minecraft/tags/ITag$INamedTag; # makeWrapperTag
public net.minecraft.tags.FluidTags func_206956_a(Ljava/lang/String;)Lnet/minecraft/tags/ITag$INamedTag; # makeWrapperTag
public net.minecraft.tags.ItemTags func_199901_a(Ljava/lang/String;)Lnet/minecraft/tags/ITag$INamedTag; # makeWrapperTag
public net.minecraft.tileentity.HopperTileEntity func_145896_c(I)V # setTransferCooldown
public net.minecraft.tileentity.HopperTileEntity func_174914_o()Z # mayTransfer
public net.minecraft.util.DamageSource *() #All methods public, most are already
@ -173,5 +178,4 @@ public net.minecraft.world.gen.layer.LayerUtil func_202829_a(JLnet/minecraft/wor
private-f net.minecraft.world.server.ChunkHolder field_219320_o # block update location
public net.minecraft.world.server.ServerChunkProvider field_186029_c # chunkGenerator
public net.minecraft.world.server.ServerChunkProvider field_73251_h # worldObj
public net.minecraft.world.storage.FolderName <init>(Ljava/lang/String;)V # constructor
public net.minecraft.item.ItemModelsProperties func_239418_a_(Lnet/minecraft/item/Item;Lnet/minecraft/util/ResourceLocation;Lnet/minecraft/item/IItemPropertyGetter;)V
public net.minecraft.world.storage.FolderName <init>(Ljava/lang/String;)V # constructor