Jump to content

Recommended Posts

Posted

good nights 

im working in a custome water block for a custome toilet im updathing to 1.19.4 and i wanna fix some issues the old code has 

for what i need to check every 20 ticks if the player is still inside mi custome watter block for some reason making a custome entity to track this dont works all the time is like the function entityInside(BlockState blkstate, Level warudo, BlockPos pos, Entity rider) is not running in the server world but some kind of pseudo world of something 

Spoiler

				
			// ########## ########## ########## ##########
		public void entityInside(BlockState blkstate, Level warudo, BlockPos pos, Entity rider) {
		//System.out.println( "entityInside( warudo => " + + ");" + rider.getPose() );
		
		Float nk = 0.1f;
		Direction facing = blkstate.getValue(BlockStateProperties.FACING);
		Pose pose = null;
		Vec3 vo = pos.relative(facing).getCenter();
		Vec3 vi = rider.getEyePosition();
		
		if ( rider instanceof Player) { //!warudo.isClientSide &&
		
		
		
		pose = ((Player) rider).getForcedPose();
		if( pose != Pose.SWIMMING )
		{
		ModMessage.sendToServer(new set_crawl(true));
		((Player) rider).setForcedPose(Pose.SWIMMING);
		}
		
		}
		
		if (rider instanceof Player && (facing == Direction.UP || facing == Direction.DOWN)) {
		vi = vi.add(0.0D, -1.8D, 0.0D);
		}
		
		float rx = get_XRot(vi, vo);
		float ry = get_YRot(vi, vo);
		Vec3 delta = get_subdelta(rx, ry);
		//System.out.println("coso=>" + entity.getName().getString().toString());
		rider.push(delta.x * nk, delta.y * nk, delta.z * nk);
		}				
			

###############################3

anyway the plan is to send a costume package to server side whit a delay this package when received must check if player is inside of the costume water block if not must reset the player pose to null or standing 

soo the issue is how to apply an delay to a package ??

 

 

 

 

 

Posted

This sounds like something you should be doing on the server originally.

And if you want to schedule something for a block, you should make it a BlockEntity so it can tick.

Or you can look at how the LiquidBlock (for spreading) or FallingBlock (for failling) schedules ticks for "one off" delayed events.

Boilerplate:

If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one.

If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install

Large files should be posted to a file sharing site like https://gist.github.com  You should also read the support forum sticky post.

Posted

no i dont want tile entities coze it could be like 250 of this spawned in a tick and dessapear 10 sec later 
mi water block is just for temporally simulate a water current  for a brief moment it just appears replacing a water block for around 10sec then it replace itself whit normal water again 
the block also toggles on the swim pose in the player so it can get through narrow paths 
the thing is i need the player to automatically unswim when no longer in contact whit this blue block that's the part that don't works 

watercrwl-edit.gif

 

 

this is the toilet block, 
when flushed it spins the entities a while then detect water blocks and replace them for mi block and send the entities through than water stream 

the trouble is than the player gets stuck on Pose.SWIMING after going out of the water stream 

 

i made a keybind and some packages to make the player crawl using Pose.SWIMMING but i need to make automatically uncrawl when out mi custome water block so i was thinking in a delay package that checks if player is outside of block an then proceed

keybind-edit.gif 

 

i been trying whit an entity but only works when feels like it 

Thanks for your time 

 

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

    • Verified users can now unlock a $100 OFF Temu Coupon Code using the verified promo code [ALF401700]. This Temu $100 OFF code works for both new and existing customers and can be used to redeem up to 50% off your next order. Our exclusive Temu coupon code [ALF401700] delivers a flat $100 OFF on top of existing deals. First-time customers using code ALF401700 can save an extra 100% off select items. Returning users also qualify for an automatic $100 OFF discount just by applying this code at checkout. But wait—there’s more. With our Temu coupon codes for 2025, users can score up to 90% OFF on clearance items. Whether you’re shopping in the USA, Canada, UK, or elsewhere, Temu promo code ALF401700 unlocks extra discounts tailored to your account. Some users are saving 100% on items using this 2025 Temu promo code. 🔥 Temu Coupon Highlights Using Code [ALF401700]: Temu new user code – ALF401700: Save 50% off your first order + $100 OFF. Temu promo for existing customers – ALF401700: Enjoy flat $100 OFF instantly. Global availability: Works in the USA, UK, Canada, Germany, France, Japan, Chile, Colombia, Malaysia, Mexico, South Korea, Philippines, Saudi Arabia, Qatar, Pakistan, and more. Top 2025 Coupon Deal: Get $200 OFF plus 100% bonus discounts using code ALF401700. Top-Ranked Temu Deals for 2025 (Coupon Code: ALF401700): ✅ Temu $100 OFF Memorial Day Sale — Use ALF401700 ✅ Temu First Order Coupon — Use ALF401700 for 50% + $100 OFF ✅ Temu USA Coupon Code — Save $100 instantly with ALF401700 ✅ Temu Japan, Germany, Chile Codes — All support ALF401700 ✅ Temu Reddit Discount – $100 OFF: Valid for both new and old users ✅ Temu Coupon Bundle 2025 — $100 OFF + up to 50% slash ✅ 100% OFF Free Gift Code — Use ALF401700, no invite needed ✅ Temu Sign-Up Bonus Promo — Get a welcome $100 OFF instantly ✅ Free Temu Code for New Users — Use ALF401700, no referral required  Temu Clearance Codes 2025 — Use ALF401700 for 85–100% discounts Why ALF401700 is the Best Temu Code in 2025 Using Temu code ALF401700 is your ticket to massive savings, free shipping, first-order discounts, and stackable coupon bundles. Whether you're browsing electronics, fashion, home goods, or beauty products, this verified Temu discount code offers real savings—up to 90% OFF + $100 OFF on qualified orders. 💡 Pro Tip: Apply ALF401700 during checkout in the Temu app or website to activate your instant $100 discount, even if you’re not a new user. Temu $100 OFF Code by Country (All Use ALF401700): 🇺🇸 Temu USA – ALF401700 🇯🇵 Temu Japan – ALF401700 🇲🇽 Temu Mexico – ALF401700 🇨🇱 Temu Chile – ALF401700 🇨🇴 Temu Colombia – ALF401700 🇲🇾 Temu Malaysia – ALF401700 🇵🇭 Temu Philippines – ALF401700 🇰🇷 Temu Korea – ALF401700 🇵🇰 Temu Pakistan – ALF401700 🇫🇮 Temu Finland – ALF401700 🇸🇦 Temu Saudi Arabia – ALF401700 🇶🇦 Temu Qatar – ALF401700 🇫🇷 Temu France – ALF401700 🇩🇪 Temu Germany – ALF401700 🇮🇱 Temu Israel – ALF401700 Temu Coupon Code [ALF401700] Summary for SEO: Temu $100 OFF Code  Temu First Order Discount Code 2025  Temu Verified Promo Code ALF401700  Temu 50% OFF + $100 Bonus  Temu 100% OFF Code 2025  Temu App Promo ALF401700  Temu Working Discount Code 2025 
    • Hey there, nothing to do with the code, I am just suggesting you use Intelij IDEA. Trust me, it is the best.
    • Hey there, nothing to do with the code, I am just suggesting you use Intelij IDEA. Trust me, it is the best.
    • You can check the config of Geckolib and Mowzie's Mobs - maybe there is a way to disable some render features
    • You can use the .requires() function  the server also has a permission level of 4, which is the highest permission level.
  • Topics

×
×
  • Create New...

Important Information

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