#bee movie
1 messages · Page 1 of 1 (latest)
do you plan on releasing this plugin to the public?
aiStep?
that's the method you sent me
first you should probably have this
@Override
public final CraftMob getBukkitEntity() {
if (this.bukkitEntity == null) {
this.bukkitEntity = new CraftMob(this.level.getCraftServer(), this) {};
}
return this.bukkitEntity;
}```
inside my custom instantiation class?
inside your entity class
and change CraftMob to whatever you like
the reason for this is so that you can access the bukkit API through the entity
so now you can call MyEntity#getBukkitEntity() to access all normal api
that was gonna be my next questions
cause before I was using getBukkitEntity.
"beegotohivegoal" 😮 so many ideas
yea, you need to make sure you have that method so you get the correct subclass
if only i was skilled
note i used CraftMob, which i needed an anonymous class for
you shouldnt make an anonymous class for most entities
can I just use Bee..?
@Override
public final CraftBee getBukkitEntity() {
if (this.bukkitEntity == null) {
this.bukkitEntity = new CraftBee(this.level.getCraftServer(), this) {};
}
return this.bukkitEntity;
}
alright cool
looks good to me
so in theory..
instead of using the nms method to set the bees name..
just set it through the bukkit entity..?
the API takes care of name changes, deletions, additions, etc
new CraftBee(this.level.getCraftServer(), this) {};
remove the annonymous class
"getCropsGrownSincePollination()" holy crap
theres a lot to this
createNavigation woah
what ide do you use?
idea
ok
the best one
i always find it helpful to ctrl click on stuff
yea i do
ok good
im just looking through yellingflipflops rn
this.n(true);
this.c(20.0f);
this.b_(-32768);
trying to see what these did
oh haha
its hard to find the right value obfuscated
yea and most of those values are static final, meaning compilers will insert the value and not the variable
these are static final variables
meaning they can never change
so when you do something like
System.out.println(FLAG_ROLL + FLAG_HAS_STUNG)
once you compile it, the compiler will effectively do System.out.println(2 + 4)
and thats how it appears when you decompile the code
weirddd..
take these for example
my ide is telling me these are never used
but... really they are
here
this stuff gets complex
when mojang people work on the game, they would see the variables there
0-100 in a millisecond
but we're using a decompiled version of the game
so we lose comments and variables sometimes
gotcha..
any tips on finding what the "n" property is?
this.n(true);
i had that before
trying to find what it was before
so i can find the new one
this has been very enlightening even if i dont quite fully understand yet
but thanks boss
when i first was transitioning from spigot to mojang
i would use both the remapped and original dependencies
so that way i could easily ctrl click to see which class the method was located in
and then find the method's new name
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<classifier>remapped-mojang</classifier>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>1.19-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
so just have both?
yea like that
gigabrain?
its not recognizing stuff like ".n" lol
or ".b"
the obfuscated stuff
oh well
well it's probably pulling from the remapped version
idk of a better way to do it
but sometimes i would just do like new EntityBee()
and then do like bee.n(true)
and then ctrl click that n to see which class it brought me to
aye sooo
CustomBee customBee = new CustomBee(customHive.getHiveLocation(), ChatColor.YELLOW + "" + ChatColor.BOLD + "Bee");
customBee.absMoveTo(customHive.getHiveLocation().getX(), customHive.getHiveLocation().getY(), customHive.getHiveLocation().getZ());
I have this, but still have to spawnfresh or whatever it was
do that here also?
Level#addFreshEntity
uhhh
I gotta figure out how to get level again lol
we ended up not needing it till now
CustomBee customBee = new CustomBee(customHive.getHiveLocation(), ChatColor.YELLOW + "" + ChatColor.BOLD + "Bee");
Level worldLevel = ((Level) customHive.getHiveLocation().getWorld()).getMinecraftWorld();
worldLevel.addFreshEntity(customBee);
getHandle on CraftWorld