Merge branch 'master' into 1.15

# Conflicts:
#	src/main/java/carpet/fakes/StructureFeatureInterface.java
#	src/main/java/carpet/mixins/PistonBlock_movableTEMixin.java
This commit is contained in:
gnembon committed 2020-01-06 21:28:07 -04:00
commit c995716357
41 files changed
+122 -137

No files matched your search

@@ -21,7 +21,7 @@ public abstract class DesertPyramidFeatureMixin extends AbstractTempleFeature<De
static
{
MONSTER_SPAWNS = Lists.newArrayList(new Biome.SpawnEntry[]{new Biome.SpawnEntry(EntityType.HUSK, 1, 1, 1)});
MONSTER_SPAWNS = Lists.newArrayList(new Biome.SpawnEntry(EntityType.HUSK, 1, 1, 1));
}
public DesertPyramidFeatureMixin(Function<Dynamic<?>, ? extends DefaultFeatureConfig> function_1)
@@ -14,7 +14,7 @@ public abstract class Entity_scarpetEventsMixin implements EntityInterface
{
@Shadow public boolean removed;
private EntityEventsGroup events = new EntityEventsGroup();
private final EntityEventsGroup events = new EntityEventsGroup();
@Override
public EntityEventsGroup getEventContainer()
@@ -65,14 +65,14 @@ public abstract class PistonBlock_movableTEMixin extends FacingBlock
@Inject(method = "move", at = @At(value = "INVOKE", shift = At.Shift.BEFORE,
target = "Ljava/util/List;size()I", ordinal = 4),locals = LocalCapture.CAPTURE_FAILHARD)
private void onMove(World world_1, BlockPos blockPos_1, Direction direction_1, boolean boolean_1,
CallbackInfoReturnable<Boolean> cir, BlockPos blockPos_2, PistonHandler pistonHandler_1, Map map_1,
List<BlockPos> list_1, List<BlockState> list_2, List list_3, int int_2, BlockState blockStates_1[],
Direction direction_2)
CallbackInfoReturnable<Boolean> cir, BlockPos blockPos_2, PistonHandler pistonHandler_1, Map map_1,
List<BlockPos> list_1, List<BlockState> list_2, List list_3, int int_2, BlockState[] blockStates_1,
Direction direction_2)
{
//Get the blockEntities and remove them from the world before any magic starts to happen
if (CarpetSettings.movableBlockEntities)
{
list1_BlockEntities.set(Lists.<BlockEntity>newArrayList());
list1_BlockEntities.set(Lists.newArrayList());
for (int i = 0; i < list_1.size(); ++i)
{
BlockPos blockpos = list_1.get(i);
@@ -94,9 +94,9 @@ public abstract class PistonBlock_movableTEMixin extends FacingBlock
"Lnet/minecraft/block/entity/BlockEntity;)V", ordinal = 0),
locals = LocalCapture.CAPTURE_FAILHARD)
private void setBlockEntityWithCarried(World world_1, BlockPos blockPos_1, Direction direction_1, boolean boolean_1,
CallbackInfoReturnable<Boolean> cir, BlockPos blockPos_2, PistonHandler pistonHandler_1, Map map_1, List list_1,
List list_2, List list_3, int int_2, BlockState blockStates_1[], Direction direction_2,
int int_3, BlockPos blockPos_4, BlockState blockState_1)
CallbackInfoReturnable<Boolean> cir, BlockPos blockPos_2, PistonHandler pistonHandler_1, Map map_1, List list_1,
List list_2, List list_3, int int_2, BlockState[] blockStates_1, Direction direction_2,
int int_3, BlockPos blockPos_4, BlockState blockState_1)
{
BlockEntity blockEntityPiston = PistonExtensionBlock.createBlockEntityPiston((BlockState) list_2.get(int_3),
direction_1, boolean_1, false);
@@ -72,7 +72,7 @@ public abstract class PlayerManagerMixin
serverPlayerEntity_3.kill();
continue;
}
serverPlayerEntity_3.networkHandler.disconnect(new TranslatableText("multiplayer.disconnect.duplicate_login", new Object[0]));
serverPlayerEntity_3.networkHandler.disconnect(new TranslatableText("multiplayer.disconnect.duplicate_login"));
}
}
@@ -36,10 +36,10 @@ public abstract class RedstoneWireBlockMixin implements RedstoneWireBlockInterfa
private Set<BlockPos> affectedNeighbors;
@Shadow
private int increasePower(int int_1, BlockState blockState_1) { return 0; };
private int increasePower(int int_1, BlockState blockState_1) { return 0; }
@Shadow
private BlockState update(World world_1, BlockPos blockPos_1, BlockState blockState_1) { return null; };
private BlockState update(World world_1, BlockPos blockPos_1, BlockState blockState_1) { return null; }
// =
@@ -74,6 +74,7 @@ public abstract class ServerChunkManagerMixin
}
}
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "method_20801", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/SpawnHelper;spawnEntitiesInChunk(Lnet/minecraft/entity/EntityCategory;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/chunk/WorldChunk;Lnet/minecraft/util/math/BlockPos;)V"
@@ -87,6 +88,7 @@ public abstract class ServerChunkManagerMixin
}
}
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "method_20801", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/entity/EntityCategory;getSpawnCap()I"
@@ -22,7 +22,7 @@ public class ServerPlayerInteractionManager_cactusMixin
))
private ActionResult activateWithOptionalCactus(BlockState blockState, World world_1, PlayerEntity playerEntity_1, Hand hand_1, BlockHitResult blockHitResult_1)
{
Boolean flipped = BlockRotator.flipBlockWithCactus(blockState, world_1, playerEntity_1, hand_1, blockHitResult_1);
boolean flipped = BlockRotator.flipBlockWithCactus(blockState, world_1, playerEntity_1, hand_1, blockHitResult_1);
if (flipped)
return ActionResult.SUCCESS;
@@ -14,7 +14,8 @@ import org.spongepowered.asm.mixin.injection.Redirect;
@Mixin(ServerWorld.class)
public abstract class ServerWorld_fakePlayersMixin
{
@Shadow private boolean ticking;
@Shadow
boolean ticking;
@Shadow /*@Nonnull*/ public abstract MinecraftServer getServer();
@@ -45,7 +45,7 @@ public class SummonCommandMixin
world.spawnEntity(skeletonHorseEntity_1);
}
world.addLightning(lightningEntity_1);
source.sendFeedback(new TranslatableText("commands.summon.success", new Object[]{lightningEntity_1.getDisplayName()}), true);
source.sendFeedback(new TranslatableText("commands.summon.success", lightningEntity_1.getDisplayName()), true);
cir.setReturnValue(1);
cir.cancel();
@@ -34,7 +34,7 @@ public abstract class World_movableTEMixin implements WorldInterface
private Profiler profiler;
@Shadow
protected abstract WorldChunk getWorldChunk(BlockPos blockPos_1);
public abstract WorldChunk getWorldChunk(BlockPos blockPos_1);
@Shadow
public abstract BlockState getBlockState(BlockPos blockPos_1);