Jump to content

[Solved][1.14.4] Problem with custom entity rendering (...I guess?)


Recommended Posts

Posted (edited)

Hi there,

 

I'm new to minecraft modelling, not to Java though. I try to make a custom mod, that adds a helicopter. For the start I tried to basically copy a boat. 

 

The problem:

When I spawn the custom entity, it is invisible. It is definitly there, since I can kill it with the ingame comments and TNT can destroy the entity, with the explosion dropping the item.

Basically i copied the minecraft boat classes, so i guess it has something to do with rendering or registration?

 

Here is the Github link if anyone is willing to help: https://github.com/Felixleh/helicopter

 

Would appreciate any help, as I have no idea where this comes from :D

 

 

Edited by Felix_
Solved
Posted
  On 9/9/2019 at 3:47 PM, diesieben07 said:

You are using SSpawnObjectPacket as your entity's spawning packet, this packet only handles a hardcoded list of vanilla entities. For non-living custom entities you need to write your own spawn packet.

Expand  

Does this mean entities are not automatically synced to the client anymore when they are spawned on the server? And you have to create a packet for this yourself?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 9/9/2019 at 3:47 PM, diesieben07 said:
  • You don't own this domain.
  • Do not use @OnlyIn.
  • You are using SSpawnObjectPacket as your entity's spawning packet, this packet only handles a hardcoded list of vanilla entities. For non-living custom entities you need to write your own spawn packet.
Expand  

Hi first of all thanks for the answer.

 

  • I'm, of course, going to change the domain, when i came somewhat further.
  • Do I have to use something instead of @OnlyIn or can I just remove it?

For the custom Packet:

Can I use a class with a signature similar to this one:

public class SpawnHelicopterPacket implements IPacket<IClientPlayNetHandler>

And if yes, how could i use the  

handler.handleSpawnObject(this);

part?

 

Sorry if that's to basic, but I really can't find anything helpfull on google.

 

Posted (edited)
  On 9/9/2019 at 8:03 PM, diesieben07 said:

Just remove it.

 

Custom packets are explained in the documentation: https://mcforge.readthedocs.io/en/1.13.x/networking/simpleimpl/.

Expand  

Thanks! I found the documentation, but honestly I have no Idea where to start. Do you know any stripped down example code of a custom non-living entity, I could use to try to understand the concept? 

Edited by Felix_
Posted
  On 9/9/2019 at 9:07 PM, diesieben07 said:

Look at how the vanilla spawning packet (that I referenced above) works. Then replicate that in your own packet.

Expand  

Hi,

 

I stripped down the code to the most essential things: https://github.com/Felixleh/helicopter

And I found a possible solution by using some build in function:

@Override
	public IPacket<?> createSpawnPacket() {
		return NetworkHooks.getEntitySpawningPacket(this);
	}

Apperently this should solve the problem. I can place the entity in the world by rightclicking the item, but I can't create it with the summon command. When created it's invisible and has no collision. Is there anything I am doing obviously wrong?

 

I tried to create my own Packet but I still don't understand how to work with the handler part.

 

Posted (edited)
  On 9/10/2019 at 12:43 PM, diesieben07 said:

You need to provide the EntityType with an EntityType.IFactory so it can actually create your entity. You do that by using the version of EntityType.Builder.create that takes an IFactory as a parameter.

Expand  

many thanks :D 

 

That's what I wrote there now:

event.getRegistry().registerAll(
						EntityList.helicopter_entity = 
							(EntityType<HelicopterEntity>) EntityType
							.Builder
							.<HelicopterEntity>create(HelicopterEntity::new ,EntityClassification.MISC)
							.size(1f, 1f)
							.build(MOD_ID + ":helicopter_entity")
							.setRegistryName(location("helicopter_entity"))
					);

 

When I now try to place the entity i get a RunTime exception.

 

Edit by changing the code to: 

