Skip to content

Commit

Permalink
Make mixins not public and add editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
jpenilla committed Aug 7, 2024
1 parent 93eca8e commit eada4f5
Show file tree
Hide file tree
Showing 116 changed files with 124 additions and 115 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[*]
charset = utf-8
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = off

[{*.kt,*.kts}]
indent_size = 2
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.lang.invoke.VarHandle;

@Mixin(SimpleBitStorage.class)
public abstract class SimpleBitStorageMixin implements BitStorage {
abstract class SimpleBitStorageMixin implements BitStorage {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import org.spongepowered.asm.mixin.Overwrite;

@Mixin(ZeroBitStorage.class)
public abstract class ZeroBitStorageMixin implements BitStorage {
abstract class ZeroBitStorageMixin implements BitStorage {

/**
* @reason Do not validate input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.spongepowered.asm.mixin.Shadow;

@Mixin(BitStorage.class)
public interface BitStorageMixin extends BlockCountingBitStorage {
interface BitStorageMixin extends BlockCountingBitStorage {

@Shadow
int getBits();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import java.util.function.Predicate;

@Mixin(LevelChunkSection.class)
public abstract class LevelChunkSectionMixin implements BlockCountingChunkSection {
abstract class LevelChunkSectionMixin implements BlockCountingChunkSection {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Objects;

@Mixin(SimpleBitStorage.class)
public abstract class SimpleBitStorageMixin implements BitStorage, BlockCountingBitStorage {
abstract class SimpleBitStorageMixin implements BitStorage, BlockCountingBitStorage {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.Objects;

@Mixin(ZeroBitStorage.class)
public abstract class ZeroBitStorageMixin implements BitStorage, BlockCountingBitStorage {
abstract class ZeroBitStorageMixin implements BitStorage, BlockCountingBitStorage {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Objects;

@Mixin(Level.class)
public abstract class LevelMixin implements LevelAccessor, AutoCloseable {
abstract class LevelMixin implements LevelAccessor, AutoCloseable {

@Shadow
protected List<TickingBlockEntity> blockEntityTickers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.spongepowered.asm.mixin.Overwrite;

@Mixin(BooleanProperty.class)
public abstract class BooleanPropertyMixin extends Property<Boolean> implements PropertyAccess<Boolean> {
abstract class BooleanPropertyMixin extends Property<Boolean> implements PropertyAccess<Boolean> {
protected BooleanPropertyMixin(String string, Class<Boolean> class_) {
super(string, class_);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(EnumProperty.class)
public abstract class EnumPropertyMixin<T extends Enum<T> & StringRepresentable> extends Property<T> implements PropertyAccess<T> {
abstract class EnumPropertyMixin<T extends Enum<T> & StringRepresentable> extends Property<T> implements PropertyAccess<T> {

@Unique
private int[] idLookupTable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.spongepowered.asm.mixin.Shadow;

@Mixin(IntegerProperty.class)
public abstract class IntegerPropertyMixin extends Property<Integer> implements PropertyAccess<Integer> {
abstract class IntegerPropertyMixin extends Property<Integer> implements PropertyAccess<Integer> {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import java.util.concurrent.atomic.AtomicInteger;

@Mixin(Property.class)
public abstract class PropertyMixin<T extends Comparable<T>> implements PropertyAccess<T> {
abstract class PropertyMixin<T extends Comparable<T>> implements PropertyAccess<T> {

@Unique
private static final AtomicInteger ID_GENERATOR = new AtomicInteger();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Optional;

@Mixin(StateHolder.class)
public abstract class StateHolderMixin<O, S> {
abstract class StateHolderMixin<O, S> {

@Shadow
private Table<Property<?>, Comparable<?>, S> neighbours;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ChunkAccess.class)
public abstract class ChunkAccessMixin implements BlockGetter, BiomeManager.NoiseBiomeSource, LightChunk, StructureAccess {
abstract class ChunkAccessMixin implements BlockGetter, BiomeManager.NoiseBiomeSource, LightChunk, StructureAccess {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(LevelChunk.class)
public abstract class LevelChunkMixin extends ChunkAccess implements GetBlockChunk {
abstract class LevelChunkMixin extends ChunkAccess implements GetBlockChunk {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import java.nio.ByteBuffer;

@Mixin(RegionFile.ChunkBuffer.class)
public abstract class ChunkBufferMixin extends ByteArrayOutputStream implements ChunkSystemChunkBuffer {
abstract class ChunkBufferMixin extends ByteArrayOutputStream implements ChunkSystemChunkBuffer {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.function.Supplier;

@Mixin(ChunkGenerator.class)
public abstract class ChunkGeneratorMixin {
abstract class ChunkGeneratorMixin {

/**
* @reason Use Runnable:run, as we schedule onto the moonrise common pool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import java.util.concurrent.Executor;

@Mixin(ChunkHolder.class)
public abstract class ChunkHolderMixin extends GenerationChunkHolder implements ChunkSystemChunkHolder {
abstract class ChunkHolderMixin extends GenerationChunkHolder implements ChunkSystemChunkHolder {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import java.util.concurrent.Executor;

@Mixin(ChunkMap.DistanceManager.class)
public abstract class ChunkMap$DistanceManagerMixin extends net.minecraft.server.level.DistanceManager implements ChunkSystemDistanceManager {
abstract class ChunkMap$DistanceManagerMixin extends net.minecraft.server.level.DistanceManager implements ChunkSystemDistanceManager {

@Shadow(aliases = "this$0")
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
import java.util.function.IntSupplier;

@Mixin(ChunkMap.class)
public abstract class ChunkMapMixin extends ChunkStorage implements ChunkSystemChunkMap, ChunkHolder.PlayerProvider, GeneratingChunkMap {
abstract class ChunkMapMixin extends ChunkStorage implements ChunkSystemChunkMap, ChunkHolder.PlayerProvider, GeneratingChunkMap {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.function.UnaryOperator;

@Mixin(ChunkPyramid.class)
public abstract class ChunkPyramidMixin {
abstract class ChunkPyramidMixin {

/**
* @reason Starlight does not require loading neighbours for light data, as Starlight performs chunk edge checks on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(ChunkSerializer.class)
public abstract class ChunkSerializerMixin {
abstract class ChunkSerializerMixin {

/**
* @reason Chunk system handles this during full transition
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.concurrent.atomic.AtomicBoolean;

@Mixin(ChunkStatus.class)
public abstract class ChunkStatusMixin implements ChunkSystemChunkStatus {
abstract class ChunkStatusMixin implements ChunkSystemChunkStatus {

@Unique
private boolean isParallelCapable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(ChunkStep.class)
public abstract class ChunkStepMixin implements ChunkSystemChunkStep {
abstract class ChunkStepMixin implements ChunkSystemChunkStep {

@Shadow
public abstract int getAccumulatedRadiusOf(ChunkStatus chunkStatus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.concurrent.CompletableFuture;

@Mixin(ChunkStorage.class)
public abstract class ChunkStorageMixin implements ChunkSystemChunkStorage, AutoCloseable {
abstract class ChunkStorageMixin implements ChunkSystemChunkStorage, AutoCloseable {

@Shadow
private IOWorker worker;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.util.function.Supplier;

@Mixin(ClientLevel.class)
public abstract class ClientLevelMixin extends Level implements ChunkSystemLevel {
abstract class ClientLevelMixin extends Level implements ChunkSystemLevel {

@Shadow
private TransientEntitySectionManager<Entity> entityStorage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import java.util.concurrent.Executor;

@Mixin(DistanceManager.class)
public abstract class DistanceManagerMixin implements ChunkSystemDistanceManager {
abstract class DistanceManagerMixin implements ChunkSystemDistanceManager {

@Shadow
Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> tickets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import java.util.function.Predicate;

@Mixin(EntityGetter.class)
public interface EntityGetterMixin extends ChunkSystemEntityGetter {
interface EntityGetterMixin extends ChunkSystemEntityGetter {

@Shadow
List<Entity> getEntities(Entity entity, AABB aABB, Predicate<? super Entity> predicate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.stream.Stream;

@Mixin(Entity.class)
public abstract class EntityMixin implements ChunkSystemEntity {
abstract class EntityMixin implements ChunkSystemEntity {

@Shadow
private ImmutableList<Entity> passengers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.function.Consumer;

@Mixin(EntityTickList.class)
public abstract class EntityTickListMixin {
abstract class EntityTickListMixin {

@Shadow
private Int2ObjectMap<Entity> active;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import java.util.concurrent.atomic.AtomicReferenceArray;

@Mixin(GenerationChunkHolder.class)
public abstract class GenerationChunkHolderMixin {
abstract class GenerationChunkHolderMixin {

@Shadow
public abstract int getTicketLevel();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(LevelChunk.class)
public abstract class LevelChunkMixin extends ChunkAccess implements ChunkSystemLevelChunk {
abstract class LevelChunkMixin extends ChunkAccess implements ChunkSystemLevelChunk {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.function.Function;

@Mixin(LevelChunkTicks.class)
public abstract class LevelChunkTicksMixin<T> implements ChunkSystemLevelChunkTicks, SerializableTickContainer<T>, TickContainerAccess<T> {
abstract class LevelChunkTicksMixin<T> implements ChunkSystemLevelChunkTicks, SerializableTickContainer<T>, TickContainerAccess<T> {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import java.util.function.Predicate;

@Mixin(Level.class)
public abstract class LevelMixin implements ChunkSystemLevel, ChunkSystemEntityGetter, LevelAccessor, AutoCloseable {
abstract class LevelMixin implements ChunkSystemLevel, ChunkSystemEntityGetter, LevelAccessor, AutoCloseable {

@Shadow
public abstract ProfilerFiller getProfiler();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.spongepowered.asm.mixin.Mixin;

@Mixin(LevelReader.class)
public interface LevelReaderMixin extends ChunkSystemLevelReader, BlockAndTintGetter, CollisionGetter, SignalGetter, BiomeManager.NoiseBiomeSource {
interface LevelReaderMixin extends ChunkSystemLevelReader, BlockAndTintGetter, CollisionGetter, SignalGetter, BiomeManager.NoiseBiomeSource {

@Override
public default ChunkAccess moonrise$syncLoadNonFull(final int chunkX, final int chunkZ, final ChunkStatus status) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.stream.Stream;

@Mixin(MinecraftServer.class)
public abstract class MinecraftServerMixin extends ReentrantBlockableEventLoop<TickTask> implements ChunkSystemMinecraftServer, ServerInfo, CommandSource, AutoCloseable {
abstract class MinecraftServerMixin extends ReentrantBlockableEventLoop<TickTask> implements ChunkSystemMinecraftServer, ServerInfo, CommandSource, AutoCloseable {

@Shadow
public abstract Iterable<ServerLevel> getAllLevels();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import java.util.function.Supplier;

@Mixin(NoiseBasedChunkGenerator.class)
public abstract class NoiseBasedChunkGeneratorMixin {
abstract class NoiseBasedChunkGeneratorMixin {

/**
* @reason Use Runnable:run, as we schedule onto the moonrise common pool
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(Options.class)
public abstract class OptionsMixin {
abstract class OptionsMixin {

/**
* @reason Allow higher view distances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(PlayerList.class)
public abstract class PlayerListMixin {
abstract class PlayerListMixin {

/**
* @reason Mark the player as "real", which enables chunk loading
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.Set;

@Mixin(PoiSection.class)
public abstract class PoiSectionMixin implements ChunkSystemPoiSection {
abstract class PoiSectionMixin implements ChunkSystemPoiSection {

@Shadow
private boolean isValid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.io.IOException;

@Mixin(RegionFile.class)
public abstract class RegionFileMixin implements ChunkSystemRegionFile {
abstract class RegionFileMixin implements ChunkSystemRegionFile {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import java.nio.file.Path;

@Mixin(RegionFileStorage.class)
public abstract class RegionFileStorageMixin implements ChunkSystemRegionFileStorage, AutoCloseable {
abstract class RegionFileStorageMixin implements ChunkSystemRegionFileStorage, AutoCloseable {

@Shadow
@Final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.concurrent.CompletableFuture;

@Mixin(SectionStorage.class)
public abstract class SectionStorageMixin implements ChunkSystemSectionStorage, AutoCloseable {
abstract class SectionStorageMixin implements ChunkSystemSectionStorage, AutoCloseable {

@Shadow
private SimpleRegionStorage simpleRegionStorage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import org.spongepowered.asm.mixin.Shadow;

@Mixin(ServerChunkCache.MainThreadExecutor.class)
public abstract class ServerChunkCache$MainThreadExecutorMixin extends BlockableEventLoop<Runnable> {
abstract class ServerChunkCache$MainThreadExecutorMixin extends BlockableEventLoop<Runnable> {

@Shadow(aliases = "this$0")
@Final
Expand Down
Loading

0 comments on commit eada4f5

Please sign in to comment.