Jump to content

DinoPawz

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by DinoPawz

  1. I created my entityblock hanging sign texture using the HangingSignRender model details. But I don't know where to put it in Minecraft's and my mod's data directories. I have tried both minecraft.textures.entity.signs and minecraft.textures.entity.hanging_signs with no luck.
  2. On Windows 11 we can longer unzip jar files, ie. the mc client jar. The mc debugger is kind enough to tell us that we need some model files, but we are clueless as to what needs to go in them, and what the blockEntity hanging_sign png should look like.
  3. Forge was kind enough to give us 1/3 of the config code in the Java Example. I created the client spec similar to the common spec example and registered both in the mods main class. But where and how do we do the rest?
  4. getMyRidingOffset doesn't take a parameter. My mob can ride two living entities, one modded, one not. For the modded one I have to adjust it to work correctly. But when the mob rides the vanilla mob, mc applies the modded entity offset to the vanilla mob, resulting in the mob being submerged within the vanilla entity's body. I have had a look at overriding the positionRider function that uses getMyRidingOffset, but that doesn't provide the vehicle entity either.
  5. I tried my mob in 1.18.2 and got exactly the same result. Still cannot visually mount a player in 1.18.2 either. A mob mounting a player worked in 1.12.2.
  6. You have effectively enchanted the already enchanted book instead of adding the enchantment.
  7. The entity constructor wants something other than null passed in.
  8. In the Demo mod, go through all the files and make sure that all instances of Example Mod are replaced by the details of your mod. And make sure your mod details at the top of the build.gradle file matches your mod details at the bottom (in the jar section).
  9. You have registered the SynchedEntityData variable DATA_IS_CHARGINGG twice. And your mob should work fine and be more code efficient if you don't bother getting the attributes in the constructor.
  10. Oh, thanks I felt dumb after posting this I deleted but here it is. And yes, I found my BlockItem instance in my Item registration class.
  11. If mc doesn't like your code in an Overridden function, it decides not to run that code and shows you the issue with the "does not override or implement a method from its supertype" error. You will see that if you remove the Override annotation, then there will be no action icon in the margin cos mc is unwilling to run it. To fix it, you must recreate mc acceptable code.
  12. In your build.gradle file your versions are not identical. The version must match the Specification-Version
  13. That log has so many errors it's a wonder mc loaded at all. Not fit for multiplayer.
  14. This guy does great mc modding video tutorials:https://www.youtube.com/@ModdingByKaupenjoe
  15. I have created a mob that needs to ride an entity in order to kill it. It can successfully ride and kill a cow, a horse, and sheep, but when it comes to a player it fails. The mob cannot visually mount the player, and yet it kills the player. I have checked in the doHurt function that the target is indeed a passenger and that the target is the vehicle. The player passes the passenger/vehicle checks yet the mob fails to visually ride the player, nor does it appear to be aggressive toward the player, or even be within killing range. Why does Minecraft skip the mount the player animation? Is there a later version of Forge/MC that would do the animation?
  16. I have created a plant using a seed item using ItemNameBlockItem and the corresponding block using the BushBlock classes. However when setting the block as an entity's favorite block, I need to test it as an item, but when I use the block.asItem() I target the seed, not the plant. I cannot figure out a way to get a block from an ItemStack, cos casting to ItemLike and BlockItem don't work and Item doesn't have an Item.getItemFromBlock method (and perhaps if it did it would just return the seed item, not the plant block as an item). I tried using the block's resource location to identify the block but ItemStack doesn't return a resource location. I printed out the block name and mc just adds prepends item to the block name. So, is this the correct way to do it? if (stack.getDescriptionId().equalsIgnoreCase("itemblock_name")) {}
  17. Spawning works if you set all the weights to 1.
  18. I looked up how Forge does it for the forge entity list but the level.getEntities().getAll() command is protected in the Level Class and not available within the checkSpawnRules function.
  19. I have set up my entities to spawn using json files in data/modid/forge/biome_modifier directory like so. { "type": "forge:add_spawns", "biomes": [ "minecraft:swamp", "minecraft:beach", "minecraft:mangrove_swamp", "minecraft:ocean", "minecraft:river" ], "spawners": { "type": "modid:mob_name", "weight": 899999, "minCount": 1, "maxCount": 1 } } However, when I am not in one of the spawn biomes, there is an acceptable number of spawned entities 7-8 and only 357 entities in total. However, as soon as I go to one of the spawn biomes, hundreds of my mobs immediately spawn and the entity count jumps to 3500+. Now after just sitting in the biome for a while, thousands of each entity type have spawned and the total entity count is crazy at 15,833! How do I limit mob spawning, since the weighting doesn't seem to work?
  20. I tried removing super class but it made no difference to the rendering. I found it thank you, I didn't know what to put for the bone PartPose setting but I do now.
  21. I have created my entity models extending the HierarchicalModel. All the entities generate properly formed and textured in the world but however they spawn, they spawn in the ground and sink so that all I can briefly see is their shadow. So, if wanna see them, I have to spawn them in water and make sure they can swim, and then they float well below the surface and don't even drown. I originally had them using extending the QuadrupedModel and using Polar Bear Layer and then they would spawn on the ground as per normal.
  22. But all types of arrows are now just stored under Arrow which is an entity and not castable as items. The only hurt investigating you can do is: if (source.getDirectEntity() instanceof Arrow) { int col = ((Arrow) source.getDirectEntity()).getColor(); if(source.isProjectile())
  23. Thank you, I have managed to get the color arrows that have potion effects, but mc doesn't bother to give the Uncraftable Tipped Arrow a color anymore, and gives the same -1 color result as a plain arrow and identical names 'entity.minecraft.arrow'. So no way to distinguish from getting hit with the Uncraftable Tipped Arrow and a plain Arrow.
  24. Is it still possible to detect within a custom mob class if it has been hit by an Uncraftable Tipped Arrow , and if so, how? I am trying to convert code from 1.12.2 to 1.18.2 but the capability no longer seems to exist. @Override public boolean hurt(DamageSource source, float amount) { Entity entity = source.getDirectEntity(); if (entity instanceof LivingEntity) { this.setTarget((LivingEntity) entity); if (entity instanceof Player) { if (amount > 0) { if (source.isProjectile()) { if (!this.hasPal()) { if( source.getImmediateSource() instanceof EntityTippedArrow) { TippedArrowItem tippedArrow = (TippedArrowItem) source.get.getImmediateSource(); if (tippedArrow.getColor()==3694022) {
×
×
  • Create New...

Important Information

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