24w06a
This commit is contained in:
1 parent
0a64a66d64
commit
3b6ada52f8
5 files changed
+15
-8
No files matched your search
+1
-1
@@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
|
||||
|
||||
# Fabric Properties
|
||||
# check https://fabricmc.net/develop/
|
||||
minecraft_version=24w05a
|
||||
minecraft_version=24w06a
|
||||
loader_version=0.15.6
|
||||
jsr305_version=3.0.2
|
||||
fabric_version=0.91.1+1.20.3
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.core.Direction;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Shadow;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
@@ -29,22 +30,26 @@ public abstract class HopperBlockEntity_counterMixin extends RandomizableContain
|
||||
super(blockEntityType, blockPos, blockState);
|
||||
}
|
||||
|
||||
@Shadow public abstract int getContainerSize();
|
||||
//@Shadow public abstract int getContainerSize();
|
||||
|
||||
@Shadow public abstract void setItem(int slot, ItemStack stack);
|
||||
//@Shadow public abstract void setItem(int slot, ItemStack stack);
|
||||
|
||||
@Shadow private Direction facing;
|
||||
|
||||
/**
|
||||
* A method to remove items from hoppers pointing into wool and count them via {@link HopperCounter#add} method
|
||||
*/
|
||||
@Inject(method = "ejectItems", at = @At("HEAD"), cancellable = true)
|
||||
private static void onInsert(Level world, BlockPos blockPos, BlockState blockState, Container inventory, CallbackInfoReturnable<Boolean> cir)
|
||||
private static void onInsert(Level world, BlockPos blockPos, HopperBlockEntity hopperBlockEntity, CallbackInfoReturnable<Boolean> cir)
|
||||
{
|
||||
if (CarpetSettings.hopperCounters) {
|
||||
Direction hopperFacing = world.getBlockState(blockPos).getValue(HopperBlock.FACING);
|
||||
DyeColor woolColor = WoolTool.getWoolColorAtPosition(
|
||||
world,
|
||||
blockPos.relative(blockState.getValue(HopperBlock.FACING)));
|
||||
blockPos.relative(hopperFacing));
|
||||
if (woolColor != null)
|
||||
{
|
||||
Container inventory = HopperBlockEntity.getContainerAt(world, blockPos);
|
||||
for (int i = 0; i < inventory.getContainerSize(); ++i)
|
||||
{
|
||||
if (!inventory.getItem(i).isEmpty())
|
||||
|
||||
@@ -84,7 +84,7 @@ public abstract class PrimedTntMixin extends Entity implements TntEntityInterfac
|
||||
|
||||
@Inject(method = "tick", at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/world/entity/item/PrimedTnt;setDeltaMovement(Lnet/minecraft/world/phys/Vec3;)V",
|
||||
ordinal = 2))
|
||||
ordinal = 1))
|
||||
private void tryMergeTnt(CallbackInfo ci)
|
||||
{
|
||||
// Merge code for combining tnt into a single entity if they happen to exist in the same spot, same fuse, no motion CARPET-XCOM
|
||||
|
||||
@@ -1201,7 +1201,7 @@ public class Auxiliary
|
||||
throw new IOException();
|
||||
}
|
||||
List<Pack> list = Lists.newArrayList(packManager.getSelectedPacks());
|
||||
resourcePackProfile.getDefaultPosition().insert(list, resourcePackProfile, p -> p, false);
|
||||
resourcePackProfile.getDefaultPosition().insert(list, resourcePackProfile, Pack::selectionConfig, false);
|
||||
|
||||
|
||||
server.reloadResources(list.stream().map(Pack::getId).collect(Collectors.toList())).
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.world.level.chunk.ChunkGenerator;
|
||||
import net.minecraft.world.level.chunk.ChunkStatus;
|
||||
import net.minecraft.world.level.chunk.LevelChunk;
|
||||
import net.minecraft.world.level.chunk.storage.RegionFile;
|
||||
import net.minecraft.world.level.chunk.storage.RegionStorageInfo;
|
||||
import net.minecraft.world.level.dimension.DimensionType;
|
||||
import net.minecraft.world.level.dimension.LevelStem;
|
||||
import net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator;
|
||||
@@ -77,7 +78,8 @@ public class WorldTools
|
||||
}
|
||||
try
|
||||
{
|
||||
RegionFile region = new RegionFile(regionPath, regionsFolder, true);
|
||||
RegionStorageInfo levelStorageInfo = new RegionStorageInfo(Vanilla.MinecraftServer_storageSource(world.getServer()).getLevelId(), world.dimension(), "chunk");
|
||||
RegionFile region = new RegionFile(levelStorageInfo, regionPath, regionsFolder, true);
|
||||
if (regionCache != null)
|
||||
{
|
||||
regionCache.put(currentRegionName, region);
|
||||
|
||||
Reference in new issue
Block a user