Jump to content

Recommended Posts

Posted

Block with constructor ::

 public static BarrierBlock barrierBlock = new BarrierBlock(AbstractBlock.Properties.of(Material.FIRE, MaterialColor.METAL));
	    public static final RegistryObject<Block> BARRIER_BLOCK = BLOCKS.register("barrier_block", (Supplier<? extends I>) barrierBlock); //this needs supplier

public class BarrierBlock extends Block {

	public BarrierBlock(Properties p_i48440_1_) {
		super(p_i48440_1_);
	}

}

//Following gives error: java.lang.NoSuchFieldError: field_151573_f
	at com.mcexamples.lists.BlockList.lambda$static$0(BlockList.java:19) ~[main/:?]


  public static final RegistryObject<Block> SILVER_BLOCK = BLOCKS.register("silver_block", () ->
	    		new Block(AbstractBlock.Properties.of(Material.METAL, MaterialColor.METAL).requiresCorrectToolForDrops()
	    				.strength(4.0f, 6.0f).sound(SoundType.METAL).harvestTool(ToolType.PICKAXE).harvestLevel(2)));

 

Thanks

 

Posted
2 minutes ago, DracoDoes said:

Block with constructor ::

add the properties in the constructor of the block and the supplier looks like this:

BarrierBlock::new

or keep the properties in the constructor and the supplier looks like this

() -> new BarrierBlock(Block Properties)

 

Posted
30 minutes ago, Luis_ST said:

 

or keep the properties in the constructor and the supplier looks like this


() -> new BarrierBlock(Block Properties)

 

Why this gives error? 

Following gives error: java.lang.NoSuchFieldError: field_151573_f
	at com.mcexamples.lists.BlockList.lambda$static$0(BlockList.java:19) ~[main/:?]

 

Posted

Two of those files are 0 bytes, nice.

Anyway:

Quote

java.lang.NoSuchFieldError: field_151573_f
    at com.mcexamples.lists.BlockList.lambda$static$0(BlockList.java:29)

Your BlockList file is only 25 lines long.

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
21 minutes ago, Luis_ST said:

please update your git repo, as this version of the mod (on github) seems is outdated, or is not complet...

updated the repo. However, it's the same line 

 public static final RegistryObject<Block> SILVER_BLOCK = BLOCKS.register("silver_block", () ->
	    		new Block(Properties.of(Material.CLAY, MaterialColor.COLOR_CYAN)));

that shows error for some field like "15**" :: Logs attached from latest run

debug.log latest.log

Posted (edited)
24 minutes ago, DracoDoes said:

Ok, ya, updated now.

 

Thanks

Why does the mod id in the .toml file not match that of your packages?

 

The path of your classes should be src/main/java/com/<MOD_AUTHOR>/<MOD_ID>/...

But yours is src/main/java/com/mcexamples/examplemod/...

 

So to fix your issue, under the package .../java/ refactor the package mcexamples to the mod author, so 'dracodoes' for example, then refactor the package examplemod to 'mcexamples'

Edited by aritod
Posted
9 minutes ago, aritod said:

Why does the mod id in the .toml file not match that of your packages?

 

 

so in .toml file, I added mcexamples with dependencies. (main folder under src/main/java) 

But modid is present in .toml file modId="mcexamples"  line 18

If I add one more entry with modId= mcexamples, (name of the ModId) in .toml file, I get the same error. I have tried it earliar. But believe me, it gives the same error.

 

[[dependencies.mcexamples]] #optional
    # the modid of the dependency
    modId="forge" #mandatory

Posted (edited)
19 minutes ago, DracoDoes said:

so in .toml file, I added mcexamples with dependencies. (main folder under src/main/java) 

But modid is present in .toml file modId="mcexamples"  line 18

If I add one more entry with modId= mcexamples, (name of the ModId) in .toml file, I get the same error. I have tried it earliar. But believe me, it gives the same error.

 

[[dependencies.mcexamples]] #optional
    # the modid of the dependency
    modId="forge" #mandatory

