This commit is contained in:
Boblet 2025-08-26 15:49:27 +02:00
parent 6555d6316a
commit 03d195fd91
22 changed files with 63 additions and 1 deletions

View File

@ -10,4 +10,5 @@
* Fixed conveyor grabber dropping items off at an offset when placing them on a conveyor belt due to a client desync
* Fixed occasional crash caused by using the settings tool on the autoloader
* Fixed QMAW not correctly working with other languages
* Fixed QMAW loading breaking entirely due to file encoding
* Fixed QMAW loading breaking entirely due to file encoding
* Fixed PWR fuel rod textures being 18x18 instead of 16x16

View File

@ -0,0 +1,51 @@
package com.hbm.commands;
import com.hbm.items.ICustomizable;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.ChatStyle;
import net.minecraft.util.EnumChatFormatting;
public class CommandCustomize extends CommandBase {
@Override
public String getCommandName() {
return "ntmcustomize";
}
@Override
public String getCommandUsage(ICommandSender sender) {
return "/ntmcustomize";
}
@Override
public int getRequiredPermissionLevel() {
return 0;
}
@Override
public boolean canCommandSenderUseCommand(ICommandSender sender) {
return true;
}
@Override
public void processCommand(ICommandSender sender, String[] args) {
if(!(sender instanceof EntityPlayer)) {
sender.addChatMessage(new ChatComponentText("Customization is only available to players!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
return;
}
EntityPlayer player = (EntityPlayer) sender;
if(player.getHeldItem() == null || !(player.getHeldItem().getItem() instanceof ICustomizable)) {
sender.addChatMessage(new ChatComponentText("You have to hold a customizable item to use this command!").setChatStyle(new ChatStyle().setColor(EnumChatFormatting.RED)));
return;
}
ICustomizable item = (ICustomizable) player.getHeldItem().getItem();
item.customize(player, player.getHeldItem(), args);
}
}

View File

@ -0,0 +1,9 @@
package com.hbm.items;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
public interface ICustomizable {
public void customize(EntityPlayer player, ItemStack stack, String... args);
}

View File

@ -665,6 +665,7 @@ public class MainRegistry {
event.registerServerCommand(new CommandPacketInfo());
event.registerServerCommand(new CommandReloadServer());
event.registerServerCommand(new CommandLocate());
event.registerServerCommand(new CommandCustomize());
ArcFurnaceRecipes.registerFurnaceSmeltables(); // because we have to wait for other mods to take their merry ass time to register recipes
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 B

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 428 B

After

Width:  |  Height:  |  Size: 428 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

After

Width:  |  Height:  |  Size: 404 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 421 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 434 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 433 B

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 419 B

After

Width:  |  Height:  |  Size: 422 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 431 B

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 429 B

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 410 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 414 B

After

Width:  |  Height:  |  Size: 414 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 422 B

After

Width:  |  Height:  |  Size: 420 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 373 B

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 398 B