perromercenary00
Members-
Posts
849 -
Joined
-
Last visited
-
Days Won
5
Everything posted by perromercenary00
-
Good days sorry is hard to express compex ideas in a non native languague i been working in a drill and i need this drill needs to have two animation the one is just the drill spining and drilling that one is on right clickand works holding right click anyway to switch the json models and the animation i need to read the values from the capability in the ModItemModelProperties thats an issue i having know i dont know how to get the capability thing to read the values soo i just have his bunch of debris code this is mi capability exactly i need to get the output from the method public int get_tick() to use thnks for your time
-
good nights this one is a little hard to explains i finally managae to get working the briefcase i still working whit the block part but still back in the 1.8 the idea whit this briefcase was to give the player an initial inventory soo ineed to preload the briefcase whit items from code digginup in the code i know minecrfas store inventories like nbt data usig a listtag named "Items" so i copy paste code from the chest container class to load things to mi briefcase but notice mi briefacase "ITEMS" and the "ITEMS" in the GUI dont match looks like to separate sets of nbt data both sets of "ITEMS" persist afther closing/reload the world soo is not an overwrite thing this are the methods i use read write the "ITEMS" in the item stack this is the code i use for the test ########################################################################### This getting too long i need to confirm if the capabilities system has its own database apart from the vainilla nbt thing and if its like that how doo i access tha data to put items in the briefcase ? class briefcase_item class item_c_provider class item_handler class menu9 thanks from your time
-
something more like the shield or the bow changin from inner variable or nbt or two diferent items
-
[1.19.2] ItemCraftedEvent triggers twice for each crafted item
perromercenary00 replied to AikonCWD's topic in Modder Support
expected behaveur nothing to worry about @SubscribeEvent public static void onCrafting(PlayerEvent.ItemCraftedEvent event) { ItemStack items = event.getCrafting(); Entity entity = event.getEntity(); Level warudo = entity.level; System.out.println("--------------" + ((warudo.isClientSide)? " local world " : " server world ") ); System.out.println("Description ID: " + items.getItem().getDescriptionId()); System.out.println("Count: " + items.getCount()); } -------------- local world Description ID: block.mercblk.deepslate_panel Count: 12 -------------- server world Description ID: block.mercblk.deepslate_panel Count: 12 -
goo days i have made some panels and trapdoors basically you take a block and split in four simetrical parts By the way this panels works it has sense to make them in the cutting table is posible to add mi blocks in a json some where ? or its the cutting table a michine whit a close predefined pool of recipes and i have to make a custome cutting table ?
-
jumm thanks you and im currently stuck at this point i made a custome gui i made an itemstack class whit the "implements MenuProvider" thing pointing to that gui but - idont get how to read the inventory from the itemstack soo mi upper slots are just draw in the background but no funtionality i dont find other items inside vainilla minecraft implementhing the capabilityt thing soo i letthing eclipse to fill the gap, no succes here //this part of here //this one created by eclipse public RegistryObject<MenuType<menu9>> getCapability(Capability<IItemHandler> itemHandlerCapability) { // TODO Auto-generated method stub return null; } //this one copied from the GemInfusingStationBlockEntity example //@Override public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) { if(cap == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { return lazyItemHandler.cast(); } //return super.getCapability(cap, side); return lazyItemHandler.cast(); } -also a idont know how or where the gui will return the changes isee the player inventory gets the blocks i change of place soo i speculate the gui will return the inventory throught the "this.data = new ContainerData()" and gonna be recived inside the contructor of mi brief_case item class the plan here is to directly pass the itemstack to the custome gui way the inventory gets store inside the brefcase_item as nbt data with no entity/tylenetity in the middle of the operation mercblk.blocks.maletin.briefcase_item; this is the gui i made coping from kaupenjoe tutorial in the second constructor "public menu9(int id, Inventory inv, briefcase_item container_item, ContainerData data)" i need to extract the inventory from the container_item to create the slots but dont get how to make that part works mercblk.blocks.maletin.screen.menu9; the screen thing whit the background image MenuInit Well thanks for your time
-
what are trying to achive op to understand the raytrace you have to look into te abstrab arrow class mostly is the same but they change the names of things package net.minecraft.world.phys.HitResult; i do this when i want to search things ignoring liquids but stoping on solid blocks this.hitresult = this.warudo.clip(new ClipContext(this.vi, this.vo, ClipContext.Block.COLLIDER, ClipContext.Fluid.NONE, this.player_entity));
-
i was looking on more code to open a menu it force me to provide an MenuProvider NetworkHooks.openScreen((ServerPlayer) pe, ghost, pos); NetworkHooks.openScreen((ServerPlayer) pe, ghost); i dont understand the capability thing dispensers and chest still save the data as nbt tags also networkhooks only has 2 openscreen methods asking for the player an a MenuProvider Entity where i can find a tutorial or code i can look at to make mi own code ?
-
Good days Im trying to remake the briefcase item from mi old mod i find and old video I made this armours whit pockets and a interface to interact whit those pockets i made this briefcase_item whit 9 slots if you right click whit the item in the hand its open a dispenser like interface from where you can interac and store items in the briefcase_item if you right click the floor while crounching the briefcase would become a block and the items stored would go as nbtdata to the tileentity in the briefcase_block if you right click the briefcase_block it would disapear returning as the briefcase_item to the player inventory whit all the items inside all that was minecraft 1.8 before capabilities and that code is long lost //########## ########## ########## ########## now in 1.19.2 coping code from the dispenser and looking to the Kaupenjoe tutorials i manage to make this briefcase_panel and the item but im far from the behaveour of the 1.8 version whit the help of the Kaupenjoe tutorials i fix the invisible texture problem and the data now is saved to the world soo the stored items persist inside the blockentity after close/open the game but but but ########### In this moment the menu pops when right clicking the block i want the dispenser menu to cameout but from the briefcase_item but no idea how to call an menu from an item i need guidance whit that feature can you help me with that mi briefcase_block Mi briefcase ghost BlockEntity mi briefcase item is an stuff state a blockitem i dont know maibe this must be a regular item Thanks for your time
-
i have similar problem in mi case was the tags expecifical this one src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json afther i realized i made some test and it frikkks up pickaxes if just mispell a block name and also if yo put the name of a block in the list but forget to add the ".requiresCorrectToolForDrops()" on declaring the block
-
good nights the thing i currently in is to make the player to rotate and look to some ghost entity under certain non defined yet conditions the code is still wip soo for now im just looking to find the nearest living entity and rotate to look diretly towars the target getEyePosition() i alredy have the maths but have troubles to scan the area and find the nearest entity from LivingEntity mi findSourroundingEntitys() looks like just picking ramdon entities sometimes the close sometimes the farest or none at all minecraft has alredy a method for that but its asking for an object i dont get how to setup thas why i begin to make my own level.getNearbyEntities(Class<T>, TargetConditions, pe, aabb_box); i need a working example of getNearbyEntities soo i can use it as template for mi code thanks for your time
-
i was thinking in that back in 1.12 when i was doing the guns but mi plans was to make a holder item something like an small box but in the json display firstperson/left/right hand set the size to 0.0 this box has an nbt container whit only one space for an itemstack and to avoid missing the item the box count 20 ticks in OnUpdate() and delete itself returning the stored itemstack back to that hand slot well is not easy solution i never do the code for that may is posible to delete the rendered arm for the client side or something the bow does
-
uhh im doing something complicated i made some panels blocks of various materials and glass also its just 1/4 of a full block and can have 6 directions that works nice but sometimes is a little hard to set the panel in the exact place i want it to be too fix that i made an entity based on abstract_arrow called "aligner_entity" for now is just a white gray texture. this entity binds to the player and every 5 ticks detecs what the player looking at and updates its position|rotation to mach where a panel_block would be placed if any the entity works nice and all ####################################################################### now i need to spawn the entity and bind it to the player any time the player hold one of mi blocks in its hand and also kill/discard the entity when player change to someting else soo i doo the event thing the LivingEquipmentChangeEvent event trigers everytime the player select an item in the hotbar the comented code its just experiments i been doing sorry is hard to comunicate complex ideas in a non native languague the "if (itemstack.getItem() == BlockInit.MANHOLE_PANEL.get().asItem())" works to detect mi block but i have like 120 it would be not resources wise to make a list and compare against all 120 blocks everytime the user select a diferent item in the hotbar all mi blocks are made from 3 main classes panel.class puerta.class trampilla.class //this one is instance of puerta soo it dont mathers if i try to made an "if (itemstack.getItem() instanceof panel && !warudo.isClientSide) " // it says "incompatible conditional operand types item and panel" sounds logic coze one is an item object and the other is a block class ##################################### ya i need is to know if the item form the itemstack the LivingEquipmentChangeEvent gives me was made from the panel block class without having to compare to each all of mi blocks thanks for your time
-
render translucent block thought request
perromercenary00 replied to duyms's topic in Modder Support
if its like the glass block you need to declare the block whit the .noOcclusion() thing public static final RegistryObject<Block> GLASS_MESH_PANEL = registerBlock("glass_mesh_panel", () -> new glass_mesh(Block.Properties.copy(Blocks.IRON_BARS).noOcclusion() )); an in the json model file must have "ambientocclusion": "true", "render_type": "cutout", it you wanna get a texture whit a transparency at 50% or something i dont know how to do that an i wanna do the same but whit an entity im working on -
hi theres the idea i made this glass block reinforced whit steel mesh if the player of a mob breaks it it just change state and becomes opaque now the explotion part when explode rhis block its supouse to become opaque as well but that part dont work really really i dont know what happening here .... any idea ?
-
Method that gets called once when an item is created?
perromercenary00 replied to DrNickenstein's topic in Modder Support
i do something similar in 1.8 the only efective way i found was to add boolean tag initialized then in every get funtion i check if initialized == true if not the initialize it -
im doing some advances here but still missing something soo i made an custom entity coping things from AbstractHorse and pig class i set a fire particle to know where the entity is and the entity spawns but player dont mount it the toilet_block if( !postate.get_POWERED() ) { toilet_entity r_entity = setOpen( warudo, blkstate, pos); if( r_entity != null ) { //p_entity.addPassenger(pe); r_entity.startRiding(pe); } } set some SystemOut's and it seems i cannot right click the entity but entity has bounding box // #################### #################### #################### public InteractionResult mobInteract(Player p_29489_, InteractionHand p_29490_) { InteractionResult interactionresult = super.interact(p_29489_, p_29490_); System.out.println("mobInteract(whith Player pe )"); return interactionresult; } @Override public InteractionResult interact(Player pe, InteractionHand mano) { InteractionResult interactionresult = super.interact(pe, mano); System.out.println("interact(whith Player pe )"); } i missing something or you cannot make an rideable entity just extending from entity class ? thanks for your time
-
How to creat a shield for forge 40.1.0 1.18.2 ?
perromercenary00 replied to DEVAN FOURNIER's topic in Modder Support
do you have made yuor ModItemModelProperties.class to pass the values from the item to the json ? -
1.19.2 Forge modding: item texture not working
perromercenary00 replied to arber mara's topic in Modder Support
double check names and routes sometime eclipse dont detect the changes in code when done from outside eclise and need to manually refresh -
hi good nights im doing a custome toilet block and i need to set the collition boxes for it in four direction but for the explanatory process i only talking about facing nort i have two main collition boxes one for the chair and one for the tank protected static final VoxelShape NB_0 = Block.box( 3.0D, 0.0D, 4.0D, 10.0D, 8.0D, 12.0D); //base chair protected static final VoxelShape NT_0 = Block.box( 1.0D, 7.0D, 0.0D, 14.0D, 9.0D, 4.0D); //water tank i need the base chair part to have a hole in the center soo i made the hole a shape hopping to find a way to just sustract the hole area form the base box and later just joint the tank part like protected static final VoxelShape HOLE = Block.box( 6.0D, 0.0D, 6.0D, 10.0D, 8.0D, 10.0D); //base whit a hole => Shapes.join( NB_0, HOLE, BooleanOp.? ) protected static final VoxelShape caja_n = Shapes.join( Shapes.join( NB_0, HOLE, BooleanOp.? ) ,NT_0 , BooleanOp.OR); //Shapes.join(caja, Y_5_AABB, BooleanOp.OR); soo iwas looking inside the BooleanOp.class net.minecraft.world.phys.shapes.BooleanOp.class an don't get a thing i guest is coze im not a english speaker soo this things dont make sense for me is like here im joining too forms using BooleanOp.OR but that dont make sense, in mi languague that must be a BooleanOp.AND operation soo how i cut the small hole shape from the bigger base chair part ? thanks for you time
-
hellow MTiers.STEEL_SMALL is just the custome tier material i create for steel i also check that change the material tier from mi items to iron just to test and is still failing so i change public static final RegistryObject<Item> PICKAXE_STEEL = ITEMS.register("pickaxe_steel", () -> new PickaxeItem(MTiers.STEEL_SMALL, 1, -2.8F, (new Item.Properties().tab(tab.instance) ))); to public static final RegistryObject<Item> PICKAXE_STEEL = ITEMS.register("pickaxe_steel", () -> new PickaxeItem(Tiers.IRON, 1, -2.8F, (new Item.Properties().tab(tab.instance) ))); but no avail is the same problem it works in eclipse but not in minecraft i have a bunch of mods in mi minecraft game and i realize it fails only when mi other mod mercenary_blocks_1.19.2-006.jar is in the folder curously the vainilla pickaxes also fail to break blocks long story short i have somehow messed up the tags in src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json i dont see any error nor eclipse marks red nothing but anyway something wrong