Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Johnnycakes

Members
  • Joined

  • Last visited

  1. Okay so I fixed the constructor, but I only solved half of my problems. What is the proper way to register an entity if EntityType$Builder objects are not valid to supply? Because after reading the forge docs it seems like entities can only be created using their $Builder classes.
  2. Hello, I am unable to register a custom TNT block I made. I am getting two errors, one in the constructor in my Primed_Dynamite class. I am unsure of what type to cast, here is the code for it: public Primed_Dynamite(Level p_32079_, double p_32080_, double p_32081_, double p_32082_, @Nullable LivingEntity p_32083_) { //this(CustomEntityType.DYNAMITE, p_32079_); this((EntityType<Primed_Dynamite>)CustomEntityType.PRIMED_DYNAMITE, p_32079_); this.setPos(p_32080_, p_32081_, p_32082_); double d0 = p_32079_.random.nextDouble() * (double)((float)Math.PI * 2F); this.setDeltaMovement(-Math.sin(d0) * 0.02D, (double)0.2F, -Math.cos(d0) * 0.02D); this.setFuse(80); this.xo = p_32080_; this.yo = p_32081_; this.zo = p_32082_; this.owner = p_32083_; } I am also clueless as to how to make a registryObject for the primed dynamite entity, with my current code I get the errors: "The method register(String, Supplier<? extends I>) in the type DeferredRegister<EntityType<?>> is not applicable for the arguments (String, () -> {})" and "The method build(null) is undefined for the type Block" public static final RegistryObject<EntityType<Primed_Dynamite>> PRIMED_DYNAMITE = ENTITY_TYPES.register("dynamite", () -> EntityType.Builder.of(Primed_Dynamite::new, ModBlocks.DYNAMITE.get().build(null))); Here is my github repositry and the specific files in question: https://github.com/John-Tsiglieris/Mod https://github.com/John-Tsiglieris/Mod/blob/main/src/main/java/block/custom/Dynamite.java https://github.com/John-Tsiglieris/Mod/blob/main/src/main/java/block/custom/Primed_Dynamite.java https://github.com/John-Tsiglieris/Mod/blob/main/src/main/java/entity/custom/CustomEntityType.java

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.