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

LuccaPossamai

Members
  • Content Count

    31
  • Joined

  • Last visited

Everything posted by LuccaPossamai

  1. These things you've said interferes in the problem?
  2. I'm from Brazil, and I'm used to code in portuguese. Like "items" in english is "itens" in portguese. Here it is the Essence class, and the EssenceItem class. I created 2 different classes to separete and simplify some things.
  3. Here it is the part of the code, the Item: and the entities' :
  4. How do I set the priority? "FML" it is something that I don't understand.
  5. I'm trying create an item that holds an entity(like an "SpawnEggItem"). But when I try to register the item with an created entity, this entity wasn't been registered yet. There's a priority system to these events? This is my code btw:
  6. Thanks It work. But for the item texture(not the armor model). I see that Dyable items need to be registered in the "ItemColors". There is an event to do it? -Forget it, just see the ColorHandlerEvent.
  7. I'm making an Dyable armor, but I don't know how the overylay textures work. I use the "getArmorTexture" in the other armors that I've make, and it worked, but in Dyable Armor it doesn't. Here's this method: @Nullable @Override public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlotType slot, String type) { if(stack.getItem() instanceof MagicArmor){ if(slot.getIndex() == 1){ return new ResourceLocation(ExampleMod.MOD_ID, "textures/models/armor/magic_armor_layer_2_overlay.png").toString(); } return new R
  8. To change the texture based on tick, which predicate I'll use? I tried exactly with the "pulling" and "pull" of the bow texture. But, it didn't work.
  9. I was creating an Item that dashes the player when release the button(the force of the dash is based on the time pressing the button). And, for this item, I want to make a texture with different sprites in every stage(more like the bow pulling texture). I think the predicates can be useful to aply different sprites, but is it the best way to do it? If someone knows I'll be grateful.
  10. It worked, thanks. When the player dies, the capability should reset? If yes, how do I do to no reset?
  11. Ok, with an example the things just get so many clear now. Thanks btw. But, I'm confused. How do I register this Capability. I mean, I tried but, with the serialization, there is no IStorage. I looked in your code, and do not find a field that you register the cap.
  12. Ok, I changed some things. But the inventory still resets. I'm calling the registration of the capability in the setup, maybe this is causing the reset. The attachEvent: And the Provider/Serializable:
  13. I use this tile entity for a block, and this block the player use to open the inventory(like an ender chest). I changed the capability to an ItemStackHandler. But every time I enter in the game the inventory resets. The class for ItemStackHandler cap: The Capability.IStorage: The instance of the capability: I'm using this to load the items, a add them to an inventory: And using this, to save the items of the container in the cap:
  14. The tile entity in this context just serves to open the container that allows the player to have acess to this inventory. I change for the ItemStackHandler and I works. But, when I enter the world the capability resets.
  15. I created a capability for player to write a custom inventory for each player. But I do not really understant how to get the data stored in the capability. Heres some classes: The IStorage The default capability: The CapabilitySerializable: The tile entity: And the container's class:
  16. I did this, but my texture did no rendered. @Mod.EventBusSubscriber public class LevelGUI { private static final ResourceLocation ICON_LOCATION = new ResourceLocation("mohard", "textures/gui/mod_icons.png"); @SubscribeEvent public static void cancelRender(RenderGameOverlayEvent.Pre event){ if(event.getType().equals(RenderGameOverlayEvent.ElementType.HEALTH)){ event.setCanceled(true); renderModHealth(Minecraft.getInstance().gui event.getMatrixStack(), event.getWindow().getWidth(), eve
  17. I was looking and coding with Attributes, and I see that, when you have a lot of Max_Health, your game starts to get a little bit visually poluted(like in the picture). After a while, these hearts starts to be really annoying. I was thinking in create a toggle switch to show and hide your health or even change the hearts display to be more confortable. I see the: RenderGameOverlayEvent but I really don't understand how to do it. In the case of changing the hearts visual, how do I "Override" the renderHearts method in the IngameGui class, if the method it's not a Overridable method?
  18. I've created some attributes, and I want to aply to all the entities in the game including the players. But I'm a bit confused with this. Someone know how to do it?
  19. Thanks, I'd realized where I messed up the things.
  20. Capability.IStorage: The class that extends the capability: The ICapabilitySerializable: And the container Inventory:
  21. I tried to use the player.addAdditionalSaveData(CompoundNBT nbt) but, things got more complicated.
  22. I've created a container that stores items for each player, it acts more like and EnderChest. And, to make this I use Capabilities, but when I was testing in a world, I see that the container share items with other worlds. For example, in the world "BananaBoys" I store 2 apples and 1 diamond axe, and when I enter in other world like "BananaGirls", in the container have 2 apples and 1 diamond axe. Someone know how to make the container unique for each world?
  23. With the AI entities, yes, but with the Stunned players?
×
×
  • Create New...

Important Information

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