Everything posted by spiritfilled
-
[1.17.x] Replacing/extending functions from vanilla class
oh, oki. thanks anyways
-
[1.17.x] Replacing/extending functions from vanilla class
ohhhhh look interesting. ill read first. anyway thanks!
-
[1.17.x] Replacing/extending functions from vanilla class
hi, it's u again ๐ so i shouldn't change it... (regardless of compatibility with other mods) how about anything with similar result, any idea... im trying to add monsoon and season
-
[1.17.x] Replacing/extending functions from vanilla class
hi, it's u again ๐ so i shouldn't change it... (regardless of compatibility with other mods) how about anything with similar result, any idea... im trying to add monsoon and season
-
[1.17] Custom pathfinding for entity
you can also change the way probability of walking on certain blocks, public BbBird(EntityType<? extends PathfinderMob> p_35267_, Level p_35268_) { this.setPathfindingMalus(BlockPathTypes.DAMAGE_FIRE, -1.0F); ...}
-
[1.17] Custom pathfinding for entity
orrrrr. u can change Aistep (maybe change how it walks to preventing getting stuck, like how the spider get stuck for being chunky) public void aiStep() {... dont super .. do your walk/fly/swim}
-
[1.17] Custom pathfinding for entity
minecraft has good path finding... but if you want to make one create a Class extending PathNavigation public class FlappingNavigation extends FlyingPathNavigation { public FlappingNavigation(Mob p_01_, Level p_02_) { super(p_01_, p_02_); ... } } then on add on stats public void setStartStat() { this.navigation = new FlyingPathNavigation(this, this.level); ... } but i didnt change how it path find, i just adjusted how it detects Y, since it's flying (with gravity) vanilla path find has a count on when it's stuck, when it is stuck it stops navi... (if that helps) you could also change the ai by extending static class WanderFloater extends WaterAvoidingRandomStrollGoal { public WanderFloater(TyFlyer p_01_, double p_02_) { super(p_01_, p_02_); } @Nullable private Vec3 findPos() { ... } } u can change how it finds the next position... maybe make it shorter??? sorry if it's already 2 days passed
-
[1.17.x] Replacing/extending functions from vanilla class
Is there a way of tweaking some vanilla class: I want to, change this code from Level.class (World.class on 1.16.x i think) public abstract class Level extends net.minecraftforge.common.capabilities.CapabilityProvider<Level> implements LevelAccessor, AutoCloseable, net.minecraftforge.common.extensions.IForgeLevel { ... public boolean isRainingAt(BlockPos p_46759_) { if (!this.isRaining()) { return false; } else if (!this.canSeeSky(p_46759_)) { return false; } else if (this.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, p_46759_).getY() > p_46759_.getY()) { return false; } else { Biome biome = this.getBiome(p_46759_); return biome.getPrecipitation() == Biome.Precipitation.RAIN && biome.getTemperature(p_46759_) >= 0.15F; } } ... } what i want to do is, make the rain stop or start on specific area (or better change climate). Biome's climate settings(temperature, humidity) can be changed, but i think only once, on world generation, I think source: [1.17.1] net.minecraft.world.level; net.minecraft.world.level.biome; net.minecraftforge.event.world.BiomeLoadingEvent; im nowhere near what im trying to do... but if anyone has an idea how to achieve it, or anything similar, any help is appreciated :3 can the class be replaced with extention???
-
Making Entity Data Persistent through logs 1.17x
found it! thanks a bunch... (btw, how come ur always the one answering my questions?) do u work at minecraft?
-
[1.17.1] Trying to get blocks to get a block to be see through.
look at createTrivialBlock(a,b); on package net.minecraft.data.models.BlockModelGenerators; (i don't know how it works but i think it may give u a hint)
-
Making Entity Data Persistent through logs 1.17x
Whenever i logout and back-in in the game, the data resets to its define state (how can i save the entity data to be persistent) the code words, data is used flawlessly, but just doesn't save through game exit public class TyBoss extends Monster{ public static final EntityDataAccessor<Boolean> STILL_HOSTILE = SynchedEntityData.defineId(TyBoss.class, EntityDataSerializers.BOOLEAN); private static final EntityDataAccessor<Byte> SCOUNT_TAG = SynchedEntityData.defineId(TyBoss.class, EntityDataSerializers.BYTE); (...) protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(SCOUNT_TAG, (byte) 0); this.entityData.define(STILL_HOSTILE, true); } (...) public void startSeenByPlayer(ServerPlayer p_01_) { super.startSeenByPlayer(p_01_); if (this.entityData.get(STILL_HOSTILE)) { this.bossEvent.addPlayer(p_01_);} } public void stopSeenByPlayer(ServerPlayer p_01_) { super.stopSeenByPlayer(p_01_); this.bossEvent.removePlayer(p_01_); } (...) }
-
Registering entity renderer in 1.17.1
โบ๏ธ
-
storing and recalling custom Player's data
i think i figured it out... now i dunno how to delete a post
-
storing and recalling custom Player's data
hiii :3 i just want to know, how to store entity data at 1.16 to 1.17 ive been doing this before at 1.12: player.getEntityData().setByte("om_orientation", (byte) 0); i don't know how it is in 1.17 i saw something on Player.Class, it goes like this... this.getEntityData().set(DATA_PLAYER_ABSORPTION_ID, p_36396_); but DATA_PLAYER_ABSORPTION_ID, is EntityDataAccessor <T> (dunno what that is) private static final EntityDataAccessor<Float> DATA_PLAYER_ABSORPTION_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.FLOAT); im doing a thing where i store tick counts on each player, i dunno if there is a simpler way of doing it or whatsoever can anyone pls help. thanks :3
-
Rendering Mobs as Sleeping
btw ive found it. GlStateManager.rotate in Render<>
-
Rendering Mobs as Sleeping
Oh, sorry i didnt know about that... this was a project of mine way before so it's a bit outdated. I'll work on newer versions after this. thanks anyways
-
Rendering Mobs as Sleeping
im on 1.12.2 there is no startSleeping... Im still checking where dinnerbone function is and player sleep too...
-
1.16.5 Creating a custom OBJ entity model
DELETED sorry.. I never thought everyone is on higher versions...
-
Rendering Mobs as Sleeping
Is there a way to make mobs appear lying down, since dinnerbone tag can make them upside down, is there a way to reverse rendering Z and Y to make mobs appear lying on their belly or on their back. The concept is I want them to stun living entity to sleep (with a sleep render) someone has done it using a command block by transporting entities to bed, but i cant seem to replicate it in java (still don't know how) here is the link to the video https://www.youtube.com/watch?v=qkFtoF3uB6w thanks :3
-
how do i calculate limbswing?
hope i wasn't that late. And don't give up on your project
-
how do i calculate limbswing?
all I know is that "MathHelper.cos(limbSwing * 0.6662F) * 1.4F * limbSwingAmount;" is a series of number from -0.79 to +0.79 (+-45deg) if it is the opposite leg ad Pi. (example MathHelper.cos(limbSwing * 0.6662F + (float)Math.PI) ) * 1.4F * limbSwingAmount; if you are trying to make the swing less modify the 1.4F into something smaller, (example for a swing of 10 degrees use the float 0.31F.) If you are trying to make the resting point to a naturally rotated spot then add it (example for20 plusminus 10 use: "this.RightLeg.rotateAngleX = -0.3490659F + (MathHelper.cos(limbSwing * 0.6662F) * 0.31F * limbSwingAmount);"
-
Time bounded ai
So, it started like this... I was trying to make a mob, a low IQ one, but i feel dumber not to know how to program it?. It was as simple as this, I want to make make a mob that does different under time values, so i did this, "if(worldIn.getWorldtome() < 1200){ do actionday();" something like that, then my mob doent spawn... Then i stopped cause ...yeah... I really dont know how to. Please help... Any help is of great value to me
-
NOOB QUESTION
is there a way to print to chat something??? like console.log, System.out.print, or trace.writeline.... just something to see my variables. really need it. TY
-
Claiming Territory
thank you again, that would be all for now. cheerio
-
Claiming Territory
does mob have UUID?? if yes what is it called... I'm actually using this for my new mob (animal territory) Thanks for your response BTW
IPS spam blocked by CleanTalk.