Jump to content

[SOLVED] Difference in setBlock breaking my mod. Help?


Arphahat

Recommended Posts

I am trying to update my mod to work in 1.5.  Much of it was trivial or little changes, but a core mechanic I was relying on seems different and I'm not sure what it is doing or how to adjust.

 

I was relying on setBlock to in World to call notifyBlockChange with the id of the block, in this case, the fire block (id 51).  Before, it worked great.  Now, however, instead of just passing the block id (par4), it passes k1 which is "k1 = chunk.getBlockID(par1 & 15, par2, par3 & 15);"  Why is it ANDing the coordinates of the block with 15? 

 

Tracing it through that area, it seems to find 51 again, but then decides to return 0.  It then uses this 0 instead of passing the 51 in par4 into notifyBlockChange.  Grrrr!!!

 

Anyhow, my important question is this: I need to know when a block is next to a fire block.  I was previously overriding the "onNeighborBlockChange" and checking to see if the id was fire.  Now the id is always 0.  Is there another way I can do this?

Link to comment
Share on other sites

I am trying to update my mod to work in 1.5.  Much of it was trivial or little changes, but a core mechanic I was relying on seems different and I'm not sure what it is doing or how to adjust.

 

I was relying on setBlock to in World to call notifyBlockChange with the id of the block, in this case, the fire block (id 51).  Before, it worked great.  Now, however, instead of just passing the block id (par4), it passes k1 which is "k1 = chunk.getBlockID(par1 & 15, par2, par3 & 15);"  Why is it ANDing the coordinates of the block with 15? 

 

Tracing it through that area, it seems to find 51 again, but then decides to return 0.  It then uses this 0 instead of passing the 51 in par4 into notifyBlockChange.  Grrrr!!!

 

Anyhow, my important question is this: I need to know when a block is next to a fire block.  I was previously overriding the "onNeighborBlockChange" and checking to see if the id was fire.  Now the id is always 0.  Is there another way I can do this?

Link to comment
Share on other sites

OK, I experimented a little bit and it seems that the logic is reversed from how it used to behave.  The block id that is used in the notify neighbor is of the block that was there before the update.  So, if you are placing fire in a spot that was just air, it will be a 0, but if you knock down a block, it will give the id of the block. 

 

So, to look for fire, I just have to let it check for 0 and then check the status of the block as it is now.  It will call the check more frequently, since it will also be 0 whenever any block is placed, but it won't call it abusively nor generate lag, so it is tolerable.

Link to comment
Share on other sites

OK, I experimented a little bit and it seems that the logic is reversed from how it used to behave.  The block id that is used in the notify neighbor is of the block that was there before the update.  So, if you are placing fire in a spot that was just air, it will be a 0, but if you knock down a block, it will give the id of the block. 

 

So, to look for fire, I just have to let it check for 0 and then check the status of the block as it is now.  It will call the check more frequently, since it will also be 0 whenever any block is placed, but it won't call it abusively nor generate lag, so it is tolerable.

