Migrate Carpet Mixin names to mojang mappings
This commit is contained in:
1 parent
2c3871b90e
commit
a547677597
154 files changed
+422
-501
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.fakes.SimpleEntityLookupInterface;
|
||||
import org.spongepowered.asm.mixin.Final;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.entity.EntityAccess;
|
||||
import net.minecraft.world.level.entity.EntitySection;
|
||||
import net.minecraft.world.level.entity.EntitySectionStorage;
|
||||
import net.minecraft.world.level.entity.LevelEntityGetterAdapter;
|
||||
|
||||
@Mixin(LevelEntityGetterAdapter.class)
|
||||
public class LevelEntityGetterAdapter_scarpetMixin<T extends EntityAccess> implements SimpleEntityLookupInterface
|
||||
{
|
||||
|
||||
@Shadow @Final private EntitySectionStorage<T> sectionStorage;
|
||||
|
||||
@Override
|
||||
public List<T> getChunkEntities(ChunkPos chpos) {
|
||||
return this.sectionStorage.getExistingSectionsInChunk(chpos.toLong()).flatMap(EntitySection::getEntities).collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user