update to hytale 0.5.1

This commit is contained in:
2026-05-26 20:46:24 +02:00
parent e56fc7c54b
commit b81224c90f
5 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -20,8 +20,8 @@
<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<hytale.version>2026.03.26-89796e57b</hytale.version>
<revision>1.4.2</revision>
<hytale.version>0.5.1</hytale.version>
<revision>1.5.0</revision>
</properties>
<build>
@@ -3,7 +3,6 @@ package me.youhavetrouble.quickerstacker;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.event.EventPriority;
import com.hypixel.hytale.math.vector.Vector3i;
import com.hypixel.hytale.protocol.InteractionType;
import com.hypixel.hytale.server.core.asset.type.blocktype.config.BlockType;
import com.hypixel.hytale.server.core.entity.InteractionContext;
@@ -24,6 +23,7 @@ import me.youhavetrouble.quickerstacker.interaction.QuickStackToChestInteraction
import me.youhavetrouble.quickerstacker.interaction.QuickStackToNearbyChestsInteraction;
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
import org.joml.Vector3i;
import java.lang.reflect.Field;
import java.util.HashMap;
@@ -94,7 +94,7 @@ public class QuickerStacker extends JavaPlugin {
Player player = ref.getStore().getComponent(ref, Player.getComponentType());
if (player == null) return false;
PlayerRef playerRef = ref.getStore().getComponent(ref, PlayerRef.getComponentType());
InteractionManager interactionManager = new InteractionManager(player, playerRef, new InteractionSimulationHandler());
InteractionManager interactionManager = new InteractionManager(playerRef, new InteractionSimulationHandler());
BlockType blockType = world.getBlockType(x, y, z);
if (blockType == null) return false;
var event = new UseBlockEvent.Pre(InteractionType.Use, InteractionContext.forProxyEntity(interactionManager, ref, ref, ref.getStore()), new Vector3i(x, y, z), blockType);
@@ -4,7 +4,6 @@ import com.hypixel.hytale.codec.builder.BuilderCodec;
import com.hypixel.hytale.component.CommandBuffer;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.math.util.ChunkUtil;
import com.hypixel.hytale.math.vector.Vector3i;
import com.hypixel.hytale.protocol.BlockPosition;
import com.hypixel.hytale.protocol.InteractionType;
import com.hypixel.hytale.protocol.packets.interface_.NotificationStyle;
@@ -29,6 +28,7 @@ import com.hypixel.hytale.server.core.util.NotificationUtil;
import me.youhavetrouble.quickerstacker.QuickerStacker;
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import org.joml.Vector3i;
public class QuickStackToChestInteraction extends SimpleBlockInteraction {
@@ -36,6 +36,11 @@ public class QuickStackToChestInteraction extends SimpleBlockInteraction {
.builder(QuickStackToChestInteraction.class, QuickStackToChestInteraction::new)
.build();
@Override
protected void simulateInteractWithBlock(@NonNullDecl InteractionType interactionType, @NonNullDecl InteractionContext interactionContext, @NullableDecl ItemStack itemStack, @NonNullDecl World world, @NonNullDecl Vector3i vector3i) {
}
@Override
protected void interactWithBlock(@NonNullDecl World world, @NonNullDecl CommandBuffer<EntityStore> commandBuffer, @NonNullDecl InteractionType interactionType, @NonNullDecl InteractionContext interactionContext, @NullableDecl ItemStack itemStack, @NonNullDecl Vector3i vector3i, @NonNullDecl CooldownHandler cooldownHandler) {
Ref<EntityStore> ref = interactionContext.getEntity();
@@ -68,9 +73,4 @@ public class QuickStackToChestInteraction extends SimpleBlockInteraction {
if (itemsMoved <= 0) return;
NotificationUtil.sendNotification(playerRef.getPacketHandler(), "Quick stacked "+ itemsMoved +" items", NotificationStyle.Success);
}
@Override
protected void simulateInteractWithBlock(@NonNullDecl InteractionType interactionType, @NonNullDecl InteractionContext interactionContext, @NullableDecl ItemStack itemStack, @NonNullDecl World world, @NonNullDecl Vector3i vector3i) {
}
}
@@ -5,8 +5,6 @@ import com.hypixel.hytale.component.CommandBuffer;
import com.hypixel.hytale.component.Ref;
import com.hypixel.hytale.component.Store;
import com.hypixel.hytale.math.util.ChunkUtil;
import com.hypixel.hytale.math.vector.Vector3d;
import com.hypixel.hytale.math.vector.Vector3i;
import com.hypixel.hytale.protocol.BlockPosition;
import com.hypixel.hytale.protocol.InteractionType;
import com.hypixel.hytale.protocol.packets.interface_.NotificationStyle;
@@ -32,6 +30,8 @@ import com.hypixel.hytale.server.core.util.NotificationUtil;
import me.youhavetrouble.quickerstacker.QuickerStacker;
import org.checkerframework.checker.nullness.compatqual.NonNullDecl;
import org.checkerframework.checker.nullness.compatqual.NullableDecl;
import org.joml.Vector3d;
import org.joml.Vector3i;
import java.util.ArrayList;
import java.util.Collection;
@@ -76,7 +76,6 @@ public class QuickStackToNearbyChestsInteraction extends SimpleBlockInteraction
/**
* Search for nearby item containers within the given range
* @param world World to search in
* @param ref
* @param store entity store
* @param range Range to search in
* @return Collection of found item containers
@@ -92,13 +91,13 @@ public class QuickStackToNearbyChestsInteraction extends SimpleBlockInteraction
if (!QuickerStacker.canInteractWithBlock(
ref,
world,
(int) (position.getX() + x),
(int) (position.getY() + y),
(int) (position.getZ() + z))
(int) (position.x + x),
(int) (position.y + y),
(int) (position.z + z))
) continue;
WorldChunk chunk = world.getChunk(ChunkUtil.indexChunkFromBlock(position.getX() + x, position.getZ() + z));
WorldChunk chunk = world.getChunk(ChunkUtil.indexChunkFromBlock(position.x + x, position.z + z));
if (chunk == null) continue;
Ref<ChunkStore> blockRef = chunk.getBlockComponentEntity((int) position.getX() + x, (int) position.getY() + y, (int) position.getZ() + z);
Ref<ChunkStore> blockRef = chunk.getBlockComponentEntity((int) position.x + x, (int) position.y + y, (int) position.z + z);
if (blockRef == null) continue;
ItemContainerBlock containerBlock = blockRef.getStore().getComponent(blockRef, ItemContainerBlock.getComponentType());
if (containerBlock == null) continue;
+2 -1
View File
@@ -10,7 +10,8 @@
"Url": "https://yht.one"
}
],
"ServerVersion": "${hytale.version}",
"Website": "https://www.curseforge.com/hytale/mods/quickerstacker",
"ServerVersion": "=${hytale.version}",
"Dependencies": {},
"OptionalDependencies": {},
"DisabledByDefault": false,