Jump to content

Tsuk1

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by Tsuk1

  1. that's a great idea, thanks! I'll try that.
  2. Is there a way to check if the player is on a shadow or dark place? The only option i could come up with is to check if there's a block above the player, but i want to know if there's better options.
  3. It worked!!! Thank you!
  4. Thanks! I'm gonna take a look.
  5. Oh, I'm sorry, i'll try to be more specific next times, So, the problem is not really blockbench, like, I make a model there and then export it, and I code the item but it doesn't get the texture and i don't know how to get it, now i'm trying to use the canEquip method to get the texture as an item instead of as an armor, but it still doesn't get the texture. Here is the github repo: https://github.com/P3terD/myths-mod Here is the item file: https://github.com/P3terD/myths-mod/blob/main/src/main/java/net/tsuk1/mythsmod/item/custom/YankeeCapItem.java Here are the item models files: https://github.com/P3terD/myths-mod/tree/main/src/main/resources/assets/mythsmod/models/item I don't know if the problem in on my "yankee_cap.json" model or where they are, but it still don't get the texture.
  6. Hello!!! How can i code wereable hats with my blockbenchs textures? I tried making it as a helmet but it didn't work
  7. Solved, I was just saving the wrong value on the nbt
  8. Hello! So, I'm having a problem where I always lose the data when I exit and rejoin a world, I think my problem is with the deserialization and serialization of the NBT, but i'm not sure and i don't know how to fix it. I think my error is somewhere here: import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.CapabilityManager; import net.minecraftforge.common.capabilities.CapabilityToken; import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.util.INBTSerializable; import net.minecraftforge.common.util.LazyOptional; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class PlayerGodParentProvider implements ICapabilityProvider, INBTSerializable<CompoundTag> { public static Capability<PlayerGodParent> PLAYER_GOD_PARENT = CapabilityManager.get(new CapabilityToken<PlayerGodParent>() { }); private PlayerGodParent godParent = null; private final LazyOptional<PlayerGodParent> optional = LazyOptional.of(this::createPlayerGodParent); private PlayerGodParent createPlayerGodParent() { if(this.godParent == null) { this.godParent = new PlayerGodParent(); } return this.godParent; } @Override public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) { if(cap == PLAYER_GOD_PARENT) { return optional.cast(); } return LazyOptional.empty(); } @Override public CompoundTag serializeNBT() { CompoundTag nbt = new CompoundTag(); createPlayerGodParent().saveNBTData(nbt); return nbt; } @Override public void deserializeNBT(CompoundTag nbt) { createPlayerGodParent().loadNBTData(nbt); } } The whole repo is here: https://github.com/P3terD/myths-mod/tree/main
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.