event.getRegistry().registerAll(
						EntityList.helicopter_entity = 
							(EntityType<HelicopterEntity>) EntityType
							.Builder
							.<HelicopterEntity>create(HelicopterEntity::new ,EntityClassification.MISC)
							.setCustomClientFactory(HelicopterEntity::new)
							.size(1f, 1f)
							.build(MOD_ID + ":helicopter_entity")
							.setRegistryName(location("helicopter_entity"))
					);

I don't get a exception anymore, but if I spawn the entity nothing is happening. It must be somewhere, since I can destroy it, but there is nothing visible. Do you know where the problem is in this code?

 

Edited by Felix_

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

    • I have no idea - maybe use a pre-configured modpack as working base and add some new mods one by one
    • Is there a crash-report?   The given log is literally just a 230 MB file of open GL error spam
    • Lemfi coupon code 15€ Bonus is the easiest way for you to turn a routine money‑transfer into instant savings—and we are thrilled to show you how. We tested it ourselves and unlocked the extra cash in seconds. RITEQH6J is the single code you need, and it delivers maximum benefits whether you are sending funds from Toronto, Paris, or Sydney. You simply enter the code once, and every eligible transaction keeps rewarding you. When you add Lemfi discount code 15€ off or Lemfi code 15€ Bonus to your transfer, you’re stacking value on security. In the next few minutes, we’ll prove that Lemfi is safe to use in Canada and walk you through the exact steps to claim your €15 windfall. What Is The Lemfi Promo Code for 15€ Bonus? Both new and existing customers enjoy a richer experience when they activate our Lemfi coupon 15€ Bonus—sometimes called the 15€ Bonus Lemfi coupon. It’s the same five‑character code, but the perks multiply depending on your status: RITEQH6J – 15 € instant bonus credited the moment you initiate a qualifying transfer RITEQH6J – 30 € sign‑up reward for brand‑new Lemfi users who complete KYC RITEQH6J – 10 % cashback (up to 50 €) on your very first transfer RITEQH6J – 20 € referral reward after your invitee finishes 20 transactions RITEQH6J – 20 € cashback on any recurring money‑transfer plan you schedule RITEQH6J – 30 € extra bonus when you send 100 € or more in a single transfer Lemfi First Time Promo Code 15€ Bonus For New Users In 2025 You get the richest haul of incentives when you join Lemfi in 2025 and apply our Lemfi First Time Promo Code for 15€ Bonus—also known as Lemfi Promo Code First Order 15€ Bonus. Below are the headline gains: RITEQH6J – 15 € credited to every qualified user, instantly RITEQH6J – 30 € one‑time welcome bonus the day you finish sign‑up RITEQH6J – 10 % cashback (max 50 €) on your inaugural transfer RITEQH6J – Second‑tier 30 € bump once your first transfer exceeds 100 € RITEQH6J – Free intra‑app transfers for 90 days, saving you FX mark‑ups How To Redeem The Lemfi Coupon 15€ Bonus For New Users? Lemfi First Time Promo Code for 15€ Bonus, Lemfi Promo Code First Order 15€ Bonus, and Lemfi First Time Promo Code 15€ Bonus for new users are redeemed in six quick moves: Download Lemfi from Google Play / App Store. Open an account with your legal name and Canadian address. Complete photo ID verification and selfie check. On the “Promo” screen, paste RITEQH6J and tap “Apply.” Initiate your first money transfer of 10 € or more. Watch the 15 € bonus hit your Lemfi balance before the funds even settle. Lemfi Promo Code 15€ Bonus For Existing Customers Already have a wallet? Great news: the lemfi promo code 15€ Bonus for existing users doubles down on loyalty, and the lemfi discount code 15€ Bonus for existing customers ensures you never miss a rebate. RITEQH6J – Flat 15 € credited to every fresh transaction over 10 € RITEQH6J – 20 € referral payout after each invited friend completes 20 transfers RITEQH6J – 20 € cashback when you fund a recurring transfer plan RITEQH6J – 30 € bonus when any single transfer tops 100 € How To Use The Lemfi Code for 15€ Bonus For Existing Customers? Follow this path to apply the Lemfi discount code for 15€ Bonus, the Code promo Lemfi for 15€ Bonus, after your Lemfi login: Sign in and tap the “Promotions” tab. Enter RITEQH6J in the promo box and confirm. Start a new transfer or schedule a future one. The system auto‑deducts the bonus from your payable amount or credits it to your wallet. Latest Lemfi Promo Code for 15€ Bonus The freshest drop—Lemfi first time promo code for 15€ Bonus first order, Lemfi discount code 15€ Bonus, and Lemfi cashback code—all point to one hero string: RITEQH6J – 15 € for every user, every time RITEQH6J – 30 € sign‑up sweetener for new users RITEQH6J – 10 % cashback (capped at 50 €) on your very first transfer RITEQH6J – 20 € friend‑referral reward after 20 completed transfers RITEQH6J – 20 € cashback on automated transfer plans RITEQH6J – 30 € bonus when you move 100 € or more in one go How To Find The Lemfi Code for 15€ Bonus? You can score the Lemfi code for 15€ Bonus, the Lemfi cashback code, and the crowd‑sourced Lemfi referral code Reddit for 15€ Bonus in three reliable ways. First, subscribe to the Lemfi newsletter—verified codes often land there before anywhere else. Second, follow Lemfi on X (formerly Twitter), Instagram, and LinkedIn for flash promos. Third, bookmark reputable coupon portals (like ours) where every code is tested daily for real‑world success. Is Lemfi 15€ Bonus Code Legit? Is Lemfi legit? Absolutely. Lemfi (legal name Lemonade Technology Ltd.) is a registered Money Service Business with FINTRAC in Canada under registration #M20383642 opengovca.com. That means every Canadian transfer is overseen by federal anti‑money‑laundering regulators. More importantly, code promo Lemfi legit status is guaranteed: we refresh and re‑test RITEQH6J weekly. The promo has no geographic restrictions, so you can claim the 15 € Bonus on your first Lemfi money transfer and stack it on future transactions worldwide. How Does Lemfi Code for 15€ Bonus Work? 15€ Bonus on first-time Lemfi money transfer is credited the moment our system recognises the code during checkout, and Lemfi promo code for recurring transactions continues to provide cashback or flat bonuses on qualified transfers thereafter. In practice, you paste RITEQH6J once, Lemfi tags it to your customer ID, and the platform’s automated ledger applies the correct reward (bonus credit or cashback) to each eligible transaction until you choose to remove or replace the code. How To Earn Lemfi 15€ Bonus Coupons As A New Customer? To grab the next Lemfi coupon code 15€ Bonus or the elusive 100 off Lemfi coupon code, complete KYC, enable two‑factor authentication, and engage with Lemfi’s seasonal challenges (e.g., “Send three transfers in one week”). Each milestone adds fresh coupons to your in‑app Promo Wallet, which you can stack on top of RITEQH6J for even bigger savings. What Are The Advantages Of Using The Lemfi Discount Code for 15€ Bonus? Lemfi promo code for 15€ bonus delivers an immediate 15 € credit Lemfi promo code for 15€ Bonus stacks with a 30 € sign‑up reward Up to 50 € cashback (10 %) on your inaugural transfer 20 € cash per referral after 20 transactions 20 € cashback on automated recurring transfers 30 € boost on any single 100 €+ transfer Unlimited global usage—no expiry date Works for both CAD and EUR wallets Lemfi Discount Code For 15€ Bonus And Free Gift For New And Existing Customers Our Lemfi Discount Code for 15€ Bonus—also known as the 15€ Bonus Lemfi discount code—unlocks a treasure chest of perks you won’t find elsewhere: RITEQH6J – 15 € for any qualified transfer RITEQH6J – 30 € welcome credit to brand‑new customers RITEQH6J – 10 % cashback (max 50 €) on your first deal RITEQH6J – 20 € per referral once the invitee completes 20 sends RITEQH6J – 30 € kicker on transfers worth 100 € or more Pros And Cons Of Using The Lemfi Discount Code 15€ Bonus for <July2025> Lemfi 15€ Bonus discount code and the wider Lemfi 15 Euro Bonus program bring clear upsides—plus a couple of caveats: Pros Immediate 15 € savings per qualifying transfer High 30 € sign‑up bonus for newcomers Legit FINTRAC‑regulated service in Canada support.lemfi.com Low FX margins versus banks Stackable with referral and cashback offers Cons Bonuses paid in EUR; conversion fees may apply if you withdraw in CAD Cashback rewards require minimum transfer values (10 € or 100 € tiers) Terms And Conditions Of Using The Lemfi Coupon 15€ Bonus In 2025 Lemfi 15€ Bonus code must be entered exactly as “RITEQH6J.” Only one active promo per transaction, but stackable across separate transfers. Latest Lemfi code 15€ Bonus has no expiration date and is valid worldwide. Available to KYC‑verified users aged 18 +. New‑user bonuses credited once per person; device or IP duplication voids offer. Existing‑user cashback requires recurring transfer setup. Lemfi reserves the right to amend terms with 30‑days’ notice. Final Note: Use The Latest Lemfi Discount Code 15€ Bonus Grab the Lemfi discount code for 15€ Bonus today, and you’ll feel the value the second you hit “Send.” We’ve tested it from coast to coast, and the results are always the same—instant savings. Keep Lemfi 15€ Bonus code RITEQH6J in your back pocket, and every future transfer can be a mini payday. Happy saving! FAQs Of Lemfi 15€ Bonus Code Q1. Is Lemfi safe to use in Canada? A1. Yes. Lemfi is a FINTRAC‑registered Money Service Business (MSB #M20383642) and must comply with strict anti‑money‑laundering laws, encryption standards, and regular audits. Q2. Can I combine RITEQH6J with other Lemfi promo codes? A2. You can’t stack two codes on a single transaction, but you may apply RITEQH6J on one transfer and another valid code on a separate transfer to maximise total savings. Q3. Does RITEQH6J expire? A3. No expiration date is set. The code remains active across 2025 and beyond unless Lemfi issues a formal sunset notice—unlikely given its popularity. Q4. How fast is the 15 € bonus credited? A4. The bonus shows up instantly in your Lemfi wallet once the transaction is submitted and KYC is complete, removing any waiting period. Q5. Is the 15 € bonus paid in CAD or EUR? A5. Lemfi credits the bonus in EUR. If your base wallet is CAD, you can convert inside the app at inter‑bank FX rates or keep it in EUR for cross‑border spending.
    • I am trying to make a custom item that converts to another custom item when eaten. The food properties includes "usingConvertsTo(ModItems.ITEM_NAME.get())", however since the item is not yet registered during the registration process, the get() method returns null. Is there any way to work around this?
    • Having problems with forge installation on headless arch linux, regardless of forge-server from yay or manual wget, Cant find class error and results in net/minecraft/world/waypoints/Waypoint$Icon.class   net/minecraft/world/waypoints/Waypoint.class   net/minecraft/world/waypoints/WaypointManager.class   net/minecraft/world/waypoints/WaypointStyleAsset.class   net/minecraft/world/waypoints/WaypointStyleAssets.class   net/minecraft/world/waypoints/WaypointTransmitter$BlockConnection.class   net/minecraft/world/waypoints/WaypointTransmitter$ChunkConnection.class   net/minecraft/world/waypoints/WaypointTransmitter$Connection.class   net/minecraft/world/waypoints/WaypointTransmitter$EntityAzimuthConnection.class   net/minecraft/world/waypoints/WaypointTransmitter$EntityBlockConnection.class   net/minecraft/world/waypoints/WaypointTransmitter$EntityChunkConnection.class   net/minecraft/world/waypoints/WaypointTransmitter.class   version.json   Processor failed, invalid outputs:     /srv/minecraft/./libraries/net/minecraft/server/1.21.6/server-1.21.6-official.jar       Expected: b1448d2c947e923ccd63224defc3b51e5a72a98d       Actual:   5f30bf411bd0d1208baca6b7be1584442f4f6579 There was an error during installation
  • Topics

×
×
  • Create New...

Important Information

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