mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f54998a6b7 | ||
|
|
7d00d015f3 | ||
|
|
fed7beab89 | ||
|
|
cf3e9d1e0c | ||
|
|
749c9063af | ||
|
|
1af6632a29 | ||
|
|
7e79243bca | ||
|
|
36f9c804d9 | ||
|
|
06fe9ccda0 | ||
|
|
53eedb0f10 | ||
|
|
6e0e67b14d | ||
|
|
22f7f4649b | ||
|
|
8a77681574 | ||
|
|
6982c5dd56 | ||
|
|
7205c30ece | ||
|
|
80baad974e | ||
|
|
ae160cad12 | ||
|
|
6ff6277efa | ||
|
|
74f9ef838a | ||
|
|
395f89c973 | ||
|
|
8536521b7b | ||
|
|
b1659300e0 | ||
|
|
93226bbcff | ||
|
|
51fa230e7b | ||
|
|
5f292895cb | ||
|
|
9cfe741cea | ||
|
|
bed38d4253 | ||
|
|
37f226eda5 | ||
|
|
59b4affbe7 | ||
|
|
5477a36656 | ||
|
|
5648336893 | ||
|
|
f5b53d5d10 | ||
|
|
10448c1ac9 | ||
|
|
5243275db2 | ||
|
|
3041c2022b | ||
|
|
09be003d61 | ||
|
|
3fe5ddd68f | ||
|
|
935cb6782d | ||
|
|
9b421b54a7 | ||
|
|
6e23030595 | ||
|
|
78d69db79e | ||
|
|
9177ac1b2e | ||
|
|
248d207dbc | ||
|
|
03082c361a | ||
|
|
65372e3123 | ||
|
|
0f923fa51f | ||
|
|
d1e3567c6b | ||
|
|
af75547d37 | ||
|
|
37be3aff2d | ||
|
|
b9b17d8331 | ||
|
|
2a433a5c8c | ||
|
|
e344fd08a5 | ||
|
|
0484f695fb | ||
|
|
e55bd86dff | ||
|
|
b1247df4dc | ||
|
|
91dda36b08 | ||
|
|
ac19d1bf2b | ||
|
|
e0e0302ece | ||
|
|
6eb3e20abb | ||
|
|
738491c25d | ||
|
|
2686b7a9ab | ||
|
|
4b93e3a224 | ||
|
|
873c490470 | ||
|
|
11e3281b3f | ||
|
|
ce6c664acd |
No files matched your search
+11
-11
@@ -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'
|
||||
MC_VERSION = '1.16.3'
|
||||
MCP_VERSION = '20200910.110331'
|
||||
MAPPING_VERSION = '20201028-1.16.3'
|
||||
MC_VERSION = '1.16.4'
|
||||
MCP_VERSION = '20201102.104115'
|
||||
}
|
||||
|
||||
project(':mcp') {
|
||||
@@ -197,7 +197,7 @@ project(':forge') {
|
||||
}
|
||||
|
||||
ext {
|
||||
SPEC_VERSION = '34.0' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
SPEC_VERSION = '35.0' // This is overwritten by git tag, but here so dev time doesnt explode
|
||||
// The new versioning sceme is <MCVersion>-<ForgeMC>.<RB>.<CommitsSinceRB>
|
||||
// ForgeMC is a unique identifier for every MC version we have supported.
|
||||
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
|
||||
@@ -353,8 +353,10 @@ project(':forge') {
|
||||
'--mod', 'global_loot_test',
|
||||
'--mod', 'scaffolding_test',
|
||||
'--mod', 'custom_tag_types_test',
|
||||
'--mod', 'new_model_loader_test',
|
||||
'--output', rootProject.file('src/generated_test/resources/'),
|
||||
'--existing', sourceSets.main.resources.srcDirs[0]
|
||||
'--existing', sourceSets.main.resources.srcDirs[0],
|
||||
'--existing', sourceSets.test.resources.srcDirs[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -435,11 +437,11 @@ project(':forge') {
|
||||
installer 'org.ow2.asm:asm-tree:7.2'
|
||||
installer 'org.ow2.asm:asm-util:7.2'
|
||||
installer 'org.ow2.asm:asm-analysis:7.2'
|
||||
installer 'cpw.mods:modlauncher:7.0.+'
|
||||
installer 'cpw.mods:modlauncher:8.0.6'
|
||||
installer 'cpw.mods:grossjava9hacks:1.3.+'
|
||||
installer 'net.minecraftforge:accesstransformers:2.2.+:shadowed'
|
||||
installer 'net.minecraftforge:eventbus:3.0.+:service'
|
||||
installer 'net.minecraftforge:forgespi:3.1.+'
|
||||
installer 'net.minecraftforge:forgespi:3.2.+'
|
||||
installer 'net.minecraftforge:coremods:3.0.+'
|
||||
installer 'net.minecraftforge:unsafe:0.2.+'
|
||||
installer 'com.electronwill.night-config:core:3.6.2'
|
||||
@@ -451,7 +453,7 @@ project(':forge') {
|
||||
installer 'org.apache.logging.log4j:log4j-core:2.11.2'
|
||||
installer 'net.minecrell:terminalconsoleappender:1.2.+'
|
||||
installer 'net.sf.jopt-simple:jopt-simple:5.0.4'
|
||||
installer 'org.spongepowered:mixin:0.8'
|
||||
installer 'org.spongepowered:mixin:0.8.2'
|
||||
fmllauncherImplementation 'com.google.guava:guava:21.0'
|
||||
fmllauncherImplementation 'com.google.code.gson:gson:2.8.0'
|
||||
fmllauncherImplementation 'org.lwjgl:lwjgl:3.2.2'
|
||||
@@ -1062,5 +1064,3 @@ task setup() {
|
||||
dependsOn ':clean:extractMapped'
|
||||
dependsOn ':forge:extractMapped' //These must be strings so that we can do lazy resolution. Else we need evaluationDependsOnChildren above
|
||||
}
|
||||
|
||||
|
||||
@@ -21,31 +21,44 @@ public class CheckSAS extends DefaultTask {
|
||||
sass.each { f ->
|
||||
def lines = []
|
||||
f.eachLine { line ->
|
||||
if (line[0] == '\t') return //Skip any tabed lines, those are ones we add
|
||||
if (line[0] == '\t') return //Skip any tabbed lines, those are ones we add
|
||||
def idx = line.indexOf('#')
|
||||
if (idx == 0 || line.isEmpty()) {
|
||||
lines.add(line)
|
||||
return
|
||||
}
|
||||
|
||||
def comment = idx == -1 ? null : line.substring(idx)
|
||||
if (idx != -1) line = line.substring(0, idx - 1)
|
||||
|
||||
def (cls, desc) = (line.trim() + ' ').split(' ', -1)
|
||||
cls = cls.replaceAll('\\.', '/')
|
||||
desc = desc.replace('(', ' (')
|
||||
if (desc.isEmpty() || json[cls] == null || json[cls]['methods'] == null || json[cls]['methods'][desc] == null) {
|
||||
|
||||
if (json[cls] == null || (!desc.isEmpty() && (json[cls]['methods'] == null || json[cls]['methods'][desc] == null))) {
|
||||
println('Invalid: ' + line)
|
||||
return
|
||||
}
|
||||
|
||||
def mtd = json[cls]['methods'][desc]
|
||||
|
||||
//Class SAS
|
||||
if (desc.isEmpty()) {
|
||||
lines.add(cls + (comment == null ? '' : ' ' + comment))
|
||||
if (json[cls]['methods'] != null)
|
||||
(json[cls]['methods'] as TreeMap).each {
|
||||
findChildMethods(json, cls, it.key).each { lines.add('\t' + it) }
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
//Method SAS
|
||||
lines.add(cls + ' ' + desc.replace(' ', '') + (comment == null ? '' : ' ' + comment))
|
||||
def children = json.values().findAll{ it.methods != null && it.methods[desc] != null && it.methods[desc].override == cls}
|
||||
.collect { it.name + ' ' + desc.replace(' ', '') } as TreeSet
|
||||
children.each { lines.add('\t' + it) }
|
||||
findChildMethods(json, cls, desc).each { lines.add('\t' + it) }
|
||||
}
|
||||
f.text = lines.join('\n')
|
||||
}
|
||||
}
|
||||
|
||||
protected static findChildMethods(json, cls, desc)
|
||||
{
|
||||
return json.values().findAll{ it.methods != null && it.methods[desc] != null && it.methods[desc].override == cls}
|
||||
.collect { it.name + ' ' + desc.replace(' ', '') } as TreeSet
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
<img src="assets/Forge_logo.svg">
|
||||

|
||||
|
||||
MinecraftForge
|
||||
=============
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net)
|
||||
[](https://files.minecraftforge.net) [](https://discord.gg/UvedJ9m) [](https://www.patreon.com/LexManos)
|
||||
|
||||
Forge is a free, open-source modding API all of your favourite mods use!
|
||||
|
||||
+5
-1
@@ -75,7 +75,8 @@ minecraft {
|
||||
// Recommended logging level for the console
|
||||
property 'forge.logging.console.level', 'debug'
|
||||
|
||||
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/')
|
||||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
||||
args '--mod', 'examplemod', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
||||
|
||||
mods {
|
||||
examplemod {
|
||||
@@ -86,6 +87,9 @@ minecraft {
|
||||
}
|
||||
}
|
||||
|
||||
// Include resources generated by data generators.
|
||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
||||
|
||||
dependencies {
|
||||
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
||||
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
+++ b/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
@@ -556,10 +556,17 @@
|
||||
@@ -572,10 +572,17 @@
|
||||
GL13.glClientActiveTexture(p_227747_0_);
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
}
|
||||
|
||||
public static Advancement.Builder func_241043_a_(JsonObject p_241043_0_, ConditionArrayParser p_241043_1_) {
|
||||
+ if (!net.minecraftforge.common.crafting.ConditionalAdvancement.processConditions(p_241043_0_)) return null;
|
||||
+ if ((p_241043_0_ = net.minecraftforge.common.crafting.ConditionalAdvancement.processConditional(p_241043_0_)) == null) return null;
|
||||
ResourceLocation resourcelocation = p_241043_0_.has("parent") ? new ResourceLocation(JSONUtils.func_151200_h(p_241043_0_, "parent")) : null;
|
||||
DisplayInfo displayinfo = p_241043_0_.has("display") ? DisplayInfo.func_192294_a(JSONUtils.func_152754_s(p_241043_0_, "display")) : null;
|
||||
AdvancementRewards advancementrewards = p_241043_0_.has("rewards") ? AdvancementRewards.func_241096_a_(JSONUtils.func_152754_s(p_241043_0_, "rewards")) : AdvancementRewards.field_192114_a;
|
||||
@@ -65,10 +65,14 @@
|
||||
}
|
||||
|
||||
return this.field_220085_g;
|
||||
@@ -346,6 +349,10 @@
|
||||
@@ -346,6 +349,14 @@
|
||||
return this.field_235684_aB_.field_235800_b_.apply(this.func_230328_p_().func_176223_P());
|
||||
}
|
||||
|
||||
+ protected boolean isAir(BlockState state) {
|
||||
+ return ((AbstractBlockState)state).field_235702_f_;
|
||||
+ }
|
||||
+
|
||||
+ /* ======================================== FORGE START ===================================== */
|
||||
+ private final java.util.function.Supplier<ResourceLocation> lootTableSupplier;
|
||||
+ /* ========================================= FORGE END ====================================== */
|
||||
@@ -76,16 +80,18 @@
|
||||
public abstract static class AbstractBlockState extends StateHolder<Block, BlockState> {
|
||||
private final int field_215708_d;
|
||||
private final boolean field_215709_e;
|
||||
@@ -428,6 +435,8 @@
|
||||
@@ -428,14 +439,18 @@
|
||||
return this.field_215708_d;
|
||||
}
|
||||
|
||||
+ /** @deprecated use {@link BlockState#isAir(IBlockReader, BlockPos) */
|
||||
+ @Deprecated
|
||||
public boolean func_196958_f() {
|
||||
return this.field_235702_f_;
|
||||
- return this.field_235702_f_;
|
||||
+ return this.func_177230_c().isAir((BlockState)this);
|
||||
}
|
||||
@@ -436,6 +445,8 @@
|
||||
|
||||
public MaterialColor func_185909_g(IBlockReader p_185909_1_, BlockPos p_185909_2_) {
|
||||
return this.field_235704_h_;
|
||||
}
|
||||
|
||||
@@ -94,7 +100,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_);
|
||||
}
|
||||
@@ -802,6 +813,9 @@
|
||||
@@ -802,6 +817,9 @@
|
||||
private ResourceLocation field_222381_j;
|
||||
private boolean field_226895_m_ = true;
|
||||
private boolean field_235813_o_;
|
||||
@@ -104,7 +110,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;
|
||||
};
|
||||
@@ -863,6 +877,8 @@
|
||||
@@ -863,6 +881,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_;
|
||||
@@ -113,7 +119,7 @@
|
||||
return abstractblock$properties;
|
||||
}
|
||||
|
||||
@@ -877,6 +893,24 @@
|
||||
@@ -877,6 +897,24 @@
|
||||
return this;
|
||||
}
|
||||
|
||||
@@ -138,7 +144,7 @@
|
||||
public AbstractBlock.Properties func_200941_a(float p_200941_1_) {
|
||||
this.field_200961_i = p_200941_1_;
|
||||
return this;
|
||||
@@ -933,7 +967,7 @@
|
||||
@@ -933,7 +971,7 @@
|
||||
}
|
||||
|
||||
public AbstractBlock.Properties func_222379_b(Block p_222379_1_) {
|
||||
|
||||
@@ -9,3 +9,12 @@
|
||||
if (flag && !p_220066_2_.func_177229_b(field_220101_b) && !p_220066_2_.func_177229_b(field_220103_d)) {
|
||||
BlockPos blockpos = p_220066_3_.func_216350_a();
|
||||
p_220066_1_.func_180501_a(blockpos, p_220066_2_.func_206870_a(BlockStateProperties.field_208190_q, Boolean.valueOf(true)), 11);
|
||||
@@ -208,7 +208,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
- boolean flag = VoxelShapes.func_197879_c(field_226912_f_, blockstate.func_215685_b(p_235474_0_, p_235474_1_, ISelectionContext.func_216377_a()), IBooleanFunction.field_223238_i_);
|
||||
+ boolean flag = VoxelShapes.func_197879_c(field_226912_f_, blockstate.func_215685_b(p_235474_0_, blockpos, ISelectionContext.func_216377_a()), IBooleanFunction.field_223238_i_);//Forge fix: MC-201374
|
||||
if (flag) {
|
||||
BlockState blockstate1 = p_235474_0_.func_180495_p(blockpos.func_177977_b());
|
||||
return func_226915_i_(blockstate1);
|
||||
@@ -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) {
|
||||
|
||||
@@ -26,16 +26,19 @@
|
||||
Direction direction3 = direction.func_176746_e();
|
||||
Direction direction4 = direction.func_176735_f();
|
||||
boolean flag = p_225542_1_.func_177229_b(func_176267_a(direction3));
|
||||
@@ -216,7 +216,7 @@
|
||||
@@ -216,8 +216,9 @@
|
||||
if (p_225542_3_.func_177956_o() > 0) {
|
||||
BlockPos blockpos1 = p_225542_3_.func_177977_b();
|
||||
BlockState blockstate = p_225542_2_.func_180495_p(blockpos1);
|
||||
- if (blockstate.func_196958_f() || blockstate.func_203425_a(this)) {
|
||||
+ if (blockstate.isAir(p_225542_2_, blockpos) || blockstate.func_203425_a(this)) {
|
||||
BlockState blockstate1 = blockstate.func_196958_f() ? this.func_176223_P() : blockstate;
|
||||
- BlockState blockstate1 = blockstate.func_196958_f() ? this.func_176223_P() : blockstate;
|
||||
+ boolean isAir = blockstate.isAir(p_225542_2_, blockpos1);
|
||||
+ if (isAir || blockstate.func_203425_a(this)) {
|
||||
+ BlockState blockstate1 = isAir ? this.func_176223_P() : blockstate;
|
||||
BlockState blockstate2 = this.func_196544_a(p_225542_1_, blockstate1, p_225542_4_);
|
||||
if (blockstate1 != blockstate2 && this.func_196540_x(blockstate2)) {
|
||||
@@ -322,4 +322,7 @@
|
||||
p_225542_2_.func_180501_a(blockpos1, blockstate2, 2);
|
||||
@@ -322,4 +323,7 @@
|
||||
public static BooleanProperty func_176267_a(Direction p_176267_0_) {
|
||||
return field_196546_A.get(p_176267_0_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/GameSettings.java
|
||||
+++ b/net/minecraft/client/GameSettings.java
|
||||
@@ -167,6 +167,7 @@
|
||||
@@ -170,6 +170,7 @@
|
||||
public boolean field_241568_aS_;
|
||||
|
||||
public GameSettings(Minecraft p_i46326_1_, File p_i46326_2_) {
|
||||
@@ -8,7 +8,7 @@
|
||||
this.field_74317_L = p_i46326_1_;
|
||||
this.field_74354_ai = new File(p_i46326_2_, "options.txt");
|
||||
if (p_i46326_1_.func_147111_S() && Runtime.getRuntime().maxMemory() >= 1000000000L) {
|
||||
@@ -518,7 +519,11 @@
|
||||
@@ -529,7 +530,11 @@
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
if (s.equals("key_" + keybinding.func_151464_g())) {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,6 +570,7 @@
|
||||
@@ -576,6 +581,7 @@
|
||||
}
|
||||
|
||||
public void func_74303_b() {
|
||||
@@ -29,7 +29,7 @@
|
||||
try (PrintWriter printwriter = new PrintWriter(new OutputStreamWriter(new FileOutputStream(this.field_74354_ai), StandardCharsets.UTF_8))) {
|
||||
printwriter.println("version:" + SharedConstants.func_215069_a().getWorldVersion());
|
||||
printwriter.println("autoJump:" + AbstractOption.field_216719_z.func_216741_b(this));
|
||||
@@ -648,7 +654,7 @@
|
||||
@@ -661,7 +667,7 @@
|
||||
printwriter.println("syncChunkWrites:" + this.field_241568_aS_);
|
||||
|
||||
for(KeyBinding keybinding : this.field_74324_K) {
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
|
||||
for(SoundCategory soundcategory : SoundCategory.values()) {
|
||||
@@ -747,6 +753,23 @@
|
||||
@@ -760,6 +766,23 @@
|
||||
p_198017_1_.func_198985_a(set);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -357,6 +357,7 @@
|
||||
@@ -368,6 +368,7 @@
|
||||
public Minecraft(GameConfiguration p_i45547_1_) {
|
||||
super("Client");
|
||||
field_71432_P = this;
|
||||
@@ -8,15 +8,15 @@
|
||||
this.field_71412_D = p_i45547_1_.field_178744_c.field_178760_a;
|
||||
File file1 = p_i45547_1_.field_178744_c.field_178759_c;
|
||||
this.field_130070_K = p_i45547_1_.field_178744_c.field_178758_b;
|
||||
@@ -369,7 +370,6 @@
|
||||
this.field_152355_az = (new YggdrasilAuthenticationService(this.field_110453_aa, UUID.randomUUID().toString())).createMinecraftSessionService();
|
||||
@@ -382,7 +383,6 @@
|
||||
this.field_244734_au = this.func_244735_a(yggdrasilauthenticationservice, p_i45547_1_);
|
||||
this.field_71449_j = p_i45547_1_.field_178745_a.field_178752_a;
|
||||
field_147123_G.info("Setting user: {}", (Object)this.field_71449_j.func_111285_a());
|
||||
- field_147123_G.debug("(Session ID is {})", (Object)this.field_71449_j.func_111286_b());
|
||||
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
||||
this.field_238175_ae_ = !p_i45547_1_.field_178741_d.field_239099_d_;
|
||||
this.field_238176_af_ = !p_i45547_1_.field_178741_d.field_239100_e_;
|
||||
@@ -415,13 +415,13 @@
|
||||
@@ -428,13 +428,13 @@
|
||||
|
||||
this.field_195558_d.func_216526_a(this.field_71474_y.field_74350_i);
|
||||
this.field_71417_B = new MouseHelper(this);
|
||||
@@ -31,7 +31,7 @@
|
||||
this.field_110448_aq.func_198983_a();
|
||||
this.field_71474_y.func_198017_a(this.field_110448_aq);
|
||||
this.field_135017_as = new LanguageManager(this.field_71474_y.field_74363_ab);
|
||||
@@ -462,6 +462,7 @@
|
||||
@@ -476,6 +476,7 @@
|
||||
this.func_193986_ar();
|
||||
this.field_110451_am.func_219534_a(this.field_193995_ae);
|
||||
this.field_71452_i = new ParticleManager(this.field_71441_e, this.field_71446_o);
|
||||
@@ -39,7 +39,7 @@
|
||||
this.field_110451_am.func_219534_a(this.field_71452_i);
|
||||
this.field_213272_aL = new PaintingSpriteUploader(this.field_71446_o);
|
||||
this.field_110451_am.func_219534_a(this.field_213272_aL);
|
||||
@@ -469,7 +470,8 @@
|
||||
@@ -483,7 +484,8 @@
|
||||
this.field_110451_am.func_219534_a(this.field_213273_aM);
|
||||
this.field_241557_ar_ = new GPUWarning();
|
||||
this.field_110451_am.func_219534_a(this.field_241557_ar_);
|
||||
@@ -49,7 +49,7 @@
|
||||
this.field_184132_p = new DebugRenderer(this);
|
||||
RenderSystem.setErrorCallback(this::func_195545_a);
|
||||
if (this.field_71474_y.field_74353_u && !this.field_195558_d.func_198113_j()) {
|
||||
@@ -481,11 +483,6 @@
|
||||
@@ -495,11 +497,6 @@
|
||||
this.field_195558_d.func_224798_d(this.field_71474_y.field_225307_E);
|
||||
this.field_195558_d.func_227801_c_();
|
||||
this.func_213226_a();
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
ResourceLoadProgressGui.func_212970_a(this);
|
||||
List<IResourcePack> list = this.field_110448_aq.func_232623_f_();
|
||||
@@ -494,7 +491,14 @@
|
||||
@@ -508,7 +505,14 @@
|
||||
if (SharedConstants.field_206244_b) {
|
||||
this.func_213256_aB();
|
||||
}
|
||||
@@ -77,7 +77,7 @@
|
||||
});
|
||||
}, false));
|
||||
}
|
||||
@@ -533,7 +537,7 @@
|
||||
@@ -556,7 +560,7 @@
|
||||
}
|
||||
|
||||
private void func_229988_a_(Throwable p_229988_1_) {
|
||||
@@ -86,7 +86,7 @@
|
||||
ITextComponent itextcomponent;
|
||||
if (p_229988_1_ instanceof SimpleReloadableResourceManager.FailedPackException) {
|
||||
itextcomponent = new StringTextComponent(((SimpleReloadableResourceManager.FailedPackException)p_229988_1_).func_241203_a().func_195762_a());
|
||||
@@ -621,7 +625,7 @@
|
||||
@@ -644,7 +648,7 @@
|
||||
return Stream.of(Registry.field_212630_s.func_177774_c(p_213251_0_.func_77973_b()));
|
||||
});
|
||||
SearchTreeReloadable<ItemStack> searchtreereloadable = new SearchTreeReloadable<>((p_213235_0_) -> {
|
||||
@@ -95,7 +95,7 @@
|
||||
});
|
||||
NonNullList<ItemStack> nonnulllist = NonNullList.func_191196_a();
|
||||
|
||||
@@ -691,13 +695,13 @@
|
||||
@@ -714,13 +718,13 @@
|
||||
Bootstrap.func_179870_a(p_71377_0_.func_71502_e());
|
||||
if (p_71377_0_.func_71497_f() != null) {
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_0_.func_71497_f());
|
||||
@@ -112,7 +112,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -706,6 +710,7 @@
|
||||
@@ -729,6 +733,7 @@
|
||||
return this.field_71474_y.field_211842_aO;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
public CompletableFuture<Void> func_213237_g() {
|
||||
if (this.field_213276_aV != null) {
|
||||
return this.field_213276_aV;
|
||||
@@ -794,10 +799,6 @@
|
||||
@@ -817,10 +822,6 @@
|
||||
}
|
||||
|
||||
public void func_147108_a(@Nullable Screen p_147108_1_) {
|
||||
@@ -131,7 +131,7 @@
|
||||
if (p_147108_1_ == null && this.field_71441_e == null) {
|
||||
p_147108_1_ = new MainMenuScreen();
|
||||
} else if (p_147108_1_ == null && this.field_71439_g.func_233643_dh_()) {
|
||||
@@ -808,6 +809,14 @@
|
||||
@@ -831,6 +832,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
if (p_147108_1_ instanceof MainMenuScreen || p_147108_1_ instanceof MultiplayerScreen) {
|
||||
this.field_71474_y.field_74330_P = false;
|
||||
this.field_71456_v.func_146158_b().func_146231_a(true);
|
||||
@@ -939,11 +948,13 @@
|
||||
@@ -962,11 +971,13 @@
|
||||
RenderSystem.enableCull();
|
||||
this.field_71424_I.func_76319_b();
|
||||
if (!this.field_71454_w) {
|
||||
@@ -160,7 +160,7 @@
|
||||
}
|
||||
|
||||
if (this.field_238174_aV_ != null) {
|
||||
@@ -1042,6 +1053,7 @@
|
||||
@@ -1065,6 +1076,7 @@
|
||||
|
||||
Framebuffer framebuffer = this.func_147110_a();
|
||||
framebuffer.func_216491_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), field_142025_a);
|
||||
@@ -168,7 +168,7 @@
|
||||
this.field_71460_t.func_147704_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l());
|
||||
this.field_71417_B.func_198021_g();
|
||||
}
|
||||
@@ -1230,11 +1242,21 @@
|
||||
@@ -1253,11 +1265,21 @@
|
||||
if (p_147115_1_ && this.field_71476_x != null && this.field_71476_x.func_216346_c() == RayTraceResult.Type.BLOCK) {
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
@@ -192,7 +192,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1253,6 +1275,8 @@
|
||||
@@ -1276,6 +1298,8 @@
|
||||
}
|
||||
|
||||
} else if (!this.field_71439_g.func_184838_M()) {
|
||||
@@ -201,7 +201,7 @@
|
||||
switch(this.field_71476_x.func_216346_c()) {
|
||||
case ENTITY:
|
||||
this.field_71442_b.func_78764_a(this.field_71439_g, ((EntityRayTraceResult)this.field_71476_x).func_216348_a());
|
||||
@@ -1260,7 +1284,7 @@
|
||||
@@ -1283,7 +1307,7 @@
|
||||
case BLOCK:
|
||||
BlockRayTraceResult blockraytraceresult = (BlockRayTraceResult)this.field_71476_x;
|
||||
BlockPos blockpos = blockraytraceresult.func_216350_a();
|
||||
@@ -210,7 +210,7 @@
|
||||
this.field_71442_b.func_180511_b(blockpos, blockraytraceresult.func_216354_b());
|
||||
break;
|
||||
}
|
||||
@@ -1270,8 +1294,10 @@
|
||||
@@ -1293,8 +1317,10 @@
|
||||
}
|
||||
|
||||
this.field_71439_g.func_184821_cY();
|
||||
@@ -221,7 +221,7 @@
|
||||
this.field_71439_g.func_184609_a(Hand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
@@ -1286,6 +1312,11 @@
|
||||
@@ -1309,6 +1335,11 @@
|
||||
}
|
||||
|
||||
for(Hand hand : Hand.values()) {
|
||||
@@ -233,7 +233,7 @@
|
||||
ItemStack itemstack = this.field_71439_g.func_184586_b(hand);
|
||||
if (this.field_71476_x != null) {
|
||||
switch(this.field_71476_x.func_216346_c()) {
|
||||
@@ -1299,6 +1330,7 @@
|
||||
@@ -1322,6 +1353,7 @@
|
||||
|
||||
if (actionresulttype.func_226246_a_()) {
|
||||
if (actionresulttype.func_226247_b_()) {
|
||||
@@ -241,7 +241,7 @@
|
||||
this.field_71439_g.func_184609_a(hand);
|
||||
}
|
||||
|
||||
@@ -1311,6 +1343,7 @@
|
||||
@@ -1334,6 +1366,7 @@
|
||||
ActionResultType actionresulttype1 = this.field_71442_b.func_217292_a(this.field_71439_g, this.field_71441_e, hand, blockraytraceresult);
|
||||
if (actionresulttype1.func_226246_a_()) {
|
||||
if (actionresulttype1.func_226247_b_()) {
|
||||
@@ -249,7 +249,7 @@
|
||||
this.field_71439_g.func_184609_a(hand);
|
||||
if (!itemstack.func_190926_b() && (itemstack.func_190916_E() != i || this.field_71442_b.func_78758_h())) {
|
||||
this.field_71460_t.field_78516_c.func_187460_a(hand);
|
||||
@@ -1326,6 +1359,9 @@
|
||||
@@ -1349,6 +1382,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@
|
||||
if (!itemstack.func_190926_b()) {
|
||||
ActionResultType actionresulttype2 = this.field_71442_b.func_187101_a(this.field_71439_g, this.field_71441_e, hand);
|
||||
if (actionresulttype2.func_226246_a_()) {
|
||||
@@ -1352,6 +1388,8 @@
|
||||
@@ -1375,6 +1411,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
if (!this.field_71445_n) {
|
||||
this.field_71456_v.func_73831_a();
|
||||
@@ -1468,6 +1506,8 @@
|
||||
@@ -1500,6 +1538,8 @@
|
||||
this.field_71424_I.func_219895_b("keyboard");
|
||||
this.field_195559_v.func_204870_b();
|
||||
this.field_71424_I.func_76319_b();
|
||||
@@ -276,8 +276,8 @@
|
||||
+ net.minecraftforge.fml.hooks.BasicEventHooks.onPostClientTick();
|
||||
}
|
||||
|
||||
private void func_184117_aA() {
|
||||
@@ -1697,7 +1737,12 @@
|
||||
private boolean func_244600_aM() {
|
||||
@@ -1747,7 +1787,12 @@
|
||||
networkmanager.func_150719_a(new ClientLoginNetHandler(networkmanager, this, (Screen)null, (p_229998_0_) -> {
|
||||
}));
|
||||
networkmanager.func_179290_a(new CHandshakePacket(socketaddress.toString(), 0, ProtocolType.LOGIN));
|
||||
@@ -291,7 +291,7 @@
|
||||
this.field_71453_ak = networkmanager;
|
||||
} else {
|
||||
this.func_241559_a_(p_238195_6_, p_238195_1_, flag, () -> {
|
||||
@@ -1771,6 +1816,7 @@
|
||||
@@ -1821,6 +1866,7 @@
|
||||
}
|
||||
|
||||
public void func_71403_a(ClientWorld p_71403_1_) {
|
||||
@@ -299,7 +299,7 @@
|
||||
WorkingScreen workingscreen = new WorkingScreen();
|
||||
workingscreen.func_200210_a(new TranslationTextComponent("connect.joining"));
|
||||
this.func_213241_c(workingscreen);
|
||||
@@ -1802,10 +1848,12 @@
|
||||
@@ -1852,10 +1898,12 @@
|
||||
IntegratedServer integratedserver = this.field_71437_Z;
|
||||
this.field_71437_Z = null;
|
||||
this.field_71460_t.func_190564_k();
|
||||
@@ -312,7 +312,7 @@
|
||||
if (integratedserver != null) {
|
||||
this.field_71424_I.func_76320_a("waitForServer");
|
||||
|
||||
@@ -1820,6 +1868,7 @@
|
||||
@@ -1870,6 +1918,7 @@
|
||||
this.field_71456_v.func_181029_i();
|
||||
this.field_71422_O = null;
|
||||
this.field_71455_al = false;
|
||||
@@ -320,7 +320,7 @@
|
||||
this.field_213274_aO.func_216815_b();
|
||||
}
|
||||
|
||||
@@ -1850,6 +1899,7 @@
|
||||
@@ -1900,6 +1949,7 @@
|
||||
this.field_71452_i.func_78870_a(p_213257_1_);
|
||||
TileEntityRendererDispatcher.field_147556_a.func_147543_a(p_213257_1_);
|
||||
this.func_230150_b_();
|
||||
@@ -328,7 +328,7 @@
|
||||
}
|
||||
|
||||
public boolean func_238216_r_() {
|
||||
@@ -1895,112 +1945,9 @@
|
||||
@@ -1945,112 +1995,9 @@
|
||||
|
||||
private void func_147112_ai() {
|
||||
if (this.field_71476_x != null && this.field_71476_x.func_216346_c() != RayTraceResult.Type.MISS) {
|
||||
@@ -444,7 +444,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2090,6 +2037,7 @@
|
||||
@@ -2140,6 +2087,7 @@
|
||||
return field_71432_P;
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@
|
||||
public CompletableFuture<Void> func_213245_w() {
|
||||
return this.func_213169_a(this::func_213237_g).thenCompose((p_229993_0_) -> {
|
||||
return p_229993_0_;
|
||||
@@ -2397,7 +2345,7 @@
|
||||
@@ -2451,7 +2399,7 @@
|
||||
supplier = func_228022_c_(supplier);
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@
|
||||
}
|
||||
|
||||
private static Supplier<IResourcePack> func_228021_b_(Supplier<IResourcePack> p_228021_0_) {
|
||||
@@ -2416,6 +2364,14 @@
|
||||
@@ -2470,6 +2418,14 @@
|
||||
this.field_175617_aL.func_229355_a_(p_228020_1_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/IngameGui.java
|
||||
+++ b/net/minecraft/client/gui/IngameGui.java
|
||||
@@ -78,7 +78,7 @@
|
||||
@@ -79,7 +79,7 @@
|
||||
protected static final ResourceLocation field_110329_b = new ResourceLocation("textures/misc/vignette.png");
|
||||
protected static final ResourceLocation field_110330_c = new ResourceLocation("textures/gui/widgets.png");
|
||||
protected static final ResourceLocation field_110328_d = new ResourceLocation("textures/misc/pumpkinblur.png");
|
||||
@@ -9,7 +9,7 @@
|
||||
protected final Random field_73842_c = new Random();
|
||||
protected final Minecraft field_73839_d;
|
||||
protected final ItemRenderer field_73841_b;
|
||||
@@ -414,6 +414,9 @@
|
||||
@@ -415,6 +415,9 @@
|
||||
|
||||
for(EffectInstance effectinstance : Ordering.natural().reverse().sortedCopy(collection)) {
|
||||
Effect effect = effectinstance.func_188419_a();
|
||||
@@ -19,7 +19,7 @@
|
||||
if (effectinstance.func_205348_f()) {
|
||||
int k = this.field_194811_H;
|
||||
int l = 1;
|
||||
@@ -451,6 +454,7 @@
|
||||
@@ -452,6 +455,7 @@
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, f1);
|
||||
func_238470_a_(p_238444_1_, j1 + 3, k1 + 3, this.func_230927_p_(), 18, 18, textureatlassprite);
|
||||
});
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -575,7 +579,8 @@
|
||||
@@ -576,7 +580,8 @@
|
||||
iformattabletextcomponent.func_240699_a_(TextFormatting.ITALIC);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
int j = (this.field_194811_H - i) / 2;
|
||||
int k = this.field_194812_I - 59;
|
||||
if (!this.field_73839_d.field_71442_b.func_78755_b()) {
|
||||
@@ -592,7 +597,13 @@
|
||||
@@ -593,7 +598,13 @@
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
func_238467_a_(p_238453_1_, j - 2, k - 2, j + i + 2, k + 9 + 2, this.field_73839_d.field_71474_y.func_216839_a(0));
|
||||
@@ -52,7 +52,7 @@
|
||||
RenderSystem.disableBlend();
|
||||
RenderSystem.popMatrix();
|
||||
}
|
||||
@@ -1055,7 +1066,7 @@
|
||||
@@ -1056,7 +1067,7 @@
|
||||
ItemStack itemstack = this.field_73839_d.field_71439_g.field_71071_by.func_70448_g();
|
||||
if (itemstack.func_190926_b()) {
|
||||
this.field_92017_k = 0;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
this.field_193018_j.add(new RecipeTabToggleWidget(recipebookcategories));
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@
|
||||
@@ -434,7 +434,7 @@
|
||||
|
||||
languagemanager.func_135045_a(language);
|
||||
this.field_191888_F.field_71474_y.field_74363_ab = language.getCode();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screen/LanguageScreen.java
|
||||
+++ b/net/minecraft/client/gui/screen/LanguageScreen.java
|
||||
@@ -45,7 +45,7 @@
|
||||
@@ -46,7 +46,7 @@
|
||||
if (languagescreen$list$languageentry != null && !languagescreen$list$languageentry.field_214398_b.getCode().equals(this.field_146454_h.func_135041_c().getCode())) {
|
||||
this.field_146454_h.func_135045_a(languagescreen$list$languageentry.field_214398_b);
|
||||
this.field_228183_b_.field_74363_ab = languagescreen$list$languageentry.field_214398_b.getCode();
|
||||
|
||||
@@ -7,23 +7,35 @@
|
||||
- this.func_243308_b(p_230457_1_, this.func_231151_a_(p_230457_2_), p_230457_3_, p_230457_4_);
|
||||
+ FontRenderer font = p_230457_2_.func_77973_b().getFontRenderer(p_230457_2_);
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_230457_2_);
|
||||
+ this.renderToolTip(p_230457_1_, Lists.transform(this.func_231151_a_(p_230457_2_), ITextComponent::func_241878_f), p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
|
||||
+ this.renderWrappedToolTip(p_230457_1_, this.func_231151_a_(p_230457_2_), p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip();
|
||||
}
|
||||
|
||||
public List<ITextComponent> func_231151_a_(ItemStack p_231151_1_) {
|
||||
@@ -129,6 +132,10 @@
|
||||
@@ -121,14 +124,20 @@
|
||||
}
|
||||
|
||||
public void func_238652_a_(MatrixStack p_238652_1_, ITextComponent p_238652_2_, int p_238652_3_, int p_238652_4_) {
|
||||
- this.func_238654_b_(p_238652_1_, Arrays.asList(p_238652_2_.func_241878_f()), p_238652_3_, p_238652_4_);
|
||||
+ this.func_243308_b(p_238652_1_, Arrays.asList(p_238652_2_), p_238652_3_, p_238652_4_);
|
||||
}
|
||||
|
||||
public void func_243308_b(MatrixStack p_243308_1_, List<ITextComponent> p_243308_2_, int p_243308_3_, int p_243308_4_) {
|
||||
- this.func_238654_b_(p_243308_1_, Lists.transform(p_243308_2_, ITextComponent::func_241878_f), p_243308_3_, p_243308_4_);
|
||||
+ this.renderWrappedToolTip(p_243308_1_, p_243308_2_, p_243308_3_, p_243308_4_, field_230712_o_);
|
||||
}
|
||||
+ public void renderWrappedToolTip(MatrixStack matrixStack, List<? extends net.minecraft.util.text.ITextProperties> tooltips, int mouseX, int mouseY, FontRenderer font) {
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.drawHoveringText(matrixStack, tooltips, mouseX, mouseY, field_230708_k_, field_230709_l_, -1, font);
|
||||
+ }
|
||||
|
||||
public void func_238654_b_(MatrixStack p_238654_1_, List<? extends IReorderingProcessor> p_238654_2_, int p_238654_3_, int p_238654_4_) {
|
||||
+ this.renderToolTip(p_238654_1_, p_238654_2_, p_238654_3_, p_238654_4_, field_230712_o_);
|
||||
+ }
|
||||
+ public void renderToolTip(MatrixStack p_238654_1_, List<? extends IReorderingProcessor> p_238654_2_, int p_238654_3_, int p_238654_4_, FontRenderer font) {
|
||||
+ //net.minecraftforge.fml.client.gui.GuiUtils.drawHoveringText(p_238654_1_, p_238654_2_, p_238654_3_, p_238654_4_, field_230708_k_, field_230709_l_, -1, font);
|
||||
if (!p_238654_2_.isEmpty()) {
|
||||
int i = 0;
|
||||
|
||||
@@ -289,9 +296,12 @@
|
||||
@@ -289,9 +298,12 @@
|
||||
}
|
||||
|
||||
public void func_231159_b_(String p_231159_1_, boolean p_231159_2_) {
|
||||
@@ -36,7 +48,7 @@
|
||||
|
||||
this.field_230706_i_.field_71439_g.func_71165_d(p_231159_1_);
|
||||
}
|
||||
@@ -302,10 +312,17 @@
|
||||
@@ -302,10 +314,17 @@
|
||||
this.field_230712_o_ = p_231158_1_.field_71466_p;
|
||||
this.field_230708_k_ = p_231158_2_;
|
||||
this.field_230709_l_ = p_231158_3_;
|
||||
@@ -54,7 +66,7 @@
|
||||
}
|
||||
|
||||
public List<? extends IGuiEventListener> func_231039_at__() {
|
||||
@@ -328,6 +345,7 @@
|
||||
@@ -328,6 +347,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);
|
||||
@@ -62,7 +74,7 @@
|
||||
} else {
|
||||
this.func_231165_f_(p_238651_2_);
|
||||
}
|
||||
@@ -346,6 +364,7 @@
|
||||
@@ -346,6 +366,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();
|
||||
@@ -70,7 +82,7 @@
|
||||
}
|
||||
|
||||
public boolean func_231177_au__() {
|
||||
@@ -432,4 +451,8 @@
|
||||
@@ -432,4 +453,8 @@
|
||||
|
||||
public void func_230476_a_(List<Path> p_230476_1_) {
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screen/ServerSelectionList.java
|
||||
+++ b/net/minecraft/client/gui/screen/ServerSelectionList.java
|
||||
@@ -310,6 +310,8 @@
|
||||
@@ -307,6 +307,8 @@
|
||||
this.field_148303_c.func_238854_b_(list1);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -181,7 +181,7 @@
|
||||
- this.func_243308_b(p_230457_1_, list1, p_230457_3_, p_230457_4_);
|
||||
+ net.minecraft.client.gui.FontRenderer font = p_230457_2_.func_77973_b().getFontRenderer(p_230457_2_);
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.preItemToolTip(p_230457_2_);
|
||||
+ this.renderToolTip(p_230457_1_, Lists.transform(list1, ITextComponent::func_241878_f), p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
|
||||
+ this.renderWrappedToolTip(p_230457_1_, list1, p_230457_3_, p_230457_4_, (font == null ? this.field_230712_o_ : font));
|
||||
+ net.minecraftforge.fml.client.gui.GuiUtils.postItemToolTip();
|
||||
} else {
|
||||
super.func_230457_a_(p_230457_1_, p_230457_2_, p_230457_3_, p_230457_4_);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/widget/list/AbstractList.java
|
||||
+++ b/net/minecraft/client/gui/widget/list/AbstractList.java
|
||||
@@ -471,6 +471,13 @@
|
||||
@@ -492,6 +492,13 @@
|
||||
p_238480_1_.field_230666_a_ = this;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/network/login/ClientLoginNetHandler.java
|
||||
+++ b/net/minecraft/client/network/login/ClientLoginNetHandler.java
|
||||
@@ -99,6 +99,7 @@
|
||||
@@ -115,6 +115,7 @@
|
||||
this.field_209525_d.accept(new TranslationTextComponent("connect.joining"));
|
||||
this.field_175091_e = p_147390_1_.func_179730_a();
|
||||
this.field_147393_d.func_150723_a(ProtocolType.PLAY);
|
||||
@@ -8,7 +8,7 @@
|
||||
this.field_147393_d.func_150719_a(new ClientPlayNetHandler(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e));
|
||||
}
|
||||
|
||||
@@ -127,6 +128,7 @@
|
||||
@@ -143,6 +144,7 @@
|
||||
}
|
||||
|
||||
public void func_209521_a(SCustomPayloadLoginPacket p_209521_1_) {
|
||||
|
||||
@@ -77,21 +77,23 @@
|
||||
if (effect != null) {
|
||||
EffectInstance effectinstance = new EffectInstance(effect, p_147260_1_.func_180755_e(), p_147260_1_.func_149428_f(), p_147260_1_.func_186984_g(), p_147260_1_.func_179707_f(), p_147260_1_.func_205527_h());
|
||||
effectinstance.func_100012_b(p_147260_1_.func_149429_c());
|
||||
@@ -1388,11 +1401,12 @@
|
||||
@@ -1388,11 +1401,14 @@
|
||||
public void func_199723_a(STagsListPacket p_199723_1_) {
|
||||
PacketThreadUtil.func_218797_a(p_199723_1_, this, this.field_147299_f);
|
||||
ITagCollectionSupplier itagcollectionsupplier = p_199723_1_.func_199858_a();
|
||||
- Multimap<ResourceLocation, ResourceLocation> multimap = TagRegistryManager.func_242198_b(itagcollectionsupplier);
|
||||
+ Multimap<ResourceLocation, ResourceLocation> multimap = TagRegistryManager.validateVanillaTags(itagcollectionsupplier);
|
||||
+ boolean vanillaConnection = net.minecraftforge.fml.network.NetworkHooks.isVanillaConnection(field_147302_e);
|
||||
+ Multimap<ResourceLocation, ResourceLocation> multimap = vanillaConnection ? TagRegistryManager.func_242198_b(net.minecraftforge.common.ForgeTagHandler.withNoCustom(itagcollectionsupplier)) : TagRegistryManager.validateVanillaTags(itagcollectionsupplier);//Forge: If we are connecting to vanilla validate all tags to properly validate custom tags the client may "require", and if we are connecting to forge only validate the vanilla tag types as the custom tag types get synced in a separate packet so may still arrive
|
||||
if (!multimap.isEmpty()) {
|
||||
field_147301_d.warn("Incomplete server tags, disconnecting. Missing: {}", (Object)multimap);
|
||||
this.field_147302_e.func_150718_a(new TranslationTextComponent("multiplayer.disconnect.missing_tags"));
|
||||
} else {
|
||||
+ net.minecraftforge.common.ForgeTagHandler.resetCachedTagCollections();
|
||||
+ net.minecraftforge.common.ForgeTagHandler.resetCachedTagCollections(true, vanillaConnection);
|
||||
+ itagcollectionsupplier = ITagCollectionSupplier.reinjectOptionalTags(itagcollectionsupplier);
|
||||
this.field_199725_m = itagcollectionsupplier;
|
||||
if (!this.field_147302_e.func_150731_c()) {
|
||||
itagcollectionsupplier.func_242212_e();
|
||||
@@ -1883,10 +1897,12 @@
|
||||
@@ -1885,10 +1901,12 @@
|
||||
int l5 = packetbuffer.readInt();
|
||||
this.field_147299_f.field_184132_p.field_229018_q_.func_229022_a_(blockpos8, l3, s10, l5);
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/client/network/play/NetworkPlayerInfo.java
|
||||
+++ b/net/minecraft/client/network/play/NetworkPlayerInfo.java
|
||||
@@ -50,6 +50,7 @@
|
||||
}
|
||||
|
||||
protected void func_178839_a(GameType p_178839_1_) {
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onClientChangeGameMode(this, this.field_178866_b, p_178839_1_);
|
||||
this.field_178866_b = p_178839_1_;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
--- a/net/minecraft/client/renderer/WorldRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/WorldRenderer.java
|
||||
@@ -830,7 +830,7 @@
|
||||
@@ -222,6 +222,11 @@
|
||||
}
|
||||
|
||||
private void func_228438_a_(LightTexture p_228438_1_, float p_228438_2_, double p_228438_3_, double p_228438_5_, double p_228438_7_) {
|
||||
+ net.minecraftforge.client.IWeatherRenderHandler renderHandler = field_72769_h.func_239132_a_().getWeatherRenderHandler();
|
||||
+ if (renderHandler != null) {
|
||||
+ renderHandler.render(field_72773_u, p_228438_2_, field_72769_h, field_72777_q, p_228438_1_, p_228438_3_, p_228438_5_, p_228438_7_);
|
||||
+ return;
|
||||
+ }
|
||||
float f = this.field_72777_q.field_71441_e.func_72867_j(p_228438_2_);
|
||||
if (!(f <= 0.0F)) {
|
||||
p_228438_1_.func_205109_c();
|
||||
@@ -830,7 +835,7 @@
|
||||
this.field_147595_R = true;
|
||||
BlockPos blockpos2 = chunkrenderdispatcher$chunkrender4.func_178568_j().func_177982_a(8, 8, 8);
|
||||
boolean flag1 = blockpos2.func_177951_i(blockpos) < 768.0D;
|
||||
@@ -9,7 +21,7 @@
|
||||
this.field_175009_l.add(chunkrenderdispatcher$chunkrender4);
|
||||
} else {
|
||||
this.field_72777_q.func_213239_aq().func_76320_a("build near");
|
||||
@@ -915,13 +915,13 @@
|
||||
@@ -915,13 +920,13 @@
|
||||
float f = p_228426_7_.func_205001_m();
|
||||
boolean flag1 = this.field_72777_q.field_71441_e.func_239132_a_().func_230493_a_(MathHelper.func_76128_c(d0), MathHelper.func_76128_c(d1)) || this.field_72777_q.field_71456_v.func_184046_j().func_184056_f();
|
||||
if (this.field_72777_q.field_71474_y.field_151451_c >= 4) {
|
||||
@@ -25,7 +37,7 @@
|
||||
iprofiler.func_219895_b("terrain_setup");
|
||||
this.func_228437_a_(p_228426_6_, clippinghelper, flag, this.field_228409_ai_++, this.field_72777_q.field_71439_g.func_175149_v());
|
||||
iprofiler.func_219895_b("updatechunks");
|
||||
@@ -942,7 +942,9 @@
|
||||
@@ -942,7 +947,9 @@
|
||||
this.func_174967_a(p_228426_3_ + l1);
|
||||
iprofiler.func_219895_b("terrain");
|
||||
this.func_228441_a_(RenderType.func_228639_c_(), p_228426_1_, d0, d1, d2);
|
||||
@@ -35,7 +47,7 @@
|
||||
this.func_228441_a_(RenderType.func_228643_e_(), p_228426_1_, d0, d1, d2);
|
||||
if (this.field_72769_h.func_239132_a_().func_239217_c_()) {
|
||||
RenderHelper.func_237533_a_(p_228426_1_.func_227866_c_().func_227870_a_());
|
||||
@@ -1010,6 +1012,7 @@
|
||||
@@ -1010,6 +1017,7 @@
|
||||
List<TileEntity> list = worldrenderer$localrenderinformationcontainer.field_178036_a.func_178571_g().func_178485_b();
|
||||
if (!list.isEmpty()) {
|
||||
for(TileEntity tileentity1 : list) {
|
||||
@@ -43,7 +55,7 @@
|
||||
BlockPos blockpos3 = tileentity1.func_174877_v();
|
||||
IRenderTypeBuffer irendertypebuffer1 = irendertypebuffer$impl;
|
||||
p_228426_1_.func_227860_a_();
|
||||
@@ -1035,6 +1038,7 @@
|
||||
@@ -1035,6 +1043,7 @@
|
||||
|
||||
synchronized(this.field_181024_n) {
|
||||
for(TileEntity tileentity : this.field_181024_n) {
|
||||
@@ -51,7 +63,7 @@
|
||||
BlockPos blockpos2 = tileentity.func_174877_v();
|
||||
p_228426_1_.func_227860_a_();
|
||||
p_228426_1_.func_227861_a_((double)blockpos2.func_177958_n() - d0, (double)blockpos2.func_177956_o() - d1, (double)blockpos2.func_177952_p() - d2);
|
||||
@@ -1084,10 +1088,13 @@
|
||||
@@ -1084,10 +1093,13 @@
|
||||
iprofiler.func_219895_b("outline");
|
||||
BlockPos blockpos = ((BlockRayTraceResult)raytraceresult).func_216350_a();
|
||||
BlockState blockstate = this.field_72769_h.func_180495_p(blockpos);
|
||||
@@ -66,7 +78,7 @@
|
||||
}
|
||||
|
||||
RenderSystem.pushMatrix();
|
||||
@@ -1119,7 +1126,7 @@
|
||||
@@ -1119,7 +1131,7 @@
|
||||
this.field_239224_H_.func_237506_a_(this.field_72777_q.func_147110_a());
|
||||
RenderState.field_239237_T_.func_228547_a_();
|
||||
iprofiler.func_219895_b("particles");
|
||||
@@ -75,7 +87,7 @@
|
||||
RenderState.field_239237_T_.func_228549_b_();
|
||||
} else {
|
||||
iprofiler.func_219895_b("translucent");
|
||||
@@ -1129,7 +1136,7 @@
|
||||
@@ -1129,7 +1141,7 @@
|
||||
iprofiler.func_219895_b("string");
|
||||
this.func_228441_a_(RenderType.func_241715_r_(), p_228426_1_, d0, d1, d2);
|
||||
iprofiler.func_219895_b("particles");
|
||||
@@ -84,7 +96,40 @@
|
||||
}
|
||||
|
||||
RenderSystem.pushMatrix();
|
||||
@@ -2076,7 +2083,12 @@
|
||||
@@ -1481,6 +1493,11 @@
|
||||
}
|
||||
|
||||
public void func_228424_a_(MatrixStack p_228424_1_, float p_228424_2_) {
|
||||
+ net.minecraftforge.client.ISkyRenderHandler renderHandler = field_72769_h.func_239132_a_().getSkyRenderHandler();
|
||||
+ if (renderHandler != null) {
|
||||
+ renderHandler.render(field_72773_u, p_228424_2_, p_228424_1_, field_72769_h, field_72777_q);
|
||||
+ return;
|
||||
+ }
|
||||
if (this.field_72777_q.field_71441_e.func_239132_a_().func_241683_c_() == DimensionRenderInfo.FogType.END) {
|
||||
this.func_228444_b_(p_228424_1_);
|
||||
} else if (this.field_72777_q.field_71441_e.func_239132_a_().func_241683_c_() == DimensionRenderInfo.FogType.NORMAL) {
|
||||
@@ -1609,6 +1626,11 @@
|
||||
}
|
||||
|
||||
public void func_228425_a_(MatrixStack p_228425_1_, float p_228425_2_, double p_228425_3_, double p_228425_5_, double p_228425_7_) {
|
||||
+ net.minecraftforge.client.ICloudRenderHandler renderHandler = field_72769_h.func_239132_a_().getCloudRenderHandler();
|
||||
+ if (renderHandler != null) {
|
||||
+ renderHandler.render(field_72773_u, p_228425_2_, p_228425_1_, field_72769_h, field_72777_q, p_228425_3_, p_228425_5_, p_228425_7_);
|
||||
+ return;
|
||||
+ }
|
||||
float f = this.field_72769_h.func_239132_a_().func_239213_a_();
|
||||
if (!Float.isNaN(f)) {
|
||||
RenderSystem.disableCull();
|
||||
@@ -1792,7 +1814,7 @@
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
ChunkRenderDispatcher.ChunkRender chunkrenderdispatcher$chunkrender = iterator.next();
|
||||
- if (chunkrenderdispatcher$chunkrender.func_188281_o()) {
|
||||
+ if (!net.minecraftforge.common.ForgeConfig.CLIENT.alwaysSetupTerrainOffThread.get() && chunkrenderdispatcher$chunkrender.func_188281_o()) {
|
||||
this.field_174995_M.func_228902_a_(chunkrenderdispatcher$chunkrender);
|
||||
} else {
|
||||
chunkrenderdispatcher$chunkrender.func_228929_a_(this.field_174995_M);
|
||||
@@ -2076,7 +2098,12 @@
|
||||
this.field_175008_n.func_217628_a(p_215319_1_, p_215319_2_, p_215319_3_, p_215319_4_);
|
||||
}
|
||||
|
||||
@@ -97,7 +142,7 @@
|
||||
ISound isound = this.field_147593_P.get(p_184377_2_);
|
||||
if (isound != null) {
|
||||
this.field_72777_q.func_147118_V().func_147683_b(isound);
|
||||
@@ -2084,7 +2096,7 @@
|
||||
@@ -2084,7 +2111,7 @@
|
||||
}
|
||||
|
||||
if (p_184377_1_ != null) {
|
||||
@@ -106,7 +151,7 @@
|
||||
if (musicdiscitem != null) {
|
||||
this.field_72777_q.field_71456_v.func_238451_a_(musicdiscitem.func_234801_g_());
|
||||
}
|
||||
@@ -2232,7 +2244,7 @@
|
||||
@@ -2232,7 +2259,7 @@
|
||||
break;
|
||||
case 1010:
|
||||
if (Item.func_150899_d(p_180439_4_) instanceof MusicDiscItem) {
|
||||
@@ -115,7 +160,7 @@
|
||||
} else {
|
||||
this.func_184377_a((SoundEvent)null, p_180439_3_);
|
||||
}
|
||||
@@ -2382,8 +2394,8 @@
|
||||
@@ -2382,8 +2409,8 @@
|
||||
break;
|
||||
case 2001:
|
||||
BlockState blockstate = Block.func_196257_b(p_180439_4_);
|
||||
@@ -126,7 +171,7 @@
|
||||
this.field_72769_h.func_184156_a(p_180439_3_, soundtype.func_185845_c(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F, false);
|
||||
}
|
||||
|
||||
@@ -2531,7 +2543,7 @@
|
||||
@@ -2531,7 +2558,7 @@
|
||||
} else {
|
||||
int i = p_228420_0_.func_226658_a_(LightType.SKY, p_228420_2_);
|
||||
int j = p_228420_0_.func_226658_a_(LightType.BLOCK, p_228420_2_);
|
||||
@@ -135,7 +180,7 @@
|
||||
if (j < k) {
|
||||
j = k;
|
||||
}
|
||||
@@ -2570,6 +2582,11 @@
|
||||
@@ -2570,6 +2597,11 @@
|
||||
return this.field_239226_J_;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,3 +13,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +79,7 @@
|
||||
|
||||
protected void func_225629_a_(T p_225629_1_, ITextComponent p_225629_2_, MatrixStack p_225629_3_, IRenderTypeBuffer p_225629_4_, int p_225629_5_) {
|
||||
double d0 = this.field_76990_c.func_229099_b_(p_225629_1_);
|
||||
- if (!(d0 > 4096.0D)) {
|
||||
+ if (net.minecraftforge.client.ForgeHooksClient.isNameplateInRenderDistance(p_225629_1_, d0)) {
|
||||
boolean flag = !p_225629_1_.func_226273_bm_();
|
||||
float f = p_225629_1_.func_213302_cg() + 0.5F;
|
||||
int i = "deadmau5".equals(p_225629_2_.getString()) ? -10 : 0;
|
||||
@@ -5,7 +5,7 @@
|
||||
private final ItemCameraTransforms field_177651_f;
|
||||
|
||||
+ public Builder(net.minecraftforge.client.model.IModelConfiguration model, ItemOverrideList overrides) {
|
||||
+ this(model.useSmoothLighting(), model.isShadedInGui(), model.isSideLit(), model.getCameraTransforms(), overrides);
|
||||
+ this(model.useSmoothLighting(), model.isSideLit(), model.isShadedInGui(), model.getCameraTransforms(), overrides);
|
||||
+ }
|
||||
+
|
||||
public Builder(BlockModel p_i230060_1_, ItemOverrideList p_i230060_2_, boolean p_i230060_3_) {
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
|
||||
public boolean func_151470_d() {
|
||||
- return this.field_74513_e;
|
||||
+ return this.field_74513_e && getKeyConflictContext().isActive() && getKeyModifier().isActive(getKeyConflictContext());
|
||||
+ return this.field_74513_e && isConflictContextAndModifierActive();
|
||||
}
|
||||
|
||||
public String func_151466_e() {
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
--- a/net/minecraft/client/settings/ToggleableKeyBinding.java
|
||||
+++ b/net/minecraft/client/settings/ToggleableKeyBinding.java
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
public void func_225593_a_(boolean p_225593_1_) {
|
||||
if (this.field_228053_a_.getAsBoolean()) {
|
||||
- if (p_225593_1_) {
|
||||
+ if (p_225593_1_ && isConflictContextAndModifierActive()) {
|
||||
super.func_225593_a_(!this.func_151470_d());
|
||||
}
|
||||
} else {
|
||||
@@ -24,4 +24,5 @@
|
||||
}
|
||||
|
||||
}
|
||||
+ @Override public boolean func_151470_d() { return this.field_74513_e && (isConflictContextAndModifierActive() || field_228053_a_.getAsBoolean()); }
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
--- a/net/minecraft/client/world/DimensionRenderInfo.java
|
||||
+++ b/net/minecraft/client/world/DimensionRenderInfo.java
|
||||
@@ -26,6 +26,9 @@
|
||||
private final DimensionRenderInfo.FogType field_241680_e_;
|
||||
private final boolean field_241681_f_;
|
||||
private final boolean field_239212_e_;
|
||||
+ private net.minecraftforge.client.IWeatherRenderHandler weatherRenderHandler = null;
|
||||
+ private net.minecraftforge.client.ISkyRenderHandler skyRenderHandler = null;
|
||||
+ private net.minecraftforge.client.ICloudRenderHandler cloudRenderHandler = null;
|
||||
|
||||
public DimensionRenderInfo(float p_i241259_1_, boolean p_i241259_2_, DimensionRenderInfo.FogType p_i241259_3_, boolean p_i241259_4_, boolean p_i241259_5_) {
|
||||
this.field_239210_c_ = p_i241259_1_;
|
||||
@@ -82,6 +85,28 @@
|
||||
return this.field_239212_e_;
|
||||
}
|
||||
|
||||
+ public void setWeatherRenderHandler(net.minecraftforge.client.IWeatherRenderHandler weatherRenderHandler) {
|
||||
+ this.weatherRenderHandler = weatherRenderHandler;
|
||||
+ }
|
||||
+ public void setSkyRenderHandler(net.minecraftforge.client.ISkyRenderHandler skyRenderHandler) {
|
||||
+ this.skyRenderHandler = skyRenderHandler;
|
||||
+ }
|
||||
+ public void setCloudRenderHandler(net.minecraftforge.client.ICloudRenderHandler cloudRenderHandler) {
|
||||
+ this.cloudRenderHandler = cloudRenderHandler;
|
||||
+ }
|
||||
+ @Nullable
|
||||
+ public net.minecraftforge.client.ICloudRenderHandler getCloudRenderHandler() {
|
||||
+ return cloudRenderHandler;
|
||||
+ }
|
||||
+ @Nullable
|
||||
+ public net.minecraftforge.client.IWeatherRenderHandler getWeatherRenderHandler() {
|
||||
+ return weatherRenderHandler;
|
||||
+ }
|
||||
+ @Nullable
|
||||
+ public net.minecraftforge.client.ISkyRenderHandler getSkyRenderHandler() {
|
||||
+ return skyRenderHandler;
|
||||
+ }
|
||||
+
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static class End extends DimensionRenderInfo {
|
||||
public End() {
|
||||
@@ -8,10 +8,11 @@
|
||||
|
||||
this.field_197062_b.findAmbiguities((p_201302_1_, p_201302_2_, p_201302_3_, p_201302_4_) -> {
|
||||
field_197061_a.warn("Ambiguity between arguments {} and {} with inputs: {}", this.field_197062_b.getPath(p_201302_2_), this.field_197062_b.getPath(p_201302_3_), p_201302_4_);
|
||||
@@ -205,6 +206,14 @@
|
||||
@@ -205,7 +206,15 @@
|
||||
|
||||
try {
|
||||
try {
|
||||
- return this.field_197062_b.execute(stringreader, p_197059_1_);
|
||||
+ ParseResults<CommandSource> parse = this.field_197062_b.parse(stringreader, p_197059_1_);
|
||||
+ net.minecraftforge.event.CommandEvent event = new net.minecraftforge.event.CommandEvent(parse);
|
||||
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) {
|
||||
@@ -20,6 +21,7 @@
|
||||
+ }
|
||||
+ return 1;
|
||||
+ }
|
||||
return this.field_197062_b.execute(stringreader, p_197059_1_);
|
||||
+ return this.field_197062_b.execute(event.getParseResults());
|
||||
} catch (CommandException commandexception) {
|
||||
p_197059_1_.func_197021_a(commandexception.func_197003_a());
|
||||
return 0;
|
||||
@@ -1,15 +1,31 @@
|
||||
--- a/net/minecraft/enchantment/Enchantment.java
|
||||
+++ b/net/minecraft/enchantment/Enchantment.java
|
||||
@@ -18,7 +18,7 @@
|
||||
@@ -18,7 +18,8 @@
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
-public abstract class Enchantment {
|
||||
+public abstract class Enchantment extends net.minecraftforge.registries.ForgeRegistryEntry<Enchantment> {
|
||||
+ private final net.minecraftforge.common.util.ReverseTagWrapper<Enchantment> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, () -> net.minecraft.tags.TagCollectionManager.func_242178_a().getCustomTypeCollection(net.minecraftforge.registries.ForgeRegistries.ENCHANTMENTS));
|
||||
private final EquipmentSlotType[] field_185263_a;
|
||||
private final Enchantment.Rarity field_77333_a;
|
||||
public final EnchantmentType field_77351_y;
|
||||
@@ -114,7 +114,7 @@
|
||||
@@ -37,6 +38,14 @@
|
||||
this.field_185263_a = p_i46731_3_;
|
||||
}
|
||||
|
||||
+ public java.util.Set<net.minecraft.util.ResourceLocation> getTags() {
|
||||
+ return reverseTags.getTagNames();
|
||||
+ }
|
||||
+
|
||||
+ public boolean isIn(net.minecraft.tags.ITag<Enchantment> tag) {
|
||||
+ return tag.func_230235_a_(this);
|
||||
+ }
|
||||
+
|
||||
public Map<EquipmentSlotType, ItemStack> func_222181_a(LivingEntity p_222181_1_) {
|
||||
Map<EquipmentSlotType, ItemStack> map = Maps.newEnumMap(EquipmentSlotType.class);
|
||||
|
||||
@@ -114,7 +123,7 @@
|
||||
}
|
||||
|
||||
public boolean func_92089_a(ItemStack p_92089_1_) {
|
||||
@@ -18,7 +34,7 @@
|
||||
}
|
||||
|
||||
public void func_151368_a(LivingEntity p_151368_1_, Entity p_151368_2_, int p_151368_3_) {
|
||||
@@ -139,6 +139,24 @@
|
||||
@@ -139,6 +148,24 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -231,9 +231,8 @@
|
||||
this.func_213319_R();
|
||||
this.field_70170_p.func_217381_Z().func_76320_a("reposition");
|
||||
- PortalInfo portalinfo = this.func_241829_a(p_241206_1_);
|
||||
- if (portalinfo == null) {
|
||||
+ PortalInfo portalinfo = teleporter.isVanilla() ? this.func_241829_a(p_241206_1_) : null;
|
||||
+ if (portalinfo == null && teleporter.isVanilla()) {
|
||||
+ PortalInfo portalinfo = teleporter.getPortalInfo(this, p_241206_1_, this::func_241829_a);
|
||||
if (portalinfo == null) {
|
||||
return null;
|
||||
} else {
|
||||
+ Entity transportedEntity = teleporter.placeEntity(this, (ServerWorld) this.field_70170_p, p_241206_1_, this.field_70177_z, spawnPortal -> { //Forge: Start vanilla logic
|
||||
|
||||
@@ -9,13 +9,28 @@
|
||||
MONSTER("monster", 70, false, false, 128),
|
||||
CREATURE("creature", 10, true, true, 128),
|
||||
AMBIENT("ambient", 15, true, false, 128),
|
||||
@@ -57,6 +57,10 @@
|
||||
@@ -14,7 +14,7 @@
|
||||
WATER_AMBIENT("water_ambient", 20, true, false, 64),
|
||||
MISC("misc", -1, true, true, 128);
|
||||
|
||||
- public static final Codec<EntityClassification> field_233667_g_ = IStringSerializable.func_233023_a_(EntityClassification::values, EntityClassification::func_233670_a_);
|
||||
+ public static final Codec<EntityClassification> field_233667_g_ = net.minecraftforge.common.IExtensibleEnum.createCodecForExtensibleEnum(EntityClassification::values, EntityClassification::func_233670_a_);
|
||||
private static final Map<String, EntityClassification> field_220364_f = Arrays.stream(values()).collect(Collectors.toMap(EntityClassification::func_220363_a, (p_220362_0_) -> {
|
||||
return p_220362_0_;
|
||||
}));
|
||||
@@ -57,6 +57,16 @@
|
||||
return this.field_82707_i;
|
||||
}
|
||||
|
||||
+ public static EntityClassification create(String name, String id, int maxNumberOfCreatureIn, boolean isPeacefulCreatureIn, boolean isAnimalIn, int despawnDistance) {
|
||||
+ throw new IllegalStateException("Enum not extended");
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ @Deprecated
|
||||
+ public void init() {
|
||||
+ field_220364_f.put(this.func_220363_a(), this);
|
||||
+ }
|
||||
+
|
||||
public int func_233671_f_() {
|
||||
return this.field_233669_n_;
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
--- a/net/minecraft/entity/monster/HoglinEntity.java
|
||||
+++ b/net/minecraft/entity/monster/HoglinEntity.java
|
||||
@@ -279,8 +279,8 @@
|
||||
return hoglinentity;
|
||||
}
|
||||
|
||||
- public boolean func_204701_dC() {
|
||||
- return !HoglinTasks.func_234386_c_(this) && super.func_204701_dC();
|
||||
+ public boolean func_213743_em() {
|
||||
+ return !HoglinTasks.func_234386_c_(this) && super.func_213743_em();
|
||||
}
|
||||
|
||||
public SoundCategory func_184176_by() {
|
||||
@@ -1,23 +1,5 @@
|
||||
--- a/net/minecraft/entity/passive/AnimalEntity.java
|
||||
+++ b/net/minecraft/entity/passive/AnimalEntity.java
|
||||
@@ -121,7 +121,7 @@
|
||||
ItemStack itemstack = p_230254_1_.func_184586_b(p_230254_2_);
|
||||
if (this.func_70877_b(itemstack)) {
|
||||
int i = this.func_70874_b();
|
||||
- if (!this.field_70170_p.field_72995_K && i == 0 && this.func_204701_dC()) {
|
||||
+ if (!this.field_70170_p.field_72995_K && i == 0 && this.func_213743_em()) {
|
||||
this.func_175505_a(p_230254_1_, itemstack);
|
||||
this.func_146082_f(p_230254_1_);
|
||||
return ActionResultType.SUCCESS;
|
||||
@@ -148,7 +148,7 @@
|
||||
|
||||
}
|
||||
|
||||
- public boolean func_204701_dC() {
|
||||
+ public boolean func_213743_em() {
|
||||
return this.field_70881_d <= 0;
|
||||
}
|
||||
|
||||
@@ -199,6 +199,17 @@
|
||||
|
||||
public void func_234177_a_(ServerWorld p_234177_1_, AnimalEntity p_234177_2_) {
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/entity/passive/PandaEntity.java
|
||||
+++ b/net/minecraft/entity/passive/PandaEntity.java
|
||||
@@ -586,7 +586,7 @@
|
||||
if (this.func_70631_g_()) {
|
||||
this.func_175505_a(p_230254_1_, itemstack);
|
||||
this.func_175501_a((int)((float)(-this.func_70874_b() / 20) * 0.1F), true);
|
||||
- } else if (!this.field_70170_p.field_72995_K && this.func_70874_b() == 0 && this.func_204701_dC()) {
|
||||
+ } else if (!this.field_70170_p.field_72995_K && this.func_70874_b() == 0 && this.func_213743_em()) {
|
||||
this.func_175505_a(p_230254_1_, itemstack);
|
||||
this.func_146082_f(p_230254_1_);
|
||||
} else {
|
||||
@@ -1,13 +0,0 @@
|
||||
--- a/net/minecraft/entity/passive/TurtleEntity.java
|
||||
+++ b/net/minecraft/entity/passive/TurtleEntity.java
|
||||
@@ -235,8 +235,8 @@
|
||||
this.func_184185_a(soundevent, 0.15F, 1.0F);
|
||||
}
|
||||
|
||||
- public boolean func_204701_dC() {
|
||||
- return super.func_204701_dC() && !this.func_203020_dx();
|
||||
+ public boolean func_213743_em() {
|
||||
+ return super.func_213743_em() && !this.func_203020_dx();
|
||||
}
|
||||
|
||||
protected float func_203009_ad() {
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/net/minecraft/entity/passive/horse/LlamaEntity.java
|
||||
+++ b/net/minecraft/entity/passive/horse/LlamaEntity.java
|
||||
@@ -181,7 +181,7 @@
|
||||
i = 90;
|
||||
j = 6;
|
||||
f = 10.0F;
|
||||
- if (this.func_110248_bS() && this.func_70874_b() == 0 && this.func_204701_dC()) {
|
||||
+ if (this.func_110248_bS() && this.func_70874_b() == 0 && this.func_213743_em()) {
|
||||
flag = true;
|
||||
this.func_146082_f(p_190678_1_);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/entity/player/ServerPlayerEntity.java
|
||||
+++ b/net/minecraft/entity/player/ServerPlayerEntity.java
|
||||
@@ -471,6 +471,7 @@
|
||||
@@ -475,6 +475,7 @@
|
||||
}
|
||||
|
||||
public void func_70645_a(DamageSource p_70645_1_) {
|
||||
@@ -8,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();
|
||||
@@ -614,13 +615,14 @@
|
||||
@@ -618,13 +619,14 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -26,18 +26,17 @@
|
||||
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));
|
||||
@@ -634,14 +636,15 @@
|
||||
@@ -638,14 +640,15 @@
|
||||
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);
|
||||
- serverworld.func_217434_e(this);
|
||||
- this.field_70128_L = false;
|
||||
- PortalInfo portalinfo = this.func_241829_a(p_241206_1_);
|
||||
- if (portalinfo != null) {
|
||||
+ serverworld.removeEntity(this, true); //Forge: the player entity is moved to the new world, NOT cloned. So keep the data alive with no matching invalidate call.
|
||||
+ this.revive();
|
||||
+ PortalInfo portalinfo = teleporter.isVanilla() ? this.func_241829_a(p_241206_1_) : null;
|
||||
+ if (portalinfo != null || !teleporter.isVanilla()) {
|
||||
+ PortalInfo portalinfo = teleporter.getPortalInfo(this, p_241206_1_, this::func_241829_a);
|
||||
if (portalinfo != null) {
|
||||
+ Entity e = teleporter.placeEntity(this, serverworld, p_241206_1_, this.field_70177_z, spawnPortal -> {//Forge: Start vanilla logic
|
||||
serverworld.func_217381_Z().func_76320_a("moving");
|
||||
if (registrykey == World.field_234918_g_ && p_241206_1_.func_234923_W_() == World.field_234919_h_) {
|
||||
@@ -47,7 +46,7 @@
|
||||
this.func_242110_a(p_241206_1_, new BlockPos(portalinfo.field_222505_a));
|
||||
}
|
||||
|
||||
@@ -653,6 +656,9 @@
|
||||
@@ -657,6 +660,9 @@
|
||||
this.func_225653_b_(portalinfo.field_222505_a.field_72450_a, portalinfo.field_222505_a.field_72448_b, portalinfo.field_222505_a.field_72449_c);
|
||||
serverworld.func_217381_Z().func_76319_b();
|
||||
this.func_213846_b(serverworld);
|
||||
@@ -57,7 +56,7 @@
|
||||
this.field_71134_c.func_73080_a(p_241206_1_);
|
||||
this.field_71135_a.func_147359_a(new SPlayerAbilitiesPacket(this.field_71075_bZ));
|
||||
playerlist.func_72354_b(this, p_241206_1_);
|
||||
@@ -666,6 +672,7 @@
|
||||
@@ -670,6 +676,7 @@
|
||||
this.field_71144_ck = -1;
|
||||
this.field_71149_ch = -1.0F;
|
||||
this.field_71146_ci = -1;
|
||||
@@ -65,7 +64,7 @@
|
||||
}
|
||||
|
||||
return this;
|
||||
@@ -739,6 +746,9 @@
|
||||
@@ -743,6 +750,9 @@
|
||||
}
|
||||
|
||||
public Either<PlayerEntity.SleepResult, Unit> func_213819_a(BlockPos p_213819_1_) {
|
||||
@@ -75,7 +74,7 @@
|
||||
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_()) {
|
||||
@@ -749,7 +759,7 @@
|
||||
@@ -753,7 +763,7 @@
|
||||
return Either.left(PlayerEntity.SleepResult.OBSTRUCTED);
|
||||
} else {
|
||||
this.func_242111_a(this.field_70170_p.func_234923_W_(), p_213819_1_, this.field_70177_z, false, true);
|
||||
@@ -84,7 +83,7 @@
|
||||
return Either.left(PlayerEntity.SleepResult.NOT_POSSIBLE_NOW);
|
||||
} else {
|
||||
if (!this.func_184812_l_()) {
|
||||
@@ -783,6 +793,7 @@
|
||||
@@ -787,6 +797,7 @@
|
||||
}
|
||||
|
||||
private boolean func_241147_a_(BlockPos p_241147_1_, Direction p_241147_2_) {
|
||||
@@ -92,7 +91,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()));
|
||||
}
|
||||
|
||||
@@ -882,6 +893,7 @@
|
||||
@@ -886,6 +897,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;
|
||||
@@ -100,7 +99,7 @@
|
||||
return OptionalInt.of(this.field_71139_cq);
|
||||
}
|
||||
}
|
||||
@@ -900,6 +912,7 @@
|
||||
@@ -904,6 +916,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);
|
||||
@@ -108,7 +107,7 @@
|
||||
}
|
||||
|
||||
public void func_184814_a(ItemStack p_184814_1_, Hand p_184814_2_) {
|
||||
@@ -957,6 +970,7 @@
|
||||
@@ -961,6 +974,7 @@
|
||||
|
||||
public void func_71128_l() {
|
||||
this.field_71070_bA.func_75134_a(this);
|
||||
@@ -116,7 +115,7 @@
|
||||
this.field_71070_bA = this.field_71069_bz;
|
||||
}
|
||||
|
||||
@@ -1081,6 +1095,13 @@
|
||||
@@ -1085,6 +1099,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());
|
||||
@@ -130,7 +129,15 @@
|
||||
}
|
||||
|
||||
protected void func_70670_a(EffectInstance p_70670_1_) {
|
||||
@@ -1187,6 +1208,7 @@
|
||||
@@ -1143,6 +1164,7 @@
|
||||
}
|
||||
|
||||
public void func_71033_a(GameType p_71033_1_) {
|
||||
+ if (!net.minecraftforge.common.ForgeHooks.onChangeGameMode(this, this.field_71134_c.func_73081_b(), p_71033_1_)) return;
|
||||
this.field_71134_c.func_73076_a(p_71033_1_);
|
||||
this.field_71135_a.func_147359_a(new SChangeGameStatePacket(SChangeGameStatePacket.field_241767_d_, (float)p_71033_1_.func_77148_a()));
|
||||
if (p_71033_1_ == GameType.SPECTATOR) {
|
||||
@@ -1191,6 +1213,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));
|
||||
@@ -138,7 +145,7 @@
|
||||
}
|
||||
|
||||
public ChatVisibility func_147096_v() {
|
||||
@@ -1297,14 +1319,14 @@
|
||||
@@ -1301,14 +1324,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_);
|
||||
@@ -156,7 +163,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);
|
||||
@@ -1313,6 +1335,7 @@
|
||||
@@ -1317,6 +1340,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);
|
||||
@@ -164,7 +171,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1335,6 +1358,7 @@
|
||||
@@ -1339,6 +1363,7 @@
|
||||
}
|
||||
|
||||
public void func_242111_a(RegistryKey<World> p_242111_1_, @Nullable BlockPos p_242111_2_, float p_242111_3_, boolean p_242111_4_, boolean p_242111_5_) {
|
||||
@@ -172,7 +179,7 @@
|
||||
if (p_242111_2_ != null) {
|
||||
boolean flag = p_242111_2_.equals(this.field_241138_cr_) && p_242111_1_.equals(this.field_241137_cq_);
|
||||
if (p_242111_5_ && !flag) {
|
||||
@@ -1387,6 +1411,8 @@
|
||||
@@ -1391,6 +1416,8 @@
|
||||
if (itementity == null) {
|
||||
return null;
|
||||
} else {
|
||||
@@ -181,11 +188,10 @@
|
||||
this.field_70170_p.func_217376_c(itementity);
|
||||
ItemStack itemstack = itementity.func_92059_d();
|
||||
if (p_146097_3_) {
|
||||
@@ -1400,4 +1426,13 @@
|
||||
return itementity;
|
||||
@@ -1405,6 +1432,15 @@
|
||||
}
|
||||
}
|
||||
+
|
||||
|
||||
+ private String language = "en_us";
|
||||
+ /**
|
||||
+ * Returns the language last reported by the player as their local language.
|
||||
@@ -194,4 +200,7 @@
|
||||
+ public String getLanguage() {
|
||||
+ return this.language;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
@Nullable
|
||||
public IChatFilter func_244529_Q() {
|
||||
return this.field_244528_co;
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/net/minecraft/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -155,6 +155,13 @@
|
||||
@@ -156,6 +156,13 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
p_77659_2_.func_71029_a(Stats.field_75929_E.func_199076_b(this));
|
||||
- p_77659_2_.func_184185_a(fluid.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187633_N : SoundEvents.field_187630_M, 1.0F, 1.0F);
|
||||
+
|
||||
+ SoundEvent soundevent = this.field_77876_a.getAttributes().getEmptySound();
|
||||
+ SoundEvent soundevent = this.field_77876_a.getAttributes().getFillSound();
|
||||
+ if (soundevent == null) soundevent = fluid.func_207185_a(FluidTags.field_206960_b) ? SoundEvents.field_187633_N : SoundEvents.field_187630_M;
|
||||
+ p_77659_2_.func_184185_a(soundevent, 1.0F, 1.0F);
|
||||
ItemStack itemstack1 = DrinkHelper.func_242398_a(itemstack, p_77659_2_, new ItemStack(fluid.func_204524_b()));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/NetworkManager.java
|
||||
+++ b/net/minecraft/network/NetworkManager.java
|
||||
@@ -75,6 +75,7 @@
|
||||
@@ -74,6 +74,7 @@
|
||||
private float field_211397_t;
|
||||
private int field_211398_u;
|
||||
private boolean field_211399_v;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public NetworkManager(PacketDirection p_i46004_1_) {
|
||||
this.field_179294_g = p_i46004_1_;
|
||||
@@ -84,6 +85,7 @@
|
||||
@@ -83,6 +84,7 @@
|
||||
super.channelActive(p_channelActive_1_);
|
||||
this.field_150746_k = p_channelActive_1_.channel();
|
||||
this.field_150743_l = this.field_150746_k.remoteAddress();
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
try {
|
||||
this.func_150723_a(ProtocolType.HANDSHAKING);
|
||||
@@ -172,7 +174,7 @@
|
||||
@@ -171,7 +173,7 @@
|
||||
++this.field_211395_r;
|
||||
if (protocoltype1 != protocoltype) {
|
||||
field_150735_g.debug("Disabled auto read");
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
if (this.field_150746_k.eventLoop().inEventLoop()) {
|
||||
@@ -260,7 +262,9 @@
|
||||
@@ -259,7 +261,9 @@
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static NetworkManager func_181124_a(InetAddress p_181124_0_, int p_181124_1_, boolean p_181124_2_) {
|
||||
@@ -35,7 +35,7 @@
|
||||
Class<? extends SocketChannel> oclass;
|
||||
LazyValue<? extends EventLoopGroup> lazyvalue;
|
||||
if (Epoll.isAvailable() && p_181124_2_) {
|
||||
@@ -287,6 +291,7 @@
|
||||
@@ -286,6 +290,7 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static NetworkManager func_150722_a(SocketAddress p_150722_0_) {
|
||||
final NetworkManager networkmanager = new NetworkManager(PacketDirection.CLIENTBOUND);
|
||||
@@ -43,7 +43,7 @@
|
||||
(new Bootstrap()).group(field_179296_e.func_179281_c()).handler(new ChannelInitializer<Channel>() {
|
||||
protected void initChannel(Channel p_initChannel_1_) throws Exception {
|
||||
p_initChannel_1_.pipeline().addLast("packet_handler", networkmanager);
|
||||
@@ -377,6 +382,14 @@
|
||||
@@ -376,6 +381,14 @@
|
||||
return this.field_211397_t;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/login/ServerLoginNetHandler.java
|
||||
+++ b/net/minecraft/network/login/ServerLoginNetHandler.java
|
||||
@@ -53,7 +53,13 @@
|
||||
@@ -55,7 +55,13 @@
|
||||
}
|
||||
|
||||
public void func_73660_a() {
|
||||
@@ -15,48 +15,48 @@
|
||||
this.func_147326_c();
|
||||
} else if (this.field_147328_g == ServerLoginNetHandler.State.DELAY_ACCEPT) {
|
||||
ServerPlayerEntity serverplayerentity = this.field_147327_f.func_184103_al().func_177451_a(this.field_147337_i.getId());
|
||||
@@ -128,7 +134,7 @@
|
||||
@@ -130,7 +136,7 @@
|
||||
this.field_147328_g = ServerLoginNetHandler.State.KEY;
|
||||
this.field_147333_a.func_179290_a(new SEncryptionRequestPacket("", this.field_147327_f.func_71250_E().getPublic(), this.field_147330_e));
|
||||
this.field_147333_a.func_179290_a(new SEncryptionRequestPacket("", this.field_147327_f.func_71250_E().getPublic().getEncoded(), this.field_147330_e));
|
||||
} else {
|
||||
- this.field_147328_g = ServerLoginNetHandler.State.READY_TO_ACCEPT;
|
||||
+ this.field_147328_g = ServerLoginNetHandler.State.NEGOTIATING;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -142,7 +148,7 @@
|
||||
this.field_147335_k = p_147315_1_.func_149300_a(privatekey);
|
||||
this.field_147328_g = ServerLoginNetHandler.State.AUTHENTICATING;
|
||||
this.field_147333_a.func_150727_a(this.field_147335_k);
|
||||
- Thread thread = new Thread("User Authenticator #" + field_147331_b.incrementAndGet()) {
|
||||
+ Thread thread = new Thread(net.minecraftforge.fml.common.thread.SidedThreadGroups.SERVER, "User Authenticator #" + field_147331_b.incrementAndGet()) {
|
||||
public void run() {
|
||||
GameProfile gameprofile = ServerLoginNetHandler.this.field_147337_i;
|
||||
@@ -155,7 +161,7 @@
|
||||
throw new IllegalStateException("Protocol error", cryptexception);
|
||||
}
|
||||
|
||||
@@ -151,11 +157,11 @@
|
||||
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.field_147327_f.func_147130_as().hasJoinedServer(new GameProfile((UUID)null, gameprofile.getName()), s, this.func_191235_a());
|
||||
if (ServerLoginNetHandler.this.field_147337_i != null) {
|
||||
ServerLoginNetHandler.field_147332_c.info("UUID of player {} is {}", ServerLoginNetHandler.this.field_147337_i.getName(), ServerLoginNetHandler.this.field_147337_i.getId());
|
||||
- ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.READY_TO_ACCEPT;
|
||||
- Thread thread = new Thread("User Authenticator #" + field_147331_b.incrementAndGet()) {
|
||||
+ Thread thread = new Thread(net.minecraftforge.fml.common.thread.SidedThreadGroups.SERVER, "User Authenticator #" + field_147331_b.incrementAndGet()) {
|
||||
public void run() {
|
||||
GameProfile gameprofile = ServerLoginNetHandler.this.field_147337_i;
|
||||
|
||||
@@ -163,11 +169,11 @@
|
||||
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.field_147327_f.func_147130_as().hasJoinedServer(new GameProfile((UUID)null, gameprofile.getName()), s, this.func_191235_a());
|
||||
if (ServerLoginNetHandler.this.field_147337_i != null) {
|
||||
ServerLoginNetHandler.field_147332_c.info("UUID of player {} is {}", ServerLoginNetHandler.this.field_147337_i.getName(), ServerLoginNetHandler.this.field_147337_i.getId());
|
||||
- ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.READY_TO_ACCEPT;
|
||||
+ ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.NEGOTIATING;
|
||||
} else if (ServerLoginNetHandler.this.field_147327_f.func_71264_H()) {
|
||||
ServerLoginNetHandler.field_147332_c.warn("Failed to verify username but will let them in anyway!");
|
||||
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.func_152506_a(gameprofile);
|
||||
- ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.READY_TO_ACCEPT;
|
||||
} else if (ServerLoginNetHandler.this.field_147327_f.func_71264_H()) {
|
||||
ServerLoginNetHandler.field_147332_c.warn("Failed to verify username but will let them in anyway!");
|
||||
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.func_152506_a(gameprofile);
|
||||
- ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.READY_TO_ACCEPT;
|
||||
+ ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.NEGOTIATING;
|
||||
} else {
|
||||
ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.unverified_username"));
|
||||
ServerLoginNetHandler.field_147332_c.error("Username '{}' tried to join with an invalid session", (Object)gameprofile.getName());
|
||||
@@ -164,7 +170,7 @@
|
||||
if (ServerLoginNetHandler.this.field_147327_f.func_71264_H()) {
|
||||
ServerLoginNetHandler.field_147332_c.warn("Authentication servers are down but will let them in anyway!");
|
||||
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.func_152506_a(gameprofile);
|
||||
- ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.READY_TO_ACCEPT;
|
||||
} else {
|
||||
ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.unverified_username"));
|
||||
ServerLoginNetHandler.field_147332_c.error("Username '{}' tried to join with an invalid session", (Object)gameprofile.getName());
|
||||
@@ -176,7 +182,7 @@
|
||||
if (ServerLoginNetHandler.this.field_147327_f.func_71264_H()) {
|
||||
ServerLoginNetHandler.field_147332_c.warn("Authentication servers are down but will let them in anyway!");
|
||||
ServerLoginNetHandler.this.field_147337_i = ServerLoginNetHandler.this.func_152506_a(gameprofile);
|
||||
- ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.READY_TO_ACCEPT;
|
||||
+ ServerLoginNetHandler.this.field_147328_g = ServerLoginNetHandler.State.NEGOTIATING;
|
||||
} else {
|
||||
ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.authservers_down"));
|
||||
ServerLoginNetHandler.field_147332_c.error("Couldn't verify username because servers are unavailable");
|
||||
@@ -185,6 +191,7 @@
|
||||
} else {
|
||||
ServerLoginNetHandler.this.func_194026_b(new TranslationTextComponent("multiplayer.disconnect.authservers_down"));
|
||||
ServerLoginNetHandler.field_147332_c.error("Couldn't verify username because servers are unavailable");
|
||||
@@ -196,6 +202,7 @@
|
||||
}
|
||||
|
||||
public void func_209526_a(CCustomPayloadLoginPacket p_209526_1_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/network/play/ServerPlayNetHandler.java
|
||||
+++ b/net/minecraft/network/play/ServerPlayNetHandler.java
|
||||
@@ -348,9 +348,11 @@
|
||||
@@ -391,9 +391,11 @@
|
||||
}
|
||||
|
||||
entity.func_70080_a(d3, d4, d5, f, f1);
|
||||
@@ -12,7 +12,7 @@
|
||||
this.field_147371_a.func_179290_a(new SMoveVehiclePacket(entity));
|
||||
return;
|
||||
}
|
||||
@@ -367,7 +369,7 @@
|
||||
@@ -410,7 +412,7 @@
|
||||
}
|
||||
|
||||
private boolean func_241162_a_(Entity p_241162_1_) {
|
||||
@@ -21,7 +21,7 @@
|
||||
}
|
||||
|
||||
public void func_184339_a(CConfirmTeleportPacket p_184339_1_) {
|
||||
@@ -881,7 +883,9 @@
|
||||
@@ -950,7 +952,9 @@
|
||||
Direction direction = blockraytraceresult.func_216354_b();
|
||||
this.field_147369_b.func_143004_u();
|
||||
if (blockpos.func_177956_o() < this.field_147367_d.func_71207_Z()) {
|
||||
@@ -32,18 +32,18 @@
|
||||
ActionResultType actionresulttype = this.field_147369_b.field_71134_c.func_219441_a(this.field_147369_b, serverworld, itemstack, hand, blockraytraceresult);
|
||||
if (direction == Direction.UP && !actionresulttype.func_226246_a_() && blockpos.func_177956_o() >= this.field_147367_d.func_71207_Z() - 1 && func_241166_a_(this.field_147369_b, itemstack)) {
|
||||
ITextComponent itextcomponent = (new TranslationTextComponent("build.tooHigh", this.field_147367_d.func_71207_Z())).func_240699_a_(TextFormatting.RED);
|
||||
@@ -1014,7 +1018,9 @@
|
||||
if (s.startsWith("/")) {
|
||||
this.func_147361_d(s);
|
||||
@@ -1097,7 +1101,9 @@
|
||||
if (p_244548_1_.startsWith("/")) {
|
||||
this.func_147361_d(p_244548_1_);
|
||||
} else {
|
||||
- ITextComponent itextcomponent = new TranslationTextComponent("chat.type.text", this.field_147369_b.func_145748_c_(), s);
|
||||
+ ITextComponent itextcomponent = new TranslationTextComponent("chat.type.text", this.field_147369_b.func_145748_c_(), net.minecraftforge.common.ForgeHooks.newChatWithLinks(s));
|
||||
+ itextcomponent = net.minecraftforge.common.ForgeHooks.onServerChatEvent(this, s, itextcomponent);
|
||||
- ITextComponent itextcomponent = new TranslationTextComponent("chat.type.text", this.field_147369_b.func_145748_c_(), p_244548_1_);
|
||||
+ ITextComponent itextcomponent = new TranslationTextComponent("chat.type.text", this.field_147369_b.func_145748_c_(), net.minecraftforge.common.ForgeHooks.newChatWithLinks(p_244548_1_));
|
||||
+ itextcomponent = net.minecraftforge.common.ForgeHooks.onServerChatEvent(this, p_244548_1_, itextcomponent);
|
||||
+ if (itextcomponent == null) return;
|
||||
this.field_147367_d.func_184103_al().func_232641_a_(itextcomponent, ChatType.CHAT, this.field_147369_b.func_110124_au());
|
||||
}
|
||||
|
||||
@@ -1104,6 +1110,7 @@
|
||||
@@ -1187,6 +1193,7 @@
|
||||
if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.INTERACT) {
|
||||
optional = Optional.of(this.field_147369_b.func_190775_a(entity, hand));
|
||||
} else if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.INTERACT_AT) {
|
||||
@@ -51,7 +51,7 @@
|
||||
optional = Optional.of(entity.func_184199_a(this.field_147369_b, p_147340_1_.func_179712_b(), hand));
|
||||
} else if (p_147340_1_.func_149565_c() == CUseEntityPacket.Action.ATTACK) {
|
||||
if (entity instanceof ItemEntity || entity instanceof ExperienceOrbEntity || entity instanceof AbstractArrowEntity || entity == this.field_147369_b) {
|
||||
@@ -1315,6 +1322,8 @@
|
||||
@@ -1402,6 +1409,8 @@
|
||||
}
|
||||
|
||||
public void func_147349_a(CCustomPayloadPacket p_147349_1_) {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
--- a/net/minecraft/network/rcon/ClientThread.java
|
||||
+++ b/net/minecraft/network/rcon/ClientThread.java
|
||||
@@ -116,13 +116,14 @@
|
||||
}
|
||||
|
||||
private void func_72655_a(int p_72655_1_, String p_72655_2_) throws IOException {
|
||||
- int i = p_72655_2_.length();
|
||||
-
|
||||
+ byte[] whole = p_72655_2_.getBytes(StandardCharsets.UTF_8);
|
||||
+ int i = whole.length;
|
||||
+ int start = 0;
|
||||
do {
|
||||
int j = 4096 <= i ? 4096 : i;
|
||||
- this.func_72654_a(p_72655_1_, 0, p_72655_2_.substring(0, j));
|
||||
- p_72655_2_ = p_72655_2_.substring(j);
|
||||
- i = p_72655_2_.length();
|
||||
+ this.func_72654_a(p_72655_1_, 0, new String(java.util.Arrays.copyOfRange(whole, start, j+start), StandardCharsets.UTF_8));
|
||||
+ i -= j;
|
||||
+ start += j;
|
||||
} while(0 != i);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/network/rcon/RConConsoleSource.java
|
||||
+++ b/net/minecraft/network/rcon/RConConsoleSource.java
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
public void func_145747_a(ITextComponent p_145747_1_, UUID p_145747_2_) {
|
||||
- this.field_70009_b.append(p_145747_1_.getString());
|
||||
+ this.field_70009_b.append(p_145747_1_.getString()).append("\n"); // FIX MC-7569 - RCON has no newlines in multiline output
|
||||
}
|
||||
|
||||
public boolean func_195039_a() {
|
||||
@@ -1,11 +1,27 @@
|
||||
--- a/net/minecraft/potion/Potion.java
|
||||
+++ b/net/minecraft/potion/Potion.java
|
||||
@@ -6,7 +6,7 @@
|
||||
@@ -6,7 +6,8 @@
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
-public class Potion {
|
||||
+public class Potion extends net.minecraftforge.registries.ForgeRegistryEntry<Potion> {
|
||||
+ private final net.minecraftforge.common.util.ReverseTagWrapper<Potion> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, () -> net.minecraft.tags.TagCollectionManager.func_242178_a().getCustomTypeCollection(net.minecraftforge.registries.ForgeRegistries.POTION_TYPES));
|
||||
private final String field_185179_d;
|
||||
private final ImmutableList<EffectInstance> field_185180_e;
|
||||
|
||||
@@ -23,6 +24,14 @@
|
||||
this.field_185180_e = ImmutableList.copyOf(p_i46740_2_);
|
||||
}
|
||||
|
||||
+ public java.util.Set<net.minecraft.util.ResourceLocation> getTags() {
|
||||
+ return reverseTags.getTagNames();
|
||||
+ }
|
||||
+
|
||||
+ public boolean isIn(net.minecraft.tags.ITag<Potion> tag) {
|
||||
+ return tag.func_230235_a_(this);
|
||||
+ }
|
||||
+
|
||||
public String func_185174_b(String p_185174_1_) {
|
||||
return p_185174_1_ + (this.field_185179_d == null ? Registry.field_212621_j.func_177774_c(this).func_110623_a() : this.field_185179_d);
|
||||
}
|
||||
@@ -8,3 +8,11 @@
|
||||
}
|
||||
|
||||
public FunctionReloader func_240960_a_() {
|
||||
@@ -81,6 +82,7 @@
|
||||
|
||||
public void func_240971_i_() {
|
||||
this.field_240955_e_.func_242231_a().func_242212_e();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.TagsUpdatedEvent.CustomTagTypes(field_240955_e_.func_242231_a()));
|
||||
}
|
||||
|
||||
public void close() {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/Main.java
|
||||
+++ b/net/minecraft/server/Main.java
|
||||
@@ -72,6 +72,8 @@
|
||||
@@ -71,6 +71,8 @@
|
||||
OptionSpec<Integer> optionspec11 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(-1);
|
||||
OptionSpec<String> optionspec12 = optionparser.accepts("serverId").withRequiredArg();
|
||||
OptionSpec<String> optionspec13 = optionparser.nonOptions();
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
try {
|
||||
OptionSet optionset = optionparser.parse(p_main_0_);
|
||||
@@ -79,33 +81,38 @@
|
||||
@@ -78,33 +80,38 @@
|
||||
optionparser.printHelpOn(System.err);
|
||||
return;
|
||||
}
|
||||
@@ -43,7 +43,7 @@
|
||||
- }
|
||||
-
|
||||
File file1 = new File(optionset.valueOf(optionspec9));
|
||||
YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString());
|
||||
YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY);
|
||||
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
|
||||
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
|
||||
PlayerProfileCache playerprofilecache = new PlayerProfileCache(gameprofilerepository, new File(file1, MinecraftServer.field_152367_a.getName()));
|
||||
@@ -55,7 +55,7 @@
|
||||
SaveFormat saveformat = SaveFormat.func_237269_a_(file1.toPath());
|
||||
SaveFormat.LevelSave saveformat$levelsave = saveformat.func_237274_c_(s);
|
||||
MinecraftServer.func_240777_a_(saveformat$levelsave);
|
||||
@@ -170,6 +177,7 @@
|
||||
@@ -169,6 +176,7 @@
|
||||
Thread thread = new Thread("Server Shutdown Thread") {
|
||||
public void run() {
|
||||
dedicatedserver.func_71263_m(true);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -225,7 +225,7 @@
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
public static <S extends MinecraftServer> S func_240784_a_(Function<Thread, S> p_240784_0_) {
|
||||
AtomicReference<S> atomicreference = new AtomicReference<>();
|
||||
@@ -9,7 +9,7 @@
|
||||
atomicreference.get().func_240802_v_();
|
||||
}, "Server thread");
|
||||
thread.setUncaughtExceptionHandler((p_240779_0_, p_240779_1_) -> {
|
||||
@@ -373,6 +373,7 @@
|
||||
@@ -376,6 +376,7 @@
|
||||
worldborder.func_177737_a(new IBorderListener.Impl(serverworld1.func_175723_af()));
|
||||
this.field_71305_c.put(registrykey1, serverworld1);
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -384,6 +385,7 @@
|
||||
@@ -387,6 +388,7 @@
|
||||
} else if (p_240786_3_) {
|
||||
p_240786_1_.func_176143_a(BlockPos.field_177992_a.func_177984_a(), 0.0F);
|
||||
} else {
|
||||
@@ -25,7 +25,15 @@
|
||||
BiomeProvider biomeprovider = chunkgenerator.func_202090_b();
|
||||
Random random = new Random(p_240786_0_.func_72905_C());
|
||||
BlockPos blockpos = biomeprovider.func_225531_a_(0, p_240786_0_.func_181545_F(), 0, 256, (p_244265_0_) -> {
|
||||
@@ -563,6 +565,7 @@
|
||||
@@ -452,6 +454,7 @@
|
||||
}
|
||||
|
||||
private void func_213186_a(IChunkStatusListener p_213186_1_) {
|
||||
+ net.minecraftforge.common.world.StructureSpawnManager.gatherEntitySpawns();
|
||||
ServerWorld serverworld = this.func_241755_D_();
|
||||
field_147145_h.info("Preparing start region for dimension {}", (Object)serverworld.func_234923_W_().func_240901_a_());
|
||||
BlockPos blockpos = serverworld.func_241135_u_();
|
||||
@@ -566,6 +569,7 @@
|
||||
for(ServerWorld serverworld1 : this.func_212370_w()) {
|
||||
if (serverworld1 != null) {
|
||||
try {
|
||||
@@ -33,7 +41,7 @@
|
||||
serverworld1.close();
|
||||
} catch (IOException ioexception1) {
|
||||
field_147145_h.error("Exception closing the level", (Throwable)ioexception1);
|
||||
@@ -611,6 +614,7 @@
|
||||
@@ -614,6 +618,7 @@
|
||||
protected void func_240802_v_() {
|
||||
try {
|
||||
if (this.func_71197_b()) {
|
||||
@@ -41,7 +49,7 @@
|
||||
this.field_211151_aa = Util.func_211177_b();
|
||||
this.field_147147_p.func_151315_a(new StringTextComponent(this.field_71286_C));
|
||||
this.field_147147_p.func_151321_a(new ServerStatusResponse.Version(SharedConstants.func_215069_a().getName(), SharedConstants.func_215069_a().getProtocolVersion()));
|
||||
@@ -640,7 +644,10 @@
|
||||
@@ -643,7 +648,10 @@
|
||||
this.func_240795_b_(longtickdetector);
|
||||
this.field_71296_Q = true;
|
||||
}
|
||||
@@ -52,7 +60,7 @@
|
||||
this.func_71228_a((CrashReport)null);
|
||||
}
|
||||
} catch (Throwable throwable1) {
|
||||
@@ -659,6 +666,7 @@
|
||||
@@ -662,6 +670,7 @@
|
||||
field_147145_h.error("We were unable to save this crash report to disk.");
|
||||
}
|
||||
|
||||
@@ -60,7 +68,7 @@
|
||||
this.func_71228_a(crashreport);
|
||||
} finally {
|
||||
try {
|
||||
@@ -667,6 +675,7 @@
|
||||
@@ -670,6 +679,7 @@
|
||||
} catch (Throwable throwable) {
|
||||
field_147145_h.error("Exception stopping the server", throwable);
|
||||
} finally {
|
||||
@@ -68,7 +76,7 @@
|
||||
this.func_71240_o();
|
||||
}
|
||||
|
||||
@@ -768,6 +777,7 @@
|
||||
@@ -771,6 +781,7 @@
|
||||
|
||||
protected void func_71217_p(BooleanSupplier p_71217_1_) {
|
||||
long i = Util.func_211178_c();
|
||||
@@ -76,7 +84,7 @@
|
||||
++this.field_71315_w;
|
||||
this.func_71190_q(p_71217_1_);
|
||||
if (i - this.field_147142_T >= 5000000000L) {
|
||||
@@ -782,6 +792,7 @@
|
||||
@@ -785,6 +796,7 @@
|
||||
|
||||
Collections.shuffle(Arrays.asList(agameprofile));
|
||||
this.field_147147_p.func_151318_b().func_151330_a(agameprofile);
|
||||
@@ -84,7 +92,7 @@
|
||||
}
|
||||
|
||||
if (this.field_71315_w % 6000 == 0) {
|
||||
@@ -809,6 +820,7 @@
|
||||
@@ -812,6 +824,7 @@
|
||||
long i1 = Util.func_211178_c();
|
||||
this.field_213215_ap.func_181747_a(i1 - i);
|
||||
this.field_71304_b.func_76319_b();
|
||||
@@ -92,7 +100,7 @@
|
||||
}
|
||||
|
||||
protected void func_71190_q(BooleanSupplier p_71190_1_) {
|
||||
@@ -816,7 +828,8 @@
|
||||
@@ -819,7 +832,8 @@
|
||||
this.func_193030_aL().func_73660_a();
|
||||
this.field_71304_b.func_219895_b("levels");
|
||||
|
||||
@@ -102,7 +110,7 @@
|
||||
this.field_71304_b.func_194340_a(() -> {
|
||||
return serverworld + " " + serverworld.func_234923_W_().func_240901_a_();
|
||||
});
|
||||
@@ -827,6 +840,7 @@
|
||||
@@ -830,6 +844,7 @@
|
||||
}
|
||||
|
||||
this.field_71304_b.func_76320_a("tick");
|
||||
@@ -110,7 +118,7 @@
|
||||
|
||||
try {
|
||||
serverworld.func_72835_b(p_71190_1_);
|
||||
@@ -835,9 +849,11 @@
|
||||
@@ -838,9 +853,11 @@
|
||||
serverworld.func_72914_a(crashreport);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
@@ -122,7 +130,7 @@
|
||||
}
|
||||
|
||||
this.field_71304_b.func_219895_b("connection");
|
||||
@@ -912,7 +928,7 @@
|
||||
@@ -915,7 +932,7 @@
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
@@ -131,7 +139,7 @@
|
||||
}
|
||||
|
||||
public CrashReport func_71230_b(CrashReport p_71230_1_) {
|
||||
@@ -925,6 +941,7 @@
|
||||
@@ -928,6 +945,7 @@
|
||||
p_71230_1_.func_85056_g().func_189529_a("Data Packs", () -> {
|
||||
StringBuilder stringbuilder = new StringBuilder();
|
||||
|
||||
@@ -139,7 +147,7 @@
|
||||
for(ResourcePackInfo resourcepackinfo : this.field_195577_ad.func_198980_d()) {
|
||||
if (stringbuilder.length() > 0) {
|
||||
stringbuilder.append(", ");
|
||||
@@ -1271,6 +1288,7 @@
|
||||
@@ -1280,6 +1298,7 @@
|
||||
this.func_184103_al().func_193244_w();
|
||||
this.field_200258_al.func_240946_a_(this.field_195576_ac.func_240960_a_());
|
||||
this.field_240765_ak_.func_195410_a(this.field_195576_ac.func_240970_h_());
|
||||
@@ -147,7 +155,7 @@
|
||||
}, this);
|
||||
if (this.func_213162_bc()) {
|
||||
this.func_213161_c(completablefuture::isDone);
|
||||
@@ -1280,10 +1298,13 @@
|
||||
@@ -1289,10 +1308,13 @@
|
||||
}
|
||||
|
||||
public static DatapackCodec func_240772_a_(ResourcePackList p_240772_0_, DatapackCodec p_240772_1_, boolean p_240772_2_) {
|
||||
@@ -163,7 +171,7 @@
|
||||
} else {
|
||||
Set<String> set = Sets.newLinkedHashSet();
|
||||
|
||||
@@ -1433,6 +1454,31 @@
|
||||
@@ -1442,6 +1464,31 @@
|
||||
|
||||
public abstract boolean func_213199_b(GameProfile p_213199_1_);
|
||||
|
||||
@@ -195,7 +203,7 @@
|
||||
public void func_223711_a(Path p_223711_1_) throws IOException {
|
||||
Path path = p_223711_1_.resolve("levels");
|
||||
|
||||
@@ -1561,6 +1607,10 @@
|
||||
@@ -1570,6 +1617,10 @@
|
||||
return this.field_240768_i_;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -76,6 +76,7 @@
|
||||
@@ -81,6 +81,7 @@
|
||||
public boolean func_71197_b() throws IOException {
|
||||
Thread thread = new Thread("Server console handler") {
|
||||
public void run() {
|
||||
@@ -8,7 +8,7 @@
|
||||
BufferedReader bufferedreader = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8));
|
||||
|
||||
String s1;
|
||||
@@ -158,11 +159,13 @@
|
||||
@@ -162,11 +163,13 @@
|
||||
SkullTileEntity.func_184293_a(this.func_152358_ax());
|
||||
SkullTileEntity.func_184294_a(this.func_147130_as());
|
||||
PlayerProfileCache.func_187320_a(this.func_71266_T());
|
||||
@@ -22,7 +22,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);
|
||||
}
|
||||
@@ -186,11 +189,12 @@
|
||||
@@ -190,11 +193,12 @@
|
||||
}
|
||||
|
||||
Items.field_190931_a.func_150895_a(ItemGroup.field_78027_g, NonNullList.func_191196_a());
|
||||
@@ -36,7 +36,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -507,6 +511,11 @@
|
||||
@@ -515,6 +519,11 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/server/dedicated/ServerHangWatchdog.java
|
||||
+++ b/net/minecraft/server/dedicated/ServerHangWatchdog.java
|
||||
@@ -36,7 +36,7 @@
|
||||
@@ -40,7 +40,7 @@
|
||||
ThreadMXBean threadmxbean = ManagementFactory.getThreadMXBean();
|
||||
ThreadInfo[] athreadinfo = threadmxbean.dumpAllThreads(true, true);
|
||||
StringBuilder stringbuilder = new StringBuilder();
|
||||
- Error error = new Error();
|
||||
- Error error = new Error("Watchdog");
|
||||
+ Error error = new Error(String.format("ServerHangWatchdog detected that a single server tick took %.2f seconds (should be max 0.05)", k / 1000F)); // Forge: don't just make a crash report with a seemingly-inexplicable Error
|
||||
|
||||
for(ThreadInfo threadinfo : athreadinfo) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/net/minecraft/server/integrated/IntegratedServer.java
|
||||
+++ b/net/minecraft/server/integrated/IntegratedServer.java
|
||||
@@ -58,9 +58,10 @@
|
||||
@@ -56,9 +56,10 @@
|
||||
this.func_71188_g(true);
|
||||
this.func_71245_h(true);
|
||||
field_147148_h.info("Generating keypair");
|
||||
this.func_71253_a(CryptManager.func_75891_b());
|
||||
this.func_244801_P();
|
||||
+ if (!net.minecraftforge.fml.server.ServerLifecycleHooks.handleServerAboutToStart(this)) return false;
|
||||
this.func_240800_l__();
|
||||
this.func_71205_p(this.func_71214_G() + " - " + this.func_240793_aU_().func_76065_j());
|
||||
@@ -12,7 +12,7 @@
|
||||
}
|
||||
|
||||
public void func_71217_p(BooleanSupplier p_71217_1_) {
|
||||
@@ -174,6 +175,7 @@
|
||||
@@ -172,6 +173,7 @@
|
||||
}
|
||||
|
||||
public void func_71263_m(boolean p_71263_1_) {
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
--- a/net/minecraft/tags/BlockTags.java
|
||||
+++ b/net/minecraft/tags/BlockTags.java
|
||||
@@ -97,6 +97,10 @@
|
||||
@@ -97,6 +97,14 @@
|
||||
return field_199899_c.func_232937_a_(p_199894_0_);
|
||||
}
|
||||
|
||||
+ public static net.minecraftforge.common.Tags.IOptionalNamedTag<Block> createOptional(ResourceLocation name) {
|
||||
+ return field_199899_c.createOptional(name, () -> null);
|
||||
+ return createOptional(name, null);
|
||||
+ }
|
||||
+
|
||||
+ public static net.minecraftforge.common.Tags.IOptionalNamedTag<Block> createOptional(ResourceLocation name, @javax.annotation.Nullable java.util.Set<java.util.function.Supplier<Block>> defaults) {
|
||||
+ return field_199899_c.createOptional(name, defaults);
|
||||
+ }
|
||||
+
|
||||
public static ITagCollection<Block> func_199896_a() {
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
--- a/net/minecraft/tags/EntityTypeTags.java
|
||||
+++ b/net/minecraft/tags/EntityTypeTags.java
|
||||
@@ -16,6 +16,10 @@
|
||||
@@ -16,6 +16,14 @@
|
||||
return field_219766_c.func_232937_a_(p_232896_0_);
|
||||
}
|
||||
|
||||
+ public static net.minecraftforge.common.Tags.IOptionalNamedTag<EntityType<?>> createOptional(ResourceLocation name) {
|
||||
+ return field_219766_c.createOptional(name, () -> null);
|
||||
+ return createOptional(name, null);
|
||||
+ }
|
||||
+
|
||||
+ public static net.minecraftforge.common.Tags.IOptionalNamedTag<EntityType<?>> createOptional(ResourceLocation name, @javax.annotation.Nullable java.util.Set<java.util.function.Supplier<EntityType<?>>> defaults) {
|
||||
+ return field_219766_c.createOptional(name, defaults);
|
||||
+ }
|
||||
+
|
||||
public static ITagCollection<EntityType<?>> func_219762_a() {
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
--- a/net/minecraft/tags/FluidTags.java
|
||||
+++ b/net/minecraft/tags/FluidTags.java
|
||||
@@ -13,7 +13,16 @@
|
||||
@@ -13,7 +13,20 @@
|
||||
return field_206961_c.func_232937_a_(p_206956_0_);
|
||||
}
|
||||
|
||||
+ public static net.minecraftforge.common.Tags.IOptionalNamedTag<Fluid> createOptional(ResourceLocation name) {
|
||||
+ return field_206961_c.createOptional(name, () -> null);
|
||||
+ return createOptional(name, null);
|
||||
+ }
|
||||
+
|
||||
+ public static net.minecraftforge.common.Tags.IOptionalNamedTag<Fluid> createOptional(ResourceLocation name, @javax.annotation.Nullable java.util.Set<java.util.function.Supplier<Fluid>> defaults) {
|
||||
+ return field_206961_c.createOptional(name, defaults);
|
||||
+ }
|
||||
+
|
||||
public static List<? extends ITag.INamedTag<Fluid>> func_241280_c_() {
|
||||
|
||||
@@ -17,3 +17,36 @@
|
||||
}
|
||||
|
||||
default void func_242210_a(PacketBuffer p_242210_1_) {
|
||||
@@ -58,4 +59,32 @@
|
||||
}
|
||||
};
|
||||
}
|
||||
+
|
||||
+ static ITagCollectionSupplier reinjectOptionalTags(ITagCollectionSupplier tagCollectionSupplier) {
|
||||
+ ITagCollection<Block> blockTagCollection = BlockTags.field_199899_c.reinjectOptionalTags(tagCollectionSupplier.func_241835_a());
|
||||
+ ITagCollection<Item> itemTagCollection = ItemTags.field_199906_c.reinjectOptionalTags(tagCollectionSupplier.func_241836_b());
|
||||
+ ITagCollection<Fluid> fluidTagCollection = FluidTags.field_206961_c.reinjectOptionalTags(tagCollectionSupplier.func_241837_c());
|
||||
+ ITagCollection<EntityType<?>> entityTypeTagCollection = EntityTypeTags.field_219766_c.reinjectOptionalTags(tagCollectionSupplier.func_241838_d());
|
||||
+ return new ITagCollectionSupplier() {
|
||||
+ @Override
|
||||
+ public ITagCollection<Block> func_241835_a() {
|
||||
+ return blockTagCollection;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public ITagCollection<Item> func_241836_b() {
|
||||
+ return itemTagCollection;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public ITagCollection<Fluid> func_241837_c() {
|
||||
+ return fluidTagCollection;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public ITagCollection<EntityType<?>> func_241838_d() {
|
||||
+ return entityTypeTagCollection;
|
||||
+ }
|
||||
+ };
|
||||
+ }
|
||||
}
|
||||
@@ -1,11 +1,15 @@
|
||||
--- a/net/minecraft/tags/ItemTags.java
|
||||
+++ b/net/minecraft/tags/ItemTags.java
|
||||
@@ -65,6 +65,10 @@
|
||||
@@ -65,6 +65,14 @@
|
||||
return field_199906_c.func_232937_a_(p_199901_0_);
|
||||
}
|
||||
|
||||
+ public static net.minecraftforge.common.Tags.IOptionalNamedTag<Item> createOptional(ResourceLocation name) {
|
||||
+ return field_199906_c.createOptional(name, () -> null);
|
||||
+ return createOptional(name, null);
|
||||
+ }
|
||||
+
|
||||
+ public static net.minecraftforge.common.Tags.IOptionalNamedTag<Item> createOptional(ResourceLocation name, @javax.annotation.Nullable java.util.Set<java.util.function.Supplier<Item>> defaults) {
|
||||
+ return field_199906_c.createOptional(name, defaults);
|
||||
+ }
|
||||
+
|
||||
public static ITagCollection<Item> func_199903_a() {
|
||||
|
||||
@@ -23,3 +23,12 @@
|
||||
ITagCollectionSupplier itagcollectionsupplier = ITagCollectionSupplier.func_242209_a(itagcollection, itagcollection1, itagcollection2, itagcollection3);
|
||||
Multimap<ResourceLocation, ResourceLocation> multimap = TagRegistryManager.func_242198_b(itagcollectionsupplier);
|
||||
if (!multimap.isEmpty()) {
|
||||
@@ -43,6 +46,8 @@
|
||||
return p_232978_0_.getKey() + ":" + p_232978_0_.getValue();
|
||||
}).sorted().collect(Collectors.joining(",")));
|
||||
} else {
|
||||
+ itagcollectionsupplier = ITagCollectionSupplier.reinjectOptionalTags(itagcollectionsupplier);
|
||||
+ net.minecraftforge.common.ForgeTagHandler.reinjectOptionalTagsCustomTypes();
|
||||
TagCollectionManager.func_242180_a(itagcollectionsupplier);
|
||||
this.field_242230_e = itagcollectionsupplier;
|
||||
}
|
||||
@@ -15,17 +15,17 @@
|
||||
+ return add(new TagRegistry.NamedTag<>(new ResourceLocation(p_232937_1_)));
|
||||
+ }
|
||||
+
|
||||
+ public net.minecraftforge.common.Tags.IOptionalNamedTag<T> createOptional(ResourceLocation key, @Nullable java.util.function.Supplier<Set<T>> defaults) {
|
||||
+ public net.minecraftforge.common.Tags.IOptionalNamedTag<T> createOptional(ResourceLocation key, @Nullable Set<java.util.function.Supplier<T>> defaults) {
|
||||
+ 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));
|
||||
+ }
|
||||
+
|
||||
+ /** Call via ForgeTagHandler#createOptionalTag to avoid any exceptions due to calling this after it is safe to call {@link #createOptional(ResourceLocation, java.util.function.Supplier)} */
|
||||
+ public static <T> net.minecraftforge.common.Tags.IOptionalNamedTag<T> createDelayedOptional(ResourceLocation tagRegistry, ResourceLocation key, @Nullable java.util.function.Supplier<Set<T>> defaults) {
|
||||
+ /** Call via ForgeTagHandler#createOptionalTag to avoid any exceptions due to calling this after it is safe to call {@link #createOptional(ResourceLocation, Set)} */
|
||||
+ public static <T> net.minecraftforge.common.Tags.IOptionalNamedTag<T> createDelayedOptional(ResourceLocation tagRegistry, ResourceLocation key, @Nullable Set<java.util.function.Supplier<T>> defaults) {
|
||||
+ return delayedAdd(tagRegistry, new TagRegistry.OptionalNamedTag<>(key, defaults));
|
||||
+ }
|
||||
+
|
||||
@@ -53,7 +53,28 @@
|
||||
this.field_232931_c_.add(namedtag);
|
||||
return namedtag;
|
||||
}
|
||||
@@ -56,7 +94,7 @@
|
||||
@@ -46,6 +84,20 @@
|
||||
});
|
||||
}
|
||||
|
||||
+ public ITagCollection<T> reinjectOptionalTags(ITagCollection<T> tagCollection) {
|
||||
+ java.util.Map<ResourceLocation, ITag<T>> currentTags = tagCollection.func_241833_a();
|
||||
+ java.util.Map<ResourceLocation, ITag<T>> missingOptionals = this.field_232931_c_.stream().filter(e -> e instanceof OptionalNamedTag && !currentTags.containsKey(e.func_230234_a_())).collect(Collectors.toMap(NamedTag::func_230234_a_, namedTag -> {
|
||||
+ OptionalNamedTag<T> optionalNamedTag = (OptionalNamedTag<T>) namedTag;
|
||||
+ optionalNamedTag.defaulted = true;
|
||||
+ return optionalNamedTag.resolveDefaulted();
|
||||
+ }));
|
||||
+ if (!missingOptionals.isEmpty()) {
|
||||
+ missingOptionals.putAll(currentTags);
|
||||
+ return ITagCollection.func_242202_a(missingOptionals);
|
||||
+ }
|
||||
+ return tagCollection;
|
||||
+ }
|
||||
+
|
||||
public ITagCollection<T> func_232939_b_() {
|
||||
return this.field_232930_b_;
|
||||
}
|
||||
@@ -56,7 +108,7 @@
|
||||
|
||||
public Set<ResourceLocation> func_242189_b(ITagCollectionSupplier p_242189_1_) {
|
||||
ITagCollection<T> itagcollection = this.field_242184_c.apply(p_242189_1_);
|
||||
@@ -62,7 +83,7 @@
|
||||
ImmutableSet<ResourceLocation> immutableset = ImmutableSet.copyOf(itagcollection.func_199908_a());
|
||||
return Sets.difference(set, immutableset);
|
||||
}
|
||||
@@ -93,5 +131,45 @@
|
||||
@@ -93,5 +145,40 @@
|
||||
public List<T> func_230236_b_() {
|
||||
return this.func_232944_c_().func_230236_b_();
|
||||
}
|
||||
@@ -77,10 +98,10 @@
|
||||
+
|
||||
+ private static class OptionalNamedTag<T> extends NamedTag<T> implements net.minecraftforge.common.Tags.IOptionalNamedTag<T> {
|
||||
+ @Nullable
|
||||
+ private final java.util.function.Supplier<Set<T>> defaults;
|
||||
+ private boolean defaulted = true;
|
||||
+ private final Set<java.util.function.Supplier<T>> defaults;
|
||||
+ private boolean defaulted = false;
|
||||
+
|
||||
+ private OptionalNamedTag(ResourceLocation name, @Nullable java.util.function.Supplier<Set<T>> defaults) {
|
||||
+ private OptionalNamedTag(ResourceLocation name, @Nullable Set<java.util.function.Supplier<T>> defaults) {
|
||||
+ super(name);
|
||||
+ this.defaults = defaults;
|
||||
+ }
|
||||
@@ -90,16 +111,11 @@
|
||||
+ return defaulted;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ void func_232943_a_(Function<ResourceLocation, ITag<T>> p_232943_1_) {
|
||||
+ super.func_232943_a_(p_232943_1_);
|
||||
+ if (this.field_232942_b_ == null) {
|
||||
+ this.defaulted = true;
|
||||
+ Set<T> defs = defaults == null ? null : defaults.get();
|
||||
+ this.field_232942_b_ = defs == null ? Tag.func_241284_a_() : Tag.func_241286_a_(defs);
|
||||
+ } else {
|
||||
+ this.defaulted = false;
|
||||
+ Tag<T> resolveDefaulted() {
|
||||
+ if (defaults == null || defaults.isEmpty()) {
|
||||
+ return Tag.func_241284_a_();
|
||||
+ }
|
||||
+ return Tag.func_241286_a_(ImmutableSet.copyOf(defaults.stream().map(java.util.function.Supplier::get).collect(Collectors.toSet())));
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
|
||||
@@ -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");
|
||||
+ }
|
||||
+
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
if (itemstack.func_190926_b()) {
|
||||
return false;
|
||||
} else if (!PotionBrewing.func_185205_a(itemstack)) {
|
||||
@@ -163,16 +164,16 @@
|
||||
@@ -163,22 +164,22 @@
|
||||
}
|
||||
|
||||
private void func_145940_l() {
|
||||
@@ -18,18 +18,26 @@
|
||||
- for(int i = 0; i < 3; ++i) {
|
||||
- this.field_145945_j.set(i, PotionBrewing.func_185212_d(itemstack, this.field_145945_j.get(i)));
|
||||
- }
|
||||
-
|
||||
- itemstack.func_190918_g(1);
|
||||
+ net.minecraftforge.common.brewing.BrewingRecipeRegistry.brewPotions(field_145945_j, itemstack, field_145947_i);
|
||||
|
||||
itemstack.func_190918_g(1);
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPotionBrewed(field_145945_j);
|
||||
BlockPos blockpos = this.func_174877_v();
|
||||
- if (itemstack.func_77973_b().func_77634_r()) {
|
||||
- ItemStack itemstack1 = new ItemStack(itemstack.func_77973_b().func_77668_q());
|
||||
+ if (itemstack.hasContainerItem()) {
|
||||
+ ItemStack itemstack1 = itemstack.getContainerItem();
|
||||
+ itemstack.func_190918_g(1);
|
||||
if (itemstack.func_190926_b()) {
|
||||
itemstack = itemstack1;
|
||||
} else if (!this.field_145850_b.field_72995_K) {
|
||||
InventoryHelper.func_180173_a(this.field_145850_b, (double)blockpos.func_177958_n(), (double)blockpos.func_177956_o(), (double)blockpos.func_177952_p(), itemstack1);
|
||||
}
|
||||
}
|
||||
+ else itemstack.func_190918_g(1);
|
||||
|
||||
this.field_145945_j.set(3, itemstack);
|
||||
this.field_145850_b.func_217379_c(1035, blockpos, 0);
|
||||
@@ -229,13 +230,13 @@
|
||||
|
||||
public boolean func_94041_b(int p_94041_1_, ItemStack p_94041_2_) {
|
||||
|
||||
@@ -9,3 +9,26 @@
|
||||
private static final Logger field_206866_A = LogManager.getLogger();
|
||||
public static final TileEntityType<FurnaceTileEntity> field_200971_b = func_200966_a("furnace", TileEntityType.Builder.func_223042_a(FurnaceTileEntity::new, Blocks.field_150460_al));
|
||||
public static final TileEntityType<ChestTileEntity> field_200972_c = func_200966_a("chest", TileEntityType.Builder.func_223042_a(ChestTileEntity::new, Blocks.field_150486_ae));
|
||||
@@ -54,6 +54,7 @@
|
||||
private final Supplier<? extends T> field_200995_z;
|
||||
private final Set<Block> field_223046_I;
|
||||
private final Type<?> field_206867_C;
|
||||
+ private final net.minecraftforge.common.util.ReverseTagWrapper<TileEntityType<?>> reverseTags = new net.minecraftforge.common.util.ReverseTagWrapper<>(this, () -> net.minecraft.tags.TagCollectionManager.func_242178_a().getCustomTypeCollection(net.minecraftforge.registries.ForgeRegistries.TILE_ENTITIES));
|
||||
|
||||
@Nullable
|
||||
public static ResourceLocation func_200969_a(TileEntityType<?> p_200969_0_) {
|
||||
@@ -75,6 +76,14 @@
|
||||
this.field_206867_C = p_i51497_3_;
|
||||
}
|
||||
|
||||
+ public java.util.Set<net.minecraft.util.ResourceLocation> getTags() {
|
||||
+ return reverseTags.getTagNames();
|
||||
+ }
|
||||
+
|
||||
+ public boolean isIn(net.minecraft.tags.ITag<TileEntityType<?>> tag) {
|
||||
+ return tag.func_230235_a_(this);
|
||||
+ }
|
||||
+
|
||||
@Nullable
|
||||
public T func_200968_a() {
|
||||
return this.field_200995_z.get();
|
||||
@@ -0,0 +1,15 @@
|
||||
--- a/net/minecraft/util/ResourceLocation.java
|
||||
+++ b/net/minecraft/util/ResourceLocation.java
|
||||
@@ -112,6 +112,12 @@
|
||||
return i;
|
||||
}
|
||||
|
||||
+ // Normal compare sorts by path first, this compares namespace first.
|
||||
+ public int compareNamespaced(ResourceLocation o) {
|
||||
+ int ret = this.field_110626_a.compareTo(o.field_110626_a);
|
||||
+ return ret != 0 ? ret : this.field_110625_b.compareTo(o.field_110625_b);
|
||||
+ }
|
||||
+
|
||||
public static ResourceLocation func_195826_a(StringReader p_195826_0_) throws CommandSyntaxException {
|
||||
int i = p_195826_0_.getCursor();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/util/SharedConstants.java
|
||||
+++ b/net/minecraft/util/SharedConstants.java
|
||||
@@ -40,6 +40,7 @@
|
||||
@@ -44,6 +44,7 @@
|
||||
}
|
||||
|
||||
static {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/util/math/vector/Vector4f.java
|
||||
+++ b/net/minecraft/util/math/vector/Vector4f.java
|
||||
@@ -128,4 +128,16 @@
|
||||
@@ -125,4 +125,16 @@
|
||||
public String toString() {
|
||||
return "[" + this.field_229368_a_ + ", " + this.field_229369_b_ + ", " + this.field_229370_c_ + ", " + this.field_229371_d_ + "]";
|
||||
}
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
--- a/net/minecraft/util/registry/Bootstrap.java
|
||||
+++ b/net/minecraft/util/registry/Bootstrap.java
|
||||
@@ -48,6 +48,7 @@
|
||||
@@ -48,6 +48,8 @@
|
||||
IDispenseItemBehavior.func_218401_c();
|
||||
ArgumentTypes.func_197483_a();
|
||||
TagRegistryManager.func_242197_b();
|
||||
+ net.minecraftforge.registries.GameData.vanillaSnapshot();
|
||||
+ if (false) // skip redirectOutputToLog, Forge already redirects stdout and stderr output to log so that they print with more context
|
||||
func_179868_d();
|
||||
}
|
||||
}
|
||||
@@ -103,7 +104,6 @@
|
||||
@@ -103,7 +105,6 @@
|
||||
Commands.func_242986_b();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/util/registry/DynamicRegistries.java
|
||||
+++ b/net/minecraft/util/registry/DynamicRegistries.java
|
||||
@@ -90,6 +90,8 @@
|
||||
RegistryKey<? extends Registry<E>> registrykey = p_243607_2_.func_243622_a();
|
||||
boolean flag = !registrykey.equals(Registry.field_243549_ar) && !registrykey.equals(Registry.field_239698_ad_);
|
||||
Registry<E> registry = field_243600_c.func_243612_b(registrykey);
|
||||
+ if (!registrykey.equals(Registry.field_239698_ad_))
|
||||
+ registry = ((Registry<Registry<E>>)WorldGenRegistries.field_243650_b).func_230516_a_((RegistryKey<Registry<E>>)registrykey);
|
||||
MutableRegistry<E> mutableregistry = p_243607_0_.func_243612_b(registrykey);
|
||||
|
||||
for(Entry<RegistryKey<E>, E> entry : registry.func_239659_c_()) {
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/util/registry/WorldSettingsImport.java
|
||||
+++ b/net/minecraft/util/registry/WorldSettingsImport.java
|
||||
@@ -190,6 +190,7 @@
|
||||
) {
|
||||
JsonParser jsonparser = new JsonParser();
|
||||
JsonElement jsonelement = jsonparser.parse(reader);
|
||||
+ if (jsonelement!= null) jsonelement.getAsJsonObject().addProperty("forge:registry_name", p_241879_3_.func_240901_a_().toString());
|
||||
return p_241879_4_.parse(p_241879_1_, jsonelement).map((p_244347_0_) -> {
|
||||
return Pair.of(p_244347_0_, OptionalInt.empty());
|
||||
});
|
||||
@@ -231,6 +232,7 @@
|
||||
|
||||
public <E> DataResult<Pair<E, OptionalInt>> func_241879_a(DynamicOps<JsonElement> p_241879_1_, RegistryKey<? extends Registry<E>> p_241879_2_, RegistryKey<E> p_241879_3_, Decoder<E> p_241879_4_) {
|
||||
JsonElement jsonelement = this.field_244349_a.get(p_241879_3_);
|
||||
+ if (jsonelement!= null) jsonelement.getAsJsonObject().addProperty("forge:registry_name", p_241879_3_.func_240901_a_().toString());
|
||||
return jsonelement == null ? DataResult.error("Unknown element: " + p_241879_3_) : p_241879_4_.parse(p_241879_1_, jsonelement).setLifecycle(this.field_244351_c.get(p_241879_3_)).map((p_244353_2_) -> {
|
||||
return Pair.of(p_244353_2_, OptionalInt.of(this.field_244350_b.getInt(p_241879_3_)));
|
||||
});
|
||||
@@ -248,7 +248,7 @@
|
||||
explosion.func_77278_a();
|
||||
explosion.func_77279_a(true);
|
||||
return explosion;
|
||||
@@ -562,6 +621,7 @@
|
||||
@@ -561,6 +620,7 @@
|
||||
|
||||
public void func_175690_a(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_) {
|
||||
if (!func_189509_E(p_175690_1_)) {
|
||||
@@ -256,7 +256,7 @@
|
||||
if (p_175690_2_ != null && !p_175690_2_.func_145837_r()) {
|
||||
if (this.field_147481_N) {
|
||||
p_175690_2_.func_226984_a_(this, p_175690_1_);
|
||||
@@ -577,7 +637,8 @@
|
||||
@@ -576,7 +636,8 @@
|
||||
|
||||
this.field_147484_a.add(p_175690_2_);
|
||||
} else {
|
||||
@@ -266,7 +266,7 @@
|
||||
this.func_175700_a(p_175690_2_);
|
||||
}
|
||||
}
|
||||
@@ -590,6 +651,8 @@
|
||||
@@ -589,6 +650,8 @@
|
||||
if (tileentity != null && this.field_147481_N) {
|
||||
tileentity.func_145843_s();
|
||||
this.field_147484_a.remove(tileentity);
|
||||
@@ -275,7 +275,7 @@
|
||||
} else {
|
||||
if (tileentity != null) {
|
||||
this.field_147484_a.remove(tileentity);
|
||||
@@ -599,7 +662,7 @@
|
||||
@@ -598,7 +661,7 @@
|
||||
|
||||
this.func_175726_f(p_175713_1_).func_177425_e(p_175713_1_);
|
||||
}
|
||||
@@ -284,7 +284,7 @@
|
||||
}
|
||||
|
||||
public boolean func_195588_v(BlockPos p_195588_1_) {
|
||||
@@ -652,10 +715,10 @@
|
||||
@@ -651,10 +714,10 @@
|
||||
public List<Entity> func_175674_a(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable Predicate<? super Entity> p_175674_3_) {
|
||||
this.func_217381_Z().func_230035_c_("getEntities");
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
@@ -299,7 +299,7 @@
|
||||
AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
|
||||
|
||||
for(int i1 = i; i1 <= j; ++i1) {
|
||||
@@ -672,10 +735,10 @@
|
||||
@@ -671,10 +734,10 @@
|
||||
|
||||
public <T extends Entity> List<T> func_217394_a(@Nullable EntityType<T> p_217394_1_, AxisAlignedBB p_217394_2_, Predicate<? super T> p_217394_3_) {
|
||||
this.func_217381_Z().func_230035_c_("getEntities");
|
||||
@@ -314,7 +314,7 @@
|
||||
List<T> list = Lists.newArrayList();
|
||||
|
||||
for(int i1 = i; i1 < j; ++i1) {
|
||||
@@ -692,10 +755,10 @@
|
||||
@@ -691,10 +754,10 @@
|
||||
|
||||
public <T extends Entity> List<T> func_175647_a(Class<? extends T> p_175647_1_, AxisAlignedBB p_175647_2_, @Nullable Predicate<? super T> p_175647_3_) {
|
||||
this.func_217381_Z().func_230035_c_("getEntities");
|
||||
@@ -329,7 +329,7 @@
|
||||
List<T> list = Lists.newArrayList();
|
||||
AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
|
||||
|
||||
@@ -713,10 +776,10 @@
|
||||
@@ -712,10 +775,10 @@
|
||||
|
||||
public <T extends Entity> List<T> func_225316_b(Class<? extends T> p_225316_1_, AxisAlignedBB p_225316_2_, @Nullable Predicate<? super T> p_225316_3_) {
|
||||
this.func_217381_Z().func_230035_c_("getLoadedEntities");
|
||||
@@ -344,7 +344,7 @@
|
||||
List<T> list = Lists.newArrayList();
|
||||
AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
|
||||
|
||||
@@ -740,6 +803,7 @@
|
||||
@@ -739,6 +802,7 @@
|
||||
this.func_175726_f(p_175646_1_).func_76630_e();
|
||||
}
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
}
|
||||
|
||||
public int func_181545_F() {
|
||||
@@ -784,7 +848,7 @@
|
||||
@@ -783,7 +847,7 @@
|
||||
public int func_175651_c(BlockPos p_175651_1_, Direction p_175651_2_) {
|
||||
BlockState blockstate = this.func_180495_p(p_175651_1_);
|
||||
int i = blockstate.func_185911_a(this, p_175651_1_, p_175651_2_);
|
||||
@@ -361,7 +361,7 @@
|
||||
}
|
||||
|
||||
public boolean func_175640_z(BlockPos p_175640_1_) {
|
||||
@@ -939,16 +1003,15 @@
|
||||
@@ -938,16 +1002,15 @@
|
||||
public abstract Scoreboard func_96441_U();
|
||||
|
||||
public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) {
|
||||
@@ -382,7 +382,7 @@
|
||||
blockstate.func_215697_a(this, blockpos, p_175666_2_, p_175666_1_, false);
|
||||
}
|
||||
}
|
||||
@@ -1025,6 +1088,18 @@
|
||||
@@ -1024,6 +1087,18 @@
|
||||
return this.field_226689_w_;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,22 @@
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
-public final class Biome {
|
||||
+public final class Biome extends net.minecraftforge.registries.ForgeRegistryEntry<Biome> {
|
||||
+public final class Biome extends net.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<Biome> {
|
||||
public static final Logger field_150586_aC = LogManager.getLogger();
|
||||
public static final Codec<Biome> field_242418_b = RecordCodecBuilder.create((p_235064_0_) -> {
|
||||
return p_235064_0_.group(Biome.Climate.field_242459_a.forGetter((p_242446_0_) -> {
|
||||
@@ -200,7 +200,7 @@
|
||||
@@ -70,7 +70,9 @@
|
||||
return p_242443_0_.field_242424_k;
|
||||
}), MobSpawnInfo.field_242552_c.forGetter((p_242442_0_) -> {
|
||||
return p_242442_0_.field_242425_l;
|
||||
- })).apply(p_235064_0_, Biome::new);
|
||||
+ }), ResourceLocation.field_240908_a_.optionalFieldOf("forge:registry_name").forGetter(b -> Optional.ofNullable(b.getRegistryName())))
|
||||
+ .apply(p_235064_0_, (climate, category, depth, scale, effects, gen, spawns, name) ->
|
||||
+ net.minecraftforge.common.ForgeHooks.enhanceBiome(name.orElse(null), climate, category, depth, scale, effects, gen, spawns, p_235064_0_, Biome::new));
|
||||
});
|
||||
public static final Codec<Biome> field_242419_c = RecordCodecBuilder.create((p_242432_0_) -> {
|
||||
return p_242432_0_.group(Biome.Climate.field_242459_a.forGetter((p_242441_0_) -> {
|
||||
@@ -200,7 +202,7 @@
|
||||
} else {
|
||||
if (p_201850_2_.func_177956_o() >= 0 && p_201850_2_.func_177956_o() < 256 && p_201850_1_.func_226658_a_(LightType.BLOCK, p_201850_2_) < 10) {
|
||||
BlockState blockstate = p_201850_1_.func_180495_p(p_201850_2_);
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
--- a/net/minecraft/world/biome/BiomeGenerationSettings.java
|
||||
+++ b/net/minecraft/world/biome/BiomeGenerationSettings.java
|
||||
@@ -47,6 +47,7 @@
|
||||
});
|
||||
private final Supplier<ConfiguredSurfaceBuilder<?>> field_242482_d;
|
||||
private final Map<GenerationStage.Carving, List<Supplier<ConfiguredCarver<?>>>> field_242483_e;
|
||||
+ private final java.util.Set<GenerationStage.Carving> carversView;
|
||||
private final List<List<Supplier<ConfiguredFeature<?, ?>>>> field_242484_f;
|
||||
private final List<Supplier<StructureFeature<?, ?>>> field_242485_g;
|
||||
private final List<ConfiguredFeature<?, ?>> field_242486_h;
|
||||
@@ -59,12 +60,17 @@
|
||||
this.field_242486_h = p_i241935_3_.stream().flatMap(Collection::stream).map(Supplier::get).flatMap(ConfiguredFeature::func_242768_d).filter((p_242490_0_) -> {
|
||||
return p_242490_0_.field_222737_a == Feature.field_227247_y_;
|
||||
}).collect(ImmutableList.toImmutableList());
|
||||
+ this.carversView = java.util.Collections.unmodifiableSet(field_242483_e.keySet());
|
||||
}
|
||||
|
||||
public List<Supplier<ConfiguredCarver<?>>> func_242489_a(GenerationStage.Carving p_242489_1_) {
|
||||
return this.field_242483_e.getOrDefault(p_242489_1_, ImmutableList.of());
|
||||
}
|
||||
|
||||
+ public java.util.Set<GenerationStage.Carving> getCarvingStages() {
|
||||
+ return this.carversView;
|
||||
+ }
|
||||
+
|
||||
public boolean func_242493_a(Structure<?> p_242493_1_) {
|
||||
return this.field_242485_g.stream().anyMatch((p_242494_1_) -> {
|
||||
return (p_242494_1_.get()).field_236268_b_ == p_242493_1_;
|
||||
@@ -0,0 +1,38 @@
|
||||
--- a/net/minecraft/world/biome/MobSpawnInfo.java
|
||||
+++ b/net/minecraft/world/biome/MobSpawnInfo.java
|
||||
@@ -42,23 +42,35 @@
|
||||
private final Map<EntityClassification, List<MobSpawnInfo.Spawners>> field_242554_e;
|
||||
private final Map<EntityType<?>, MobSpawnInfo.SpawnCosts> field_242555_f;
|
||||
private final boolean field_242556_g;
|
||||
+ private final java.util.Set<EntityClassification> typesView;
|
||||
+ private final java.util.Set<EntityType<?>> costView;
|
||||
|
||||
private MobSpawnInfo(float p_i241946_1_, Map<EntityClassification, List<MobSpawnInfo.Spawners>> p_i241946_2_, Map<EntityType<?>, MobSpawnInfo.SpawnCosts> p_i241946_3_, boolean p_i241946_4_) {
|
||||
this.field_242553_d = p_i241946_1_;
|
||||
this.field_242554_e = p_i241946_2_;
|
||||
this.field_242555_f = p_i241946_3_;
|
||||
this.field_242556_g = p_i241946_4_;
|
||||
+ this.typesView = java.util.Collections.unmodifiableSet(this.field_242554_e.keySet());
|
||||
+ this.costView = java.util.Collections.unmodifiableSet(this.field_242555_f.keySet());
|
||||
}
|
||||
|
||||
public List<MobSpawnInfo.Spawners> func_242559_a(EntityClassification p_242559_1_) {
|
||||
return this.field_242554_e.getOrDefault(p_242559_1_, ImmutableList.of());
|
||||
}
|
||||
|
||||
+ public java.util.Set<EntityClassification> getSpawnerTypes() {
|
||||
+ return this.typesView;
|
||||
+ }
|
||||
+
|
||||
@Nullable
|
||||
public MobSpawnInfo.SpawnCosts func_242558_a(EntityType<?> p_242558_1_) {
|
||||
return this.field_242555_f.get(p_242558_1_);
|
||||
}
|
||||
|
||||
+ public java.util.Set<EntityType<?>> getEntityTypes() {
|
||||
+ return this.costView;
|
||||
+ }
|
||||
+
|
||||
public float func_242557_a() {
|
||||
return this.field_242553_d;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/gen/FlatGenerationSettings.java
|
||||
+++ b/net/minecraft/world/gen/FlatGenerationSettings.java
|
||||
@@ -174,7 +174,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- return (new Biome.Builder()).func_205415_a(biome.func_201851_b()).func_205419_a(biome.func_201856_r()).func_205421_a(biome.func_185355_j()).func_205420_b(biome.func_185360_m()).func_205414_c(biome.func_242445_k()).func_205417_d(biome.func_76727_i()).func_235097_a_(biome.func_235089_q_()).func_242457_a(biomegenerationsettings$builder.func_242508_a()).func_242458_a(biome.func_242433_b()).func_242455_a();
|
||||
+ return (new Biome.Builder()).func_205415_a(biome.func_201851_b()).func_205419_a(biome.func_201856_r()).func_205421_a(biome.func_185355_j()).func_205420_b(biome.func_185360_m()).func_205414_c(biome.func_242445_k()).func_205417_d(biome.func_76727_i()).func_235097_a_(biome.func_235089_q_()).func_242457_a(biomegenerationsettings$builder.func_242508_a()).func_242458_a(biome.func_242433_b()).func_242455_a().setRegistryName(biome.getRegistryName());
|
||||
}
|
||||
|
||||
public DimensionStructuresSettings func_236943_d_() {
|
||||
@@ -11,3 +11,21 @@
|
||||
chunkprimer.func_201637_h(blockpos$mutable);
|
||||
}
|
||||
|
||||
@@ -582,6 +582,9 @@
|
||||
}
|
||||
|
||||
public List<MobSpawnInfo.Spawners> func_230353_a_(Biome p_230353_1_, StructureManager p_230353_2_, EntityClassification p_230353_3_, BlockPos p_230353_4_) {
|
||||
+ List<MobSpawnInfo.Spawners> spawns = net.minecraftforge.common.world.StructureSpawnManager.getStructureSpawns(p_230353_2_, p_230353_3_, p_230353_4_);
|
||||
+ if (spawns != null) return spawns;
|
||||
+ if (false) {//Forge: We handle these hardcoded cases above in StructureSpawnManager#getStructureSpawns, but allow for insideOnly to be changed and allow for creatures to be spawned in ones other than just the witch hut
|
||||
if (p_230353_2_.func_235010_a_(p_230353_4_, true, Structure.field_236374_j_).func_75069_d()) {
|
||||
if (p_230353_3_ == EntityClassification.MONSTER) {
|
||||
return Structure.field_236374_j_.func_202279_e();
|
||||
@@ -605,6 +608,7 @@
|
||||
return Structure.field_236378_n_.func_202279_e();
|
||||
}
|
||||
}
|
||||
+ }
|
||||
|
||||
return super.func_230353_a_(p_230353_1_, p_230353_2_, p_230353_3_, p_230353_4_);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/gen/WorldGenRegion.java
|
||||
+++ b/net/minecraft/world/gen/WorldGenRegion.java
|
||||
@@ -170,11 +170,11 @@
|
||||
@@ -173,11 +173,11 @@
|
||||
|
||||
public boolean func_241212_a_(BlockPos p_241212_1_, boolean p_241212_2_, @Nullable Entity p_241212_3_, int p_241212_4_) {
|
||||
BlockState blockstate = this.func_180495_p(p_241212_1_);
|
||||
@@ -14,7 +14,7 @@
|
||||
Block.func_220054_a(blockstate, this.field_201689_f, p_241212_1_, tileentity, p_241212_3_, ItemStack.field_190927_a);
|
||||
}
|
||||
|
||||
@@ -194,11 +194,11 @@
|
||||
@@ -197,11 +197,11 @@
|
||||
if (compoundnbt != null) {
|
||||
if ("DUMMY".equals(compoundnbt.func_74779_i("id"))) {
|
||||
Block block = blockstate.func_177230_c();
|
||||
@@ -28,7 +28,7 @@
|
||||
} else {
|
||||
tileentity = TileEntity.func_235657_b_(blockstate, compoundnbt);
|
||||
}
|
||||
@@ -209,7 +209,7 @@
|
||||
@@ -212,7 +212,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
field_208303_a.warn("Tried to access a block entity before it was created. {}", (Object)p_175625_1_);
|
||||
}
|
||||
|
||||
@@ -225,9 +225,9 @@
|
||||
@@ -228,9 +228,9 @@
|
||||
}
|
||||
|
||||
Block block = p_241211_2_.func_177230_c();
|
||||
@@ -49,7 +49,7 @@
|
||||
} else {
|
||||
CompoundNBT compoundnbt = new CompoundNBT();
|
||||
compoundnbt.func_74768_a("x", p_241211_1_.func_177958_n());
|
||||
@@ -236,7 +236,7 @@
|
||||
@@ -239,7 +239,7 @@
|
||||
compoundnbt.func_74778_a("id", "DUMMY");
|
||||
ichunk.func_201591_a(compoundnbt);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/gen/feature/jigsaw/JigsawPattern.java
|
||||
+++ b/net/minecraft/world/gen/feature/jigsaw/JigsawPattern.java
|
||||
@@ -104,7 +104,7 @@
|
||||
@@ -104,11 +104,11 @@
|
||||
return this.field_214953_e.size();
|
||||
}
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
TERRAIN_MATCHING("terrain_matching", ImmutableList.of(new GravityStructureProcessor(Heightmap.Type.WORLD_SURFACE_WG, -1))),
|
||||
RIGID("rigid", ImmutableList.of());
|
||||
|
||||
- public static final Codec<JigsawPattern.PlacementBehaviour> field_236858_c_ = IStringSerializable.func_233023_a_(JigsawPattern.PlacementBehaviour::values, JigsawPattern.PlacementBehaviour::func_214938_a);
|
||||
+ public static final Codec<JigsawPattern.PlacementBehaviour> field_236858_c_ = net.minecraftforge.common.IExtensibleEnum.createCodecForExtensibleEnum(JigsawPattern.PlacementBehaviour::values, JigsawPattern.PlacementBehaviour::func_214938_a);
|
||||
private static final Map<String, JigsawPattern.PlacementBehaviour> field_214939_c = Arrays.stream(values()).collect(Collectors.toMap(JigsawPattern.PlacementBehaviour::func_214936_a, (p_214935_0_) -> {
|
||||
return p_214935_0_;
|
||||
}));
|
||||
@@ -135,5 +135,15 @@
|
||||
public String func_176610_l() {
|
||||
return this.field_214940_d;
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/world/gen/feature/structure/FortressStructure.java
|
||||
+++ b/net/minecraft/world/gen/feature/structure/FortressStructure.java
|
||||
@@ -30,7 +30,8 @@
|
||||
return FortressStructure.Start::new;
|
||||
}
|
||||
|
||||
- public List<MobSpawnInfo.Spawners> func_202279_e() {
|
||||
+ @Override
|
||||
+ public List<MobSpawnInfo.Spawners> getDefaultSpawnList() {
|
||||
return field_202381_d;
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/world/gen/feature/structure/OceanMonumentStructure.java
|
||||
+++ b/net/minecraft/world/gen/feature/structure/OceanMonumentStructure.java
|
||||
@@ -49,7 +49,8 @@
|
||||
return OceanMonumentStructure.Start::new;
|
||||
}
|
||||
|
||||
- public List<MobSpawnInfo.Spawners> func_202279_e() {
|
||||
+ @Override
|
||||
+ public List<MobSpawnInfo.Spawners> getDefaultSpawnList() {
|
||||
return field_175803_h;
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
--- a/net/minecraft/world/gen/feature/structure/PillagerOutpostStructure.java
|
||||
+++ b/net/minecraft/world/gen/feature/structure/PillagerOutpostStructure.java
|
||||
@@ -19,7 +19,8 @@
|
||||
super(p_i231977_1_, 0, true, true);
|
||||
}
|
||||
|
||||
- public List<MobSpawnInfo.Spawners> func_202279_e() {
|
||||
+ @Override
|
||||
+ public List<MobSpawnInfo.Spawners> getDefaultSpawnList() {
|
||||
return field_214558_a;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,28 @@
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
-public abstract class Structure<C extends IFeatureConfig> {
|
||||
+public abstract class Structure<C extends IFeatureConfig> extends net.minecraftforge.registries.ForgeRegistryEntry<Structure<?>> {
|
||||
+public abstract class Structure<C extends IFeatureConfig> extends net.minecraftforge.registries.ForgeRegistryEntry<Structure<?>> implements net.minecraftforge.common.extensions.IForgeStructure {
|
||||
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();
|
||||
@@ -237,13 +237,18 @@
|
||||
}
|
||||
|
||||
public List<MobSpawnInfo.Spawners> func_202279_e() {
|
||||
- return ImmutableList.of();
|
||||
+ return getSpawnList(net.minecraft.entity.EntityClassification.MONSTER);
|
||||
}
|
||||
|
||||
public List<MobSpawnInfo.Spawners> func_214469_f() {
|
||||
- return ImmutableList.of();
|
||||
+ return getSpawnList(net.minecraft.entity.EntityClassification.CREATURE);
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public final List<MobSpawnInfo.Spawners> getSpawnList(net.minecraft.entity.EntityClassification classification) {
|
||||
+ return net.minecraftforge.common.world.StructureSpawnManager.getSpawnList(getStructure(), classification);
|
||||
+ }
|
||||
+
|
||||
public interface IStartFactory<C extends IFeatureConfig> {
|
||||
StructureStart<C> create(Structure<C> p_create_1_, int p_create_2_, int p_create_3_, MutableBoundingBox p_create_4_, int p_create_5_, long p_create_6_);
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/world/gen/feature/structure/SwampHutStructure.java
|
||||
+++ b/net/minecraft/world/gen/feature/structure/SwampHutStructure.java
|
||||
@@ -24,11 +24,13 @@
|
||||
return SwampHutStructure.Start::new;
|
||||
}
|
||||
|
||||
- public List<MobSpawnInfo.Spawners> func_202279_e() {
|
||||
+ @Override
|
||||
+ public List<MobSpawnInfo.Spawners> getDefaultSpawnList() {
|
||||
return field_202384_d;
|
||||
}
|
||||
|
||||
- public List<MobSpawnInfo.Spawners> func_214469_f() {
|
||||
+ @Override
|
||||
+ public List<MobSpawnInfo.Spawners> getDefaultCreatureSpawnList() {
|
||||
return field_214559_aS;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
--- a/net/minecraft/world/gen/layer/BiomeLayer.java
|
||||
+++ b/net/minecraft/world/gen/layer/BiomeLayer.java
|
||||
@@ -10,12 +10,13 @@
|
||||
private static final int[] field_202746_t = new int[]{4, 3, 5, 1};
|
||||
private static final int[] field_202747_u = new int[]{12, 12, 12, 30};
|
||||
private int[] field_151623_c = field_202744_r;
|
||||
+ private final boolean legacyDesert;
|
||||
+ private java.util.List<net.minecraftforge.common.BiomeManager.BiomeEntry>[] biomes = new java.util.ArrayList[net.minecraftforge.common.BiomeManager.BiomeType.values().length];
|
||||
|
||||
public BiomeLayer(boolean p_i232147_1_) {
|
||||
- if (p_i232147_1_) {
|
||||
- this.field_151623_c = field_202743_q;
|
||||
- }
|
||||
-
|
||||
+ this.legacyDesert = p_i232147_1_;
|
||||
+ for (net.minecraftforge.common.BiomeManager.BiomeType type : net.minecraftforge.common.BiomeManager.BiomeType.values())
|
||||
+ biomes[type.ordinal()] = new java.util.ArrayList<>(net.minecraftforge.common.BiomeManager.getBiomes(type));
|
||||
}
|
||||
|
||||
public int func_202726_a(INoiseRandom p_202726_1_, int p_202726_2_) {
|
||||
@@ -28,21 +29,21 @@
|
||||
return p_202726_1_.func_202696_a(3) == 0 ? 39 : 38;
|
||||
}
|
||||
|
||||
- return this.field_151623_c[p_202726_1_.func_202696_a(this.field_151623_c.length)];
|
||||
+ return getBiomeId(net.minecraftforge.common.BiomeManager.BiomeType.DESERT, p_202726_1_);
|
||||
case 2:
|
||||
if (i > 0) {
|
||||
return 21;
|
||||
}
|
||||
|
||||
- return field_202745_s[p_202726_1_.func_202696_a(field_202745_s.length)];
|
||||
+ return getBiomeId(net.minecraftforge.common.BiomeManager.BiomeType.WARM, p_202726_1_);
|
||||
case 3:
|
||||
if (i > 0) {
|
||||
return 32;
|
||||
}
|
||||
|
||||
- return field_202746_t[p_202726_1_.func_202696_a(field_202746_t.length)];
|
||||
+ return getBiomeId(net.minecraftforge.common.BiomeManager.BiomeType.COOL, p_202726_1_);
|
||||
case 4:
|
||||
- return field_202747_u[p_202726_1_.func_202696_a(field_202747_u.length)];
|
||||
+ return getBiomeId(net.minecraftforge.common.BiomeManager.BiomeType.ICY, p_202726_1_);
|
||||
default:
|
||||
return 14;
|
||||
}
|
||||
@@ -50,4 +51,17 @@
|
||||
return p_202726_2_;
|
||||
}
|
||||
}
|
||||
+
|
||||
+ private int getBiomeId(net.minecraftforge.common.BiomeManager.BiomeType type, INoiseRandom context) {
|
||||
+ return net.minecraft.util.registry.WorldGenRegistries.field_243657_i.func_148757_b(
|
||||
+ net.minecraft.util.registry.WorldGenRegistries.field_243657_i.func_230516_a_(getBiome(type, context)));
|
||||
+ }
|
||||
+ protected net.minecraft.util.RegistryKey<net.minecraft.world.biome.Biome> getBiome(net.minecraftforge.common.BiomeManager.BiomeType type, INoiseRandom context) {
|
||||
+ if (type == net.minecraftforge.common.BiomeManager.BiomeType.DESERT && this.legacyDesert)
|
||||
+ type = net.minecraftforge.common.BiomeManager.BiomeType.DESERT_LEGACY;
|
||||
+ java.util.List<net.minecraftforge.common.BiomeManager.BiomeEntry> biomeList = biomes[type.ordinal()];
|
||||
+ int totalWeight = net.minecraft.util.WeightedRandom.func_76272_a(biomeList);
|
||||
+ int weight = net.minecraftforge.common.BiomeManager.isTypeListModded(type) ? context.func_202696_a(totalWeight) : context.func_202696_a(totalWeight / 10) * 10;
|
||||
+ return net.minecraft.util.WeightedRandom.func_180166_a(biomeList, weight).getKey();
|
||||
+ }
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/server/ServerWorld.java
|
||||
+++ b/net/minecraft/world/server/ServerWorld.java
|
||||
@@ -138,7 +138,7 @@
|
||||
@@ -143,7 +143,7 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
public static final BlockPos field_241108_a_ = new BlockPos(100, 50, 0);
|
||||
private static final Logger field_147491_a = LogManager.getLogger();
|
||||
private final Int2ObjectMap<Entity> field_217498_x = new Int2ObjectLinkedOpenHashMap<>();
|
||||
@@ -168,6 +168,7 @@
|
||||
@@ -173,6 +173,7 @@
|
||||
private final DragonFightManager field_241105_O_;
|
||||
private final StructureManager field_241106_P_;
|
||||
private final boolean field_241107_Q_;
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
public ServerWorld(MinecraftServer p_i241885_1_, Executor p_i241885_2_, SaveFormat.LevelSave p_i241885_3_, IServerWorldInfo p_i241885_4_, RegistryKey<World> p_i241885_5_, DimensionType p_i241885_6_, IChunkStatusListener p_i241885_7_, ChunkGenerator p_i241885_8_, boolean p_i241885_9_, long p_i241885_10_, List<ISpecialSpawner> p_i241885_12_, boolean p_i241885_13_) {
|
||||
super(p_i241885_4_, p_i241885_5_, p_i241885_6_, p_i241885_1_::func_213185_aS, false, p_i241885_9_, p_i241885_10_);
|
||||
@@ -195,7 +196,7 @@
|
||||
@@ -200,7 +201,7 @@
|
||||
} else {
|
||||
this.field_241105_O_ = null;
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
}
|
||||
|
||||
public void func_241113_a_(int p_241113_1_, int p_241113_2_, boolean p_241113_3_, boolean p_241113_4_) {
|
||||
@@ -291,15 +292,19 @@
|
||||
@@ -296,15 +297,19 @@
|
||||
this.field_73061_a.func_184103_al().func_232642_a_(new SChangeGameStatePacket(SChangeGameStatePacket.field_241772_i_, this.field_73017_q), this.func_234923_W_());
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
}
|
||||
|
||||
if (this.field_73068_P && this.field_217491_A.stream().noneMatch((p_241132_0_) -> {
|
||||
@@ -307,8 +312,8 @@
|
||||
@@ -312,8 +317,8 @@
|
||||
})) {
|
||||
this.field_73068_P = false;
|
||||
if (this.func_82736_K().func_223586_b(GameRules.field_223607_j)) {
|
||||
@@ -61,7 +61,7 @@
|
||||
}
|
||||
|
||||
this.func_229856_ab_();
|
||||
@@ -399,7 +404,7 @@
|
||||
@@ -404,7 +409,7 @@
|
||||
if (entity1.field_70128_L) {
|
||||
this.func_217454_n(entity1);
|
||||
objectiterator.remove();
|
||||
@@ -70,7 +70,7 @@
|
||||
}
|
||||
|
||||
iprofiler.func_76319_b();
|
||||
@@ -470,6 +475,7 @@
|
||||
@@ -475,6 +480,7 @@
|
||||
BlockPos blockpos2 = this.func_205770_a(Heightmap.Type.MOTION_BLOCKING, this.func_217383_a(i, 0, j, 15));
|
||||
BlockPos blockpos3 = blockpos2.func_177977_b();
|
||||
Biome biome = this.func_226691_t_(blockpos2);
|
||||
@@ -78,7 +78,7 @@
|
||||
if (biome.func_201848_a(this, blockpos3)) {
|
||||
this.func_175656_a(blockpos3, Blocks.field_150432_aD.func_176223_P());
|
||||
}
|
||||
@@ -593,9 +599,10 @@
|
||||
@@ -598,9 +604,10 @@
|
||||
++p_217479_1_.field_70173_aa;
|
||||
IProfiler iprofiler = this.func_217381_Z();
|
||||
iprofiler.func_194340_a(() -> {
|
||||
@@ -90,7 +90,7 @@
|
||||
p_217479_1_.func_70071_h_();
|
||||
iprofiler.func_76319_b();
|
||||
}
|
||||
@@ -682,6 +689,7 @@
|
||||
@@ -687,6 +694,7 @@
|
||||
p_217445_1_.func_200209_c(new TranslationTextComponent("menu.savingChunks"));
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
serverchunkprovider.func_217210_a(p_217445_2_);
|
||||
}
|
||||
}
|
||||
@@ -772,6 +780,7 @@
|
||||
@@ -777,6 +785,7 @@
|
||||
}
|
||||
|
||||
private void func_217448_f(ServerPlayerEntity p_217448_1_) {
|
||||
@@ -106,7 +106,7 @@
|
||||
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());
|
||||
@@ -796,6 +805,7 @@
|
||||
@@ -801,6 +810,7 @@
|
||||
} else if (this.func_217478_l(p_72838_1_)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -114,7 +114,7 @@
|
||||
IChunk ichunk = this.func_217353_a(MathHelper.func_76128_c(p_72838_1_.func_226277_ct_() / 16.0D), MathHelper.func_76128_c(p_72838_1_.func_226281_cx_() / 16.0D), ChunkStatus.field_222617_m, p_72838_1_.field_98038_p);
|
||||
if (!(ichunk instanceof Chunk)) {
|
||||
return false;
|
||||
@@ -811,6 +821,7 @@
|
||||
@@ -816,6 +826,7 @@
|
||||
if (this.func_217478_l(p_217440_1_)) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -122,7 +122,7 @@
|
||||
this.func_217465_m(p_217440_1_);
|
||||
return true;
|
||||
}
|
||||
@@ -874,12 +885,17 @@
|
||||
@@ -879,12 +890,17 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
|
||||
this.field_175741_N.remove(p_217484_1_.func_110124_au());
|
||||
this.func_72863_F().func_217226_b(p_217484_1_);
|
||||
@@ -893,6 +909,8 @@
|
||||
@@ -898,6 +914,8 @@
|
||||
this.field_217495_I.remove(((MobEntity)p_217484_1_).func_70661_as());
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
}
|
||||
|
||||
private void func_217465_m(Entity p_217465_1_) {
|
||||
@@ -913,15 +931,19 @@
|
||||
@@ -918,15 +936,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -934,8 +956,11 @@
|
||||
@@ -939,8 +961,11 @@
|
||||
}
|
||||
|
||||
public void func_217434_e(ServerPlayerEntity p_217434_1_) {
|
||||
@@ -185,7 +185,7 @@
|
||||
this.func_72854_c();
|
||||
}
|
||||
|
||||
@@ -954,10 +979,20 @@
|
||||
@@ -959,10 +984,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_) {
|
||||
@@ -206,7 +206,7 @@
|
||||
this.field_73061_a.func_184103_al().func_148543_a(p_217384_1_, p_217384_2_.func_226277_ct_(), p_217384_2_.func_226278_cu_(), p_217384_2_.func_226281_cx_(), p_217384_5_ > 1.0F ? (double)(16.0F * p_217384_5_) : 16.0D, this.func_234923_W_(), new SSpawnMovingSoundEffectPacket(p_217384_3_, p_217384_4_, p_217384_2_, p_217384_5_, p_217384_6_));
|
||||
}
|
||||
|
||||
@@ -993,6 +1028,7 @@
|
||||
@@ -998,6 +1033,7 @@
|
||||
|
||||
public Explosion func_230546_a_(@Nullable Entity p_230546_1_, @Nullable DamageSource p_230546_2_, @Nullable ExplosionContext p_230546_3_, double p_230546_4_, double p_230546_6_, double p_230546_8_, float p_230546_10_, boolean p_230546_11_, Explosion.Mode p_230546_12_) {
|
||||
Explosion explosion = new Explosion(this, p_230546_1_, p_230546_2_, p_230546_3_, p_230546_4_, p_230546_6_, p_230546_8_, p_230546_10_, p_230546_11_, p_230546_12_);
|
||||
@@ -214,7 +214,7 @@
|
||||
explosion.func_77278_a();
|
||||
explosion.func_77279_a(false);
|
||||
if (p_230546_12_ == Explosion.Mode.NONE) {
|
||||
@@ -1379,4 +1415,14 @@
|
||||
@@ -1410,4 +1446,14 @@
|
||||
p_241121_0_.func_175656_a(p_241122_1_, Blocks.field_150343_Z.func_176223_P());
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
@@ -35,5 +36,13 @@ public class BackgroundWaiter {
|
||||
} catch (InterruptedException ignored) {
|
||||
}
|
||||
} while (!work.isDone());
|
||||
try {
|
||||
runner.shutdown();
|
||||
work.get();
|
||||
} catch (ExecutionException ee) {
|
||||
throw new RuntimeException(ee.getCause());
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -29,10 +31,17 @@ public class EarlyLoadingException extends RuntimeException {
|
||||
public static class ExceptionData {
|
||||
|
||||
|
||||
private final IModInfo modInfo;
|
||||
private final String i18message;
|
||||
private final Object[] args;
|
||||
|
||||
public ExceptionData(final String message, Object... args) {
|
||||
this(message, null, args);
|
||||
}
|
||||
|
||||
public ExceptionData(final String message, final IModInfo modInfo, Object... args) {
|
||||
this.i18message = message;
|
||||
this.modInfo = modInfo;
|
||||
this.args = args;
|
||||
}
|
||||
|
||||
@@ -43,6 +52,10 @@ public class EarlyLoadingException extends RuntimeException {
|
||||
public Object[] getArgs() {
|
||||
return args;
|
||||
}
|
||||
|
||||
public IModInfo getModInfo() {
|
||||
return modInfo;
|
||||
}
|
||||
}
|
||||
private final List<ExceptionData> errorMessages;
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ public class FMLEnvironment
|
||||
public static final Dist dist = FMLLoader.getDist();
|
||||
public static final String naming = FMLLoader.getNaming();
|
||||
public static final boolean production = FMLLoader.isProduction() || System.getProperties().containsKey("production");
|
||||
public static final boolean secureJarsEnabled = FMLLoader.isSecureJarEnabled();
|
||||
|
||||
static void setupInteropEnvironment(IEnvironment environment) {
|
||||
environment.computePropertyIfAbsent(IEnvironment.Keys.NAMING.get(), v->naming);
|
||||
|
||||
@@ -302,4 +302,8 @@ public class FMLLoader
|
||||
public static boolean isProduction() {
|
||||
return production;
|
||||
}
|
||||
|
||||
public static boolean isSecureJarEnabled() {
|
||||
return Launcher.INSTANCE.environment().getProperty(IEnvironment.Keys.SECURED_JARS_ENABLED.get()).orElse(false);
|
||||
}
|
||||
}
|
||||
@@ -50,4 +50,8 @@ public class Java9BackportUtils
|
||||
emptyAction.run();
|
||||
}
|
||||
}
|
||||
|
||||
public static <T> Stream<T> toStream(final Optional<T> optional) {
|
||||
return optional.map(Stream::of).orElseGet(Stream::empty);
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
package net.minecraftforge.fml.loading;
|
||||
|
||||
import cpw.mods.modlauncher.api.LamdbaExceptionUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -29,6 +30,7 @@ import java.net.URLConnection;
|
||||
import java.net.URLStreamHandler;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.jar.Manifest;
|
||||
|
||||
@@ -43,6 +45,18 @@ public class ModJarURLHandler extends URLStreamHandler
|
||||
return new ModJarURLConnection(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int hashCode(final URL u) {
|
||||
return Objects.hash(u.getHost(), u.getFile());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean equals(final URL u1, final URL u2) {
|
||||
return Objects.equals(u1.getProtocol(), u2.getProtocol())
|
||||
&& Objects.equals(u1.getHost(), u2.getHost())
|
||||
&& Objects.equals(u1.getFile(), u2.getFile());
|
||||
}
|
||||
|
||||
static class ModJarURLConnection extends URLConnection {
|
||||
private Path resource;
|
||||
private String modpath;
|
||||
@@ -83,6 +97,12 @@ public class ModJarURLHandler extends URLStreamHandler
|
||||
}
|
||||
}
|
||||
|
||||
// Used to cache protectiondomains by "top level object" aka the modid
|
||||
@Override
|
||||
public URL getURL() {
|
||||
return LamdbaExceptionUtils.uncheck(()->new URL("modjar://"+modid));
|
||||
}
|
||||
|
||||
public Optional<Manifest> getManifest() {
|
||||
return manifest;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.function.Function;
|
||||
@@ -191,7 +192,7 @@ public class ModSorter
|
||||
if (!dupedMods.isEmpty()) {
|
||||
final List<EarlyLoadingException.ExceptionData> duplicateModErrors = dupedMods
|
||||
.stream()
|
||||
.map(dm -> new EarlyLoadingException.ExceptionData("fml.modloading.dupedmod", dm.getValue().get(0)))
|
||||
.map(dm -> new EarlyLoadingException.ExceptionData("fml.modloading.dupedmod", dm.getValue().get(0), Objects.toString(dm.getValue().get(0))))
|
||||
.collect(Collectors.toList());
|
||||
throw new EarlyLoadingException("Duplicate mods found", null, duplicateModErrors);
|
||||
}
|
||||
@@ -243,7 +244,7 @@ public class ModSorter
|
||||
if (!missingVersions.isEmpty()) {
|
||||
final List<EarlyLoadingException.ExceptionData> exceptionData = missingVersions
|
||||
.stream()
|
||||
.map(mv -> new EarlyLoadingException.ExceptionData("fml.modloading.missingdependency",
|
||||
.map(mv -> new EarlyLoadingException.ExceptionData("fml.modloading.missingdependency", mv.getOwner(),
|
||||
mv.getModId(), mv.getOwner().getModId(), mv.getVersionRange(),
|
||||
modVersions.getOrDefault(mv.getModId(), new DefaultArtifactVersion("null"))))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -55,4 +55,13 @@ public class StringUtils
|
||||
public static String parseStringFormat(final String input, final Map<String, String> properties) {
|
||||
return StrSubstitutor.replace(input, properties);
|
||||
}
|
||||
|
||||
public static String binToHex(final byte[] bytes) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < bytes.length; i++) {
|
||||
sb.append(Integer.toHexString((bytes[i]&0xf0) >>4));
|
||||
sb.append(Integer.toHexString(bytes[i]&0x0f));
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Minecraft Forge
|
||||
* Copyright (c) 2016-2020.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation version 2.1
|
||||
* of the License.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
package net.minecraftforge.fml.loading.log4j;
|
||||
|
||||
import net.minecrell.terminalconsole.HighlightErrorConverter;
|
||||
import net.minecrell.terminalconsole.TerminalConsoleAppender;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.core.config.Configuration;
|
||||
import org.apache.logging.log4j.core.config.plugins.Plugin;
|
||||
import org.apache.logging.log4j.core.pattern.ConverterKeys;
|
||||
import org.apache.logging.log4j.core.pattern.HighlightConverter;
|
||||
import org.apache.logging.log4j.core.pattern.PatternConverter;
|
||||
import org.apache.logging.log4j.status.StatusLogger;
|
||||
import org.apache.logging.log4j.util.PerformanceSensitive;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A wrapper for {@link HighlightConverter} that auto-disables ANSI when the terminal doesn't support it.
|
||||
* Ansi support is determined by TerminalConsoleAppender
|
||||
*/
|
||||
@Plugin(name = "highlightForge", category = PatternConverter.CATEGORY)
|
||||
@ConverterKeys("highlightForge")
|
||||
@PerformanceSensitive("allocation")
|
||||
public class ForgeHighlight {
|
||||
protected static final Logger LOGGER = StatusLogger.getLogger();
|
||||
|
||||
/**
|
||||
* Gets a new instance of the {@link HighlightErrorConverter} with the
|
||||
* specified options.
|
||||
*
|
||||
* @param config The current configuration
|
||||
* @param options The pattern options
|
||||
* @return The new instance
|
||||
*/
|
||||
public static @Nullable HighlightConverter newInstance(Configuration config, String[] options) {
|
||||
try {
|
||||
Method method = TerminalConsoleAppender.class.getDeclaredMethod("initializeTerminal");
|
||||
method.setAccessible(true);
|
||||
method.invoke(null);
|
||||
} catch (ReflectiveOperationException e) {
|
||||
LOGGER.warn("Failed to invoke initializeTerminal on TCA", e);
|
||||
}
|
||||
if (!TerminalConsoleAppender.isAnsiSupported() && Arrays.stream(options).noneMatch(s -> s.equals("disableAnsi=true"))) {
|
||||
List<String> optionList = new ArrayList<>();
|
||||
optionList.add(options[0]);
|
||||
optionList.add("disableAnsi=true");
|
||||
options = optionList.toArray(new String[0]);
|
||||
}
|
||||
return HighlightConverter.newInstance(config, options);
|
||||
}
|
||||
}
|
||||
+22
-2
@@ -19,20 +19,25 @@
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import cpw.mods.modlauncher.api.LamdbaExceptionUtils;
|
||||
import net.minecraftforge.forgespi.locating.IModFile;
|
||||
import net.minecraftforge.forgespi.locating.IModLocator;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.nio.file.FileSystem;
|
||||
import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.security.CodeSigner;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.stream.Stream;
|
||||
@@ -79,16 +84,31 @@ public abstract class AbstractJarFileLocator implements IModLocator {
|
||||
LOGGER.debug(SCAN,"Scan finished: {}", file);
|
||||
}
|
||||
|
||||
static final Method ENSURE_INIT = LamdbaExceptionUtils.uncheck(()->JarFile.class.getDeclaredMethod("ensureInitialization"));
|
||||
static {
|
||||
ENSURE_INIT.setAccessible(true);
|
||||
}
|
||||
@Override
|
||||
public Optional<Manifest> findManifest(final Path file)
|
||||
{
|
||||
return findManifestAndSigners(file).getKey();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pair<Optional<Manifest>, Optional<CodeSigner[]>> findManifestAndSigners(final Path file) {
|
||||
try (JarFile jf = new JarFile(file.toFile()))
|
||||
{
|
||||
return Optional.ofNullable(jf.getManifest());
|
||||
final Manifest manifest = jf.getManifest();
|
||||
if (manifest!=null) {
|
||||
final JarEntry jarEntry = jf.getJarEntry(JarFile.MANIFEST_NAME);
|
||||
LamdbaExceptionUtils.uncheck(() -> ENSURE_INIT.invoke(jf));
|
||||
return Pair.of(Optional.of(manifest), Optional.ofNullable(jarEntry.getCodeSigners()));
|
||||
}
|
||||
return Pair.of(Optional.empty(), Optional.empty());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
return Optional.empty();
|
||||
return Pair.of(Optional.empty(), Optional.empty());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -36,6 +36,7 @@ public enum InvalidModIdentifier {
|
||||
FABRIC(filePresent("fabric.mod.json")),
|
||||
LITELOADER(filePresent("litemod.json")),
|
||||
OPTIFINE(filePresent("optifine/Installer.class")),
|
||||
BUKKIT(filePresent("plugin.yml")),
|
||||
INVALIDZIP((f,zf) -> !zf.isPresent());
|
||||
|
||||
private BiPredicate<Path, Optional<ZipFile>> ident;
|
||||
|
||||
@@ -32,6 +32,7 @@ import net.minecraftforge.fml.loading.progress.StartupMessageManager;
|
||||
import net.minecraftforge.forgespi.Environment;
|
||||
import net.minecraftforge.forgespi.locating.IModFile;
|
||||
import net.minecraftforge.forgespi.locating.IModLocator;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -45,6 +46,7 @@ import java.nio.file.FileSystems;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.security.CodeSigner;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -57,6 +59,8 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.ServiceLoader;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
@@ -215,6 +219,24 @@ public class ModDiscoverer {
|
||||
LOGGER.debug(SCAN,"Scan finished: {}", modFile);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Pair<Optional<Manifest>, Optional<CodeSigner[]>> findManifestAndSigners(final Path file) {
|
||||
if (Files.isDirectory(mcJar)) {
|
||||
return Pair.of(Optional.empty(), Optional.empty());
|
||||
}
|
||||
try (JarFile jf = new JarFile(mcJar.toFile())) {
|
||||
final Manifest manifest = jf.getManifest();
|
||||
if (manifest!=null) {
|
||||
final JarEntry jarEntry = jf.getJarEntry(JarFile.MANIFEST_NAME);
|
||||
LamdbaExceptionUtils.uncheck(() -> AbstractJarFileLocator.ENSURE_INIT.invoke(jf));
|
||||
return Pair.of(Optional.of(manifest), Optional.ofNullable(jarEntry.getCodeSigners()));
|
||||
}
|
||||
} catch (IOException ioe) {
|
||||
return Pair.of(Optional.empty(), Optional.empty());
|
||||
}
|
||||
return Pair.of(Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Manifest> findManifest(final Path file) {
|
||||
return Optional.empty();
|
||||
|
||||
@@ -19,16 +19,30 @@
|
||||
|
||||
package net.minecraftforge.fml.loading.moddiscovery;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
import cpw.mods.modlauncher.api.LamdbaExceptionUtils;
|
||||
import net.minecraftforge.fml.loading.Java9BackportUtils;
|
||||
import net.minecraftforge.fml.loading.StringUtils;
|
||||
import net.minecraftforge.forgespi.language.IConfigurable;
|
||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
import net.minecraftforge.forgespi.language.MavenVersionAdapter;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.maven.artifact.versioning.VersionRange;
|
||||
|
||||
import javax.security.auth.x500.X500Principal;
|
||||
import java.net.URL;
|
||||
import java.security.CodeSigner;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.NoSuchProviderException;
|
||||
import java.security.SignatureException;
|
||||
import java.security.cert.Certificate;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -54,6 +68,7 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
|
||||
// Caches the manifest of the mod jar as parsing the manifest can be expensive for
|
||||
// signed jars.
|
||||
private final Optional<Manifest> manifest;
|
||||
private final Optional<CodeSigner[]> signers;
|
||||
|
||||
ModFileInfo(final ModFile modFile, final IConfigurable config)
|
||||
{
|
||||
@@ -65,7 +80,7 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
|
||||
.map(MavenVersionAdapter::createFromVersionSpec)
|
||||
.orElseThrow(()->new InvalidModFileException("Missing ModLoader version in file", this));
|
||||
this.license = config.<String>getConfigElement("license")
|
||||
.orElseThrow(()->new InvalidModFileException("Missing License, please supply a license.", this));
|
||||
.orElse("");
|
||||
this.showAsResourcePack = config.<Boolean>getConfigElement("showAsResourcePack").orElse(false);
|
||||
this.properties = config.<Map<String, Object>>getConfigElement("properties").orElse(Collections.emptyMap());
|
||||
this.modFile.setFileProperties(this.properties);
|
||||
@@ -82,7 +97,9 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
|
||||
this.modFile::getFileName,
|
||||
() -> this.mods.stream().map(IModInfo::getModId).collect(Collectors.joining(",", "{", "}")),
|
||||
() -> this.mods.stream().map(IModInfo::getVersion).map(Objects::toString).collect(Collectors.joining(",", "{", "}")));
|
||||
this.manifest = modFile.getLocator().findManifest(modFile.getFilePath());
|
||||
final Pair<Optional<Manifest>, Optional<CodeSigner[]>> manifestAndSigners = modFile.getLocator().findManifestAndSigners(modFile.getFilePath());
|
||||
this.manifest = manifestAndSigners.getKey();
|
||||
this.signers = manifestAndSigners.getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -147,4 +164,47 @@ public class ModFileInfo implements IModFileInfo, IConfigurable
|
||||
{
|
||||
return issueURL;
|
||||
}
|
||||
|
||||
public boolean missingLicense()
|
||||
{
|
||||
return Strings.isNullOrEmpty(license);
|
||||
}
|
||||
|
||||
public Optional<CodeSigner[]> getCodeSigners() {
|
||||
return this.signers;
|
||||
}
|
||||
|
||||
public Optional<String> getCodeSigningFingerprint() {
|
||||
return Java9BackportUtils.toStream(this.signers)
|
||||
.flatMap(csa->csa[0].getSignerCertPath().getCertificates().stream())
|
||||
.findFirst()
|
||||
.map(LamdbaExceptionUtils.rethrowFunction(Certificate::getEncoded))
|
||||
.map(bytes->LamdbaExceptionUtils.uncheck(()->MessageDigest.getInstance("SHA-256")).digest(bytes))
|
||||
.map(StringUtils::binToHex)
|
||||
.map(str-> String.join(":", str.split("(?<=\\G.{2})")));
|
||||
}
|
||||
|
||||
public Optional<String> getTrustData() {
|
||||
return Java9BackportUtils.toStream(this.signers)
|
||||
.flatMap(csa->csa[0].getSignerCertPath().getCertificates().stream())
|
||||
.findFirst()
|
||||
.map(X509Certificate.class::cast)
|
||||
.map(c->{
|
||||
StringBuffer sb = new StringBuffer();
|
||||
sb.append(c.getSubjectX500Principal().getName(X500Principal.RFC2253).split(",")[0]);
|
||||
boolean selfSigned = false;
|
||||
try {
|
||||
c.verify(c.getPublicKey());
|
||||
selfSigned = true;
|
||||
} catch (CertificateException | NoSuchAlgorithmException | InvalidKeyException | SignatureException | NoSuchProviderException e) {
|
||||
// not self signed
|
||||
}
|
||||
if (selfSigned) {
|
||||
sb.append(" self-signed");
|
||||
} else {
|
||||
sb.append(" signed by ").append(c.getIssuerX500Principal().getName(X500Principal.RFC2253).split(",")[0]);
|
||||
};
|
||||
return sb.toString();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="warn" packages="net.minecrell.terminalconsole,net.minecrell.terminalconsole.util,com.mojang.util,cpw.mods.modlauncher.log" shutdownHook="disable">
|
||||
<Configuration status="warn" packages="net.minecrell.terminalconsole,net.minecrell.terminalconsole.util,com.mojang.util,cpw.mods.modlauncher.log,net.minecraftforge.fml.loading.log4j" shutdownHook="disable">
|
||||
<filters>
|
||||
<ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="NEUTRAL"/>
|
||||
<MarkerFilter marker="NETWORK_PACKETS" onMatch="${sys:forge.logging.marker.networking:-DENY}" onMismatch="NEUTRAL"/>
|
||||
@@ -20,10 +20,10 @@
|
||||
<Appenders>
|
||||
<TerminalConsole name="Console">
|
||||
<PatternLayout>
|
||||
<LoggerNamePatternSelector defaultPattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [%c{2.}/%markerSimpleName]: %minecraftFormatting{%msg}%n%tEx}">
|
||||
<LoggerNamePatternSelector defaultPattern="%highlightForge{[%d{HH:mm:ss}] [%t/%level] [%c{2.}/%markerSimpleName]: %minecraftFormatting{%msg}%n%tEx}">
|
||||
<!-- don't include the full logger name for Mojang's logs since they use full class names and it's very verbose -->
|
||||
<PatternMatch key="net.minecraft." pattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [minecraft/%logger{1}]: %minecraftFormatting{%msg}%n%tEx}"/>
|
||||
<PatternMatch key="com.mojang." pattern="%highlight{[%d{HH:mm:ss}] [%t/%level] [mojang/%logger{1}]: %minecraftFormatting{%msg}%n%tEx}"/>
|
||||
<PatternMatch key="net.minecraft." pattern="%highlightForge{[%d{HH:mm:ss}] [%t/%level] [minecraft/%logger{1}]: %minecraftFormatting{%msg}%n%tEx}"/>
|
||||
<PatternMatch key="com.mojang." pattern="%highlightForge{[%d{HH:mm:ss}] [%t/%level] [mojang/%logger{1}]: %minecraftFormatting{%msg}%n%tEx}"/>
|
||||
</LoggerNamePatternSelector>
|
||||
</PatternLayout>
|
||||
</TerminalConsole>
|
||||
|
||||
@@ -63,14 +63,22 @@ bf2e445b48b024354a69138b20a4a4a8aa5d15d1 assets/minecraft/blockstates/oak_trapdo
|
||||
9c4cc92efb78811e8d70a383a1a89eb75b69db04 assets/minecraft/blockstates/stone.json
|
||||
570fdd86046df75a073b759ff7aaf4c4caf43115 assets/minecraft/blockstates/torch.json
|
||||
a012d6d92bab1c91913bd0f2dc0492a0fce916f2 assets/minecraft/blockstates/wall_torch.json
|
||||
e615d11ed9a452bca5d8b242e733a43ba2df19a3 assets/new_model_loader_test/blockstates/obj_block.json
|
||||
bab7cd04569c8aa63320772acdc3c91a5ceda14a assets/new_model_loader_test/models/block/obj_block.json
|
||||
9fa44308a52fbc384d5befee4e117531642299fb assets/new_model_loader_test/models/item/item_layers.json
|
||||
70c8c81f3a157e4d698f213d5c1a13c13eaa5157 assets/new_model_loader_test/models/item/separate_perspective.json
|
||||
273e0ed992d227f09f1c83bc22d066fb68d03c84 assets/piston_event_test/blockstates/shiftonmove.json
|
||||
d2c8e860521c5e738ed0798337f5728d610825ff assets/piston_event_test/models/block/shiftonmove.json
|
||||
f51f026a75e27a0a53a76771d553c0e3385a2966 assets/piston_event_test/models/item/shiftonmove.json
|
||||
cf16f861eaf5815238c2278eb48bde0688cb73b7 assets/scaffolding_test/blockstates/scaffolding_method_test.json
|
||||
42d3ce7d941eb8b80c3d541b937d0f93c9cf7c3c data/custom_tag_types_test/tags/biomes/oceans.json
|
||||
862196702dcd5538c5ceb4ac6202e57eb5c8a97f data/custom_tag_types_test/tags/custom_tag_types_test/custom_types/tests.json
|
||||
8c1969250406edfbd470cc06aca4dcccfd6ce682 data/custom_tag_types_test/tags/enchantments/fire.json
|
||||
44985f1cb0df54b632187ed97a6a443455f1e51c data/custom_tag_types_test/tags/potions/damage.json
|
||||
9405b72d54aad3f4377035d9707bb9947e9032a3 data/custom_tag_types_test/tags/tile_entity_types/storage.json
|
||||
4fbaf6f4a3ea05cc071076e27f44ac81f9cc50e3 data/data_gen_test/advancements/conditional.json
|
||||
66442c8000af9af4ba36109b3c9d09d9ffd57277 data/data_gen_test/advancements/recipes/conditional2.json
|
||||
ed4cbf1a3a2f5d8969f6346fdc9acdbe81d0c919 data/data_gen_test/recipes/conditional.json
|
||||
ca9827bff0a49957e01cf3887ef5131ad8710320 data/data_gen_test/recipes/conditional2.json
|
||||
40208299608468b044f64317995f9182ec219d90 data/data_gen_test/tags/blocks/test.json
|
||||
d65c425e740dc833f29d16606a1171825876be0d data/data_gen_test/tags/blocks/thing/one.json
|
||||
1f70ed4ddc878bada5e43d3c44a34157806beda8 data/data_gen_test/tags/blocks/thing/three.json
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "new_model_loader_test:block/obj_block"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"textures": {
|
||||
"qr": "minecraft:block/oak_planks",
|
||||
"particle": "#qr"
|
||||
},
|
||||
"loader": "forge:obj",
|
||||
"model": "new_model_loader_test:models/item/sugar_glider.obj",
|
||||
"flip-v": true
|
||||
}
|
||||
Loaded 100 of 254 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user