Skip to content

Commit

Permalink
0.6.15a
Browse files Browse the repository at this point in the history
Added /cpmclient command
Subcommands:
- profile <name>: open the social settings menu for player
- safety: opens the safety settings
- animate <animation> [value]: play animation
- set_model <model file>: change your model
- reset_model: remove your selected model
Added Safe Fall Distance Scaling (1.20.5+)
Added attack speed attribute scaling
Editor QoL:
- Added Export UV Map under Edit/Tools
- Editable display names for roots
- Improved part highlights
- Set Part Name Color
- Multi-select parts with animation editor
Updated Spanish and Chinese translations (#563, #559)
Translatable wiki pages
24w10a port

Fixed dragging and dropping .cpmmodels while inside the Models menu on the Minecraft window not working in some cases.
Fixed value layer default value showing negative (Closes #553)
Fixed model elements getting stuck inside the animation system after delete (Closes #536)
Fixed scaling staying stuck on model disable/switch (Closes #546)
Fixed first person hand rotations not wrapping around correctly (Closes #574)
Fixed initial part pose not copying over (Closes #575)
Fixed fill UV not working with per-face uv
Fixed parts tree scrolling to the bottom in some cases

Web:
Fixed Fill UV not working
  • Loading branch information
tom5454 committed Mar 8, 2024
1 parent 8de364e commit 082f1dc
Show file tree
Hide file tree
Showing 283 changed files with 11,940 additions and 8,187 deletions.
14,700 changes: 7,395 additions & 7,305 deletions Blockbench/cpm_plugin.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Blockbench/cpm_plugin.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CustomPlayerModels-1.10/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.14a
mod_version=0.6.15a
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public void processIMC(IMCEvent event) {
@EventHandler
public void serverStart(FMLServerStartingEvent evt) {
MinecraftObjectHolder.setServerObject(new MinecraftServerObject(evt.getServer()));
new Command(evt::registerServerCommand);
new Command(evt::registerServerCommand, false);
}

@EventHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent;

import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.client.event.GuiOpenEvent;
import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.client.event.GuiScreenEvent.DrawScreenEvent;
Expand All @@ -49,6 +50,7 @@
import com.tom.cpl.text.FormatText;
import com.tom.cpm.CommonProxy;
import com.tom.cpm.CustomPlayerModels;
import com.tom.cpm.common.Command;
import com.tom.cpm.common.PlayerAnimUpdater;
import com.tom.cpm.lefix.FixSSL;
import com.tom.cpm.shared.config.ConfigKeys;
Expand Down Expand Up @@ -99,6 +101,7 @@ public void init() {
netHandler.setGetNet(c -> ((EntityPlayerSP)c).connection);
netHandler.setDisplayText(f -> minecraft.ingameGUI.getChatGUI().printChatMessage(f.remap()));
netHandler.setGetPlayerAnimGetters(new PlayerAnimUpdater());
new Command(ClientCommandHandler.instance::registerCommand, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static ResourceLocation getBoundLoc() {
}

@Override
public void executeLater(Runnable r) {
public void executeOnGameThread(Runnable r) {
mc.addScheduledTask(r);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public List<IAttribute> toKey(ScalingOptions opt) {
switch (opt) {
case HEALTH: return Collections.singletonList(SharedMonsterAttributes.MAX_HEALTH);
case ATTACK_DMG: return Collections.singletonList(SharedMonsterAttributes.ATTACK_DAMAGE);
case ATTACK_SPEED: return Collections.singletonList(SharedMonsterAttributes.ATTACK_SPEED);
case DEFENSE: return Collections.singletonList(SharedMonsterAttributes.ARMOR);
case MOB_VISIBILITY: return Collections.singletonList(SharedMonsterAttributes.FOLLOW_RANGE);
case MOTION: return Collections.singletonList(SharedMonsterAttributes.MOVEMENT_SPEED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

public class Command extends StringCommandHandler<MinecraftServer, ICommandSender, CommandException> {

public Command(Consumer<CommandBase> register) {
super(i -> register.accept(new Cmd(i)));
public Command(Consumer<CommandBase> register, boolean client) {
super(i -> register.accept(new Cmd(i)), client);
}

private static class Cmd extends CommandBase {
Expand Down Expand Up @@ -51,7 +51,7 @@ public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSend

@Override
public int getRequiredPermissionLevel() {
return 2;
return impl.isOp() ? 2 : 0;
}
}

Expand Down
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.12/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.14a
mod_version=0.6.15a
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void processIMC(IMCEvent event) {
@EventHandler
public void serverStart(FMLServerStartingEvent evt) {
MinecraftObjectHolder.setServerObject(new MinecraftServerObject(evt.getServer()));
new Command(evt::registerServerCommand);
new Command(evt::registerServerCommand, false);
}

@EventHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import net.minecraft.util.text.ChatType;
import net.minecraft.util.text.ITextComponent;

import net.minecraftforge.client.ClientCommandHandler;
import net.minecraftforge.client.event.GuiOpenEvent;
import net.minecraftforge.client.event.GuiScreenEvent;
import net.minecraftforge.client.event.GuiScreenEvent.DrawScreenEvent;
Expand All @@ -50,6 +51,7 @@
import com.tom.cpl.text.FormatText;
import com.tom.cpm.CommonProxy;
import com.tom.cpm.CustomPlayerModels;
import com.tom.cpm.common.Command;
import com.tom.cpm.common.PlayerAnimUpdater;
import com.tom.cpm.lefix.FixSSL;
import com.tom.cpm.shared.config.ConfigKeys;
Expand Down Expand Up @@ -100,6 +102,7 @@ public void init() {
netHandler.setGetNet(c -> ((EntityPlayerSP)c).connection);
netHandler.setDisplayText(f -> minecraft.ingameGUI.addChatMessage(ChatType.SYSTEM, f.remap()));
netHandler.setGetPlayerAnimGetters(new PlayerAnimUpdater());
new Command(ClientCommandHandler.instance::registerCommand, true);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static ResourceLocation getBoundLoc() {
}

@Override
public void executeLater(Runnable r) {
public void executeOnGameThread(Runnable r) {
mc.addScheduledTask(r);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public List<IAttribute> toKey(ScalingOptions opt) {
switch (opt) {
case HEALTH: return Collections.singletonList(SharedMonsterAttributes.MAX_HEALTH);
case ATTACK_DMG: return Collections.singletonList(SharedMonsterAttributes.ATTACK_DAMAGE);
case ATTACK_SPEED: return Collections.singletonList(SharedMonsterAttributes.ATTACK_SPEED);
case DEFENSE: return Collections.singletonList(SharedMonsterAttributes.ARMOR);
case FLIGHT_SPEED: return Collections.singletonList(SharedMonsterAttributes.FLYING_SPEED);
case MOB_VISIBILITY: return Collections.singletonList(SharedMonsterAttributes.FOLLOW_RANGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

public class Command extends StringCommandHandler<MinecraftServer, ICommandSender, CommandException> {

public Command(Consumer<CommandBase> register) {
super(i -> register.accept(new Cmd(i)));
public Command(Consumer<CommandBase> register, boolean client) {
super(i -> register.accept(new Cmd(i)), client);
}

private static class Cmd extends CommandBase {
Expand Down Expand Up @@ -51,7 +51,7 @@ public List<String> getTabCompletions(MinecraftServer server, ICommandSender sen

@Override
public int getRequiredPermissionLevel() {
return 2;
return impl.isOp() ? 2 : 0;
}
}

Expand Down
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.14/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.14a
mod_version=0.6.15a
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void onTrackingStart(PlayerEvent.StartTracking evt) {
}

public static void registerCommands(CommandDispatcher<CommandSource> d) {
new Command(d);
new Command(d, false);
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,15 @@ public DynamicTexture getDynTex() {
}

@Override
public void executeLater(Runnable r) {
public void executeOnGameThread(Runnable r) {
mc.execute(r);
}

@Override
public void executeNextFrame(Runnable r) {
mc.tell(r);
}

@Override
public ModelDefinitionLoader<GameProfile> getDefinitionLoader() {
return loader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public List<IAttribute> toKey(ScalingOptions opt) {
case HEALTH: return Collections.singletonList(SharedMonsterAttributes.MAX_HEALTH);
case ATTACK_DMG: return Collections.singletonList(SharedMonsterAttributes.ATTACK_DAMAGE);
case ATTACK_KNOCKBACK: return Collections.singletonList(SharedMonsterAttributes.ATTACK_KNOCKBACK);
case ATTACK_SPEED: return Collections.singletonList(SharedMonsterAttributes.ATTACK_SPEED);
case DEFENSE: return Collections.singletonList(SharedMonsterAttributes.ARMOR);
case FLIGHT_SPEED: return Collections.singletonList(SharedMonsterAttributes.FLYING_SPEED);
case MOB_VISIBILITY: return Collections.singletonList(SharedMonsterAttributes.FOLLOW_RANGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

public class Command extends BrigadierCommandHandler<CommandSource> {

public Command(CommandDispatcher<CommandSource> dispatcher) {
super(dispatcher);
public Command(CommandDispatcher<CommandSource> dispatcher, boolean client) {
super(dispatcher, client);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.15/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.14a
mod_version=0.6.15a
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void onTrackingStart(PlayerEvent.StartTracking evt) {
}

public static void registerCommands(CommandDispatcher<CommandSource> d) {
new Command(d);
new Command(d, false);
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,15 @@ public DynamicTexture getDynTex() {
}

@Override
public void executeLater(Runnable r) {
public void executeOnGameThread(Runnable r) {
mc.execute(r);
}

@Override
public void executeNextFrame(Runnable r) {
mc.tell(r);
}

@Override
public ModelDefinitionLoader<GameProfile> getDefinitionLoader() {
return loader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public List<IAttribute> toKey(ScalingOptions opt) {
case HEALTH: return Collections.singletonList(SharedMonsterAttributes.MAX_HEALTH);
case ATTACK_DMG: return Collections.singletonList(SharedMonsterAttributes.ATTACK_DAMAGE);
case ATTACK_KNOCKBACK: return Collections.singletonList(SharedMonsterAttributes.ATTACK_KNOCKBACK);
case ATTACK_SPEED: return Collections.singletonList(SharedMonsterAttributes.ATTACK_SPEED);
case DEFENSE: return Collections.singletonList(SharedMonsterAttributes.ARMOR);
case FLIGHT_SPEED: return Collections.singletonList(SharedMonsterAttributes.FLYING_SPEED);
case MOB_VISIBILITY: return Collections.singletonList(SharedMonsterAttributes.FOLLOW_RANGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

public class Command extends BrigadierCommandHandler<CommandSource> {

public Command(CommandDispatcher<CommandSource> dispatcher) {
super(dispatcher);
public Command(CommandDispatcher<CommandSource> dispatcher, boolean client) {
super(dispatcher, client);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.16/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.14c
mod_version=0.6.15a
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void onTrackingStart(PlayerEvent.StartTracking evt) {
@SubscribeEvent
public void registerCommands(RegisterCommandsEvent evt) {
CommandDispatcher<CommandSource> d = evt.getDispatcher();
new Command(d);
new Command(d, false);
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,15 @@ public DynamicTexture getDynTex() {
}

@Override
public void executeLater(Runnable r) {
public void executeOnGameThread(Runnable r) {
mc.execute(r);
}

@Override
public void executeNextFrame(Runnable r) {
mc.tell(r);
}

@Override
public ModelDefinitionLoader<GameProfile> getDefinitionLoader() {
return loader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public List<Attribute> toKey(ScalingOptions opt) {
case HEALTH: return Collections.singletonList(Attributes.MAX_HEALTH);
case ATTACK_DMG: return Collections.singletonList(Attributes.ATTACK_DAMAGE);
case ATTACK_KNOCKBACK: return Collections.singletonList(Attributes.ATTACK_KNOCKBACK);
case ATTACK_SPEED: return Collections.singletonList(Attributes.ATTACK_SPEED);
case DEFENSE: return Collections.singletonList(Attributes.ARMOR);
case FLIGHT_SPEED: return Collections.singletonList(Attributes.FLYING_SPEED);
case MOB_VISIBILITY: return Collections.singletonList(Attributes.FOLLOW_RANGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

public class Command extends BrigadierCommandHandler<CommandSource> {

public Command(CommandDispatcher<CommandSource> dispatcher) {
super(dispatcher);
public Command(CommandDispatcher<CommandSource> dispatcher, boolean client) {
super(dispatcher, client);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.17/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.14b
mod_version=0.6.15a
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void onTrackingStart(PlayerEvent.StartTracking evt) {
@SubscribeEvent
public void registerCommands(RegisterCommandsEvent evt) {
CommandDispatcher<CommandSourceStack> d = evt.getDispatcher();
new Command(d);
new Command(d, false);
}

@SubscribeEvent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,15 @@ public DynamicTexture getDynTex() {
}

@Override
public void executeLater(Runnable r) {
public void executeOnGameThread(Runnable r) {
mc.execute(r);
}

@Override
public void executeNextFrame(Runnable r) {
mc.tell(r);
}

@Override
public ModelDefinitionLoader<GameProfile> getDefinitionLoader() {
return loader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public List<Attribute> toKey(ScalingOptions opt) {
case HEALTH: return Collections.singletonList(Attributes.MAX_HEALTH);
case ATTACK_DMG: return Collections.singletonList(Attributes.ATTACK_DAMAGE);
case ATTACK_KNOCKBACK: return Collections.singletonList(Attributes.ATTACK_KNOCKBACK);
case ATTACK_SPEED: return Collections.singletonList(Attributes.ATTACK_SPEED);
case DEFENSE: return Collections.singletonList(Attributes.ARMOR);
case FLIGHT_SPEED: return Collections.singletonList(Attributes.FLYING_SPEED);
case MOB_VISIBILITY: return Collections.singletonList(Attributes.FOLLOW_RANGE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

public class Command extends BrigadierCommandHandler<CommandSourceStack> {

public Command(CommandDispatcher<CommandSourceStack> dispatcher) {
super(dispatcher);
public Command(CommandDispatcher<CommandSourceStack> dispatcher, boolean client) {
super(dispatcher, client);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.18/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.14c
mod_version=0.6.15a
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import net.minecraftforge.client.ConfigGuiHandler;
import net.minecraftforge.client.event.ClientPlayerNetworkEvent;
import net.minecraftforge.client.event.RegisterClientCommandsEvent;
import net.minecraftforge.client.event.RegisterShadersEvent;
import net.minecraftforge.client.event.RenderPlayerEvent;
import net.minecraftforge.client.event.ScreenEvent;
Expand All @@ -28,6 +29,7 @@

import com.mojang.blaze3d.vertex.VertexFormat;

import com.tom.cpm.common.Command;
import com.tom.cpm.shared.config.ConfigKeys;
import com.tom.cpm.shared.config.ModConfig;
import com.tom.cpm.shared.config.Player;
Expand Down Expand Up @@ -143,4 +145,9 @@ public Button(int x, int y, Runnable r) {
public void onLogout(ClientPlayerNetworkEvent.LoggedOutEvent evt) {
mc.onLogOut();
}

@SubscribeEvent
public void registerClientCommands(RegisterClientCommandsEvent event) {
new Command(event.getDispatcher(), true);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void onTrackingStart(PlayerEvent.StartTracking evt) {
@SubscribeEvent
public void registerCommands(RegisterCommandsEvent evt) {
CommandDispatcher<CommandSourceStack> d = evt.getDispatcher();
new Command(d);
new Command(d, false);
}

@SubscribeEvent
Expand Down
Loading

0 comments on commit 082f1dc

Please sign in to comment.