Jump to content

Recommended Posts

Posted (edited)

Edit Solved Issues 1 and 2:
CMD Code:
https://gist.github.com/jredfox/6108a45efc52e6e214d8161a0ed693a3

 

Goal teleport player to x dimension specified including other players.

 

Issues With CMD:
after teleportation a couple times @p no longer works
after teleporting from the end to nether then dying the ender dragon bar doesn't go away.

 

Steps to reproduce Issue 1:

/tpdim @p ~ ~ ~ -1
/tpdim @p ~ ~ ~ 1
/tpdim @p ~ ~ ~ -1
/tpdim @p ~ ~ ~ 1 > errors here cannot find @p
/tp @p ~ ~ ~+1 > errors here cannot find @p vanilla test

Steps to reproduce Issue 2:
go to end dimension

go to nether dimension observe ender dragon bar

/kill and observe both fog and the ender dragon bar
 

Code:

https://gist.github.com/jredfox/9b81f4f26ebb81a9398618e330a7abae

Edited by jredfox
Posted (edited)

I guess I was being specific enough I need help fixing those issues and have no clue how to undo the boss bar and no clue as to why @p cannot find me

Edited by jredfox
Posted (edited)

I think I figured out the dragon/wither it's setup hard coded and stupid at least via server side. The entity contains the boss info server necessary to send a packet to the client to add/remove boss bar.but, the thing is you need that instance to begin with. I don't see why the server is handling client only code. It should be only packets and then handled via client side and clients then have an array of bars. I will test my hypothesis by caching all boss mobs then on world change remove boss bars and then clear the cache.

I still need help with not being able to find @p bug? please help. Why can't the vanilla command not be able to find the nearest player?

Edit: the objects for the dragon/wither boss data doesn't get updated and no longer exist after traveling to another dimension so I am thinking of a tick handler client only where if the data doesn't update in so many ticks to remove the bar. How could I do this?

Edited by jredfox
Posted (edited)
  On 5/2/2018 at 7:52 AM, diesieben07 said:

Once again you insist on doing things completely ass-backwards.

Vanilla manages cross-dimension teleports just fine: Via portals. No hacks or tick handlers or whatever the fuck needed.

You need to do the same thing and it will work.

Expand  

I didn't do anything backwards and no it doesn't work. Take a look at mist craft which did the same thing the ender dragon bug still occurs when doing as I said above just with their command. So how do I fix this?

Why can't the command find @p is what I need to know

And if you took a look at my code I call a vanilla handler for changing dimensions so....

Edited by jredfox
Posted (edited)

I got the dragon manager to update as the player leaves the world. It appears this bug is only 1.9+ I never heard of it occurring in 1.7 especially since it use to be client only and we had mods to transfer to other dimensions lots of them some only calling vanilla methods. It appears this issue doesn't exist for withers and it also appears that dragon bars do not appear and dragons do not work unless they are in their specified dimension unlike < 1.9 versions

Now I need to know why the @p cannot find nearest player. Something isn't syncing when the player goes from the end dimension to the nether dimension. I need to know what hashmap isn't populated

Edited by jredfox
Posted
    /**
     * Must be only called if player is at end dim this is because vanilla is hard coded and no longer displays bars outside of end dim
     */
    public void removeDragonBars(EntityPlayerMP p,World end) 
    {
    	try
    	{
    		DragonFightManager fightManager = ((WorldProviderEnd)end.provider).getDragonFightManager();
    		if(fightManager != null)
    		{
    			FieldAcess.method_dragonManager.invoke(fightManager);
    		}
    	}
    	catch(Throwable t)
    	{
    		t.printStackTrace();
    	}
	}

 

Posted (edited)
  On 5/2/2018 at 7:52 AM, diesieben07 said:

Once again you insist on doing things completely ass-backwards.

Vanilla manages cross-dimension teleports just fine: Via portals. No hacks or tick handlers or whatever the fuck needed.

You need to do the same thing and it will work.

Expand  

Not to spam or anything but, this is weird when teleportation from my command from end to nether it doesn't add it to any of the word's new hash maps like loaded entities and loaded players I would even guess the chunk hash maps. 

