Class BuilderToolsPlugin
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.builtin.buildertools.BuilderToolsPlugin
- All Implemented Interfaces:
MetricProvider,CommandOwner,SelectionProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic classstatic classstatic classstatic classprivate static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockColorIndexprivate final Map<UUID, BuilderToolsPlugin.BuilderState> private ScheduledFuture<?> private final Config<BuilderToolsPlugin.BuilderToolsConfig> static final Stringstatic final Stringstatic final Stringprivate static final FeedbackConsumerprivate intprivate static BuilderToolsPluginprivate static final longprivate final com.hypixel.fastutil.ints.Int2ObjectConcurrentHashMap<ConcurrentHashMap<String, UUID>> private final com.hypixel.fastutil.ints.Int2ObjectConcurrentHashMap<ConcurrentHashMap<UUID, UUID>> private static final MetricsRegistry<BuilderToolsPlugin> private ComponentType<EntityStore, PrefabAnchor> private PrefabEditSessionManagerprivate ResourceType<EntityStore, PrefabEditSession> private static final longprivate static final int[]private static final floatprotected static final floatprivate longprivate ComponentType<EntityStore, BuilderToolsUserData> Fields inherited from class com.hypixel.hytale.server.core.plugin.PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Throwable>
voidaddToQueue(Player player, PlayerRef playerRef, ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task) private voidcleanup()clearBuilderState(UUID uuid) <T extends Throwable>
voidcomputeSelectionCopy(Ref<EntityStore> ref, Player player, ThrowableConsumer<BlockSelection, T> task, ComponentAccessor<EntityStore> componentAccessor) static Holder<ChunkStore> createBlockComponent(WorldChunk chunk, int x, int y, int z, int newId, int oldId, Holder<ChunkStore> oldHolder, boolean copy) Deprecated.static voidforEachCopyableInSelection(World world, int minX, int minY, int minZ, int width, int height, int depth, Consumer<Ref<EntityStore>> action) static BuilderToolsPluginget()getBuilderState(Player player, PlayerRef playerRef) getNewPathIdOnPrefabPasted(UUID id, String name, int prefabId) private static intgetNonEmptyNeighbourBlock(ChunkAccessor accessor, int x, int y, int z) com.hypixel.fastutil.ints.Int2ObjectConcurrentHashMap<ConcurrentHashMap<UUID, UUID>> private static voidinternalForEachCopyableInSelection(World world, int minX, int minY, int minZ, int encompassingWidth, int encompassingHeight, int encompassingDepth, Consumer<Ref<EntityStore>> action) (package private) static voidinvalidateWorldMapForBounds(Vector3i min, Vector3i max, World world) static voidinvalidateWorldMapForSelection(BlockSelection selection, World world) voidonPasteEnd(int prefabId, ComponentAccessor<EntityStore> componentAccessor) static booleanonPasteStart(int prefabId, ComponentAccessor<EntityStore> componentAccessor) private voidprivate voidvoidonToolArgUpdate(PlayerRef playerRef, Player player, BuilderToolArgUpdate packet) private voidprivate voidreleaseBuilderState(UUID uuid) private voidretainBuilderState(Player player, PlayerRef playerRef) static voidsendFeedback(Message message, CommandSender feedback, NotificationStyle notificationStyle, ComponentAccessor<EntityStore> componentAccessor) static voidsendFeedback(String key, int total, int num, CommandSender feedback, ComponentAccessor<EntityStore> componentAccessor) static voidsendFeedback(String key, int total, CommandSender feedback, ComponentAccessor<EntityStore> componentAccessor) voidsetToolHistorySize(int size) protected voidsetup()protected voidshutdown()protected voidstart()Methods inherited from class com.hypixel.hytale.server.core.plugin.JavaPlugin
getClassLoader, getFile, getType, start0Methods inherited from class com.hypixel.hytale.server.core.plugin.PluginBase
getAssetRegistry, getBasePermission, getBlockStateRegistry, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad, setup0, shutdown0, withConfig, withConfig
-
Field Details
-
EDITOR_BLOCK
- See Also:
-
EDITOR_BLOCK_PREFAB_AIR
- See Also:
-
EDITOR_BLOCK_PREFAB_ANCHOR
- See Also:
-
SPHERE_SIZE
protected static final float SPHERE_SIZE- See Also:
-
FEEDBACK_CONSUMER
-
PLUGIN_METRICS_REGISTRY
-
RETAIN_BUILDER_STATE_TIMESTAMP
private static final long RETAIN_BUILDER_STATE_TIMESTAMP- See Also:
-
MIN_CLEANUP_INTERVAL_NANOS
private static final long MIN_CLEANUP_INTERVAL_NANOS -
builderStates
-
prefabEditSessionManager
-
blockColorIndex
-
instance
-
historyCount
private int historyCount -
toolExpireTimeNanos
private long toolExpireTimeNanos -
cleanupTask
-
userDataComponentType
-
prefabAnchorComponentType
-
pastedPrefabPathUUIDMap
private final com.hypixel.fastutil.ints.Int2ObjectConcurrentHashMap<ConcurrentHashMap<UUID,UUID>> pastedPrefabPathUUIDMap -
pastedPrefabPathNameToUUIDMap
private final com.hypixel.fastutil.ints.Int2ObjectConcurrentHashMap<ConcurrentHashMap<String,UUID>> pastedPrefabPathNameToUUIDMap -
SMOOTHING_KERNEL_TOTAL
private static final float SMOOTHING_KERNEL_TOTAL- See Also:
-
SMOOTHING_KERNEL
private static final int[] SMOOTHING_KERNEL -
config
-
prefabEditSessionResourceType
-
-
Constructor Details
-
BuilderToolsPlugin
-
-
Method Details
-
get
-
getBlockColorIndex
-
invalidateWorldMapForSelection
public static void invalidateWorldMapForSelection(@Nonnull BlockSelection selection, @Nonnull World world) -
invalidateWorldMapForBounds
-
getState
@Nonnull public static BuilderToolsPlugin.BuilderState getState(@Nonnull Player player, @Nonnull PlayerRef playerRef) -
addToQueue
public static <T extends Throwable> void addToQueue(@Nonnull Player player, @Nonnull PlayerRef playerRef, @Nonnull ThrowableTriConsumer<Ref<EntityStore>, BuilderToolsPlugin.BuilderState, ComponentAccessor<EntityStore>, T> task) -
setup
protected void setup()- Overrides:
setupin classPluginBase
-
registerBrushOperations
private void registerBrushOperations() -
getPrefabEditSessionResourceType
-
start
protected void start()- Overrides:
startin classPluginBase
-
shutdown
protected void shutdown()- Overrides:
shutdownin classPluginBase
-
cleanup
private void cleanup() -
setToolHistorySize
public void setToolHistorySize(int size) -
onPlayerConnect
-
onPlayerDisconnect
-
onToolArgUpdate
public void onToolArgUpdate(@Nonnull PlayerRef playerRef, @Nonnull Player player, @Nonnull BuilderToolArgUpdate packet) -
getBuilderState
@Nonnull public BuilderToolsPlugin.BuilderState getBuilderState(@Nonnull Player player, @Nonnull PlayerRef playerRef) -
clearBuilderState
-
retainBuilderState
-
releaseBuilderState
-
getUserDataComponentType
-
sendFeedback
public static void sendFeedback(@Nonnull Message message, @Nullable CommandSender feedback, @Nonnull NotificationStyle notificationStyle, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendFeedback
public static void sendFeedback(@Nonnull String key, int total, CommandSender feedback, ComponentAccessor<EntityStore> componentAccessor) -
sendFeedback
public static void sendFeedback(@Nonnull String key, int total, int num, CommandSender feedback, ComponentAccessor<EntityStore> componentAccessor) -
computeSelectionCopy
public <T extends Throwable> void computeSelectionCopy(@Nonnull Ref<EntityStore> ref, @Nonnull Player player, @Nonnull ThrowableConsumer<BlockSelection, T> task, @Nonnull ComponentAccessor<EntityStore> componentAccessor) - Specified by:
computeSelectionCopyin interfaceSelectionProvider
-
toMetricResults
- Specified by:
toMetricResultsin interfaceMetricProvider
-
getPrefabAnchorComponentType
-
getPrefabEditSessionManager
-
createBlockComponent
@Nullable @Deprecated public static Holder<ChunkStore> createBlockComponent(WorldChunk chunk, int x, int y, int z, int newId, int oldId, @Nullable Holder<ChunkStore> oldHolder, boolean copy) Deprecated. -
forEachCopyableInSelection
public static void forEachCopyableInSelection(@Nonnull World world, int minX, int minY, int minZ, int width, int height, int depth, @Nonnull Consumer<Ref<EntityStore>> action) -
internalForEachCopyableInSelection
private static void internalForEachCopyableInSelection(@Nonnull World world, int minX, int minY, int minZ, int encompassingWidth, int encompassingHeight, int encompassingDepth, @Nonnull Consumer<Ref<EntityStore>> action) -
getNonEmptyNeighbourBlock
-
getNewPathIdOnPrefabPasted
-
onPasteStart
public static boolean onPasteStart(int prefabId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
onPasteEnd
-
getPastedPrefabPathUUIDMap
public com.hypixel.fastutil.ints.Int2ObjectConcurrentHashMap<ConcurrentHashMap<UUID,UUID>> getPastedPrefabPathUUIDMap()
-