mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-16 10:34:52 +00:00
throttle no explicit subchannel warning
This commit is contained in:
5 files changed
+131
-2
No files matched your search
@@ -2706,12 +2706,18 @@ public class StructureUtility {
|
||||
}
|
||||
|
||||
private void warnNoExplicitSubChannel(EntityPlayer currentPlayer) {
|
||||
currentPlayer.addChatComponentMessage(
|
||||
new ChatComponentTranslation("structurelib.autoplace.warning.no_explicit_channel", channel));
|
||||
// throttle this warning a bit.
|
||||
// I'm sure we can finish a check/autoplace round within 100 milliseconds.
|
||||
StructureLibAPI.addThrottledChat(
|
||||
new ChatThrottleKey.NoExplicitChannel(channel),
|
||||
currentPlayer,
|
||||
new ChatComponentTranslation("structurelib.autoplace.warning.no_explicit_channel", channel),
|
||||
(short) 100);
|
||||
}
|
||||
|
||||
public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
|
||||
// I hope a CREATIVE player know what he is doing...
|
||||
// no warning for yah
|
||||
return backing.placeBlock(t, world, x, y, z, ChannelDataAccessor.withChannel(trigger, channel));
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user