[02:38:20] [Server thread/INFO] [STDOUT]: [com.EvilNotch.lib.minecraft.content.CMDDim:execute:94]: Ent List:[]
[02:38:20] [Server thread/INFO] [STDOUT]: [com.EvilNotch.lib.minecraft.content.CMDDim:execute:95]: EntHasPlayer:false

I call the vanilla method transfer player to dimension what else should I be calling?
https://gist.github.com/jredfox/9b81f4f26ebb81a9398618e330a7abae

I fire forge's respawn event since the respawn packet is there on vanilla player list travel player to dimension. Is this wrong should this not be considered as a respawn since the player is being transferred?

I will take a look at the entity method transfer to dimension but, the player list should be all I have to call for players.

Edited by jredfox
Posted (edited)
  On 5/3/2018 at 7:41 AM, diesieben07 said:

So far no you didn't. But your approach when something doesn't work is completely wrong.

You refuse to take a step back and figure out why what you are doing doesn't work and instead insist on tacking on quick fixes and hacks to make your initial solution work no matter what.

 

Things like this is what I mean. You do not need to care about any hash maps internal to Minecraft. Do not hack around internals.

 

Things I observed about your code (can't test it because you have not provided a working repository):

  • Why the f*** are you firing FML's respawn event? You are not respawning anything. And if you did, you would not have to fire the event manually.
  • You are setting the location first, then teleporting to the target dimension. This is broken.
  • Traveling to a dimension happens via Entity::travelToDimension, this is what portals use for example.
Expand  

Entity travelToDimension seems to be non existent but, I did eventually find changeDimension which I don't see called anywhere in playerlist guess it's bugged going to give this a try or vanilla always expects that to fire first which means it's called elsewhere either way going to give it a try soon.

Edit: that method I found above doesn't do what I need it to do it doesn't even add them to the hashmaps.

Setting the location without packets it's a set of varibles. If I transfered the player to the dimension then set the location it lags alot so I set the location first therefore only loading the chunks your xyz is suppose to be at. And if I detect it's still not re positioned then I do it again this time with networks being involved

Edited by jredfox
Posted (edited)
  On 5/3/2018 at 7:59 AM, diesieben07 said:

Yeah, I meant changeDimension, sorry.

Why would playerlist call it? The only thing in Minecraft that teleports across dimensions are portals. And they use changeDimension. Why would you expect PlayerList to use this? What for? Why do you think it's bugged? You just blurt out random statements without anything to back them up. This is not helpful.

 

WHAT?

 

WHAT! WHAT WHAT WHWAHTAHHH

I give up.

Expand  

Look at my method call:
 

p.getServer().getPlayerList().transferPlayerToDimension(p,traveldim, new EntityTeleporter(p.getServer().getWorld(traveldim)));



That is what I call to change dimensions and it does work but, the world hashmaps and possibly other data isn't synced right? What other thing should I be calling?

That method is what perfect spawn calls and what vanilla calls is my guess somewhere. 

Edited by jredfox
Posted
  On 5/3/2018 at 8:05 AM, diesieben07 said:

What the fuck are "world hashmaps"?

Expand  

sorry arraylists very tired right now.

loadedEntities, playerEntities that's the first two things I checked and were blank after calling my tp command from end to nether

Posted (edited)
  On 5/3/2018 at 8:12 AM, diesieben07 said:

Why are you checking them? Why do you care? As far as I know it would take a few ticks for the player to fully transfer over.

Expand  

I checked them after the dimension change. I care because the @p command no longer works and it's going to cause mod incompatibilities when it can't find the player. 

I gave it a full 2 seconds before trying to transfer from the nether back to the end but, couldn't find @p. you probably are right on the arraylists taking a couple ticks to update but, what is causing it then?

going to have a tick checker firing every second will post resaults

Edited by jredfox
Posted (edited)

After 5 seconds with this code on tick this was still printing and didn't print until I teleported straight from the end to the nether. I tried teleporting from the nether to end before and it didn't print so it only occurs from end to nether then it bugs out.
 

		if(!event.player.world.loadedEntityList.contains(event.player))
			System.out.println("ERR:" + event.player.getName() );

 

It appears player list has some broken if statements that will never fire because they say if false && method() well it's never going to fire.

Edited by jredfox
Posted
  On 5/3/2018 at 8:44 AM, diesieben07 said:

And I don't know why that is nor can I test it since you did not include a working repository.

Expand  

Ok I am currently using evil notch lib for the command. It will be in a separate mod eventually
https://github.com/jredfox/evilnotchlib

I found a fix but, I know it's not proper since the entity player could already be added to the chunk list and it's not calling the proper method in the first place that I know of.

                	if(!newWorld.loadedEntityList.contains(p) || !newWorld.playerEntities.contains(p))
                	{
                		System.out.println("ERR Player Not Added To World:" + p.getName());
                		newWorld.spawnEntity(p);
                	}

 

Posted (edited)
  On 5/3/2018 at 9:21 AM, diesieben07 said:

Did you borrow your commit names from Reika?

Your repository is also completely broken, it contains duplicate classes.

And I doubt you own evilnotch.com.

Expand  

dupe classes well I will take a look at that.

Of course I own evil notch lib just go to curseforge then take a look at evil notch lib the owner says it was me if it wasn't it would have been a fork which is detectable on github. I am in the middle of a huge update and I am not going to say this is 2.0 it's just a huge update so I could do builds or snapshots this time I decided snapshots since each stage had little to no bugs.

Wow that's alot of dupes I wonder how src wound up there. Fixing it now new repository should be same link.
https://github.com/jredfox/evilnotchlib

So you going to test why the entity player gets added to the world arrays sometimes and not others by calling player list travel to dimension?

evilnotch.com no I don't It's the failed team's name that originally planned on updating evil minecraft mod but, I got way too busy with utility mods and the rest of the team quit on me. But, I did succeed in writing a legacy mod to fix minecraft to be more like 1.2.5 in 1.7.10 called evil notch core. The code was rushed and although the code looked clean in most areas had bugs since I didn't understand how everything worked. I plan on making evil notch core re-write once the lib nessary for it has been done as well as silkspawners and mob spawnage updates and dungeon tweaks

 

the original coding team for evil notch quit( evil notch himself didn't and was constantly asking for a new team of coders all the way up to early 2014 sad nobody responded)

Edited by jredfox
Posted (edited)
  On 5/3/2018 at 11:05 AM, diesieben07 said:

Why did you kill your complete commit history? Do you not know how Git works?!

You are now missing your build.gradle.

 

This is not at all what I said. Package names are domain names. If you do not own the domain evilnotch.com you should not use that as your package name.

Expand  

no it's com.evilnotch.lib  most programs have their package base retaliative to their program name. And in all previous versions of how to make a mod and even program tatorials for java say use three packages com(program option),org(library and api only),net(don't remember second option). Then it says what is the author usually and the third dot is what is the program used for. This rules out package and classes getting overridden by other java programs in memory.

No I don't own mc user EvilNotch but, I do own the Team EvilNotch do you know what I am saying? I was trying to revive old ideas but, all the other coders quit on me so the actual source plan me and another agreed we would do (update evil minecraft) never happened.

I forgot about the build.gradle I just reset the repository so I forgot to add it back thanks. It's up now. The only thing I edited though was options.encoding = "UTF-8" under compile java

Edited by jredfox
Posted (edited)
  On 5/3/2018 at 11:21 AM, diesieben07 said:

That's not how package names work.

 

You still do way too much crap in your teleport method. Why are you firing the respawn event? Clean this up.

Expand  

I could comment out the respawn method even though the packet for respawn is there in the player list transfer dimension aka vanilla respawns but, not forge. So I thought why not fire it on forges side to. It could mess up things either way so I just left it there. But, I will comment it out for the tp command.

What other crap is there? I told you why I had the code to re position the entity before changing dimensions because the way the transfer works is set the players location on the connection from the players current position thus alot more chunks would load. If you got a better idea for doing this or a manual method idea I am all ears. Also if you looked I didn't say player.connection.setlocation meaning that it's not going to send any packets and before the tick is even up the player changes to that specified dimension at that location.

The package name is named right:
The prefix is com:
the domain is evilnotch

the function aka program is lib


So team evil notch has a lib. I know it's only three chars but, I didn't want any more then I had to name and com.evilnotch.library sounded wrong and unprofessional 

Edited by jredfox
Posted

this is an improper fix this is what I am worried about please help me on this.
Line 86:

                	if(!newWorld.loadedEntityList.contains(p) || !newWorld.playerEntities.contains(p))
                	{
                		System.out.println("ERR Player Not Added To World:" + p.getName());
                		newWorld.spawnEntity(p);
                	}

 

Posted

Ok I think I might have figured out why it's only bugging out if your tping from the end to any other dim it's because they have a hard coded if statement if it's not the end dim spawn entity into new world. What the heck? This is garbage it should always do that and they should have a different teleporter for the end instead of always trying to use the nether teleporter instead they give you garbage so you either code around it or make your own method because you can't use it as is since it don't work.

Vanilla hard coded if is end do nothing:

        if (lastDimension != 1)
        {
            oldWorldIn.profiler.startSection("placing");
            d0 = (double)MathHelper.clamp((int)d0, -29999872, 29999872);
            d1 = (double)MathHelper.clamp((int)d1, -29999872, 29999872);

            if (entityIn.isEntityAlive())
            {
                entityIn.setLocationAndAngles(d0, entityIn.posY, d1, entityIn.rotationYaw, entityIn.rotationPitch);
                teleporter.placeInPortal(entityIn, f);
                toWorldIn.spawnEntity(entityIn);
                toWorldIn.updateEntityWithOptionalForce(entityIn, false);
            }

            oldWorldIn.profiler.endSection();
        }



Work Around:

                	if(oldWorld.provider.getDimension() == 1)
                	{
                		System.out.println("End to Another Dim Patching Vanilla:" + p.getName());
                		tele.placeInPortal(p, p.rotationYaw);
                                newWorld.spawnEntity(p);
                                newWorld.updateEntityWithOptionalForce(p, false);
                	}



Vanilla needs to have proper object orientation for teleportation shouldn't have to do that work around myself but, you know....

Posted (edited)

tumblr_ljh0puClWT1qfkt17.gif

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)
  On 5/3/2018 at 11:21 AM, diesieben07 said:

