Introduce new Side Annotation Stripper system to semi-automate the shipment of Sided methods and cleanup patches.

New forge:checkSAS task to validate this config file. Closes #5995
This commit is contained in:
LexManos 2019-07-31 21:15:39 -07:00
parent c6dd475610
commit b009cedc0c
43 changed files with 325 additions and 575 deletions

View File

@ -15,11 +15,20 @@ import groovy.json.JsonBuilder
import java.text.SimpleDateFormat
import java.util.Date
import java.util.LinkedHashMap
import java.util.TreeSet
import java.util.stream.Collectors
import java.util.zip.ZipEntry
import java.util.zip.ZipInputStream
import java.util.zip.ZipOutputStream
import java.security.MessageDigest
import java.net.URL
import net.minecraftforge.gradle.common.task.ArchiveChecksum
import net.minecraftforge.gradle.common.task.DownloadMavenArtifact
import net.minecraftforge.gradle.common.task.ExtractInheritance
import net.minecraftforge.gradle.common.task.SignJar
import net.minecraftforge.gradle.common.util.HashStore
import net.minecraftforge.gradle.mcp.function.MCPFunction
import net.minecraftforge.gradle.mcp.util.MCPEnvironment
import net.minecraftforge.gradle.patcher.task.ApplyBinPatches
import net.minecraftforge.gradle.patcher.task.TaskReobfuscateJar
import net.minecraftforge.gradle.userdev.tasks.RenameJar
@ -27,8 +36,8 @@ import org.apache.tools.ant.filters.ReplaceTokens
import de.undercouch.gradle.tasks.download.Download
import org.gradle.plugins.ide.eclipse.model.SourceFolder
import org.objectweb.asm.ClassReader
import java.util.stream.Collectors
import org.objectweb.asm.ClassWriter
import org.objectweb.asm.tree.ClassNode
plugins {
id 'net.minecrell.licenser' version '0.4'
@ -178,6 +187,7 @@ project(':forge') {
// Essentially, the same as the old, except dropping the first number, and the builds are no longer unique.
MCP_ARTIFACT = project(':mcp').mcp.config
SPECIAL_SOURCE = 'net.md-5:SpecialSource:1.8.5'
SIDE_STRIPPER = rootProject.file('src/main/resources/forge.sas')
}
def getVersion = {
@ -519,6 +529,10 @@ project(':forge') {
}
}
}
task extractInheritance(type: ExtractInheritance, dependsOn: genJoinedBinPatches) {
input { genJoinedBinPatches.cleanJar }
}
task checkATs(dependsOn: genJoinedBinPatches) {
inputs.file { genJoinedBinPatches.cleanJar }
inputs.files patcher.accessTransformers
@ -567,6 +581,139 @@ project(':forge') {
}
}
}
task checkSAS(dependsOn: extractInheritance) {
inputs.file { extractInheritance.output }
inputs.file SIDE_STRIPPER
doLast {
def json = new JsonSlurper().parseText(extractInheritance.output.text)
def lines = []
SIDE_STRIPPER.eachLine { line ->
if (line[0] == '\t') return //Skip any tabed 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) {
println('Invalid: ' + line)
return
}
def mtd = json[cls]['methods'][desc]
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) }
}
SIDE_STRIPPER.text = lines.join('\n')
}
}
if (SIDE_STRIPPER != null && SIDE_STRIPPER.exists()) {
def setupMCP = project(':mcp').setupMCP
setupMCP.addPreDecompile("${project.name}SideStripper", new MCPFunction() {
def config = project(':forge').SIDE_STRIPPER // As this is a anon class it can't reference the project directly?
File execute(MCPEnvironment env) throws IOException {
def input = env.arguments.get('input')
def output = env.getFile('output.jar')
def cacheFile = env.getFile('lastinput.sha1')
def cache = new HashStore(env.project).load(cacheFile)
if (cache.areSame(input, config) && output.exists()) return output
def classes = [] as Set
def methods = [] as Set
config.eachLine { line ->
def idx = line.indexOf('#')
if (idx == 0 || line.isEmpty()) return
if (idx != -1) line = line.substring(0, idx - 1)
if (line[0] == '\t') line = line.substring(1)
def (cls, desc) = (line.trim() + ' ').split(' ', -1)
classes.add(cls)
methods.add(cls + ' ' + desc)
}
if (output.exists()) output.delete()
if (!output.getParentFile().exists()) output.getParentFile().mkdirs()
output.createNewFile()
new ZipInputStream(input.newInputStream()).withCloseable{ zis ->
new ZipOutputStream(output.newOutputStream()).withCloseable{ zos ->
def entry
while ((entry = zis.getNextEntry()) != null) {
zos.putNextEntry(new ZipEntry(entry))
if (!entry.name.endsWith('.class') || !classes.contains(entry.name.substring(0, entry.name.length() - 6))) {
def read
def buf = new byte[0x100]
while ((read = zis.read(buf, 0, buf.length)) != -1)
zos.write(buf, 0, read)
} else {
def reader = new ClassReader(zis)
def node = new ClassNode();
reader.accept(node, 0)
if (node.methods != null) {
node.methods.each { mtd ->
if (methods.contains(node.name + ' ' + mtd.name + mtd.desc)) {
if (mtd.visibleAnnotations != null) {
def itr = mtd.visibleAnnotations.iterator()
while (itr.hasNext()) {
def ann = itr.next()
if ('Lnet/minecraftforge/api/distmarker/OnlyIn;'.equals(ann.desc))
itr.remove()
}
}
}
}
}
def writer = new ClassWriter(ClassWriter.COMPUTE_MAXS)
node.accept(writer)
zos.write(writer.toByteArray())
}
zos.closeEntry()
}
}
}
cache.save(cacheFile)
return output
}
void addInputs(HashStore cache, String prefix) {
cache.add("${prefix}SAS", config)
}
})
def fakePatches = file('build/makeSASFakePatches/')
task makeSASFakePatches() {
inputs.file SIDE_STRIPPER
outputs.file fakePatches
doLast() {
SIDE_STRIPPER.eachLine { line ->
def idx = line.indexOf('#')
if (idx == 0 || line.isEmpty()) return
if (idx != -1) line = line.substring(0, idx - 1)
if (line[0] == '\t') line = line.substring(1)
def (cls, desc) = (line.trim() + ' ').split(' ', -1)
def patch = new File(fakePatches, cls + '.java.patch')
if (!patch.getParentFile().exists()) patch.getParentFile().mkdirs()
patch.createNewFile()
}
}
}
genClientBinPatches.dependsOn(makeSASFakePatches)
genClientBinPatches.addPatchSet(fakePatches)
genServerBinPatches.dependsOn(makeSASFakePatches)
genServerBinPatches.addPatchSet(fakePatches)
genJoinedBinPatches.dependsOn(makeSASFakePatches)
genJoinedBinPatches.addPatchSet(fakePatches)
}
task launcherJson(dependsOn: ['signUniversalJar', 'signLauncherJar']) {
inputs.file universalJar.archivePath

View File

@ -100,15 +100,15 @@
public float func_149638_a() {
return this.field_149781_w;
}
@@ -677,6 +681,7 @@
p_176216_2_.func_213317_d(p_176216_2_.func_213322_ci().func_216372_d(1.0D, 0.0D, 1.0D));
@@ -640,6 +644,7 @@
return !this.field_149764_J.func_76220_a() && !this.field_149764_J.func_76224_d();
}
+ @Deprecated // Forge: Use more sensitive version below: getPickBlock
@OnlyIn(Dist.CLIENT)
public ItemStack func_185473_a(IBlockReader p_185473_1_, BlockPos p_185473_2_, BlockState p_185473_3_) {
return new ItemStack(this);
@@ -691,6 +696,7 @@
public ITextComponent func_200291_n() {
return new TranslationTextComponent(this.func_149739_a());
@@ -690,6 +695,7 @@
return Fluids.field_204541_a.func_207188_f();
}
@ -116,7 +116,7 @@
public float func_208618_m() {
return this.field_149765_K;
}
@@ -711,6 +717,7 @@
@@ -710,6 +716,7 @@
public void func_176224_k(World p_176224_1_, BlockPos p_176224_2_) {
}
@ -124,7 +124,7 @@
public boolean func_149659_a(Explosion p_149659_1_) {
return true;
}
@@ -755,6 +762,7 @@
@@ -754,6 +761,7 @@
}
}
@ -132,7 +132,7 @@
public SoundType func_220072_p(BlockState p_220072_1_) {
return this.field_149762_H;
}
@@ -780,13 +788,80 @@
@@ -779,13 +787,80 @@
}
public static boolean func_196252_e(Block p_196252_0_) {
@ -215,7 +215,7 @@
public static enum OffsetType {
NONE,
XZ,
@@ -805,6 +880,8 @@
@@ -804,6 +879,8 @@
private float field_200961_i = 0.6F;
private ResourceLocation field_222381_j;
private boolean field_208772_j;
@ -224,7 +224,7 @@
private Properties(Material p_i48616_1_, MaterialColor p_i48616_2_) {
this.field_200953_a = p_i48616_1_;
@@ -835,6 +912,8 @@
@@ -834,6 +911,8 @@
block$properties.field_200956_d = p_200950_0_.field_149762_H;
block$properties.field_200961_i = p_200950_0_.func_208618_m();
block$properties.field_208772_j = p_200950_0_.field_208621_p;
@ -233,7 +233,7 @@
return block$properties;
}
@@ -883,6 +962,16 @@
@@ -882,6 +961,16 @@
return this;
}

View File

@ -1,7 +1,7 @@
--- a/net/minecraft/block/FlowerPotBlock.java
+++ b/net/minecraft/block/FlowerPotBlock.java
@@ -21,7 +21,7 @@
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -19,7 +19,7 @@
import net.minecraft.world.World;
public class FlowerPotBlock extends Block {
- private static final Map<Block, Block> field_196451_b = Maps.newHashMap();

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/NetherWartBlock.java
+++ b/net/minecraft/block/NetherWartBlock.java
@@ -33,9 +33,10 @@
@@ -31,9 +31,10 @@
public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) {
int i = p_196267_1_.func_177229_b(field_176486_a);

View File

@ -1,18 +0,0 @@
--- a/net/minecraft/block/SoundType.java
+++ b/net/minecraft/block/SoundType.java
@@ -54,7 +54,6 @@
return this.field_185861_n;
}
- @OnlyIn(Dist.CLIENT)
public SoundEvent func_185845_c() {
return this.field_185862_o;
}
@@ -67,7 +66,6 @@
return this.field_185864_q;
}
- @OnlyIn(Dist.CLIENT)
public SoundEvent func_185846_f() {
return this.field_185865_r;
}

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/block/SpawnerBlock.java
+++ b/net/minecraft/block/SpawnerBlock.java
@@ -21,10 +21,13 @@
@@ -19,10 +19,13 @@
public void func_220062_a(BlockState p_220062_1_, World p_220062_2_, BlockPos p_220062_3_, ItemStack p_220062_4_) {
super.func_220062_a(p_220062_1_, p_220062_2_, p_220062_3_, p_220062_4_);

View File

@ -30,7 +30,7 @@
}
}
@@ -101,4 +103,10 @@
@@ -100,4 +102,10 @@
public StemGrownBlock func_208486_d() {
return this.field_149877_a;
}