I'm not sure I quite understand you.

 

What I'm saying is that your project structure should look like this:

 

2018278076_ScreenShot2021-05-24at2_33_53PM.thumb.png.2a171bbcf699253a7debe1a82394c3a5.png

 

Notice how the path is src/main/java/com/dracodoes/mcexamples/ instead of src/main/java/com/mcexamples/examplemod/

So make sure your project structures looks like this. Obviously, you can rename the directory 'dracodoes' to another name, such as MacDax, etc, as it represents the mod author.

I am not asking you to change anything in your mods.toml file, so either I misunderstood you, or you misunderstood me.

 

Also, sorry if this is not what you meant, because you were somewhat unclear.

Edited by aritod
Posted (edited)
1 hour ago, aritod said:

The path of your classes should be src/main/java/com/<MOD_AUTHOR>/<MOD_ID>/...

That should only be the path if you own the domain <MOD_AUTHOR>.com, which commonly isn't the case

if  you don't own a website/domain, the recommended package name is io.github.<MOD_AUTHOR>, or some repository hosting service you use.

The name of the package, however, does not affect the issue

Edited by kiou.23
Posted
10 minutes ago, kiou.23 said:

That should only be the path if you own the domain <MOD_AUTHOR>.com, which commonly isn't the case

if  you don't own a website/domain, the recommended package name is io.github.<MOD_AUTHOR>, or some repository hosting service you use.

The name of the package, however, does not affect the issue

That's what I thought.. so what's the issue?

Posted

Now my package structure looks like this:  But still it gives the same error:

image.png.84681aae1251b07fbd8fde5ca9696998.png

