-
Posts
157 -
Joined
-
Last visited
Posts posted by Dragonisser
-
-
4 minutes ago, diesieben07 said:
Note that the method posted by @Dragonisser unnecessary loops through all entities, not just players. It also sends the message to all of them. For vanilla entities this does nothing, but mods might implement it differently.
No it shouldnt. It should only list all EntityPlayer(MP)
List<T> net.minecraft.world.World.getEntitiesWithinAABB(Class<? extends T> classEntity, AxisAlignedBB bb) Gets all entities of the specified class type which intersect with the AABB. Type Parameters:<T> Parameters:classEntity bb
-
-
All code
-
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from PinkMod (fpm) Caused by: java.lang.NullPointerException at com.flipking78.pinkmod.init.ModItems.registerRender(ModItems.java:24) at com.flipking78.pinkmod.init.ModItems.registerRenders(ModItems.java:28) at com.flipking78.pinkmod.proxy.ClientProxy.init(ClientProxy.java:9) at com.flipking78.pinkmod.PinkMod.preInit(PinkMod.java:27)
1. Stop spaming. You arent the king here which gets served first.
2. There are errors, if you would take a look at it you would see them
3. Post the goddamn code. How the hell should we know why i might crash if you dont even provide the code that crashes
-
AxisAlignedBB boundingbox = new AxisAlignedBB(minX, minY, minZ, maxX, maxY, maxZ); List<Entity> entityList = worldIn.getEntitiesWithinAABB(playerIn.getClass(), boundingbox); for(int i = 0; i < entityList.size(); i++) { entity.get(i).sendMessage(new TextComponentString(player.getDisplayNameString() + " displays their MyNewItem")); }
Parameters for the BoudingBox are "minX, minY, minZ, maxX, maxY, maxZ". So if you want to get all players in a cube of 20x20x20 around you, you would need to do.
double minX = playerIn.posX - 10.0; double minY = playerIn.posY - 10.0; double minZ = playerIn.posZ - 10.0; double maxX = playerIn.posX + 10.0; double maxY = playerIn.posY + 10.0; double maxZ = playerIn.posZ + 10.0;
The one below is probably more logical.
- 1
-
I did it like this last time to open my backpack item via a keybind. It shouldnt be that much different from 1.7.10 to 1.12.2
-
4 minutes ago, TheMysticMinecart Myles said:
first link or second one
both obviously.
-
25 minutes ago, TheMysticMinecart Myles said:
this is how i created a creative tab for my 1.7.10 mod how do i make a second one, sorry i am kinda a noob i started modding a year or 2 ago then stopped and forgot almost everything i knew and that was very little
public static CreativeTabs tabAnimeDecorationsPlus = new CreativeTabs("tabAnimeDecorationsPlus"){
@Override
public Item getTabIconItem(){
return new ItemStack(itemDragonBallLogo1).getItem();
}I posted the full code you need to make 1000 new tabs if you want to.
-
41 minutes ago, Draco18s said:
I'm a derp >..<
Successfully trolled expert modder
- 1
-
25 minutes ago, diesieben07 said:
Did you reobfuscate your mod? Post logs.
Still wondering what people think about not posting their full code or error log >_>
-
-
Shouldnt the portal be placed in the dimension like it is in the overworld - hole facing north/south and then same when its made?
https://github.com/Dragonisser/CobaltMod-2/commit/4b3b64cb15c54fb5f6dfa5a784bc0286d2c7fbf8
-
6 minutes ago, Curly_dev said:
I tried the usual:
player.capabilities.setPlayerWalkSpeed(speed);
No method for setPlayerWalkSpeed, and it's correct it doesn't have because is a EntityPlayerMP.
There is any way to change speed while being on server side? The topic is kinda scarce.
I tried:PlayerCapabilities cap = ObfuscationReflectionHelper.getPrivateValue(EntityPlayer.class, player, "capabilities", "field_71075_bZ"); player.capabilities.setPlayerWalkSpeed(speed); ObfuscationReflectionHelper.setPrivateValue(PlayerCapabilities.class, cap, speed,"walkSpeed", "field_73357_f");
It works as intended but the private field name changes from version to version and i would like something more maintanable(someone with forge 1.10 and i had 1.12 and the field name was the only problem).
What are my choices?Take a look at that. im not sure if it still works in the higher versions tho.
- 1
-
11 minutes ago, dyon0 said:
I launched it in the folder where i extracted all the mdk contents.
Im using my own batch called "setup_gradlew.bat"
gradlew.bat setupDecompWorkspace --refresh-dependencies --debug & gradlew.bat eclipse
-
Where did you launch that command?
-
My custom portal works perfectly if i face south or north(same yaw and pitch after teleport), but not when i face east or west. Then im rotated 90° facing the portal frame.
Im using exactly the same code as the normal teleporter, setting the lastPortalPos, lastPortalVec, teleportDirection via Reflection(which does work).
https://github.com/Dragonisser/CobaltMod-2
-
3 hours ago, ttocskcaj said:
Looks ok. But why not just extend MapGenCaves and override the one method you need to?
because i already changed 3 methods and the other will be changed too. bigger caves to be exact.
i recommend you to change your WorldProvider like it did to get rid of the lag.
-
11 hours ago, ttocskcaj said:
Just been working on the cave generation. @jabelar it automatically picks the biome blocks to repace as well (topBlock and fillerBlock).
https://github.com/Dragonisser/CobaltMod-2/commit/41a591d2efa6646ccb352f7f1c1aedc6b6d5be94
-
3 hours ago, jabelar said:
You can see my example code here: https://github.com/jabelar/ExampleMod-1.12/tree/master/src/main/java/com/blogspot/jabelarminecraft/examplemod/worldgen
The way the WorldType works, is you MUST use the super constructor that just takes a string for the name. That constructor will add your custom world type to the available options in the new world creation menu. See https://github.com/jabelar/ExampleMod-1.12/blob/master/src/main/java/com/blogspot/jabelarminecraft/examplemod/worldgen/WorldTypeCloud.java. In that you'll see you need to override the key methods for providing the BiomeProvider and ChunkGenerator.
I give a list of the things that need to be hooked together in this tutorial: http://jabelarminecraft.blogspot.com/p/minecraft-modding-custom-dimension.html.
Well, i dont start my world via the new world option. I use a portal to it, thats why i overwrite chunkgenerator and biomeprovider.
Edit:
I can try and load it via the world type and see what happens.
Edit: Works fine, no lag at all, even with decoration
also no decorationand not what i want.Therefore it has nothing to do with the decoration or generation.
WorldProvider
Minimal Lag and decoration:
public BiomeProvider getBiomeProvider() { return new CMBiomeProvider(this.world); }
I FIXED IT!
Instead of overwriting getBiomeProvider, i simply set it in the init and the lag is completely gone, even on my sort of shitty laptop.
protected void init() { this.hasSkyLight = true; this.biomeProvider = new CMBiomeProvider(this.world); this.setAllowedSpawnTypes(false, false); }
https://github.com/Dragonisser/CobaltMod-2/commit/c4663a443573e289b4f5c46af8afeee04f22192f
-
Jfyi even the less lag isnt normal, there shouldnt be any at all.
I completely disabled everything that tries to put something below surface.
Caves are still in there tho, gotta check that.
Added a WorldType, but now the chunkgenerator and the rest doesnt work. How can i bind it to my world, i cant find any relations in your code.
https://github.com/Dragonisser/CobaltMod-2/commit/03fc2b919b0c61c13bd7a089c0db1bb2db7b20f1
-
If you dont mind ill post it here: https://github.com/Dragonisser/CobaltMod-2
I disabled the dimension light, sky, decoration, spreading of my block, particle effects and its still the exact same issue.
Changed the CMBiomeProvider to the simplier version of ttocskcaj which drastically increased the fps, but still not good enough.
And now in normal minecraft
-
20 minutes ago, ttocskcaj said:
Maybe the issue lies somewhere else. Blocks, Items or Entities?
From my understanding, your dimension, ChunkProvider, Biomes etc should only cause lag when chunks are being generated.Since i dont have any entities or decorations(test, not the actual state) generating, just the chunks with topblock and fillerblock, its kinda weird why it lags.
Neither is it cascading chunk loading.
Sadly i cant check the code right now.
I bet if TGG, diesieben, jabelar or draco would take a look at it they would probably find it quite fast, but that is not their job.
-
3 minutes ago, ttocskcaj said:
Try profiling the code and see what's running slow?
Or step through in debugger, maybe you're getting stuck in a loop somewhere?Theres this normal minecraft lag where everything runs fine but entities and world generation lags, "xxx ticks behind". But for me its a game lag, like running battlefield on a shitty laptop with 3 fps.
I wish i would knew where i should search to find the culprit for it.
-
8 minutes ago, ttocskcaj said:
https://github.com/ttocskcaj/ElementalCraft/tree/b4931beb400823e81610d2d3854271204be8de57
After getting the dimension working with 2 biomes, we made the decision to split out "Elemental Plane" into 4 dimensions anyway (one for each element). There's link to an older commit, but it was working with 2 biomes at that point.
Thanks, hopefully i can figure it out now, why it isnt working. Still remember the good old 1.7.10 times were you could put up a dimension and it just works.
[1.12.2] Sending /me command in radius?
in Modder Support
Posted · Edited by Dragonisser
Its the exact same method and it does exist, i even tested it myself.
Looks totally different.. not.
I might not be a master in java and modding minecraft, but im not retarded.