Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Custom armor modeling help


skip999
 Share

Recommended Posts

Hello,

I have been trying to implement a custom armor model for a set of armor I'm making. The model is rendering correctly, however the armor pieces are not binding to the player. I am not sure why as from what I can tell from the limited resources on it, I am doing it correctly. I have linked to the rendering method as well as the rendering class. Any help would be appreciated!

 

 

Rendering Method: https://github.com/skiprocks999/Electrodynamics-Fork/blob/c68f5c93949c3fe0549ce4eecbcdbe55fe0e5305/src/main/java/electrodynamics/common/item/gear/armor/types/composite/CompositeArmorItem.java#L89

Rendering Class: https://github.com/skiprocks999/Electrodynamics-Fork/blob/1.16.5/src/main/java/electrodynamics/common/item/gear/armor/types/composite/CompositeArmorModel.java

Link to comment
Share on other sites

In other words the various parts do not move with the player. Instead of behaving like the vanilla armor for example, it instead behaves like this:

image.thumb.png.d65fb6bbaaf77e735389714ac53133b8.png

image.thumb.png.01c65bd493e3dd9923b62a6a9ef1eee1.png

I was under the impression that adding the various armor parts as children to the various biped parts would do this, but this does not seem to be the case. I linked the whole render class in my first post, but I have also included a screenshot of the code:

image.png.f5b2629d50b60e1336134549112ac169.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • I'm not sure how the change in platform is causing the error, but your best bet would be to create a fresh environment on your Mac and then copy all the class files over
    • Nevermind, I was able to wrap my mind around https://forge.gemwire.uk/wiki/Capabilities#Accessing_a_Capability , and currently have it working!
    • So I'm nearly finished with a version of my mod and, although I haven't done mapping changes in awhile, I'm confident that I have the correct method name so that an instance of reflection runs properly. However, the new method name isn't recognized during load in the real environment (I'm aware it needs to be changed back to run in dev). I cross-referenced both the output.srg as well as a Discord bot and they tell me that: func_221052_a    in     PointOfInterestType.class       should be       registerBlockStates Attached is the relevant class and log file. Any help is appreciated. Loading Output Log Villager Util class:  
    • Hey, I have an issue where I can't run the Minecraft client on a fresh project. The steps I took to set it up are as follows: - Downloaded the Forge 1.12.2 MDK (version 14.23.5.2855) - Extracted the .zip file to a folder - With a command prompt console within that directory, I ran "gradlew genEclipseRuns" then once that successfully completed, "gradlew eclipse". - Opened that root folder as a Gradle project in Eclipse - Under Gradle Tasks I ran "runClient" then received the following error specifically for ":runClient":   org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk-11.0.11\bin\java.exe'' finished with non-zero exit value 1 at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:395) at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:37) at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:79) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:46) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39) at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:786) at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:753) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:131) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:120) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:99) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77) at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101) at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44) at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91) at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43) at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292) at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174) at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90) at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31) at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46) at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:273) at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:258) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191) at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55) at java.base/java.lang.Thread.run(Thread.java:834) I'd appreciate any help, and please don't think I'm lazy by asking this, I've honestly been looking for a solution for the past ~6 hours haha. Thanks!
    • Hello! I'm trying to create a capability that reads a player's CompoundTag, and extracts some custom mod data from it to assemble an object, along with being given one of those mod objects and writing it to a Player's nbt. I've hopefully created the capability correctly, but I'm not sure how to go about having a `Player` read/write this data during a world save, and how I can go about retrieving the data from a given `Player` object on world join (I know I'd need to subscribe to the event, but I have no idea what I'd do from there). Additionally, this code results in "Invalid player data" whenever I join a world, and I don't know what's in here causes that (EDIT: Figured out this was due to my own bad serialization code. Does this mean that the NBT is automatically loaded on world join and saved on world leave?). My full repository can be found here: https://github.com/hammy3502/elementalism , and the relevant code snippets are below:   Object with Custom Mod Data (PlayerProgressionData.java): public class PlayerProgressionData implements INBTSerializable<CompoundTag> { public static final String outerTag = "elementalism_data"; public ProgressionInfo.ElementType type; public ProgressionInfo.ElementType type2; public List<ProgressionInfo> powersUnlocked; public PlayerProgressionData() { this.type = ProgressionInfo.ElementType.NONE; this.type2 = ProgressionInfo.ElementType.NONE; this.powersUnlocked = new ArrayList<>(); } @Override public CompoundTag serializeNBT() { CompoundTag toRet = new CompoundTag(); CompoundTag data = new CompoundTag(); StringBuilder powersList = new StringBuilder(); for (int i = 0; i < powersUnlocked.size(); i++) { powersList.append(powersUnlocked.get(i).id); if (i != powersUnlocked.size() - 1) { powersList.append(","); } } data.putString("unlockedPowers", powersList.toString()); data.putString("element1", this.type.id); data.putString("element2", this.type2.id); toRet.put(outerTag, data); return toRet; } @Override public void deserializeNBT(CompoundTag nbt) { if (!nbt.contains(outerTag)) return; this.powersUnlocked.clear(); CompoundTag data = nbt.getCompound(outerTag); this.type = ProgressionInfo.ElementType.getElementById(data.getString("element1")); this.type2 = ProgressionInfo.ElementType.getElementById(data.getString("element2")); String[] powerIds = data.getString("unlockedPowers").split(","); for (String id : powerIds) { ProgressionInfo info = Objects.requireNonNull(ProgressionInfoInit.ALL_PROGRESSION_INFOS.get(id)); this.powersUnlocked.add(info); } } } Capability Registration (Elementalism.java): public void registerCapabilities(RegisterCapabilitiesEvent event) { event.register(PlayerProgressionData.class); }   Capability Attaching (CommonSubscriber.java): @SubscribeEvent public void attachCapabilities(AttachCapabilitiesEvent<Entity> event) { if (!(event.getObject() instanceof Player)) return; PlayerProgressionData progressionData = new PlayerProgressionData(); LazyOptional<PlayerProgressionData> optionalProgressionData = LazyOptional.of(() -> progressionData); ICapabilityProvider provider = new ICapabilitySerializable<CompoundTag>() { @Override public CompoundTag serializeNBT() { return progressionData.serializeNBT(); } @Override public void deserializeNBT(CompoundTag nbt) { progressionData.deserializeNBT(nbt); } @Nonnull @Override public <T> LazyOptional<T> getCapability(@Nonnull Capability<T> cap, @Nullable Direction side) { if (cap == DATA_STORAGE_CAPABILITY) { return optionalProgressionData.cast(); } return LazyOptional.empty(); } }; event.addCapability(new ResourceLocation(Elementalism.MOD_ID, "data_storage"), provider); event.addListener(optionalProgressionData::invalidate); }   Thank you so much for any help!
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.