Everything posted by DinoPawz
-
Forge 1.20.1 Custom entities not spawning
I cannot get my custom entities to spawn naturally in the world. They spawn successfully from a spawn egg. I have tried a video and did what they said, but still doesn't work. I put this in the entity's class: public static boolean canSpawn(EntityType<CarnAchillobator> entityType, ServerLevelAccessor levelAccessor, MobSpawnType mobSpawnType, BlockPos pos, RandomSource randomSource) { return Monster.checkMonsterSpawnRules(entityType, levelAccessor, mobSpawnType, pos, randomSource); } I this in the main class: @SubscribeEvent public static void registerSpawnPlacementsEvent(@NotNull SpawnPlacementRegisterEvent event) { event.register(ModEntities.ACHILLOBATOR.get(), SpawnPlacements.Type.ON_GROUND, Heightmap.Types.WORLD_SURFACE, CarnAchillobator::canSpawn, SpawnPlacementRegisterEvent.Operation.AND); In the modid/biome_modifier directory, spawn_achillobator.json file: { "type": "forge:add_spawns", "biomes": [ "minecraft:jungle", "minecraft:sparse_jungle", "minecraft:windswept_forest", "minecraft:dark_forest", "minecraft:old_growth_birch_forest" ], "spawners": { "type": "wilddinos:achillobator", "weight": 100, "minCount": 1, "maxCount": 1 } }
-
Forge 1.20.1 Hanging Sign
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.
-
Forge 1.20.1 Hanging Sign
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.
-
Forge 1.20.1 Config
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?
-
Forge 1.19.3 getMyRidingOffset not customizable to the vehicle type
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.
-
Forge 1.19.3 Mob cannot visually ride a Player
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.
-
How to give player enchanted book
You have effectively enchanted the already enchanted book instead of adding the enchantment.
-
Spawning entities with forge 1.18.2
The entity constructor wants something other than null passed in.
-
How do I fix java.lang.NoSuchMethodException
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).
-
[1.19.2] Strange Duplicate id value error for spawning custom Entity
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.
-
Forge 1.19.3 How to get a block from an itemstack and compare it to an item
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.
-
method does not override or implement a method from a supertype @Override
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.
-
[1.19.4] warden sonic boom shooting sword, issue with particles
Villagers spawn various particles
-
[Forge 1.19.2] bin\main has mods that are not found...
In your build.gradle file your versions are not identical. The version must match the Specification-Version
-
Minecraft crashes on multiplayer server launch
That log has so many errors it's a wonder mc loaded at all. Not fit for multiplayer.
-
[1.19.2] Where to find utter forge documentation ?
This guy does great mc modding video tutorials:https://www.youtube.com/@ModdingByKaupenjoe
-
Forge 1.19.3 Mob cannot visually ride a Player
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?
-
Forge 1.19.3 How to get a block from an itemstack and compare it to an item
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")) {}
-
Forge 1.19.3 How to limit mob spawning
Spawning works if you set all the weights to 1.
-
Forge 1.19.3 How to limit mob spawning
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.
-
Forge 1.19.3 How to limit mob spawning
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?
-
Forge 1.19.3 LayerDefinition createBodyLayer() logic
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.
-
Forge 1.19.3 LayerDefinition createBodyLayer() logic
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.
-
Forge 1.18.2 How to detect if mob hit by an Uncraftable Tipped Arrow
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())
-
Forge 1.18.2 How to detect if mob hit by an Uncraftable Tipped Arrow
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.
IPS spam blocked by CleanTalk.