Jump to content

thebest108

Members
  • Posts

    503
  • Joined

  • Last visited

Everything posted by thebest108

  1. Who knows. Maybe with something like this? [embed=425,349]<iframe width="560" height="315" src="https://www.youtube.com/embed/hOn9rJdTnKg" frameborder="0" allowfullscreen></iframe>[/embed] Seriously though Lex would *probably strangle me if saw my source. RIP the Axis-Aligned in bounding boxes
  2. So my custom collision system works fine with the player whenever the player is in creative, but in survival the server will occasionally say that the player moved wrongly and force the player into its last position forever. You can see in the video theres times where I get stuck for no reason. [embed=425,349]<iframe width="560" height="315" src="https://www.youtube.com/embed/hOn9rJdTnKg" frameborder="0" allowfullscreen></iframe>[/embed] I know my questions usually never get a helpful answer, but I mean look at what I've got. I just want to speed up the development. Plz help?
  3. Alright so I'm having a problem where I need a world loaded, even if theres no entities in it. A lot of updates arent happening because of the getPersistentChunks() method in my WorldServer class returning that theres nothing that should be loaded. I'd love to manage this myself and return an ImmutableSetMultimap<ChunkCoordIntPair, Ticket>, but theres no public methods (that I can find) that will allow me to make my own ticket. How am I supposed to get a ticket for this, or how am I supposed to get the ForgeChunkManager.getPersistentChunksFor(World world) to return what I want it to?
  4. Why don't you store the length and width in a data watcher? Then every tick client side set the entity bounding box based on those values. Seems a lot easier to me.
  5. Well there's a lot of potential causes for entity rubber banding. There's a certain function in the entity class (Sorry can't remember the name) that when it's called it takes in a Boolean that every couple ticks will forcibly change the entity position to values sent by the server. The boat class overrides this and uses a terrible solution which basically averages the differences and changes the position over 5 ticks. If that function is the problem then you'll have to override or and replace it with your own smoothing algorithm. Another cause could be your ai is telling the fish to go to different locations on the client than what its determining on the server. The function I mentioned earlier will force an entities position if the difference in distance is too large. There's quite a few potential causes for rubber banding, mind posting some code?
  6. If I had an entity with a bounding box that covered multiple Chunks. Would that entity be unloaded if the chunk at its posX,Y,Z is unloaded, or would it only be unloaded if all the chunks within its bounding box were unloaded?
  7. Coming from the EffectRenderer class in net.minecraft.client.particle.EffectRenderer public void addEffect(EntityFX p_78873_1_) { if (p_78873_1_ == null) return; int i = p_78873_1_.getFXLayer(); int j = p_78873_1_.func_174838_j() != 1.0F ? 0 : 1; if (this.fxLayers[j].size() >= 4000) { this.fxLayers[j].remove(0); } this.fxLayers[j].add(p_78873_1_); } I would use asm (even though I dont know how to use it) to override this method. The thing thats causing it to limit is the( this.fxLayers[j].size() >= 4000 ). Hope this helps Edit:This effectively means once you have too many particles they don't even despawn anymore, the game just removes them.
  8. This isnt an entityliving though, its just an entity.
  9. What method gets called when an entity gets unloaded because there's nobody around it? I'd need something like this void unload(){ //Clear out extra data here }
  10. Every time Ive tried reflection it never works for some reason. Could you point me in the right direction?
  11. Block block = World.getBlockState(x,y,z).getBlock(); ItemStack itemstack = "Your pickaxe itemstack" Then its just itemstack.canDestroy(block)
  12. From what I understand all the fields are set to public in runtime anyway so it doesnt matter either way. I just cant get a server to launch because I need some fields public. I really doubt that access transformers were made with the intention that if you used a client/server only class the game would crash. I really dont want to spend hours specifying fields in reflection, is there a workaround?
  13. I cant launch the server because the access transformer changes some rendering classes. How do I specify a different one for both? public net.minecraft.entity.Entity * # All fields public net.minecraft.client.multiplayer.PlayerControllerMP * # All fields public net.minecraft.client.multiplayer.PlayerControllerMP *() # All methods public net.minecraft.client.particle.EntityFX *() # All methods public net.minecraft.client.particle.EntityDiggingFX *() # All methods public net.minecraft.client.renderer.EntityRenderer * # All fields public net.minecraft.client.renderer.EntityRenderer *() # All methods public net.minecraft.network.INetHandler *() # All methods public net.minecraft.network.play.INetHandlerPlayClient *() # All methods public net.minecraft.client.network.NetHandlerPlayClient * # All fields public net.minecraft.client.network.NetHandlerPlayClient *() # All methods public net.minecraft.server.gui.IUpdatePlayerListBox *() # All methods public net.minecraft.network.play.INetHandlerPlayServer *() # All methods public net.minecraft.network.NetHandlerPlayServer * # All fields public net.minecraft.network.NetHandlerPlayServer *() # All methods public net.minecraft.server.management.ItemInWorldManager * # All fields public net.minecraft.server.management.ItemInWorldManager *() # All methods public net.minecraft.client.Minecraft * # All fields public net.minecraft.client.Minecraft *() # All methods public net.minecraft.entity.Entity.MovingObjectPosition * # All fields public net.minecraft.entity.Entity.MovingObjectPosition *() # All methods public net.minecraft.client.renderer.RenderGlobal * # All fields public net.minecraft.client.renderer.RenderGlobal *() # All methods
  14. Also how would I get the position from the player's open container. All the container classes have their own private fields for blockPos and TileEntity. The only way I can think of around it would be to write a lot of instanceof checks. Is there a much better way?
  15. So Ive been able to allow the player to interact with multiple worlds so far with block breaking and placing, but for some reason I cant open inventories unless the inventory's position in its world is about the same as the players position in the players world. The only distance checks Ive found were the ones in the server net handlers for the processPlayerBlockPlacement() and the processPlayerDigging(). Ive overriden those and interaction works, but for some reason anything with a gui wont open because of some extra distance check. I've been looking all over and cant find one. Plz help?
  16. Just spawn 10k entities that dont do anything and the game will lag horrible
  17. Basically I'm reworking the way player interaction is processed by adding some things to the nethandlers. I've already replacing the client one easily with something like this @SubscribeEvent public void onClientTickEvent(ClientTickEvent event){ if(!(Minecraft.getMinecraft().playerController instanceof CustomPlayerController)){ System.out.println("Player Controller got changed?"); Minecraft mc = Minecraft.getMinecraft(); CustomNetHandlerClient customNet = null; if(mc.getNetHandler()!=null){ customNet = new CustomNetHandlerClient(mc, mc.getNetHandler().guiScreenServer, mc.getNetHandler().netManager, mc.getNetHandler().profile); } try{ WorldSettings.GameType currentGameType = Minecraft.getMinecraft().playerController.currentGameType; Minecraft.getMinecraft().playerController = new CustomPlayerController(Minecraft.getMinecraft(),customNet); Minecraft.getMinecraft().playerController.currentGameType=currentGameType; }catch(Exception e){ Minecraft.getMinecraft().playerController = new CustomPlayerController(Minecraft.getMinecraft(),customNet); } } } On server side however this seems a lot trickier. Where would the nethandlers be stored on the server and could they be replaced without replacing the entityplayer? Also with the player connection event on the serverside the nethandler in the event seems to be final, does that mean all the nethandlers are final?
  18. Thats how Ive learned m8
  19. Then how do I tell it to load them EDIT: Never mind, you have to add a vm argument to eclipse -Dfml.coreMods.load= pathToYourPluginClass thanks for nothing
  20. This problem is beyond weird. Ive been installing other coremods into my workspace and none of them load!
  21. I mean I would love to have more non-answers, but please it must be something stupid holding this back. I'm 100% positive I cant do this without editting some code. I just want to some method calls into things. Please what do I need to do!
  22. Gr8 help m8. I need to insert a call in the moveEntity Method, please whats wrong with this
  23. Please I cant do any further deving on my mod until I have a plugin
  24. http://lmgtfy.com/?q=https%3A%2F%2Fgithub.com%2FAtomicStryker%2Fatomicstrykers-minecraft-mods%2Ftree%2F1.8%2FDynamicLights Extra: Its a bit confusing but basicly it manually changes values in the lightmap and when it wants to remove them it just does a checkLight on the locations it changed
×
×
  • Create New...

Important Information

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