View File

@ -8,15 +8,7 @@
}
public boolean func_213358_a(EntityType<?> p_213358_1_) {
@@ -259,7 +260,6 @@
}
- @OnlyIn(Dist.CLIENT)
public void func_70103_a(byte p_70103_1_) {
if (p_70103_1_ == 20) {
this.func_70656_aK();
@@ -458,7 +458,7 @@
@@ -458,7 +459,7 @@
public void func_70636_d() {
super.func_70636_d();
this.field_70170_p.func_217381_Z().func_76320_a("looting");
@ -25,7 +17,7 @@
for(ItemEntity itementity : this.field_70170_p.func_217357_a(ItemEntity.class, this.func_174813_aQ().func_72314_b(1.0D, 0.0D, 1.0D))) {
if (!itementity.field_70128_L && !itementity.func_92059_d().func_190926_b() && !itementity.func_174874_s()) {
this.func_175445_a(itementity);
@@ -548,6 +548,14 @@
@@ -548,6 +549,14 @@
protected void func_70623_bb() {
if (!this.func_104002_bU() && !this.func_213392_I()) {
Entity entity = this.field_70170_p.func_217362_a(this, -1.0D);
@ -40,7 +32,7 @@
if (entity != null) {
double d0 = entity.func_70068_e(this);
if (d0 > 16384.0D && this.func_213397_c(d0)) {
@@ -786,6 +794,8 @@
@@ -786,6 +795,8 @@
}
public static EquipmentSlotType func_184640_d(ItemStack p_184640_0_) {
@ -49,7 +41,7 @@
Item item = p_184640_0_.func_77973_b();
if (item != Blocks.field_196625_cS.func_199767_j() && (!(item instanceof BlockItem) || !(((BlockItem)item).func_179223_d() instanceof AbstractSkullBlock))) {
if (item instanceof ArmorItem) {
@@ -793,7 +803,7 @@
@@ -793,7 +804,7 @@
} else if (item == Items.field_185160_cR) {
return EquipmentSlotType.CHEST;
} else {
@ -58,7 +50,7 @@
}
} else {
return EquipmentSlotType.HEAD;
@@ -1173,10 +1183,10 @@
@@ -1173,10 +1184,10 @@
PlayerEntity playerentity = (PlayerEntity)p_70652_1_;
ItemStack itemstack = this.func_184614_ca();
ItemStack itemstack1 = playerentity.func_184587_cr() ? playerentity.func_184607_cu() : ItemStack.field_190927_a;

View File

@ -1,18 +0,0 @@
--- a/net/minecraft/item/crafting/AbstractCookingRecipe.java
+++ b/net/minecraft/item/crafting/AbstractCookingRecipe.java
@@ -35,7 +35,6 @@
return this.field_222143_e.func_77946_l();
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return true;
}
@@ -54,7 +53,6 @@
return this.field_222143_e;
}
- @OnlyIn(Dist.CLIENT)
public String func_193358_e() {
return this.field_222141_c;
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/ArmorDyeRecipe.java
+++ b/net/minecraft/item/crafting/ArmorDyeRecipe.java
@@ -74,7 +74,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ * p_194133_2_ >= 2;
}

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/item/crafting/BannerDuplicateRecipe.java
+++ b/net/minecraft/item/crafting/BannerDuplicateRecipe.java
@@ -79,8 +79,8 @@
@@ -77,8 +77,8 @@
for(int i = 0; i < nonnulllist.size(); ++i) {
ItemStack itemstack = p_179532_1_.func_70301_a(i);
if (!itemstack.func_190926_b()) {
@ -11,11 +11,3 @@
} else if (itemstack.func_77942_o() && BannerTileEntity.func_175113_c(itemstack) > 0) {
ItemStack itemstack1 = itemstack.func_77946_l();
itemstack1.func_190920_e(1);
@@ -96,7 +96,6 @@
return IRecipeSerializer.field_222167_k;
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ * p_194133_2_ >= 2;
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/BlastingRecipe.java
+++ b/net/minecraft/item/crafting/BlastingRecipe.java
@@ -11,7 +11,6 @@
super(IRecipeType.field_222151_c, p_i50031_1_, p_i50031_2_, p_i50031_3_, p_i50031_4_, p_i50031_5_, p_i50031_6_);
}
- @OnlyIn(Dist.CLIENT)
public ItemStack func_222128_h() {
return new ItemStack(Blocks.field_222424_lM);
}

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/item/crafting/BookCloningRecipe.java
+++ b/net/minecraft/item/crafting/BookCloningRecipe.java
@@ -81,8 +81,8 @@
@@ -79,8 +79,8 @@
for(int i = 0; i < nonnulllist.size(); ++i) {
ItemStack itemstack = p_179532_1_.func_70301_a(i);
@ -11,11 +11,3 @@
} else if (itemstack.func_77973_b() instanceof WrittenBookItem) {
ItemStack itemstack1 = itemstack.func_77946_l();
itemstack1.func_190920_e(1);
@@ -98,7 +98,6 @@
return IRecipeSerializer.field_222160_d;
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ >= 3 && p_194133_2_ >= 3;
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/CampfireCookingRecipe.java
+++ b/net/minecraft/item/crafting/CampfireCookingRecipe.java
@@ -11,7 +11,6 @@
super(IRecipeType.field_222153_e, p_i50030_1_, p_i50030_2_, p_i50030_3_, p_i50030_4_, p_i50030_5_, p_i50030_6_);
}
- @OnlyIn(Dist.CLIENT)
public ItemStack func_222128_h() {
return new ItemStack(Blocks.field_222433_lV);
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/FireworkRocketRecipe.java
+++ b/net/minecraft/item/crafting/FireworkRocketRecipe.java
@@ -74,7 +74,6 @@
return itemstack;
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ * p_194133_2_ >= 2;
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/FireworkStarFadeRecipe.java
+++ b/net/minecraft/item/crafting/FireworkStarFadeRecipe.java
@@ -68,7 +68,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ * p_194133_2_ >= 2;
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/FireworkStarRecipe.java
+++ b/net/minecraft/item/crafting/FireworkStarRecipe.java
@@ -111,7 +111,6 @@
return itemstack;
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ * p_194133_2_ >= 2;
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/FurnaceRecipe.java
+++ b/net/minecraft/item/crafting/FurnaceRecipe.java
@@ -11,7 +11,6 @@
super(IRecipeType.field_222150_b, p_i48715_1_, p_i48715_2_, p_i48715_3_, p_i48715_4_, p_i48715_5_, p_i48715_6_);
}
- @OnlyIn(Dist.CLIENT)
public ItemStack func_222128_h() {
return new ItemStack(Blocks.field_150460_al);
}

View File

@ -1,16 +1,6 @@
--- a/net/minecraft/item/crafting/IRecipe.java
+++ b/net/minecraft/item/crafting/IRecipe.java
@@ -15,8 +15,7 @@
ItemStack func_77572_b(C p_77572_1_);
- @OnlyIn(Dist.CLIENT)
- boolean func_194133_a(int p_194133_1_, int p_194133_2_);
+ default boolean func_194133_a(int p_194133_1_, int p_194133_2_) { return true; }
ItemStack func_77571_b();
@@ -24,9 +23,9 @@
@@ -21,9 +21,9 @@
NonNullList<ItemStack> nonnulllist = NonNullList.func_191197_a(p_179532_1_.func_70302_i_(), ItemStack.field_190927_a);
for(int i = 0; i < nonnulllist.size(); ++i) {
@ -23,16 +13,3 @@
}
}
@@ -41,12 +40,10 @@
return false;
}
- @OnlyIn(Dist.CLIENT)
default String func_193358_e() {
return "";
}
- @OnlyIn(Dist.CLIENT)
default ItemStack func_222128_h() {
return new ItemStack(Blocks.field_150462_ai);
}

View File

@ -1,7 +1,7 @@
--- a/net/minecraft/item/crafting/Ingredient.java
+++ b/net/minecraft/item/crafting/Ingredient.java
@@ -30,6 +30,12 @@
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -28,6 +28,12 @@
import net.minecraft.util.registry.Registry;
public class Ingredient implements Predicate<ItemStack> {
+ //Because Mojang caches things... we need to invalidate them.. so... here we go..
@ -13,7 +13,7 @@
private static final Predicate<? super Ingredient.IItemList> field_209362_b = (p_209361_0_) -> {
return !p_209361_0_.func_199799_a().stream().allMatch(ItemStack::func_190926_b);
};
@@ -37,14 +43,16 @@
@@ -35,11 +41,14 @@
private final Ingredient.IItemList[] field_199807_b;
private ItemStack[] field_193371_b;
private IntList field_194140_c;
@ -27,11 +27,8 @@
+ Ingredient.INSTANCES.add(this);
}
- @OnlyIn(Dist.CLIENT)
public ItemStack[] func_193365_a() {
this.func_199806_d();
return this.field_193371_b;
@@ -96,6 +104,10 @@
@@ -93,6 +102,10 @@
public final void func_199564_a(PacketBuffer p_199564_1_) {
this.func_199806_d();
@ -42,7 +39,7 @@
p_199564_1_.func_150787_b(this.field_193371_b.length);
for(int i = 0; i < this.field_193371_b.length; ++i) {
@@ -122,6 +134,25 @@
@@ -119,6 +132,25 @@
return this.field_199807_b.length == 0 && (this.field_193371_b == null || this.field_193371_b.length == 0) && (this.field_194140_c == null || this.field_194140_c.isEmpty());
}
@ -68,15 +65,7 @@
public static Ingredient func_209357_a(Stream<? extends Ingredient.IItemList> p_209357_0_) {
Ingredient ingredient = new Ingredient(p_209357_0_);
return ingredient.field_199807_b.length == 0 ? field_193370_a : ingredient;
@@ -133,7 +164,6 @@
}));
}
- @OnlyIn(Dist.CLIENT)
public static Ingredient func_193369_a(ItemStack... p_193369_0_) {
return func_209357_a(Arrays.stream(p_193369_0_).map((p_209356_0_) -> {
return new Ingredient.SingleItemList(p_209356_0_);
@@ -146,6 +176,9 @@
@@ -142,6 +174,9 @@
public static Ingredient func_199566_b(PacketBuffer p_199566_0_) {
int i = p_199566_0_.func_150792_a();
@ -86,7 +75,7 @@
return func_209357_a(Stream.generate(() -> {
return new Ingredient.SingleItemList(p_199566_0_.func_150791_c());
}).limit((long)i));
@@ -153,6 +186,8 @@
@@ -149,6 +184,8 @@
public static Ingredient func_199802_a(@Nullable JsonElement p_199802_0_) {
if (p_199802_0_ != null && !p_199802_0_.isJsonNull()) {
@ -95,7 +84,7 @@
if (p_199802_0_.isJsonObject()) {
return func_209357_a(Stream.of(func_199803_a(p_199802_0_.getAsJsonObject())));
} else if (p_199802_0_.isJsonArray()) {
@@ -173,6 +208,11 @@
@@ -169,6 +206,11 @@
}
public static Ingredient.IItemList func_199803_a(JsonObject p_199803_0_) {
@ -107,7 +96,7 @@
if (p_199803_0_.has("item") && p_199803_0_.has("tag")) {
throw new JsonParseException("An ingredient entry is either a tag or an item, not both");
} else if (p_199803_0_.has("item")) {
@@ -194,6 +234,12 @@
@@ -190,6 +232,12 @@
}
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/MapCloningRecipe.java
+++ b/net/minecraft/item/crafting/MapCloningRecipe.java
@@ -71,7 +71,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ >= 3 && p_194133_2_ >= 3;
}

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/item/crafting/RepairItemRecipe.java
+++ b/net/minecraft/item/crafting/RepairItemRecipe.java
@@ -24,7 +24,7 @@
@@ -22,7 +22,7 @@
list.add(itemstack);
if (list.size() > 1) {
ItemStack itemstack1 = list.get(0);
@ -9,7 +9,7 @@
return false;
}
}
@@ -43,7 +43,7 @@
@@ -41,7 +41,7 @@
list.add(itemstack);
if (list.size() > 1) {
ItemStack itemstack1 = list.get(0);
@ -18,7 +18,7 @@
return ItemStack.field_190927_a;
}
}
@@ -53,12 +53,12 @@
@@ -51,12 +51,12 @@
if (list.size() == 2) {
ItemStack itemstack3 = list.get(0);
ItemStack itemstack4 = list.get(1);

View File

@ -1,8 +1,8 @@
--- a/net/minecraft/item/crafting/ShapedRecipe.java
+++ b/net/minecraft/item/crafting/ShapedRecipe.java
@@ -23,7 +23,20 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -21,7 +21,20 @@
import net.minecraft.util.registry.Registry;
import net.minecraft.world.World;
-public class ShapedRecipe implements ICraftingRecipe {
+public class ShapedRecipe implements ICraftingRecipe, net.minecraftforge.common.crafting.IShapedRecipe<CraftingInventory> {
@ -22,23 +22,7 @@
private final int field_77576_b;
private final int field_77577_c;
private final NonNullList<Ingredient> field_77574_d;
@@ -48,7 +61,6 @@
return IRecipeSerializer.field_222157_a;
}
- @OnlyIn(Dist.CLIENT)
public String func_193358_e() {
return this.field_194137_e;
}
@@ -61,7 +73,6 @@
return this.field_77574_d;
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ >= this.field_77576_b && p_194133_2_ >= this.field_77577_c;
}
@@ -113,10 +124,20 @@
@@ -109,10 +122,20 @@
return this.field_77576_b;
}
@ -59,7 +43,7 @@
private static NonNullList<Ingredient> func_192402_a(String[] p_192402_0_, Map<String, Ingredient> p_192402_1_, int p_192402_2_, int p_192402_3_) {
NonNullList<Ingredient> nonnulllist = NonNullList.func_191197_a(p_192402_2_ * p_192402_3_, Ingredient.field_193370_a);
Set<String> set = Sets.newHashSet(p_192402_1_.keySet());
@@ -198,15 +219,15 @@
@@ -194,15 +217,15 @@
private static String[] func_192407_a(JsonArray p_192407_0_) {
String[] astring = new String[p_192407_0_.size()];
@ -79,7 +63,7 @@
}
if (i > 0 && astring[0].length() != s.length()) {
@@ -248,11 +269,12 @@
@@ -244,11 +267,12 @@
throw new JsonParseException("Disallowed data tag found");
} else {
int i = JSONUtils.func_151208_a(p_199798_0_, "count", 1);

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/item/crafting/ShapelessRecipe.java
+++ b/net/minecraft/item/crafting/ShapelessRecipe.java
@@ -19,12 +19,14 @@
@@ -17,12 +17,14 @@
private final String field_194138_c;
private final ItemStack field_77580_a;
private final NonNullList<Ingredient> field_77579_b;
@ -15,15 +15,7 @@
}
public ResourceLocation func_199560_c() {
@@ -35,7 +37,6 @@
return IRecipeSerializer.field_222158_b;
}
- @OnlyIn(Dist.CLIENT)
public String func_193358_e() {
return this.field_194138_c;
}
@@ -50,36 +51,39 @@
@@ -47,17 +49,20 @@
public boolean func_77569_a(CraftingInventory p_77569_1_, World p_77569_2_) {
RecipeItemHelper recipeitemhelper = new RecipeItemHelper();
@ -45,16 +37,12 @@
}
public ItemStack func_77572_b(CraftingInventory p_77572_1_) {
return this.field_77580_a.func_77946_l();
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
@@ -68,14 +73,15 @@
return p_194133_1_ * p_194133_2_ >= this.field_77579_b.size();
}
- public static class Serializer implements IRecipeSerializer<ShapelessRecipe> {
+ public static class Serializer extends net.minecraftforge.registries.ForgeRegistryEntry<IRecipeSerializer<?>> implements IRecipeSerializer<ShapelessRecipe> {
+ public static class Serializer extends net.minecraftforge.registries.ForgeRegistryEntry<IRecipeSerializer<?>> implements IRecipeSerializer<ShapelessRecipe> {
+ private static final ResourceLocation NAME = new ResourceLocation("minecraft", "crafting_shapeless");
public ShapelessRecipe func_199425_a_(ResourceLocation p_199425_1_, JsonObject p_199425_2_) {
String s = JSONUtils.func_151219_a(p_199425_2_, "group", "");

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/ShieldRecipes.java
+++ b/net/minecraft/item/crafting/ShieldRecipes.java
@@ -79,7 +79,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ * p_194133_2_ >= 2;
}

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/item/crafting/ShulkerBoxColoringRecipe.java
+++ b/net/minecraft/item/crafting/ShulkerBoxColoringRecipe.java
@@ -27,7 +27,7 @@
@@ -25,7 +25,7 @@
if (Block.func_149634_a(itemstack.func_77973_b()) instanceof ShulkerBoxBlock) {
++i;
} else {
@ -9,7 +9,7 @@
return false;
}
@@ -45,7 +45,7 @@
@@ -43,7 +43,7 @@
public ItemStack func_77572_b(CraftingInventory p_77572_1_) {
ItemStack itemstack = ItemStack.field_190927_a;
@ -18,7 +18,7 @@
for(int i = 0; i < p_77572_1_.func_70302_i_(); ++i) {
ItemStack itemstack1 = p_77572_1_.func_70301_a(i);
@@ -53,13 +53,14 @@
@@ -51,13 +51,14 @@
Item item = itemstack1.func_77973_b();
if (Block.func_149634_a(item) instanceof ShulkerBoxBlock) {
itemstack = itemstack1;
@ -36,11 +36,3 @@
if (itemstack.func_77942_o()) {
itemstack2.func_77982_d(itemstack.func_77978_p().func_74737_b());
}
@@ -67,7 +68,6 @@
return itemstack2;
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ * p_194133_2_ >= 2;
}

View File

@ -1,6 +1,6 @@
--- a/net/minecraft/item/crafting/SingleItemRecipe.java
+++ b/net/minecraft/item/crafting/SingleItemRecipe.java
@@ -64,7 +64,7 @@
@@ -60,7 +60,7 @@
return this.field_222132_b.func_77946_l();
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/SmokingRecipe.java
+++ b/net/minecraft/item/crafting/SmokingRecipe.java
@@ -11,7 +11,6 @@
super(IRecipeType.field_222152_d, p_i50022_1_, p_i50022_2_, p_i50022_3_, p_i50022_4_, p_i50022_5_, p_i50022_6_);
}
- @OnlyIn(Dist.CLIENT)
public ItemStack func_222128_h() {
return new ItemStack(Blocks.field_222423_lL);
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/StonecuttingRecipe.java
+++ b/net/minecraft/item/crafting/StonecuttingRecipe.java
@@ -17,7 +17,6 @@
return this.field_222131_a.test(p_77569_1_.func_70301_a(0));
}
- @OnlyIn(Dist.CLIENT)
public ItemStack func_222128_h() {
return new ItemStack(Blocks.field_222430_lS);
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/SuspiciousStewRecipe.java
+++ b/net/minecraft/item/crafting/SuspiciousStewRecipe.java
@@ -68,7 +68,6 @@
return itemstack2;
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ >= 2 && p_194133_2_ >= 2;
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/item/crafting/TippedArrowRecipe.java
+++ b/net/minecraft/item/crafting/TippedArrowRecipe.java
@@ -53,7 +53,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
public boolean func_194133_a(int p_194133_1_, int p_194133_2_) {
return p_194133_1_ >= 2 && p_194133_2_ >= 2;
}

View File

@ -1,30 +1,6 @@
--- a/net/minecraft/nbt/CompressedStreamTools.java
+++ b/net/minecraft/nbt/CompressedStreamTools.java
@@ -38,7 +38,6 @@
}
- @OnlyIn(Dist.CLIENT)
public static void func_74793_a(CompoundNBT p_74793_0_, File p_74793_1_) throws IOException {
File file1 = new File(p_74793_1_.getAbsolutePath() + "_tmp");
if (file1.exists()) {
@@ -57,7 +56,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
public static void func_74795_b(CompoundNBT p_74795_0_, File p_74795_1_) throws IOException {
DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(p_74795_1_));
@@ -70,7 +68,6 @@
}
@Nullable
- @OnlyIn(Dist.CLIENT)
public static CompoundNBT func_74797_a(File p_74797_0_) throws IOException {
if (!p_74797_0_.exists()) {
return null;
@@ -115,10 +112,12 @@
@@ -110,10 +110,12 @@
private static INBT func_152455_a(DataInput p_152455_0_, int p_152455_1_, NBTSizeTracker p_152455_2_) throws IOException {
byte b0 = p_152455_0_.readByte();

View File

@ -1,35 +1,11 @@
--- a/net/minecraft/potion/Effect.java
+++ b/net/minecraft/potion/Effect.java
@@ -20,7 +20,7 @@
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@@ -18,7 +18,7 @@
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
-public class Effect {
+public class Effect extends net.minecraftforge.registries.ForgeRegistryEntry<Effect> implements net.minecraftforge.common.extensions.IForgeEffect {
private final Map<IAttribute, AttributeModifier> field_111188_I = Maps.newHashMap();
private final EffectType field_220305_b;
private final int field_76414_N;
@@ -134,7 +134,6 @@
return new TranslationTextComponent(this.func_76393_a());
}
- @OnlyIn(Dist.CLIENT)
public EffectType func_220303_e() {
return this.field_220305_b;
}
@@ -149,7 +148,6 @@
return this;
}
- @OnlyIn(Dist.CLIENT)
public Map<IAttribute, AttributeModifier> func_111186_k() {
return this.field_111188_I;
}
@@ -180,7 +178,6 @@
return p_111183_2_.func_111164_d() * (double)(p_111183_1_ + 1);
}
- @OnlyIn(Dist.CLIENT)
public boolean func_188408_i() {
return this.field_220305_b == EffectType.BENEFICIAL;
}

View File

@ -1,10 +0,0 @@
--- a/net/minecraft/potion/EffectType.java
+++ b/net/minecraft/potion/EffectType.java
@@ -15,7 +15,6 @@
this.field_220307_d = p_i50390_3_;
}
- @OnlyIn(Dist.CLIENT)
public TextFormatting func_220306_a() {
return this.field_220307_d;
}

View File

@ -1,18 +0,0 @@
--- a/net/minecraft/resources/FallbackResourceManager.java
+++ b/net/minecraft/resources/FallbackResourceManager.java
@@ -30,7 +30,6 @@
this.field_199023_a.add(p_199021_1_);
}
- @OnlyIn(Dist.CLIENT)
public Set<String> func_199001_a() {
return Collections.emptySet();
}
@@ -59,7 +58,6 @@
throw new FileNotFoundException(p_199002_1_.toString());
}
- @OnlyIn(Dist.CLIENT)
public boolean func_219533_b(ResourceLocation p_219533_1_) {
if (!this.func_219541_f(p_219533_1_)) {
return false;

View File

@ -1,21 +0,0 @@
--- a/net/minecraft/resources/IResourceManager.java
+++ b/net/minecraft/resources/IResourceManager.java
@@ -10,18 +10,15 @@
import net.minecraftforge.api.distmarker.OnlyIn;
public interface IResourceManager {
- @OnlyIn(Dist.CLIENT)
Set<String> func_199001_a();
IResource func_199002_a(ResourceLocation p_199002_1_) throws IOException;
- @OnlyIn(Dist.CLIENT)
boolean func_219533_b(ResourceLocation p_219533_1_);
List<IResource> func_199004_b(ResourceLocation p_199004_1_) throws IOException;
Collection<ResourceLocation> func_199003_a(String p_199003_1_, Predicate<String> p_199003_2_);
- @OnlyIn(Dist.CLIENT)
void func_199021_a(IResourcePack p_199021_1_);
}

View File

@ -1,26 +0,0 @@
--- a/net/minecraft/resources/SimpleReloadableResourceManager.java
+++ b/net/minecraft/resources/SimpleReloadableResourceManager.java
@@ -50,7 +50,6 @@
}
- @OnlyIn(Dist.CLIENT)
public Set<String> func_199001_a() {
return this.field_199016_e;
}
@@ -64,7 +63,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
public boolean func_219533_b(ResourceLocation p_219533_1_) {
IResourceManager iresourcemanager = this.field_199014_c.get(p_219533_1_.func_110624_b());
return iresourcemanager != null ? iresourcemanager.func_219533_b(p_219533_1_) : false;
@@ -118,7 +116,6 @@
return iasyncreloader;
}
- @OnlyIn(Dist.CLIENT)
public IAsyncReloader func_219535_a(Executor p_219535_1_, Executor p_219535_2_, CompletableFuture<Unit> p_219535_3_) {
return this.func_219538_b(p_219535_1_, p_219535_2_, this.field_219539_d, p_219535_3_);
}

View File

@ -1,19 +0,0 @@
--- a/net/minecraft/tags/TagCollection.java
+++ b/net/minecraft/tags/TagCollection.java
@@ -27,8 +27,6 @@
import net.minecraft.util.JSONUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Util;
-import net.minecraftforge.api.distmarker.Dist;
-import net.minecraftforge.api.distmarker.OnlyIn;
import org.apache.commons.io.IOUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -64,7 +62,6 @@
return this.field_199921_d.keySet();
}
- @OnlyIn(Dist.CLIENT)
public Collection<ResourceLocation> func_199913_a(T p_199913_1_) {
List<ResourceLocation> list = Lists.newArrayList();

View File

@ -40,23 +40,7 @@
return p_189516_1_;
}
}
@@ -93,14 +100,13 @@
if (this.field_145850_b != null) {
this.field_195045_e = this.field_145850_b.func_180495_p(this.field_174879_c);
this.field_145850_b.func_175646_b(this.field_174879_c, this);
- if (!this.field_195045_e.func_196958_f()) {
+ if (!this.field_195045_e.isAir(field_145850_b, this.field_174879_c)) {
this.field_145850_b.func_175666_e(this.field_174879_c, this.field_195045_e.func_177230_c());
}
}
}
- @OnlyIn(Dist.CLIENT)
public double func_145835_a(double p_145835_1_, double p_145835_3_, double p_145835_5_) {
double d0 = (double)this.field_174879_c.func_177958_n() + 0.5D - p_145835_1_;
double d1 = (double)this.field_174879_c.func_177956_o() + 0.5D - p_145835_3_;
@@ -140,6 +146,7 @@
@@ -139,6 +146,7 @@
public void func_145843_s() {
this.field_145846_f = true;
@ -64,7 +48,7 @@
}
public void func_145829_t() {
@@ -182,6 +189,13 @@
@@ -181,6 +189,13 @@
return this.field_200663_e;
}

View File

@ -1,42 +0,0 @@
--- a/net/minecraft/util/Direction.java
+++ b/net/minecraft/util/Direction.java
@@ -119,7 +119,6 @@
return func_82600_a(this.field_176759_h);
}
- @OnlyIn(Dist.CLIENT)
public Direction func_176732_a(Direction.Axis p_176732_1_) {
switch(p_176732_1_) {
case X:
@@ -160,7 +159,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
private Direction func_176744_n() {
switch(this) {
case NORTH:
@@ -178,7 +176,6 @@
}
}
- @OnlyIn(Dist.CLIENT)
private Direction func_176738_p() {
switch(this) {
case EAST:
@@ -231,7 +228,6 @@
}
@Nullable
- @OnlyIn(Dist.CLIENT)
public static Direction func_176739_a(@Nullable String p_176739_0_) {
return p_176739_0_ == null ? null : field_176761_p.get(p_176739_0_.toLowerCase(Locale.ROOT));
}
@@ -353,7 +349,6 @@
}
@Nullable
- @OnlyIn(Dist.CLIENT)
public static Direction.Axis func_176717_a(String p_176717_0_) {
return field_176725_d.get(p_176717_0_.toLowerCase(Locale.ROOT));
}

View File

@ -1,23 +0,0 @@
--- a/net/minecraft/util/math/Vec3d.java
+++ b/net/minecraft/util/math/Vec3d.java
@@ -80,7 +80,6 @@
return this.func_216372_d(p_186678_1_, p_186678_1_, p_186678_1_);
}
- @OnlyIn(Dist.CLIENT)
public Vec3d func_216371_e() {
return this.func_186678_a(-1.0D);
}
@@ -150,12 +149,10 @@
return new Vec3d(d0, d1, d2);
}
- @OnlyIn(Dist.CLIENT)
public static Vec3d func_189984_a(Vec2f p_189984_0_) {
return func_189986_a(p_189984_0_.field_189982_i, p_189984_0_.field_189983_j);
}
- @OnlyIn(Dist.CLIENT)
public static Vec3d func_189986_a(float p_189986_0_, float p_189986_1_) {
float f = MathHelper.func_76134_b(-p_189986_1_ * ((float)Math.PI / 180F) - (float)Math.PI);
float f1 = MathHelper.func_76126_a(-p_189986_1_ * ((float)Math.PI / 180F) - (float)Math.PI);

View File

@ -161,11 +161,9 @@
}
public void func_184133_a(@Nullable PlayerEntity p_184133_1_, BlockPos p_184133_2_, SoundEvent p_184133_3_, SoundCategory p_184133_4_, float p_184133_5_, float p_184133_6_) {
@@ -390,8 +431,11 @@
public void func_217404_b(IParticleData p_217404_1_, boolean p_217404_2_, double p_217404_3_, double p_217404_5_, double p_217404_7_, double p_217404_9_, double p_217404_11_, double p_217404_13_) {
@@ -391,6 +432,10 @@
}
- @OnlyIn(Dist.CLIENT)
public float func_72971_b(float p_72971_1_) {
+ return this.field_73011_w.getSunBrightness(p_72971_1_);
+ }
@ -174,7 +172,7 @@
float f = this.func_72826_c(p_72971_1_);
float f1 = 1.0F - (MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.2F);
f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F);
@@ -403,12 +447,15 @@
@@ -402,12 +447,15 @@
@OnlyIn(Dist.CLIENT)
public Vec3d func_217382_a(BlockPos p_217382_1_, float p_217382_2_) {
@ -193,7 +191,7 @@
float f3 = (float)(i >> 16 & 255) / 255.0F;
float f4 = (float)(i >> 8 & 255) / 255.0F;
float f5 = (float)(i & 255) / 255.0F;
@@ -455,6 +502,11 @@
@@ -454,6 +502,11 @@
@OnlyIn(Dist.CLIENT)
public Vec3d func_72824_f(float p_72824_1_) {
@ -205,7 +203,7 @@
float f = this.func_72826_c(p_72824_1_);
float f1 = MathHelper.func_76134_b(f * ((float)Math.PI * 2F)) * 2.0F + 0.5F;
f1 = MathHelper.func_76131_a(f1, 0.0F, 1.0F);
@@ -493,17 +545,24 @@
@@ -492,17 +545,24 @@
@OnlyIn(Dist.CLIENT)
public float func_72880_h(float p_72880_1_) {
@ -231,7 +229,7 @@
}
boolean flag = this.field_147482_g.add(p_175700_1_);
@@ -511,6 +570,8 @@
@@ -510,6 +570,8 @@
this.field_175730_i.add(p_175700_1_);
}
@ -240,7 +238,7 @@
if (this.field_72995_K) {
BlockPos blockpos = p_175700_1_.func_174877_v();
BlockState blockstate = this.func_180495_p(blockpos);
@@ -522,6 +583,7 @@
@@ -521,6 +583,7 @@
public void func_147448_a(Collection<TileEntity> p_147448_1_) {
if (this.field_147481_N) {
@ -248,7 +246,7 @@
this.field_147484_a.addAll(p_147448_1_);
} else {
for(TileEntity tileentity : p_147448_1_) {
@@ -534,13 +596,15 @@
@@ -533,13 +596,15 @@
public void func_217391_K() {
IProfiler iprofiler = this.func_217381_Z();
iprofiler.func_76320_a("blockEntities");
@ -265,7 +263,7 @@
Iterator<TileEntity> iterator = this.field_175730_i.iterator();
while(iterator.hasNext()) {
@@ -549,8 +613,9 @@
@@ -548,8 +613,9 @@
BlockPos blockpos = tileentity.func_174877_v();
if (this.field_73020_y.func_222866_a(blockpos) && this.func_175723_af().func_177746_a(blockpos)) {
try {
@ -276,7 +274,7 @@
});
if (tileentity.func_200662_C().func_223045_a(this.func_180495_p(blockpos).func_177230_c())) {
((ITickableTileEntity)tileentity).func_73660_a();
@@ -563,8 +628,16 @@
@@ -562,8 +628,16 @@
CrashReport crashreport = CrashReport.func_85055_a(throwable, "Ticking block entity");
CrashReportCategory crashreportcategory = crashreport.func_85058_a("Block entity being ticked");
tileentity.func_145828_a(crashreportcategory);
@ -293,7 +291,7 @@
}
}
@@ -572,7 +645,10 @@
@@ -571,7 +645,10 @@
iterator.remove();
this.field_147482_g.remove(tileentity);
if (this.func_175667_e(tileentity.func_174877_v())) {
@ -305,7 +303,7 @@
}
}
}
@@ -604,12 +680,15 @@
@@ -603,12 +680,15 @@
public void func_217390_a(Consumer<Entity> p_217390_1_, Entity p_217390_2_) {
try {
@ -321,7 +319,7 @@
}
}
@@ -626,7 +705,7 @@
@@ -625,7 +705,7 @@
for(int l1 = k; l1 < l; ++l1) {
for(int i2 = i1; i2 < j1; ++i2) {
BlockState blockstate = this.func_180495_p(blockpos$pooledmutableblockpos.func_181079_c(k1, l1, i2));
@ -330,7 +328,7 @@
boolean flag = true;
return flag;
}
@@ -650,8 +729,8 @@
@@ -649,8 +729,8 @@
for(int k1 = i; k1 < j; ++k1) {
for(int l1 = k; l1 < l; ++l1) {
for(int i2 = i1; i2 < j1; ++i2) {
@ -341,7 +339,7 @@
boolean flag = true;
return flag;
}
@@ -722,6 +801,7 @@
@@ -721,6 +801,7 @@
if (p_217401_2_ != null) {
explosion.func_199592_a(p_217401_2_);
}
@ -349,7 +347,7 @@
explosion.func_77278_a();
explosion.func_77279_a(true);
@@ -782,9 +862,12 @@
@@ -781,9 +862,12 @@
public void func_175690_a(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_) {
if (!func_189509_E(p_175690_1_)) {
@ -362,7 +360,7 @@
Iterator<TileEntity> iterator = this.field_147484_a.iterator();
while(iterator.hasNext()) {
@@ -797,7 +880,8 @@
@@ -796,7 +880,8 @@
this.field_147484_a.add(p_175690_2_);
} else {
@ -372,7 +370,7 @@
this.func_175700_a(p_175690_2_);
}
}
@@ -810,6 +894,8 @@
@@ -809,6 +894,8 @@
if (tileentity != null && this.field_147481_N) {
tileentity.func_145843_s();
this.field_147484_a.remove(tileentity);
@ -381,7 +379,7 @@
} else {
if (tileentity != null) {
this.field_147484_a.remove(tileentity);
@@ -819,7 +905,7 @@
@@ -818,7 +905,7 @@
this.func_175726_f(p_175713_1_).func_177425_e(p_175713_1_);
}
@ -390,7 +388,7 @@
}
public boolean func_195588_v(BlockPos p_195588_1_) {
@@ -844,9 +930,14 @@
@@ -843,9 +930,14 @@
public void func_72891_a(boolean p_72891_1_, boolean p_72891_2_) {
this.func_72863_F().func_217203_a(p_72891_1_, p_72891_2_);
@ -405,7 +403,7 @@
if (this.field_72986_A.func_76059_o()) {
this.field_73004_o = 1.0F;
if (this.field_72986_A.func_76061_m()) {
@@ -866,10 +957,10 @@
@@ -865,10 +957,10 @@
public List<Entity> func_175674_a(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable Predicate<? super Entity> p_175674_3_) {
List<Entity> list = Lists.newArrayList();
@ -420,7 +418,7 @@
for(int i1 = i; i1 <= j; ++i1) {
for(int j1 = k; j1 <= l; ++j1) {
@@ -884,10 +975,10 @@
@@ -883,10 +975,10 @@
}
public List<Entity> func_217394_a(@Nullable EntityType<?> p_217394_1_, AxisAlignedBB p_217394_2_, Predicate<? super Entity> p_217394_3_) {
@ -435,7 +433,7 @@
List<Entity> list = Lists.newArrayList();
for(int i1 = i; i1 < j; ++i1) {
@@ -903,10 +994,10 @@
@@ -902,10 +994,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_) {
@ -450,7 +448,7 @@
List<T> list = Lists.newArrayList();
AbstractChunkProvider abstractchunkprovider = this.func_72863_F();
@@ -1001,7 +1092,7 @@
@@ -1000,7 +1092,7 @@
public int func_175651_c(BlockPos p_175651_1_, Direction p_175651_2_) {
BlockState blockstate = this.func_180495_p(p_175651_1_);
@ -459,7 +457,7 @@
}
public boolean func_175640_z(BlockPos p_175640_1_) {
@@ -1046,7 +1137,7 @@
@@ -1045,7 +1137,7 @@
}
public long func_72905_C() {
@ -468,7 +466,7 @@
}
public long func_82737_E() {
@@ -1054,11 +1145,11 @@
@@ -1053,11 +1145,11 @@
}
public long func_72820_D() {
@ -482,7 +480,7 @@
}
protected void func_217389_a() {
@@ -1070,7 +1161,7 @@
@@ -1069,7 +1161,7 @@
}
public BlockPos func_175694_M() {
@ -491,7 +489,7 @@
if (!this.func_175723_af().func_177746_a(blockpos)) {
blockpos = this.func_205770_a(Heightmap.Type.MOTION_BLOCKING, new BlockPos(this.func_175723_af().func_177731_f(), 0.0D, this.func_175723_af().func_177721_g()));
}
@@ -1079,10 +1170,14 @@
@@ -1078,10 +1170,14 @@
}
public void func_175652_B(BlockPos p_175652_1_) {
@ -507,7 +505,7 @@
return true;
}
@@ -1150,8 +1245,7 @@
@@ -1149,8 +1245,7 @@
}
public boolean func_180502_D(BlockPos p_180502_1_) {
@ -517,7 +515,7 @@
}
@Nullable
@@ -1165,12 +1259,11 @@
@@ -1164,11 +1259,11 @@
}
public int func_72940_L() {
@ -525,14 +523,13 @@
+ return this.field_73011_w.getActualHeight();
}
- @OnlyIn(Dist.CLIENT)
public double func_72919_O() {
- return this.field_72986_A.func_76067_t() == WorldType.field_77138_c ? 0.0D : 63.0D;
+ return this.field_73011_w.getHorizon();
}
public CrashReportCategory func_72914_a(CrashReport p_72914_1_) {
@@ -1201,16 +1294,15 @@
@@ -1199,16 +1294,15 @@
public abstract Scoreboard func_96441_U();
public void func_175666_e(BlockPos p_175666_1_, Block p_175666_2_) {
@ -553,7 +550,7 @@
blockstate.func_215697_a(this, blockpos, p_175666_2_, p_175666_1_, false);
}
}
@@ -1289,4 +1381,16 @@
@@ -1287,4 +1381,16 @@
public BlockPos func_205770_a(Heightmap.Type p_205770_1_, BlockPos p_205770_2_) {
return new BlockPos(p_205770_2_.func_177958_n(), this.func_201676_a(p_205770_1_, p_205770_2_.func_177958_n(), p_205770_2_.func_177952_p()), p_205770_2_.func_177952_p());
}

View File

@ -0,0 +1,89 @@
# Forge Sided Annotation Stripper Config
# Please keep this file organized. And use the forge:checkSAS task to generate/validate inheretance.
# So only add the root function that needs to have the annotation stripped.
# checkSAS will populate all overrides as nessasary. Prefixing added lines with \t
# checkSAS also supports names using . so simplest way to find the correct line to add is to get the AT line from the bot
# and remove the access modifier.
#==================================================================================================================================
# Block.getItem called from Block.getPickBlock.
net/minecraft/block/Block func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/AbstractBannerBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/AttachedStemBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/BambooSaplingBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/CropsBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/EndGatewayBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/EndPortalBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/FlowerPotBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/FrostedIceBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/KelpBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/MovingPistonBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/NetherPortalBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/NetherWartBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/PistonHeadBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/ShulkerBoxBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/SpawnerBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/StemBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/SweetBerryBushBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/TallSeaGrassBlock func_185473_a(Lnet/minecraft/world/IBlockReader;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;)Lnet/minecraft/item/ItemStack;
net/minecraft/block/SoundType func_185845_c()Lnet/minecraft/util/SoundEvent; # getBreakSound
net/minecraft/block/SoundType func_185846_f()Lnet/minecraft/util/SoundEvent; # getHitSound
net/minecraft/item/crafting/Ingredient func_193365_a()[Lnet/minecraft/item/ItemStack; # getMatchingStacks
net/minecraft/item/crafting/Ingredient func_193369_a([Lnet/minecraft/item/ItemStack;)Lnet/minecraft/item/crafting/Ingredient; # fromStacks
net/minecraft/item/crafting/IRecipe func_222128_h()Lnet/minecraft/item/ItemStack; # getIcon
net/minecraft/item/crafting/BlastingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/CampfireCookingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/FurnaceRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/SmokingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/StonecuttingRecipe func_222128_h()Lnet/minecraft/item/ItemStack;
net/minecraft/item/crafting/IRecipe func_194133_a(II)Z # canFit
net/minecraft/item/crafting/AbstractCookingRecipe func_194133_a(II)Z
net/minecraft/item/crafting/ArmorDyeRecipe func_194133_a(II)Z
net/minecraft/item/crafting/BannerDuplicateRecipe func_194133_a(II)Z
net/minecraft/item/crafting/BookCloningRecipe func_194133_a(II)Z
net/minecraft/item/crafting/FireworkRocketRecipe func_194133_a(II)Z
net/minecraft/item/crafting/FireworkStarFadeRecipe func_194133_a(II)Z
net/minecraft/item/crafting/FireworkStarRecipe func_194133_a(II)Z
net/minecraft/item/crafting/MapCloningRecipe func_194133_a(II)Z
net/minecraft/item/crafting/RepairItemRecipe func_194133_a(II)Z
net/minecraft/item/crafting/ShapedRecipe func_194133_a(II)Z
net/minecraft/item/crafting/ShapelessRecipe func_194133_a(II)Z
net/minecraft/item/crafting/ShieldRecipes func_194133_a(II)Z
net/minecraft/item/crafting/ShulkerBoxColoringRecipe func_194133_a(II)Z
net/minecraft/item/crafting/SingleItemRecipe func_194133_a(II)Z
net/minecraft/item/crafting/SuspiciousStewRecipe func_194133_a(II)Z
net/minecraft/item/crafting/TippedArrowRecipe func_194133_a(II)Z
net/minecraft/item/crafting/IRecipe func_193358_e()Ljava/lang/String; # getGroup
net/minecraft/item/crafting/AbstractCookingRecipe func_193358_e()Ljava/lang/String;
net/minecraft/item/crafting/ShapedRecipe func_193358_e()Ljava/lang/String;
net/minecraft/item/crafting/ShapelessRecipe func_193358_e()Ljava/lang/String;
net/minecraft/item/crafting/SingleItemRecipe func_193358_e()Ljava/lang/String;
net/minecraft/nbt/CompressedStreamTools func_74797_a(Ljava/io/File;)Lnet/minecraft/nbt/CompoundNBT; # read
net/minecraft/nbt/CompressedStreamTools func_74795_b(Lnet/minecraft/nbt/CompoundNBT;Ljava/io/File;)V # write
net/minecraft/nbt/CompressedStreamTools func_74793_a(Lnet/minecraft/nbt/CompoundNBT;Ljava/io/File;)V # safeWrite
net/minecraft/potion/Effect func_220303_e()Lnet/minecraft/potion/EffectType; # getEffectType
net/minecraft/potion/Effect func_111186_k()Ljava/util/Map; # getAttributeModifierMap
net/minecraft/potion/Effect func_188408_i()Z # isBeneficial
net/minecraft/potion/EffectType func_220306_a()Lnet/minecraft/util/text/TextFormatting; # getColor
net/minecraft/resources/IResourceManager func_199001_a()Ljava/util/Set; # getResourceNamespaces
net/minecraft/resources/FallbackResourceManager func_199001_a()Ljava/util/Set;
net/minecraft/resources/SimpleReloadableResourceManager func_199001_a()Ljava/util/Set;
net/minecraft/resources/IResourceManager func_219533_b(Lnet/minecraft/util/ResourceLocation;)Z # hasResource
net/minecraft/resources/FallbackResourceManager func_219533_b(Lnet/minecraft/util/ResourceLocation;)Z
net/minecraft/resources/SimpleReloadableResourceManager func_219533_b(Lnet/minecraft/util/ResourceLocation;)Z
net/minecraft/resources/IResourceManager func_199021_a(Lnet/minecraft/resources/IResourcePack;)V # addResourcePack
net/minecraft/resources/FallbackResourceManager func_199021_a(Lnet/minecraft/resources/IResourcePack;)V
net/minecraft/resources/SimpleReloadableResourceManager func_199021_a(Lnet/minecraft/resources/IResourcePack;)V
net/minecraft/resources/IReloadableResourceManager func_219535_a(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;)Lnet/minecraft/resources/IAsyncReloader; # initialReload
net/minecraft/resources/SimpleReloadableResourceManager func_219535_a(Ljava/util/concurrent/Executor;Ljava/util/concurrent/Executor;Ljava/util/concurrent/CompletableFuture;)Lnet/minecraft/resources/IAsyncReloader;
net/minecraft/tags/TagCollection func_199913_a(Ljava/lang/Object;)Ljava/util/Collection; # getOwningTags
net/minecraft/tileentity/TileEntity func_145835_a(DDD)D # getDistanceSq
net/minecraft/util/Direction func_176732_a(Lnet/minecraft/util/Direction$Axis;)Lnet/minecraft/util/Direction; # rotateAround
net/minecraft/util/Direction func_176744_n()Lnet/minecraft/util/Direction; # rotateX
net/minecraft/util/Direction func_176738_p()Lnet/minecraft/util/Direction; # rotateZ
net/minecraft/util/Direction func_176739_a(Ljava/lang/String;)Lnet/minecraft/util/Direction; # byName
net/minecraft/util/Direction$Axis func_176717_a(Ljava/lang/String;)Lnet/minecraft/util/Direction$Axis; # byName
net/minecraft/util/math/Vec3d func_216371_e()Lnet/minecraft/util/math/Vec3d;
net/minecraft/util/math/Vec3d func_189984_a(Lnet/minecraft/util/math/Vec2f;)Lnet/minecraft/util/math/Vec3d; # fromPitchYaw
net/minecraft/util/math/Vec3d func_189986_a(FF)Lnet/minecraft/util/math/Vec3d; # fromPitchYaw
net/minecraft/world/World func_72971_b(F)F # getSunBrightness
net/minecraft/world/World func_72919_O()D # getHorizon