That's not how package names work.

 

You still do way too much crap in your teleport method. Why are you firing the respawn event? Clean this up.

Expand  

Ok I figured out the two issues but, I have a new one. Players don't update to other players once either teleported from another dimension.

What packet should I send to what players to update them?

Edit nevermind vanilla's transfer player to dimension is highly bugged copied code from another mod worked perfect no syncing issues.

Edited by jredfox

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • But your Launcher does not find it   Java path is: /run/user/1000/doc/3f910b8/java Checking Java version... Java checker returned some invalid data we don't understand: Check the Azul Zulu site and select your OS and download the latest Java 8 build for Linux https://www.azul.com/downloads/?version=java-8-lts&package=jre#zulu After installation, check the path and put this path into your Launcher Java settings (Java Executable)
    • Try other builds of pehkui and origins++ until you find a working combination
    • Some Create addons are only compatible with Create 6 or Create 5 - so not both versions at the same time Try older builds of Create Stuff and Additions This is the last build before the Create 6 update: https://www.curseforge.com/minecraft/mc-mods/create-stuff-additions/files/6168370
    • ✅ Crobo Coupon Code: 51k3b0je — Get Your \$25 Amazon Gift Card Bonus! If you’re new to Crobo and want to make the most out of your first transaction, you’ve come to the right place. The **Crobo coupon code: 51k3b0je** is a fantastic way to get started. By using this code, you can unlock an exclusive **\$25 Amazon gift card** after completing your first eligible transfer. Let’s dive deep into how the **Crobo coupon code: 51k3b0je** works, why you should use it, and how to claim your reward. --- 🌟 What is Crobo? Crobo is a trusted, modern platform designed for **international money transfers**. It offers fast, secure, and low-cost transactions, making it a favorite choice for individuals and businesses alike. Crobo is committed to transparency, low fees, and competitive exchange rates. And with promo deals like the **Crobo coupon code: 51k3b0je**, it becomes even more attractive. Crobo focuses on providing customers with: * Quick transfer speeds * Minimal fees * Safe, encrypted transactions * Great referral and promo code rewards When you choose Crobo, you’re choosing a platform that values your time, money, and loyalty. And now with the **Crobo coupon code: 51k3b0je**, you can start your Crobo journey with a **bonus reward**! ---# 💥 What is the Crobo Coupon Code: 51k3b0je? The **Crobo coupon code: 51k3b0je** is a **special promotional code** designed for new users. By entering this code during signup, you’ll be eligible for: ✅ A **\$25 Amazon gift card** after your first qualifying transfer. ✅ Access to Crobo’s referral system to earn more rewards. ✅ The ability to combine with future seasonal Crobo discounts. Unlike generic promo codes that just offer small fee reductions, the **Crobo coupon code: 51k3b0je** directly gives you a tangible, valuable reward — perfect for online shopping or gifting. --- ### 🎯 Why Use Crobo Coupon Code: 51k3b0je? There are many reasons why users choose to apply the **Crobo coupon code: 51k3b0je**: 🌟 **Free bonus reward** — Your first transfer can instantly earn you a \$25 Amazon gift card. 🌟 **Trusted platform** — Crobo is known for secure, fast, and affordable transfers. 🌟 **Easy to apply** — Simply enter **Crobo coupon code: 51k3b0je** at signup — no complicated steps. 🌟 **Referral opportunities** — Once you’ve used **Crobo coupon code: 51k3b0je**, you can invite friends and earn more rewards. 🌟 **Stackable savings** — Pair **Crobo coupon code: 51k3b0je** with Crobo’s ongoing offers or holiday deals for even more benefits. --- ### 📝 How to Use Crobo Coupon Code: 51k3b0je Getting started with **Crobo coupon code: 51k3b0je** is quick and easy. Just follow these steps: 1️⃣ **Download the Crobo app** (available on Google Play Store and Apple App Store) or visit the official Crobo website. 2️⃣ **Start the sign-up process** by entering your basic details (name, email, phone number, etc.). 3️⃣ When prompted, enter **Crobo coupon code: 51k3b0je** in the promo code or coupon code field. 4️⃣ Complete your first transaction — be sure to meet the minimum amount required to qualify for the reward (usually specified in Crobo’s promo terms). 5️⃣ After the transaction is verified, receive your **\$25 Amazon gift card** directly via email or within your Crobo account. --- ### 💡 Tips to Maximize Your Crobo Coupon Code: 51k3b0je Bonus 👉 **Transfer the minimum qualifying amount or more** — this ensures you meet the conditions for the gift card. 👉 **Refer friends after your signup** — Crobo allows users who’ve signed up with codes like **Crobo coupon code: 51k3b0je** to share their own code for extra bonuses. 👉 **Check for additional Crobo promotions** — sometimes Crobo offers seasonal or regional deals that stack with the coupon code. 👉 **Complete your transaction soon after signup** — many bonuses have time limits, so act quickly! --- ### 🚀 Frequently Asked Questions about Crobo Coupon Code: 51k3b0je **Q: Can I use Crobo coupon code: 51k3b0je if I already have a Crobo account?** A: No — the **Crobo coupon code: 51k3b0je** is intended for **new users only**. It must be applied during the initial registration process. --- **Q: How long does it take to get the \$25 Amazon gift card after using Crobo coupon code: 51k3b0je?** A: Typically, the gift card is sent **within a few business days** after your first qualifying transfer is completed and verified. --- **Q: Are there hidden fees when using Crobo coupon code: 51k3b0je?** A: No — Crobo is transparent about its fees. The **Crobo coupon code: 51k3b0je** simply adds a bonus reward without increasing your costs. --- **Q: Can I combine Crobo coupon code: 51k3b0je with other promo codes?** A: The **Crobo coupon code: 51k3b0je** is generally applied as a standalone signup bonus. However, Crobo often offers **ongoing promotions** that may apply to future transactions. ---  📌 Reference Crobo promo code: {51k3b0je} Crobo discount code: {51k3b0je} --- # 🌍 Final Thoughts If you want to enjoy safe, fast, and affordable money transfers with an added bonus, **Crobo coupon code: 51k3b0je** is your best option. Not only will you experience excellent service, but you’ll also earn a **\$25 Amazon gift card** — a reward that you can use immediately for shopping or gifts. 👉 **Don’t wait — sign up today using Crobo coupon code: 51k3b0je and claim your bonus!**
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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