Link to comment
Share on other sites

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

    • Use Temu coupon code $200 off [act965193] for Bahrain and special 30% discount Plus get free shipping Temu has always been a shopper's paradise, offering a vast collection of trending items at unbeatable prices. With fast delivery and free shipping to 67 countries, it's no wonder Temu has become a go-to platform for savvy shoppers. Now, with these exclusive Temu coupon codes, you can enjoy even more savings: act965193: Temu coupon code 40% off for existing users act965193: $100 off Temu coupon for new customers act965193: $100 off Temu coupon for existing customers act965193: 40% discount for new users act965193: Temu coupon code 40 off for existing and new users Why You Shouldn't Miss Out on the Temu Coupon Code 40% Off The Temu coupon code 40% off is a game-changer for both new and existing customers. Whether you're a first-time user or a loyal Temu shopper, these codes offer substantial savings on your purchases. With a flat 40% extra off, you can stretch your budget further and indulge in more of your favorite items. Maximizing Your Savings with Temu 40 Off Coupon Code To make the most of your Temu shopping experience, it's crucial to understand how to apply these coupon codes effectively. When you use the Temu coupon code 40 off, you're not just saving money – you're unlocking a world of possibilities. From fashion to home decor, electronics to beauty products, your 40% discount applies across a wide range of categories. How to Apply Your Temu Coupon Code 40% Off Using your Temu coupon code 40% off is a breeze. Here's a step-by-step guide to ensure you don't miss out on these incredible savings: Browse through Temu's extensive collection and add your desired items to your cart. Proceed to checkout when you're ready to make your purchase. Look for the "Promo Code" or "Coupon Code" field. Enter your Temu coupon code 40 off [act581784]. Watch as your total amount gets reduced by a whopping 40%! The Power of Temu Coupon Code 40 Off First Order For those new to Temu, the Temu coupon code 40% off first order is an excellent opportunity to experience the platform's offerings at a discounted price. This introductory offer allows you to explore Temu's vast catalog while enjoying significant savings on your inaugural purchase.Be sure to use it before it expires!
    • Looking for the best deals and discounts? The Temu coupon code [act200019] or [acp856709] offers fantastic savings for both new and existing customers. Whether you're placing your first order or restocking your favorites, these coupon codes unlock discounts of up to 90% and an additional $100 off on selected items. Plus, enjoy the added benefit of free shipping on select orders. This guide will show you how to make the most of these deals and maximize your savings on Temu. How to Use the Temu Coupon Code [act200019] or [acp856709] Applying the Temu coupon code is quick and easy. Here’s how to redeem it for maximum savings: 1. Visit the Temu Website: Explore Temu’s wide range of products, including fashion, electronics, and home goods. 2. Add Items to Your Cart: Choose the products you want and add them to your shopping cart. 3. Proceed to Checkout: Click on your cart and proceed to checkout when you're ready. 4. Enter the Coupon Code: In the "Coupon Code" field at checkout, enter [act200019] or [acp856709] and click "Apply." 5. Enjoy Your Savings: You’ll instantly see the $100 discount along with additional savings of up to 90%, depending on the items selected. Benefits of Temu Coupon Codes [act200019] or [acp856709] for First-Time Users and Existing Customers Whether you're a new customer or a regular shopper, the Temu coupon code offers unbeatable discounts. Here's how both new and existing users can benefit: • First-Time Users: New customers using the Temu coupon code [act200019] or [acp856709] on their first order get $100 off, along with discounts ranging from 30% to 90% on selected products. It’s the perfect opportunity to try out Temu’s product range without overspending. • Existing Customers: Loyal shoppers can continue to enjoy significant savings by applying the same coupon code on subsequent orders. Restock your favorites or discover new items at discounted prices. • Free Shipping: Using the Temu coupon code [act200019] or [acp856709] can also qualify you for free shipping on selected items, further increasing your overall savings. Breakdown of Discounts with Temu Coupon Code [act200019] or [acp856709] With the Temu coupon code [act200019] or [acp856709], you’re not limited to just $100 off. You can also enjoy varying levels of discounts on a wide range of products. Here’s how it works: • 30% Discount: Perfect for budget-friendly products and everyday essentials. Shop clothing, beauty products, and home goods at 30% off. • 40% Discount: Ideal for mid-range purchases such as electronics, gadgets, and household items. • 50% Discount: Save big on high-end gadgets, designer apparel, and premium beauty products with 50% off. • 70% Discount: Excellent for those looking for luxury items like branded accessories and upscale electronics. • 90% Discount: The ultimate deal for savvy shoppers. Enjoy top-tier products like tech and home goods at a fraction of the price. Maximize Your Savings on First Orders, Free Shipping, and More with Temu Coupon Code [act200019] or [acp856709] Here are some top tips to get the most value from the Temu coupon code [act200019] or [acp856709]: 1. First Order Savings: For first-time users, using the code [act200019] or [acp856709] on your first order guarantees $100 off, making it the perfect way to kickstart your shopping experience at Temu. 2. Look for Free Shipping: Check if your items qualify for free shipping by applying the coupon code at checkout. It’s a great way to save even more on your total purchase. 3. Shop During Major Sales: Combine the coupon code with major sales events like Black Friday or Cyber Monday for even greater savings. 4. Buy in Bulk: Bulk purchases allow you to maximize the value of the $100 discount, especially if you’re buying items across various categories. 5. Check Product Eligibility: Make sure the products you’re adding to your cart qualify for higher percentage discounts. Some items may only offer 30%-50% off, while others can go up to 90%. FAQs About Temu Coupon Code [act200019] or [acp856709] 1. Is the Temu coupon code verified and working?  Yes, the Temu coupon codes [act200019] and [acp856709] are verified and currently active. Both codes offer up to $100 off, along with percentage discounts of up to 90%. 2. How much can I save with the Temu coupon code?  Using the coupon codes [act200019] or [acp856709], you can get $100 off plus additional percentage-based discounts ranging from 30% to 90%, depending on the products you choose. 3. Can both first-time users and existing customers use these coupon codes?  Absolutely! Both new and existing customers can take advantage of the Temu coupon codes [act200019] or [acp856709]. First-time users can apply the code for their first order, while loyal customers can continue saving on subsequent purchases. 4. Does the coupon code apply to free shipping?  In many cases, using the Temu coupon code [act200019] or [acp856709] may qualify you for free shipping, depending on the items and promotions available at the time of purchase. 5. Are there any exclusions with these coupon codes?  While these coupon codes offer excellent discounts, some high-percentage offers may not apply to every item. Be sure to check product eligibility before completing your purchase. Conclusion: Don’t Miss Out on These Massive Savings with Temu Coupon Code [act200019] or [acp856709] The Temu coupon code [act200019] or [acp856709] provides an excellent opportunity to save big on a wide variety of products. Whether you're a first-time user placing your first order or an existing customer looking to restock, these coupon codes guarantee substantial savings. Take advantage of discounts up to 90%, free shipping on select orders, and $100 off when you shop at Temu. Don’t wait—start shopping today and use the coupon codes [act200019] or [acp856709] to unlock the best possible deals! Happy shopping!
    • The office interior in Delhi has been evolving rapidly, blending functionality with modern aesthetics. Here are some key trends: Sustainable Design: Companies are opting for eco-friendly materials like recycled wood, energy-efficient lighting, and green office plants to create environmentally conscious workspaces. Collaborative Spaces: Open layouts and shared workspaces foster teamwork and creativity. Modular furniture and flexible seating arrangements allow for easy reconfiguration. Smart Technology Integration: Smart offices use automation to control lighting, temperature, and even security, offering convenience and energy efficiency. Biophilic Design: Incorporating natural elements like plants, natural light, and organic textures improves employee well-being and productivity. Wellness Zones: Dedicated relaxation areas, ergonomic furniture, and quiet zones are gaining popularity to promote a healthier work environment. Minimalist and Clean Aesthetics: Sleek, clutter-free designs with neutral color palettes are favored to create calm and professional atmospheres. These trends reflect a growing focus on creating efficient, healthy, and flexible office environments in Delhi.    
    • Make a test with deleting the config of tempad-forge (config folder) If there is no change, remove this mod
    • There is an invalid entry in your level.dat   Create a copy of this world and open it in singleplayer - if this works, upload this world to the server If not, add the latest.log from the singleplayer test
  • Topics

×
×
  • Create New...

Important Information

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