• Recently Browsing

    No registered users viewing this page.

  • Posts

    • Hi! I'm building a simple sword where it should count to 5 once every hit and once it hits five starts a cooldown! that logic is still not implemented because I'm having problems saving data inside the ItemStack of the sword in the form of a capability! here's my code, All it does is give me this error Execution failed for task ':runClient', but if I remove the initCapability function inside DickSword.java it doesn't give any error! https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/DickMod.java https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/ForgeEventSubscriber.java https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/objects/items/DickSword.java https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/capabilities/CoolDownCapability.java https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/capabilities/interfaces/ICoolDown.java https://github.com/MisterProgrammer/DickMod/blob/master/src/main/java/com/example/DickMod/capabilities/instances/CoolDown.java
    • ModBlocks::NOODLE_ORE is always null. You've never give it a value.
    • In the minecraft-tester, the fin of this entity looks opaque. How do i make it transparent there?
    • Now i use two models ant e texture, thad holds stuff for both models to simulate his inflating skill. This worked well. Then i thaught about resizing his boundingbox to fit the two different sizes. Now he disappears, if i run into him to make him inflate. I created theese boundingboxes: protected static final AxisAlignedBB BBUBBLES_AABB = new AxisAlignedBB(6.0D, 0.0D, 6.0D, 12.0D, 4.0D, 12.0D); protected static final AxisAlignedBB BBUBBLES_INFLATED_AABB = new AxisAlignedBB(-2.0D, 0.0D, -2.0D, 18.0D, 20.0D, 18.0D);   and use them in theese methods: @Override public void livingTick() { if (timeUntilDeflating > 0) { timeUntilDeflating--; if (timeUntilDeflating == 0) { isInflated = false; setBoundingBox(BBUBBLES_AABB); } } else { super.livingTick(); } } @Override public void onCollideWithPlayer(PlayerEntity entityIn) { if (timeUntilDeflating == 0) { timeUntilDeflating = 80; isInflated = true; setBoundingBox(BBUBBLES_INFLATED_AABB); } } in ormal state he is a 4x4x4 pixels (1/4 block-edhelength) cube and inflated 20.2.x2.pixels (a bit bigger than a block) Is something wrong with my boundingboxes?
    • Hello, I've made a simple custom ItemEntity that can't catch on fire. Here's the code for it: package zorochase.yanm.item; import net.minecraft.entity.EntityType; import net.minecraft.entity.item.ItemEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.world.World; public class FireproofItemEntity extends ItemEntity { public FireproofItemEntity(World worldIn, double x, double y, double z, ItemStack stack) { super(worldIn, x, y, z, stack); } public FireproofItemEntity(EntityType<?> entityType, World world) { super((EntityType<? extends ItemEntity>)entityType, world); } @Override public boolean attackEntityFrom(DamageSource p_70097_1_, float p_70097_2_) { if (!p_70097_1_.isFireDamage()) { return super.attackEntityFrom(p_70097_1_, p_70097_2_); } return false; } }   Here's how it was registered (taken from my main mod class): @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD) public static class RegistryEvents { @SubscribeEvent public static void onEntityRegistry(final RegistryEvent.Register<EntityType<?>> entityRegistryEvent) { entityRegistryEvent.getRegistry().register( EntityType.Builder .create(FireproofItemEntity::new, EntityClassification.MISC) .build(YetAnotherNetheriteMod.MODID + ":fireproof_item_entity") .setRegistryName(YetAnotherNetheriteMod.MODID, "fireproof_item_entity") ); } }   I also have a FireproofItem class that I use for all items I want to be fireproof when dropped, here's its code: package zorochase.yanm.item; import net.minecraft.entity.Entity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import zorochase.yanm.YetAnotherNetheriteMod; import javax.annotation.Nullable; public class FireproofItem extends Item { public FireproofItem(String registryName) { super(new Item.Properties().group(YetAnotherNetheriteMod.MOD_TAB)); setRegistryName(YetAnotherNetheriteMod.MODID, registryName); } @Nullable @Override public Entity createEntity(World world, Entity location, ItemStack itemstack) { FireproofItemEntity custom = new FireproofItemEntity(world, location.posX, location.posY, location.posZ, itemstack); custom.setMotion(location.getMotion()); custom.setDefaultPickupDelay(); return custom; } @Override public boolean hasCustomEntity(ItemStack stack) { return true; } }   All of this works just fine, so long as I don't leave a FireproofItem on the ground before quitting the game/to the main menu. If I do, and I try to load the world again, it freezes on 100%. I have no idea what could be causing this. Somebody else on these forums had the same issue a few months ago, but it seems they were also unable to figure it out. That or if they did they never replied with their fix. Any help would really be appreciated, as this is a feature I'd really rather not leave out.  
  • Topics

  • Who's Online (See full list)