mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
Update ForgeFlower (#7857)
This commit is contained in:
parent
f0b4d5aa22
commit
ea9a831a7f
12 changed files with 49 additions and 49 deletions
|
@ -63,7 +63,7 @@ repositories {
|
||||||
dependencies {
|
dependencies {
|
||||||
paramMappings("net.fabricmc:yarn:1.18.2+build.2:mergedv2")
|
paramMappings("net.fabricmc:yarn:1.18.2+build.2:mergedv2")
|
||||||
remapper("net.fabricmc:tiny-remapper:0.8.2:fat")
|
remapper("net.fabricmc:tiny-remapper:0.8.2:fat")
|
||||||
decompiler("net.minecraftforge:forgeflower:1.5.498.29")
|
decompiler("net.minecraftforge:forgeflower:1.5.605.7")
|
||||||
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.4")
|
spigotDecompiler("io.papermc:patched-spigot-fernflower:0.1+build.4")
|
||||||
paperclip("io.papermc:paperclip:3.0.2")
|
paperclip("io.papermc:paperclip:3.0.2")
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
- if (this.iterated == this.active) {
|
- if (this.iterated == this.active) {
|
||||||
- this.passive.clear();
|
- this.passive.clear();
|
||||||
-
|
-
|
||||||
- for(Entry<Entity> entry : Int2ObjectMaps.fastIterable(this.active)) {
|
- for(Int2ObjectMap.Entry<Entity> entry : Int2ObjectMaps.fastIterable(this.active)) {
|
||||||
- this.passive.put(entry.getIntKey(), entry.getValue());
|
- this.passive.put(entry.getIntKey(), entry.getValue());
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
|
|
|
@ -1064,7 +1064,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.heightmaps = new CompoundTag();
|
this.heightmaps = new CompoundTag();
|
||||||
|
|
||||||
for(Entry<Heightmap.Types, Heightmap> entry : chunk.getHeightmaps()) {
|
for(Map.Entry<Heightmap.Types, Heightmap> entry : chunk.getHeightmaps()) {
|
||||||
@@ -0,0 +0,0 @@ public class ClientboundLevelChunkPacketData {
|
@@ -0,0 +0,0 @@ public class ClientboundLevelChunkPacketData {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ public List<StructureStart> startsForFeature(SectionPos sectionPos, ConfiguredStructureFeature<?, ?> configuredStructureFeature, ServerLevelAccessor world) {
|
+ public List<StructureStart> startsForFeature(SectionPos sectionPos, ConfiguredStructureFeature<?, ?> configuredStructureFeature, ServerLevelAccessor world) {
|
||||||
+ LongSet longSet = (world == null ? this.level : world).getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES).getReferencesForFeature(configuredStructureFeature);
|
+ LongSet longSet = (world == null ? this.level : world).getChunk(sectionPos.x(), sectionPos.z(), ChunkStatus.STRUCTURE_REFERENCES).getReferencesForFeature(configuredStructureFeature);
|
||||||
+ // Paper end - add world option
|
+ // Paper end - add world option
|
||||||
Builder<StructureStart> builder = ImmutableList.builder();
|
ImmutableList.Builder<StructureStart> builder = ImmutableList.builder();
|
||||||
this.fillStartsForFeature(configuredStructureFeature, longSet, builder::add);
|
this.fillStartsForFeature(configuredStructureFeature, longSet, builder::add);
|
||||||
return builder.build();
|
return builder.build();
|
||||||
@@ -0,0 +0,0 @@ public class StructureFeatureManager {
|
@@ -0,0 +0,0 @@ public class StructureFeatureManager {
|
||||||
|
|
|
@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
SurfaceRules.ConditionSource conditionSource2 = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(256), 0);
|
SurfaceRules.ConditionSource conditionSource2 = SurfaceRules.yBlockCheck(VerticalAnchor.absolute(256), 0);
|
||||||
@@ -0,0 +0,0 @@ public class SurfaceRuleData {
|
@@ -0,0 +0,0 @@ public class SurfaceRuleData {
|
||||||
SurfaceRules.RuleSource ruleSource9 = SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WOODED_BADLANDS), SurfaceRules.ifTrue(conditionSource, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource16, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource17, COARSE_DIRT), ruleSource))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.SWAMP), SurfaceRules.ifTrue(conditionSource5, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource6), SurfaceRules.ifTrue(SurfaceRules.noiseCondition(Noises.SWAMP, 0.0D), WATER)))))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.BADLANDS, Biomes.ERODED_BADLANDS, Biomes.WOODED_BADLANDS), SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource2, ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource4, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, TERRACOTTA), SurfaceRules.ifTrue(conditionSource16, TERRACOTTA), SurfaceRules.ifTrue(conditionSource17, TERRACOTTA), SurfaceRules.bandlands())), SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_CEILING, RED_SANDSTONE), RED_SAND)), SurfaceRules.ifTrue(SurfaceRules.not(conditionSource10), ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA), ruleSource3)), SurfaceRules.ifTrue(conditionSource3, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource6, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource4), ORANGE_TERRACOTTA)), SurfaceRules.bandlands())), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource8, AIR), SurfaceRules.ifTrue(SurfaceRules.temperature(), ICE), WATER))), ruleSource8))), SurfaceRules.ifTrue(conditionSource9, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, WATER))), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, ruleSource7), SurfaceRules.ifTrue(conditionSource13, SurfaceRules.ifTrue(SurfaceRules.DEEP_UNDER_FLOOR, SANDSTONE)), SurfaceRules.ifTrue(conditionSource14, SurfaceRules.ifTrue(SurfaceRules.VERY_DEEP_UNDER_FLOOR, SANDSTONE)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.FROZEN_PEAKS, Biomes.JAGGED_PEAKS), STONE), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WARM_OCEAN, Biomes.LUKEWARM_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN), ruleSource2), ruleSource3)));
|
SurfaceRules.RuleSource ruleSource9 = SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WOODED_BADLANDS), SurfaceRules.ifTrue(conditionSource, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource16, COARSE_DIRT), SurfaceRules.ifTrue(conditionSource17, COARSE_DIRT), ruleSource))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.SWAMP), SurfaceRules.ifTrue(conditionSource5, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource6), SurfaceRules.ifTrue(SurfaceRules.noiseCondition(Noises.SWAMP, 0.0D), WATER)))))), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.BADLANDS, Biomes.ERODED_BADLANDS, Biomes.WOODED_BADLANDS), SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource2, ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource4, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource15, TERRACOTTA), SurfaceRules.ifTrue(conditionSource16, TERRACOTTA), SurfaceRules.ifTrue(conditionSource17, TERRACOTTA), SurfaceRules.bandlands())), SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_CEILING, RED_SANDSTONE), RED_SAND)), SurfaceRules.ifTrue(SurfaceRules.not(conditionSource10), ORANGE_TERRACOTTA), SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA), ruleSource3)), SurfaceRules.ifTrue(conditionSource3, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource6, SurfaceRules.ifTrue(SurfaceRules.not(conditionSource4), ORANGE_TERRACOTTA)), SurfaceRules.bandlands())), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, SurfaceRules.ifTrue(conditionSource9, WHITE_TERRACOTTA)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource7, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, SurfaceRules.sequence(SurfaceRules.ifTrue(conditionSource8, AIR), SurfaceRules.ifTrue(SurfaceRules.temperature(), ICE), WATER))), ruleSource8))), SurfaceRules.ifTrue(conditionSource9, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.ifTrue(conditionSource11, SurfaceRules.ifTrue(conditionSource10, WATER))), SurfaceRules.ifTrue(SurfaceRules.UNDER_FLOOR, ruleSource7), SurfaceRules.ifTrue(conditionSource13, SurfaceRules.ifTrue(SurfaceRules.DEEP_UNDER_FLOOR, SANDSTONE)), SurfaceRules.ifTrue(conditionSource14, SurfaceRules.ifTrue(SurfaceRules.VERY_DEEP_UNDER_FLOOR, SANDSTONE)))), SurfaceRules.ifTrue(SurfaceRules.ON_FLOOR, SurfaceRules.sequence(SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.FROZEN_PEAKS, Biomes.JAGGED_PEAKS), STONE), SurfaceRules.ifTrue(SurfaceRules.isBiome(Biomes.WARM_OCEAN, Biomes.LUKEWARM_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN), ruleSource2), ruleSource3)));
|
||||||
Builder<SurfaceRules.RuleSource> builder = ImmutableList.builder();
|
ImmutableList.Builder<SurfaceRules.RuleSource> builder = ImmutableList.builder();
|
||||||
if (bedrockRoof) {
|
if (bedrockRoof) {
|
||||||
- builder.add(SurfaceRules.ifTrue(SurfaceRules.not(SurfaceRules.verticalGradient("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top())), BEDROCK));
|
- builder.add(SurfaceRules.ifTrue(SurfaceRules.not(SurfaceRules.verticalGradient("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top())), BEDROCK));
|
||||||
+ builder.add(SurfaceRules.ifTrue(SurfaceRules.not(new PaperBedrockConditionSource("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top(), true)), BEDROCK)); // Paper
|
+ builder.add(SurfaceRules.ifTrue(SurfaceRules.not(new PaperBedrockConditionSource("bedrock_roof", VerticalAnchor.belowTop(5), VerticalAnchor.top(), true)), BEDROCK)); // Paper
|
||||||
|
|
|
@ -33,7 +33,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
this.blockEntitiesData = Lists.newArrayList();
|
this.blockEntitiesData = Lists.newArrayList();
|
||||||
+ int totalTileEntities = 0; // Paper
|
+ int totalTileEntities = 0; // Paper
|
||||||
|
|
||||||
for(Entry<BlockPos, BlockEntity> entry2 : chunk.getBlockEntities().entrySet()) {
|
for(Map.Entry<BlockPos, BlockEntity> entry2 : chunk.getBlockEntities().entrySet()) {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (++totalTileEntities > TE_LIMIT) {
|
+ if (++totalTileEntities > TE_LIMIT) {
|
||||||
+ var packet = entry2.getValue().getUpdatePacket();
|
+ var packet = entry2.getValue().getUpdatePacket();
|
||||||
|
|
|
@ -17,8 +17,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ private static void awardTargetHitCriteria(Projectile projectile, BlockHitResult hit, int i) {
|
+ private static void awardTargetHitCriteria(Projectile projectile, BlockHitResult hit, int i) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
Entity entity = projectile.getOwner();
|
Entity entity = projectile.getOwner();
|
||||||
if (entity instanceof ServerPlayer) {
|
if (entity instanceof ServerPlayer serverPlayer) {
|
||||||
ServerPlayer serverPlayer = (ServerPlayer)entity;
|
serverPlayer.awardStat(Stats.TARGET_HIT);
|
||||||
@@ -0,0 +0,0 @@ public class TargetBlock extends Block {
|
@@ -0,0 +0,0 @@ public class TargetBlock extends Block {
|
||||||
private static int updateRedstoneOutput(LevelAccessor world, BlockState state, BlockHitResult hitResult, Entity entity) {
|
private static int updateRedstoneOutput(LevelAccessor world, BlockState state, BlockHitResult hitResult, Entity entity) {
|
||||||
int i = getRedstoneStrength(hitResult, hitResult.getLocation());
|
int i = getRedstoneStrength(hitResult, hitResult.getLocation());
|
||||||
|
|
|
@ -11,9 +11,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
@@ -0,0 +0,0 @@ public class Util {
|
@@ -0,0 +0,0 @@ public class Util {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <K> Strategy<K> identityStrategy() {
|
public static <K> Hash.Strategy<K> identityStrategy() {
|
||||||
- return Util.IdentityStrategy.INSTANCE;
|
- return Util.IdentityStrategy.INSTANCE;
|
||||||
+ return (Strategy<K>) Util.IdentityStrategy.INSTANCE; // Paper - decompile fix
|
+ return (Hash.Strategy<K>) Util.IdentityStrategy.INSTANCE; // Paper - decompile fix
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <V> CompletableFuture<List<V>> sequence(List<? extends CompletableFuture<V>> futures) {
|
public static <V> CompletableFuture<List<V>> sequence(List<? extends CompletableFuture<V>> futures) {
|
||||||
|
|
|
@ -210,4 +210,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ return betweenClosedStream(center.x - radius, 0, center.z - radius, center.x + radius, 15, center.z + radius); // Paper - simplify/inline
|
+ return betweenClosedStream(center.x - radius, 0, center.z - radius, center.x + radius, 15, center.z + radius); // Paper - simplify/inline
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Stream<SectionPos> betweenClosedStream(int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
|
public static Stream<SectionPos> betweenClosedStream(final int minX, final int minY, final int minZ, final int maxX, final int maxY, final int maxZ) {
|
||||||
|
|
|
@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
||||||
+import it.unimi.dsi.fastutil.objects.ObjectArrayList; // Paper
|
+import it.unimi.dsi.fastutil.objects.ObjectArrayList; // Paper
|
||||||
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
import it.unimi.dsi.fastutil.objects.ObjectIterator;
|
||||||
import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry;
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
@@ -0,0 +0,0 @@ public class GossipContainer {
|
@@ -0,0 +0,0 @@ public class GossipContainer {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue