Jump to content

Ore dictionary directionality


patmo98

Recommended Posts

In general I have seen four different uses for the ore dictionary:

*) Interchangeability in recipes (Using clear glass in recipes that need glass)

*) Equivalent exchange ( Using a Unifier to change IC2 Copper into TE Copper)

*) Downcasting ( For example, if you could use a Unifier to convert "clear glass" into "glass"

*) Filtering ( Searching in NEI or using Mekanism machines)

 

 

I am willing to do the coding myself and submit a pull request for this idea, but I wanted to check if this had already been shot down.

 

The idea is that when someone registers something in the ore dictionary, they also pass a parameter that tells what dictionary uses are permitted.  (This would probably be an overload so that backwards compatibility isn't broken)

 

 

 

The modes would be:

*) Bi directional (The player can convert from this item or to this item in a unifier.  This is useful for items like copper ingots where the items should be the same)

 

*) Downcast-able (I'm open to suggestions on this name.  This is for items that are more valuable than the normal item, so you let someone predict this item into the "normal" version, but you can't convert to this version.  As an example, you might allow the user to convert TC Clear Glass into Glass, but you don't let the user convert normal Glass into Clear Glass)

 

*) Nonconvertible (You should never be able to convert these items into another type, but they still work for filtering and recipes.  This is used for items like Forestry combs, where it would defeat the purpose of the mod if you could unify one type of comb into another, but you still want to be able to use the dict in a recipe.)

 

 

Is there any interest in this?

Link to comment
Share on other sites

Why? This over complicates the ore dictionary. It's NOTHING more then 'this item stack should be treated IDENTICAL to this item stack'

Anything else people impose on it is just dumb.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Why? This over complicates the ore dictionary. It's NOTHING more then 'this item stack should be treated IDENTICAL to this item stack'

Anything else people impose on it is just dumb.

 

I agree that people are trying to abuse the ore dictionary for something very different from its original purpose, but I think the number of people doing this shows that there is a real need for something like this.

 

Right now this is causing problems for mod makers because lots of popular mods are using Ore Dictionary in places where the item items are not identical.  That is the problem.

 

If I can implement this cleanly and without breaking backwards compatibility with what is already in place, would you be willing to consider the pull request?

Link to comment
Share on other sites

Not really, there is no good reason for this.

Expanding the dictionary to more than what it is is just a dumb idea.

If there are mods that are using the ore dictionary for more then 'this item is that item' then they are doing it wrong.

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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