Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Unspecified value type for entry in global config defaults to boolean?


jackd23
 Share

Recommended Posts

Forge 4.6.12.511 for Minecraft 1.4.6

 

My guess was, that the prefix on value or key names ("I:xxx", "S:xxx", "B:xxx" e.g.) is used to explicitly identift value types, and stand for integer, string, and boolean respectively.

 

Rummaging around in the global config file, I noticed that after I start the client for a second time (first time is when the global cfg is created), the version=3.3.0 (note the missing specifier) entry from /config/buildcraft/main.conf, will get turned into B:version=.

 

I'd reckon it should default to string instead, so it doesn't end in a parsing/casting error if you explicitly expect a value of the type specified.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • Use the forge provided spawn egg. Not your current hack.
    • Lol. I didn't mean the literate word. Of course I can review that in a translator. By definition that would mean "to repeatedly, or in succession tag/label/numerize/sent/release something", if related to actual code? I may as well completely expressed myself wrongly. What I mend was, when do I want to use it? Is it comparable to a "for loop", only it automatically applies numbered variables? Does it have any relation to "produce in series"? I've seen people using it, and asking for it all the time, yet I haven't had a case to use it myself. I just want to prepared, so I actually understand when I want to use it, once it shows up. I guess I'd use it when a serializer doesn't exist for a given tag/recipe/loot_table etc.?
    • Error = Required RegistryObject<?extends EntityType<?>> Provided EntityType<SKELETON>
    • What's then the problem? As uSkizzik already mentioned Forge has their own SpawnEggItem use it
    • I think the error comes from this java class even though it dosen't show any error -  package com.mahidhoni123.forgemod.items; import net.minecraft.core.BlockSource; import net.minecraft.core.Direction; import net.minecraft.core.dispenser.DefaultDispenseItemBehavior; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MobSpawnType; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.SpawnEggItem; import net.minecraft.world.level.block.DispenserBlock; import net.minecraftforge.common.util.Lazy; import net.minecraftforge.fml.util.ObfuscationReflectionHelper; import net.minecraftforge.fmllegacy.RegistryObject; import java.util.ArrayList; import java.util.List; import java.util.Map; public class ModSpawnEggItem extends SpawnEggItem { protected static final List<ModSpawnEggItem> UNADDED_EGGS = new ArrayList<>(); private final Lazy<? extends EntityType<?>> entityTypeSupplier; public ModSpawnEggItem(final RegistryObject<? extends EntityType<?>> entityTypeSupplier, int p_43208_, int p_43209_, Properties p_43210_) { super(null, p_43208_, p_43209_, p_43210_); this.entityTypeSupplier = Lazy.of(entityTypeSupplier::get); UNADDED_EGGS.add(this); } public static void initSpawnEggs(){ final Map<EntityType<?>, SpawnEggItem> EGGS = ObfuscationReflectionHelper.getPrivateValue(SpawnEggItem.class, null, "field_195987_b"); DefaultDispenseItemBehavior dispenseBehavior = new DefaultDispenseItemBehavior() { @Override protected ItemStack execute(BlockSource p_123385_, ItemStack p_123386_) { Direction direction = p_123385_ .getBlockState().getValue(DispenserBlock.FACING); EntityType<?> type = ((SpawnEggItem) p_123386_.getItem()).getType(p_123386_.getTag()); type.spawn(p_123385_.getLevel(), p_123386_, null, p_123385_.getPos(), MobSpawnType.DISPENSER, direction != Direction.UP, false); p_123386_.shrink(1); return p_123386_; } }; for (final SpawnEggItem spawnEgg : UNADDED_EGGS) { EGGS.put(spawnEgg.getType(null ), spawnEgg); DispenserBlock.registerBehavior(spawnEgg, dispenseBehavior); } UNADDED_EGGS.clear(); } @Override public EntityType<?> getType(CompoundTag nbt) { return this.entityTypeSupplier.get(); } }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.