Migrate the Carpet codebase to Mojang Mappings
This commit is contained in:
346 files changed
+8353
-8492
No files matched your search
@@ -1,10 +1,10 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
|
||||
public interface BiomeArrayInterface // unused
|
||||
{
|
||||
void setBiomeAtIndex(BlockPos pos, World world, Biome what);
|
||||
void setBiomeAtIndex(BlockPos pos, Level world, Biome what);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
public interface BlockEntityInterface
|
||||
{
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import carpet.script.value.Value;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.tag.Tag;
|
||||
|
||||
import java.util.Map;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.tags.Tag;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public interface BlockPredicateInterface
|
||||
{
|
||||
BlockState getCMBlockState();
|
||||
Tag<Block> getCMBlockTag();
|
||||
Map<Value, Value> getCMProperties();
|
||||
NbtCompound getCMDataTag();
|
||||
CompoundTag getCMDataTag();
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.nbt.NbtCompound;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
|
||||
public interface BlockStateArgumentInterface
|
||||
{
|
||||
NbtCompound getCMTag();
|
||||
CompoundTag getCMTag();
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
|
||||
public interface ChunkGeneratorInterface
|
||||
{
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import com.mojang.datafixers.util.Either;
|
||||
import net.minecraft.server.world.ChunkHolder;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.thread.ThreadExecutor;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.util.thread.BlockableEventLoop;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.chunk.ChunkAccess;
|
||||
|
||||
public interface ChunkHolderInterface
|
||||
{
|
||||
CompletableFuture<Either<Chunk, ChunkHolder.Unloaded>> setDefaultProtoChunk(ChunkPos chpos, ThreadExecutor<Runnable> executor, ServerWorld world);
|
||||
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> setDefaultProtoChunk(ChunkPos chpos, BlockableEventLoop<Runnable> executor, ServerLevel world);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.world.chunk.ChunkNibbleArray;
|
||||
import net.minecraft.world.level.chunk.DataLayer;
|
||||
|
||||
public interface ChunkLightProviderInterface
|
||||
{
|
||||
int callGetCurrentLevelFromSection(ChunkNibbleArray array, long blockPos);
|
||||
int callGetCurrentLevelFromSection(DataLayer array, long blockPos);
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
|
||||
import net.minecraft.server.world.ChunkHolder;
|
||||
import net.minecraft.server.world.ChunkTicket;
|
||||
import net.minecraft.util.collection.SortedArraySet;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.server.level.Ticket;
|
||||
import net.minecraft.util.SortedArraySet;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
|
||||
public interface ChunkTicketManagerInterface
|
||||
{
|
||||
void changeSpawnChunks(ChunkPos pos, int distance);
|
||||
|
||||
Long2ObjectOpenHashMap<SortedArraySet<ChunkTicket<?>>> getTicketsByPosition();
|
||||
Long2ObjectOpenHashMap<SortedArraySet<Ticket<?>>> getTicketsByPosition();
|
||||
|
||||
void replaceHolder(ChunkHolder oldHolder, ChunkHolder newHolder);
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import java.util.Random;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public interface CoralFeatureInterface
|
||||
{
|
||||
boolean growSpecific(World worldIn, Random random, BlockPos pos, BlockState blockUnder);
|
||||
boolean growSpecific(Level worldIn, Random random, BlockPos pos, BlockState blockUnder);
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
public interface IngredientInterface
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.inventory.Inventory;
|
||||
import net.minecraft.world.Container;
|
||||
|
||||
public interface InventoryBearerInterface
|
||||
{
|
||||
Inventory getCMInventory(); // can be removed in 1.17 due to class_6067
|
||||
Container getCMInventory(); // can be removed in 1.17 due to class_6067
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.world.chunk.light.ChunkLightProvider;
|
||||
import net.minecraft.world.level.lighting.LayerLightEngine;
|
||||
|
||||
public interface LightStorageInterface extends Lighting_scarpetChunkCreationInterface
|
||||
{
|
||||
void processRemoveLightData(long pos);
|
||||
|
||||
void processRelight(ChunkLightProvider<?, ?> lightProvider, long pos);
|
||||
void processRelight(LayerLightEngine<?, ?> lightProvider, long pos);
|
||||
}
|
||||
@@ -1,18 +1,17 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.resource.ServerResourceManager;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.level.storage.LevelStorage;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.BooleanSupplier;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.server.ServerResources;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.storage.LevelStorageSource;
|
||||
|
||||
public interface MinecraftServerInterface
|
||||
{
|
||||
void forceTick(BooleanSupplier sup);
|
||||
LevelStorage.Session getCMSession();
|
||||
Map<RegistryKey<World>, ServerWorld> getCMWorlds();
|
||||
ServerResourceManager getResourceManager();
|
||||
LevelStorageSource.LevelStorageAccess getCMSession();
|
||||
Map<ResourceKey<Level>, ServerLevel> getCMWorlds();
|
||||
ServerResources getResourceManager();
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.entity.ai.goal.Goal;
|
||||
import net.minecraft.entity.ai.goal.GoalSelector;
|
||||
|
||||
import java.util.Map;
|
||||
import net.minecraft.world.entity.ai.goal.Goal;
|
||||
import net.minecraft.world.entity.ai.goal.GoalSelector;
|
||||
|
||||
public interface MobEntityInterface
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
|
||||
public interface PistonBlockEntityInterface
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
public interface PistonBlockInterface
|
||||
{
|
||||
boolean publicShouldExtend(World world_1, BlockPos blockPos_1, Direction direction_1);
|
||||
boolean publicShouldExtend(Level world_1, BlockPos blockPos_1, Direction direction_1);
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.gen.feature.Feature;
|
||||
import net.minecraft.world.gen.feature.FeatureConfig;
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
||||
|
||||
public interface PlacedFeatureInterface {
|
||||
ConfiguredFeature<?, ?> getRawFeature();
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.recipe.RecipeType;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
import net.minecraft.world.item.crafting.RecipeType;
|
||||
|
||||
public interface RecipeManagerInterface
|
||||
{
|
||||
@@ -13,5 +11,5 @@ public interface RecipeManagerInterface
|
||||
* Gets all the recipes for a given item. Also used for {@link carpet.helpers.HopperCounter#guessColor} to guess the
|
||||
* colour of an item to display it prettily
|
||||
*/
|
||||
List<Recipe<?>> getAllMatching(RecipeType<?> type, Identifier output);
|
||||
List<Recipe<?>> getAllMatching(RecipeType<?> type, ResourceLocation output);
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public interface RedstoneWireBlockInterface {
|
||||
BlockState updateLogicPublic(World world_1, BlockPos blockPos_1, BlockState blockState_1);
|
||||
BlockState updateLogicPublic(Level world_1, BlockPos blockPos_1, BlockState blockState_1);
|
||||
void setWiresGivePower(boolean wiresGivePower);
|
||||
boolean getWiresGivePower();
|
||||
}
|
||||
@@ -1,12 +1,12 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.recipe.Recipe;
|
||||
import net.minecraft.screen.Property;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.inventory.DataSlot;
|
||||
import net.minecraft.world.item.crafting.Recipe;
|
||||
|
||||
public interface ScreenHandlerInterface {
|
||||
Property getProperty(int index);
|
||||
boolean callButtonClickListener(int button, PlayerEntity player);
|
||||
boolean callSelectRecipeListener(ServerPlayerEntity player, Recipe<?> recipe, boolean craftAll);
|
||||
DataSlot getProperty(int index);
|
||||
boolean callButtonClickListener(int button, Player player);
|
||||
boolean callSelectRecipeListener(ServerPlayer player, Recipe<?> recipe, boolean craftAll);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.server.world.ChunkTicketManager;
|
||||
import net.minecraft.server.level.DistanceManager;
|
||||
|
||||
public interface ServerChunkManagerInterface
|
||||
{
|
||||
ChunkTicketManager getCMTicketManager();
|
||||
DistanceManager getCMTicketManager();
|
||||
}
|
||||
@@ -1,17 +1,16 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.chunk.ChunkAccess;
|
||||
|
||||
public interface ServerLightingProviderInterface
|
||||
{
|
||||
void invokeUpdateChunkStatus(ChunkPos pos);
|
||||
|
||||
void removeLightData(Chunk chunk);
|
||||
void removeLightData(ChunkAccess chunk);
|
||||
|
||||
CompletableFuture<Void> relight(Chunk chunk);
|
||||
CompletableFuture<Void> relight(ChunkAccess chunk);
|
||||
|
||||
void resetLight(Chunk chunk, ChunkPos pos);
|
||||
void resetLight(ChunkAccess chunk, ChunkPos pos);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
public interface ServerPlayerInteractionManagerInterface
|
||||
{
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityLookup;
|
||||
import net.minecraft.world.level.ServerWorldProperties;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.entity.LevelEntityGetter;
|
||||
import net.minecraft.world.level.storage.ServerLevelData;
|
||||
|
||||
public interface ServerWorldInterface {
|
||||
ServerWorldProperties getWorldPropertiesCM();
|
||||
EntityLookup<Entity> getEntityLookupCMPublic();
|
||||
ServerLevelData getWorldPropertiesCM();
|
||||
LevelEntityGetter<Entity> getEntityLookupCMPublic();
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.world.entity.EntityLike;
|
||||
|
||||
import java.util.List;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.entity.EntityAccess;
|
||||
|
||||
public interface SimpleEntityLookupInterface<T extends EntityLike>
|
||||
public interface SimpleEntityLookupInterface<T extends EntityAccess>
|
||||
{
|
||||
List<T> getChunkEntities(ChunkPos chpos);
|
||||
}
|
||||
@@ -1,10 +1,10 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.util.math.GravityField;
|
||||
import net.minecraft.world.level.PotentialCalculator;
|
||||
|
||||
public interface SpawnHelperInnerInterface
|
||||
{
|
||||
GravityField getPotentialCalculator();
|
||||
PotentialCalculator getPotentialCalculator();
|
||||
|
||||
int cmGetChunkCount();
|
||||
}
|
||||
@@ -1,16 +1,12 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.world.HeightLimitView;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.source.BiomeSource;
|
||||
import net.minecraft.world.gen.random.ChunkRandom;
|
||||
import net.minecraft.world.gen.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.gen.feature.FeatureConfig;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.level.levelgen.feature.configurations.FeatureConfiguration;
|
||||
|
||||
public interface StructureFeatureInterface<C extends FeatureConfig>
|
||||
public interface StructureFeatureInterface<C extends FeatureConfiguration>
|
||||
{
|
||||
boolean plopAnywhere(ServerWorld world, BlockPos pos, ChunkGenerator generator, boolean wireOnly,Biome biome, C config);
|
||||
boolean plopAnywhere(ServerLevel world, BlockPos pos, ChunkGenerator generator, boolean wireOnly,Biome biome, C config);
|
||||
}
|
||||
@@ -2,9 +2,8 @@ package carpet.fakes;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.server.world.ChunkHolder;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.server.level.ChunkHolder;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
|
||||
public interface ThreadedAnvilChunkStorageInterface
|
||||
{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
||||
public interface WorldChunkInterface
|
||||
{
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package carpet.fakes;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Box;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Predicate;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
public interface WorldInterface
|
||||
{
|
||||
@@ -18,5 +18,5 @@ public interface WorldInterface
|
||||
|
||||
boolean setBlockStateWithBlockEntity(BlockPos blockPos, BlockState blockState, BlockEntity newBlockEntity, int int1);
|
||||
|
||||
List<Entity> getOtherEntitiesLimited(@Nullable Entity except, Box box, Predicate<? super Entity> predicate, int limit);
|
||||
List<Entity> getOtherEntitiesLimited(@Nullable Entity except, AABB box, Predicate<? super Entity> predicate, int limit);
|
||||
}
|
||||
Reference in new issue
Block a user