[24May2021 13:45:58.012] [Render thread/ERROR] [net.minecraftforge.fml.javafmlmod.FMLModContainer/LOADING]: Caught exception during event RegistryEvent.Register<minecraft:block> dispatch for modid mcexamples
java.lang.NoSuchFieldError: field_151571_B
	at com.MacDax.mcexamples.lists.BlockList.lambda$static$0(BlockList.java:27) ~[main/:?]
	at net.minecraftforge.registries.DeferredRegister.lambda$register$0(DeferredRegister.java:124) ~[forge-1.16.5-36.1.4_mapped_official_1.16.5-recomp.jar:?]

 

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

    • New users at Temureceive a 40 Off discount on orders over 40 Off Use the code [ACS766913] during checkout to get TemuDiscount 40 Off For New Users. You n save 40 Off off your first order with the Promo Code available for a limited time only. Extra 30% off for new and existing customers + Up to $40 Off % off & more. Temu Promo Codes for New users- [ACS766913] Temudiscount code for New customers- [ACS766913] Temu $40 Off Promo Code- [ACS766913] what are Temu codes- ACS766913 does Temu give you $40 Off - [ACS766913] Yes Verified Temu Promo Code january 2025- {ACS766913} TemuNew customer offer {ACS766913} Temudiscount codejanuary 2025 {ACS766913} 40 off Promo Code Temu {ACS766913} Temu 40% off any order {ACS766913} 40 dollar off Temu code {ACS766913} TemuCoupon $40 Off off for New customers There are a number of discounts and deals shoppers n take advantage of with the Teemu Coupon Bundle [ACS766913]. TemuCoupon $40 Off off for New customers [ACS766913] will save you $40 Off on your order. To get a discount, click on the item to purchase and enter the code. You n think of it as a supercharged savings pack for all your shopping needs Temu Promo Code 80% off – [ACS766913] Free Temu codes 50% off – [ACS766913] TemuCoupon $40 Off off – [ACS766913] Temu buy to get ₱39 – [ACS766913] Temu 129 coupon bundle – [ACS766913] Temu buy 3 to get €99 – [ACS766913] Exclusive $40 Off Off TemuDiscount Code Temu $40 Off Off Promo Code : (ACS766913) Temu Discount Code $40 Off Bundle ACS766913) ACS766913 Temu $40 Off off Promo Code for Exsting users : ACS766913) Temu Promo Code $40 Off off Temu 40 Off coupon code (ACS766913) will save you 40 Off on your order. To get a discount, click on the item to purchase and enter the code. Yes, Temu offers 40 Off Coupon Code “ACS766913” for Existing Customers.  You can get a 40 Off bonus plus 30% off any purchase at Temu with the 40 Off Coupon Bundle at Temu if you sign up with the referral code [ACS766913] and make a first purchase of $40 Off or more. Temu Promo Code 40 off-{ACS766913} Temu Promo Code -{ACS766913} Temu Promo Code $40 Off off-{ACS766913} kubonus code -{ACS766913} Get ready to unlock a world of savings with our free Temu UK coupons! We’ve got you covered with a wide range of Temu UK coupon code options that will help you maximize your shopping experience.30% Off Temu UK Coupons, Promo Codes + 25% Cash Back [ ACS766913]   Yes, Temu offers 40 off coupon code {ACS766913} for first-time users. You can get a $40 bonus plus 40% off any purchase at Temu with the $40 Coupon Bundle if you sign up with the referral code [ACS766913] and make a first purchase of $40 or more. If you are who wish to join Temu, then you should use this exclusive TemuCoupon code 40 off (ACS766913) and get 40 off on your purchase with Temu. You can get a 40% discount with TemuCoupon code {ACS766913}. This exclusive offer is for existing customers and can be used for a 40 reduction on your total purchase. Enter coupon code {ACS766913} at checkout to avail of the discount. You can use the code {ACS766913} to get a 40 off TemuCoupon as a new customer. Apply this TemuCoupon code $40 off (ACS766913) to get a $40 discount on your shopping with Temu. If you’re a first-time user and looking for a TemuCoupon code $40 first time user(ACS766913) then using this code will give you a flat $40 Off and a 90% discount on your Temu shopping.     •    ACS766913: Enjoy flat 40% off on your first Temu order.     •    ACS766913: Download the Temu app and get an additional 40% off.     •    ACS766913: Celebrate spring with up to 90% discount on selected items.     •    ACS766913: Score up to 90% off on clearance items.     •    ACS766913: Beat the heat with hot summer savings of up to 90% off.     •    ACS766913: Temu UK Coupon Code to 40% off on Appliances at Temu. How to Apply Temu Coupon Code? Using the TemuCoupon code $40 off is a breeze. All you need to do is follow these simple steps:     1    Visit the Temu website or app and browse through the vast collection of products.     2    Once you’ve added the items you wish to purchase to your cart, proceed to the checkout page.     3    During the checkout process, you’ll be prompted to enter a coupon code or promo code.     4    Type in the coupon code: [ACS766913] and click “Apply.”     5    Voila! You’ll instantly see the $40 discount reflected in your total purchase amount. Temu New User Coupon: Up To 90% OFF For Existing Customers Temu Existing customer’s coupon codes are designed just for new customers, offering the biggest discounts 90% and the best deals currently available on Temu. To maximize your savings, download the Temu app and apply our Temu new user coupon during checkout.     •    ACS766913: New users can get up to 80% extra off.     •    ACS766913: Get a massive 40% off your first order!     •    ACS766913: Get 20% off on your first order; no minimum spending required.     •    ACS766913: Take an extra 15% off your first order on top of existing discounts.     •    ACS766913: Temu UK Enjoy a 40% discount on your entire first purchase.
    • i have just made a modpack and i accidentally added a few fabric mods and after deleting them i can no longer launch the pack if any one could help these are my latest logs [22:42:24] [main/INFO]:additionalClassesLocator: [optifine., net.optifine.] [22:42:25] [main/INFO]:Compatibility level set to JAVA_17 [22:42:25] [main/ERROR]:Mixin config epicsamurai.mixins.json does not specify "minVersion" property [22:42:25] [main/INFO]:Launching target 'forgeclient' with arguments [--version, forge-43.4.0, --gameDir, C:\Users\Mytht\curseforge\minecraft\Instances\overseer (1), --assetsDir, C:\Users\Mytht\curseforge\minecraft\Install\assets, --uuid, 4c176bf14d4041cba29572aa4333ca1d, --username, mythtitan0, --assetIndex, 1.19, --accessToken, ????????, --clientId, MGJiMTEzNGEtMjc3Mi00ODE0LThlY2QtNzFiODMyODEyYjM4, --xuid, 2535469006485684, --userType, msa, --versionType, release, --width, 854, --height, 480] [22:42:25] [main/WARN]:Reference map 'insanelib.refmap.json' for insanelib.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:25] [main/WARN]:Reference map 'corpsecurioscompat.refmap.json' for gravestonecurioscompat.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:25] [main/WARN]:Reference map 'nitrogen_internals.refmap.json' for nitrogen_internals.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:25] [main/WARN]:Reference map 'arclight.mixins.refmap.json' for epicsamurai.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:25] [main/WARN]:Reference map 'simplyswords-common-refmap.json' for simplyswords-common.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:25] [main/WARN]:Reference map 'simplyswords-forge-refmap.json' for simplyswords.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:25] [main/WARN]:Reference map '${refmap_target}refmap.json' for corgilib.forge.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:25] [main/WARN]:Reference map 'MysticPotions-forge-refmap.json' for mysticpotions.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:26] [main/WARN]:Reference map 'packetfixer-forge-forge-refmap.json' for packetfixer-forge.mixins.json could not be read. If this is a development environment you can ignore this message [22:42:26] [main/WARN]:Error loading class: atomicstryker/multimine/client/MultiMineClient (java.lang.ClassNotFoundException: atomicstryker.multimine.client.MultiMineClient) [22:42:26] [main/WARN]:@Mixin target atomicstryker.multimine.client.MultiMineClient was not found treechop.forge.compat.mixins.json:MultiMineMixin [22:42:26] [main/WARN]:Error loading class: com/simibubi/create/content/contraptions/components/fan/AirCurrent (java.lang.ClassNotFoundException: com.simibubi.create.content.contraptions.components.fan.AirCurrent) [22:42:26] [main/WARN]:Error loading class: shadows/apotheosis/ench/table/ApothEnchantContainer (java.lang.ClassNotFoundException: shadows.apotheosis.ench.table.ApothEnchantContainer) [22:42:26] [main/WARN]:@Mixin target shadows.apotheosis.ench.table.ApothEnchantContainer was not found origins_classes.mixins.json:common.apotheosis.ApotheosisEnchantmentMenuMixin [22:42:26] [main/WARN]:Error loading class: se/mickelus/tetra/blocks/workbench/WorkbenchTile (java.lang.ClassNotFoundException: se.mickelus.tetra.blocks.workbench.WorkbenchTile) [22:42:26] [main/WARN]:@Mixin target se.mickelus.tetra.blocks.workbench.WorkbenchTile was not found origins_classes.mixins.json:common.tetra.WorkbenchTileMixin [22:42:27] [main/WARN]:Error loading class: tfar/davespotioneering/blockentity/AdvancedBrewingStandBlockEntity (java.lang.ClassNotFoundException: tfar.davespotioneering.blockentity.AdvancedBrewingStandBlockEntity) [22:42:27] [main/WARN]:@Mixin target tfar.davespotioneering.blockentity.AdvancedBrewingStandBlockEntity was not found itemproductionlib.mixins.json:davespotioneering/AdvancedBrewingStandBlockEntityMixin [22:42:27] [main/WARN]:Error loading class: fuzs/visualworkbench/world/inventory/ModCraftingMenu (java.lang.ClassNotFoundException: fuzs.visualworkbench.world.inventory.ModCraftingMenu) [22:42:27] [main/WARN]:@Mixin target fuzs.visualworkbench.world.inventory.ModCraftingMenu was not found itemproductionlib.mixins.json:visualworkbench/ModCraftingMenuMixin [22:42:27] [main/WARN]:Error loading class: fuzs/easymagic/world/inventory/ModEnchantmentMenu (java.lang.ClassNotFoundException: fuzs.easymagic.world.inventory.ModEnchantmentMenu) [22:42:27] [main/WARN]:@Mixin target fuzs.easymagic.world.inventory.ModEnchantmentMenu was not found skilltree.mixins.json:easymagic/ModEnchantmentMenuMixin [22:42:27] [main/WARN]:Error loading class: shadows/apotheosis/ench/table/ApothEnchantmentMenu (java.lang.ClassNotFoundException: shadows.apotheosis.ench.table.ApothEnchantmentMenu) [22:42:27] [main/WARN]:@Mixin target shadows.apotheosis.ench.table.ApothEnchantmentMenu was not found skilltree.mixins.json:apotheosis/ApothEnchantContainerMixin [22:42:27] [main/WARN]:Error loading class: shadows/apotheosis/adventure/affix/socket/SocketingRecipe (java.lang.ClassNotFoundException: shadows.apotheosis.adventure.affix.socket.SocketingRecipe) [22:42:27] [main/WARN]:@Mixin target shadows.apotheosis.adventure.affix.socket.SocketingRecipe was not found skilltree.mixins.json:apotheosis/SocketingRecipeMixin [22:42:27] [main/WARN]:Error loading class: shadows/apotheosis/adventure/affix/socket/gem/bonus/AttributeBonus (java.lang.ClassNotFoundException: shadows.apotheosis.adventure.affix.socket.gem.bonus.AttributeBonus) [22:42:27] [main/WARN]:@Mixin target shadows.apotheosis.adventure.affix.socket.gem.bonus.AttributeBonus was not found skilltree.mixins.json:apotheosis/AttributeBonusMixin [22:42:27] [main/WARN]:Error loading class: shadows/apotheosis/adventure/affix/socket/gem/bonus/EnchantmentBonus (java.lang.ClassNotFoundException: shadows.apotheosis.adventure.affix.socket.gem.bonus.EnchantmentBonus) [22:42:27] [main/WARN]:@Mixin target shadows.apotheosis.adventure.affix.socket.gem.bonus.EnchantmentBonus was not found skilltree.mixins.json:apotheosis/EnchantmentBonusMixin [22:42:27] [main/WARN]:Error loading class: shadows/apotheosis/adventure/client/AdventureModuleClient (java.lang.ClassNotFoundException: shadows.apotheosis.adventure.client.AdventureModuleClient) [22:42:27] [main/WARN]:@Mixin target shadows.apotheosis.adventure.client.AdventureModuleClient was not found skilltree.mixins.json:apotheosis/AdventureModuleClientMixin [22:42:27] [main/WARN]:Error loading class: me/shedaniel/rei/RoughlyEnoughItemsCoreClient (java.lang.ClassNotFoundException: me.shedaniel.rei.RoughlyEnoughItemsCoreClient) [22:42:27] [main/WARN]:Error loading class: com/replaymod/replay/ReplayHandler (java.lang.ClassNotFoundException: com.replaymod.replay.ReplayHandler) [22:42:27] [main/WARN]:Error loading class: net/coderbot/iris/pipeline/newshader/ExtendedShader (java.lang.ClassNotFoundException: net.coderbot.iris.pipeline.newshader.ExtendedShader) [22:42:27] [main/WARN]:Error loading class: net/irisshaders/iris/pipeline/programs/ExtendedShader (java.lang.ClassNotFoundException: net.irisshaders.iris.pipeline.programs.ExtendedShader) [22:42:27] [main/INFO]:Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.6).
    • My Mohist server crashed as well but all it says in logs is " C:\Minecraft Mohist server>java -Xm6G -jar mohist.jar nogul  Error: Unable to access jarfile mohist.jar   C:\Minecraft Mohist server>PAUSE press any key to continue  .  .  . " Any ideas? i have the server file that its looking for where its looking for it.
  • Topics

×
×
  • Create New...

Important Information

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