perromercenary00
Members-
Posts
849 -
Joined
-
Last visited
-
Days Won
5
perromercenary00 last won the day on May 6
perromercenary00 had the most liked content!
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
Recent Profile Visitors
270619 profile views
perromercenary00's Achievements
Dragon Slayer (6/8)
9
Reputation
-
i have this custome crossbow i made it autoloads after the first shoot is nice and all but i don't like how when aiming it begins missaligned a little to the right then it slowly trembles a few and aligning whit the crosshair this is coze the bow animation id vertical and made this crosbow rotate 90degrees public UseAnim getUseAnimation(ItemStack p_40678_) { return UseAnim.BOW; } why i dont use UseAnim.CROSSBOW for a crossbow you see the vainilla crossbow from the CrossbowItem.class uses a tag to know if its pulling to load an arrow or to shoot private static final String TAG_CHARGED = "Charged"; i copy this methods to mi crossbow and set to UseAnim.CROSSBOW but dont seems to do nothing public static boolean isCharged(ItemStack p_40933_) { CompoundTag compoundtag = p_40933_.getTag(); return compoundtag != null && compoundtag.getBoolean("Charged"); } public static void setCharged(ItemStack p_40885_, boolean p_40886_) { CompoundTag compoundtag = p_40885_.getOrCreateTag(); compoundtag.putBoolean("Charged", p_40886_); } inside LivingEntity.class there is this .getUseItemRemainingTicks() thats used to calculate the bow pulling but seems like theres no .setUseItemRemainingTicks() hoping to be understandable i need to override the way the pulling animation is calculated to set it to the max from the beginning just for the sake of aesthetics
-
1.20.6 No imports resolvable in unmodified MDK (UNSOLVED)
perromercenary00 replied to Tiny Desk Engineer's topic in Modder Support
is usual than the imported classes changes in name and int path from version to version are you sure the code you are putting is for the version you are trying to run -
i guest is the word "models/" in the json pathname abrasmagics:models/item/ingot_test.json { "parent": "mercmod:item/parent/ingots/parent_ingot_model", "textures": { "layer0": "mercmod:item/surface/acero-clear", "particle": "mercmod:item/surface/acero-clear" } }
-
Sending command to server from client
perromercenary00 replied to sheepie20's topic in Modder Support
you cannot sent chat message to server coze you cannot display messages in the server side thats a client only thing if you wanna make something happend server side from a client side trigger then https://www.youtube.com/results?search_query=kaupenjoe+networking -
Help with Arrow rendering incorrectly
perromercenary00 replied to mahatmagandhrian's topic in Modder Support
yes you are right """My best guess is that this behaviour is caused, because minecraft appears to try to predict the projectiles path on the client side instead of constantly synching (perhaps something to do with it implementing the TracableEntity interface??). I am thinking I need help with either""" i have this problem but left it behind coze many other thing to do Mi plan was to sync the local word arrow position just the first tick using the EntityDataAccessor and let it go from there private static final EntityDataAccessor<Vector3f> VI = SynchedEntityData.defineId(lance_entity.class, EntityDataSerializers.VECTOR3); // #################### #################### #################### @Override protected void defineSynchedData() { this.entityData.define(VI, new Vector3f(0f,0f,0f) ); } @Override public void tick() { //do some code to update the posicion just one time this.entityData.set(VI, this.position() ); if( vi is not [0,0,0] ) this.setPos( this.entityData.get(VI) ); when you make it work lend me your code -
[1.20.1] What has block#getMaterial been changed to?
perromercenary00 replied to Azarsra's topic in Modder Support
nothing replace it you have to use the minecraft block tags or made your own lists of blocks if (dblkstate.canBeReplaced()) { System.out.println("blkstate.canBeReplaced()"); } if (dblkstate.is(BlockTags.MINEABLE_WITH_AXE)) { System.out.println("BlockTags.MINEABLE_WITH_AXE"); } if (dblkstate.is(BlockTags.MINEABLE_WITH_PICKAXE)) { System.out.println("BlockTags.MINEABLE_WITH_PICKAXE"); } if (dblkstate.is(BlockTags.MINEABLE_WITH_SHOVEL)) { System.out.println("BlockTags.MINEABLE_WITH_SHOVEL"); } if (dblkstate.is(BlockTags.LOGS)) { System.out.println("BlockTags.LOGS"); } if (dblkstate.is(BlockTags.PLANKS)) { System.out.println("BlockTags.PLANKS"); } -
that means writing yourself the code
-
[1.20.1] help with transparent blocks
perromercenary00 replied to Somerandomguy98's topic in Modder Support
im just coping the properties from the glass block whit no occlusion and the "render_type": "translucent", public static final RegistryObject<Block> GLASS_PANEL = registerBlock( "glass_panel", () -> new panel_pglass(BlockBehaviour.Properties.ofFullCopy(Blocks.GLASS_PANE).noOcclusion(), """ { "name":"glass_panel", "en_us_lang" : "Glass Panel", "es_es_lang" : "Panel De Vidrio", "north": "minecraft:block/glass", "crafthing_input_c0": "minecraft:glass", "cutthing_input_c0": "minecraft:glass", "no_drop" : "true" } """, crear_archivos_glass ) ); { "credit": "Made with Blockbench", "ambientocclusion": "true", "render_type": "translucent", "elements": [ { "name": "panel", "from": [0, 0, 0], "to": [16, 16, 4], "faces": { "north": {"uv": [0, 0, 16, 16], "texture": "#north"}, "east": {"uv": [12, 0, 16, 16], "texture": "#east"}, "south": {"uv": [16, 0, 0, 16], "texture": "#south"}, "west": {"uv": [0, 0, 4, 16], "texture": "#west"}, "up": {"uv": [16, 16, 0, 12], "texture": "#up"}, "down": {"uv": [16, 4, 0, 0], "texture": "#down"} } } ], the thing whit this that rain and snow cannot be see trough the block -
you need a damage source and use it to hurt the entity thing DamageSource damagesource; //damagesource = level.damageSources().playerAttack((Player) le);//.trident(le, thing); damagesource = level.damageSources().mobAttack(player); if (thing.hurt(damagesource, damage)) { thing.setLastHurtMob(player); }
-
Hellow good days i have a custome block dead adventurer shaped i use to spawn mobs but the mobs i spawn has no equipment zombies without nothing and skeletons without bows minecraft has a series of json files organizing items and block by categories then there is the minecraft:data/minecraft/tags/items/swords.json { "values": [ "minecraft:diamond_sword", "minecraft:stone_sword", "minecraft:golden_sword", "minecraft:netherite_sword", "minecraft:wooden_sword", "minecraft:iron_sword" ] } and i got mi own json file with the mines /home/usuario/workspace/1.20.4/mercmod/src/main/resources/data/minecraft/tags/items/swords.json { "values": [ "minecraft:stick", "mercmod:knife_steel", "mercmod:sword_steel", "mercmod:warhammer_steel", "mercmod:battleaxe_steel", "mercmod:crowbar", "mercmod:lance_steel" ] } ############################ i wanna use this files, read them, randomly select one and set it for the mob mainhand i spawning i wanna do something like ArrayList<String> list = ItemTags.SWORDS.something_getKeys(); data/minecraft/tags/items/arrows.json data/minecraft/tags/items/axes.json data/minecraft/tags/items/hoes.json data/minecraft/tags/items/pickaxes.json data/minecraft/tags/items/shovels.json data/minecraft/tags/items/swords.json
-
the world capability works for the current world and its different for every dimension sound like what you need the only thing is you cannot access data from a diferent world things like reading a data of the overworld from the nether would nwork
-
use inventorytick() whit the slot number you can know if its into an armour slot //########## ########## ########## public void inventoryTick(ItemStack helditem, Level warudo, Entity en, int slot, boolean value) { Long wtick = 0L; int tick = 0; // System.out.println("\n#inventoryTick#\n"); if( !warudo.isClientSide ){ wtick = warudo.dayTime(); if( wtick % 20 == 0 && en instanceof Player ) { item_handler ih = get_itemhandler(helditem); //inicializar tiempo if (ih.start_time < 1L) { ih.start_time = wtick; } ih.time = (int) ( wtick - ih.start_time ); tick = ih.time; //cada 5 seg causar daño por fuego al player if (tick > 0 && tick % 100 == 0) { en.setSecondsOnFire(1); } //despues de un minuto el lingote se enfria y vielve a ser hierro if ( tick > 1200 ) { // helditem = new ItemStack( Items.IRON_INGOT, helditem.getCount() ); ((Player) en).getInventory().setItem(slot, helditem ); } } } }
-
[1.20.1] How to limit a slot to only 1 item?
perromercenary00 replied to IlluminatiJoe's topic in Modder Support
i have not test it but you must extend the slot class overriding the max stack size to 1 public int getMaxStackSize() { return this.container.getMaxStackSize(); } then in the menu class use your custome slot class to declare the slot this.addSlot(new SlotItemHandler(handler00, 6, 62, 35));//slot zero this.addSlot(new ArmourSlotItemHandler(handler00, null,5, 80, 8));//head -
Good days im working on this Costume underground dungeon the plan is creating a mineshaft tunel whit fully functional railway and rail switchs going deep down into the ground My hypothesis its than than the rails get created before the supporting stone blocks i was setting blocks whit Level.setBlock(pos,blkstate,2) in mode 2 i change it to 10 but the problem persist in the doorblock class it uses 3 as flag level.setBlock(p_52750_.above(), p_52751_.setValue(HALF, DoubleBlockHalf.UPPER), 3); i set 3 as flag the problem continues (i du not know what 3 means) this numbers are basically a mistery ===> i need the number mode to set a block into the world whithout doing any checks or triggering neighbors blocks ############# The nbt class has an Enum to make more redable the code is in "import net.minecraft.nbt.Tag;" nbtpos = entitydata.getList("blockPos", Tag.TAG_INT);// blockdata contains pos; if theres something like this for the setBlockMode that would be nice
-
this is a really old resurrected post anyway //values to nbt ListTag nbtblockpos = new ListTag(); nbtblockpos.add(IntTag.valueOf(blockPos.getX())); nbtblockpos.add(IntTag.valueOf(blockPos.getY())); nbtblockpos.add(IntTag.valueOf(blockPos.getZ())); entitydata.put("blockPos", nbtblockpos); ListTag nbtpos = new ListTag(); nbtpos.add(DoubleTag.valueOf(Pos.x)); nbtpos.add(DoubleTag.valueOf(Pos.y)); nbtpos.add(DoubleTag.valueOf(Pos.z)); entitydata.put("pos", nbtpos); //getting things back if(entitydata.contains("blockPos")) { nbtpos = entitydata.getList("blockPos", Tag.TAG_INT);// blockdata contains pos this.blockPos = new BlockPos( nbtpos.getInt(0), nbtpos.getInt(1), nbtpos.getInt(2) ); } this.pos = null; if(entitydata.contains("pos")) { nbtpos = entitydata.getList("pos", Tag.TAG_DOUBLE);// blockdata contains pos this.Pos = new Vec3( nbtpos.getDouble(0), nbtpos.getDouble(1), nbtpos.getDouble(2) ); }