Jump to content

perromercenary00

Members
  • Posts

    834
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by perromercenary00

  1. i fond the issue and dont like it in mi words i allways turn down render distance the bobbing effect the particles the shadows and pop up the light level is like a tradition to get the best experience from mi video card soo particles was not rendering coze i set particles to minimun, turn it to max and now it works is weird i could assure than before versions always pops particles from mods wherever the config says
  2. g days i need to show a particle at this exact vector but the particle donts spaws or its not visible soo i made this in a custom item to try figure out was wrong // ########## ########## ########## ########## @Override public InteractionResultHolder<ItemStack> use(Level warudo, Player pe, InteractionHand hand) { Vec3 vh = util.calcularVectores(pe, 2 , 0.0F );// if ( vh != null) //warudo.isClientSide && { util.showthis( String.format(" %1$s, %2$s, %3$s", vh.x, vh.y, vh.z ) , pe); warudo.addAlwaysVisibleParticle(ParticleTypes.FLAME, vh.x, vh.y, vh.z , 0.0D, 0.0D, 0.0D); warudo.addParticle(ParticleTypes.SMOKE, vh.x, vh.y, vh.z , 0.0D, 0.0D, 0.0D); pe.playSound(SoundEvents.FIRE_EXTINGUISH, 1.0F, 1.0F); } return InteractionResultHolder.pass(pe.getItemInHand(hand)); } util.calcularVectores(pe, 2 , 0.0F ); just calculate the position 2 meters in from of player if i hold rigth click from time to time i see the flame particle but never see the smoke the sound allways works soo ineed help whith this how i spawn a particle or its now an entity ?
  3. i have to make 3 slabs for mi mod so i public static final RegistryObject<Block> DIRT_SLAB = registerBlock("dirt_slab", () -> new SlabBlock(Block.Properties.copy(Blocks.DIRT))); public static final RegistryObject<Block> GRASS_SLAB = registerBlock("grass_slab", () -> new SlabBlock(Block.Properties.copy(Blocks.GRASS))); public static final RegistryObject<Block> GRAVEL_SLAB = registerBlock("gravel_slab", () -> new SlabBlock(Block.Properties.copy(Blocks.GRAVEL))); internally the 3 slabs point to the same 3 parent_model_slab json basemmod:block/parent/slab/parent_slab_bottom.json basemmod:block/parent/slab/parent_slab_double.json basemmod:block/parent/slab/parent_slab_top.json but the grass slab behave as she wants , the size is wrong and the size randomly change every time i put a newone also the block dont have fisical boundaries i cannot step on it also happends when in slab double but the other the dirt one and the gravel one just behave normally as expected ###### how i fix this also is posible to make the grass slab match the bioma color in an easy way i cannot make it work before this dark green texture match the most of forest biomas but not all and gonna looks weird on custome biomas thanks for your time
  4. Thanks man now i have something to work whit for( Entry<ResourceKey<Block>, Block> ResourceKey : ForgeRegistries.BLOCKS.getEntries() ) { Block actualBlock = ResourceKey.getValue(); String blockname = "" + actualBlock.getName(); System.out.println( blockname ); if( blockname.contains("deepslate") && blockname.contains("_stairs") ) { break; } }
  5. hi i need help whit animating and item i need to animated while on use i having following a tutorial for 1.16.5 making a ModItemModelProperties class and all but dont works for 1.19.2 exactly the ItemModelsProperties.register dont have a source import in 1.16.5 was in import net.minecraft.item.ItemModelsProperties; that means ItemModelsProperties change of name or was dropped and now the bow animation is done diferent also for the sake of saving time surely the way of declaring the item to attach the make_solution_shake(Item item) also change i need an example of the new way thanks for your attention
  6. hay you have a custome shoot method BulletEntity shoot(Level world, LivingEntity entity, float power, double damage, int knockback, RegistryObject<SoundEvent> soundName, float spreading) the vainilla arrow uses shootFromRotation(Entity le, float rot_pan, float rot_til, float left_offset, float fuerza, float precision) may when you make your custome is passing values to left_offset thing while it must remain in 0.0F
  7. well projectiles entities has its own method shootFromRotation float f = 1.0F; arrow.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, f * 3.0F, 1.0F); //i have the hipotesis than p_234612_4_ shifs the arrow vi to the left or right @Override public void shootFromRotation(Entity le, float rot_pan, float rot_til, float p_234612_4_, float fuerza, float precision) { float f = -Mth.sin(rot_til * ((float)Math.PI / 180F)) * Mth.cos(rot_pan * ((float)Math.PI / 180F)); float f1 = -Mth.sin((rot_pan + p_234612_4_) * ((float)Math.PI / 180F)); float f2 = Mth.cos(rot_til * ((float)Math.PI / 180F)) * Mth.cos(rot_pan * ((float)Math.PI / 180F)); this.shoot((double)f, (double)f1, (double)f2, fuerza, precision); Vec3 vector3d = le.getDeltaMovement(); this.setDeltaMovement(this.getDeltaMovement().add(vector3d.x, le.isOnGround() ? 0.0D : vector3d.y, vector3d.z)); }
  8. based on the log i think theres an error on curios.mixins.json file
  9. // ########## ########## ########## ########## @Override public InteractionResultHolder<ItemStack> use(Level warudo, Player pe, InteractionHand hand) { ItemStack itemstack = pe.getItemInHand(hand); pe.setXRot(pe.getXRot() - 15.0F); } //why xrot makes steve move its head up an down and not left and right // i thing someone messe that up
  10. well thats its i need to get the block or the default.blockstate from a block i only have an string "deepslate_bricks" "deepslate_brick_stairs" "deepslate_brick_slab" soo i create a map taken the internal of the block class and using regexp and awk i made this and after i realize is stupid and also dont include moded blocks i say to miself probably minecrafs already has a way of doing this lets ask for it in the forums basically i need per example i have this deepslate_brick block and to level the terrain i need to set some slabs around soo ineed to get the corresponding slab type to deepslate_brick to doo that i would have to search in the list for keys containing the word "deepslate_brick" and the word slab also not all blocks have slabs and stairs
  11. if you text the curios.mixins.json file on https://jsonchecker.com/ it pass or not
  12. Good days i dont speak english soo i gonna try to explain the idea i need help whit this i cannot figure out by myself the target i wanna reach is to create a bullet hole entity and this entity can hold explosives inside if the entity hole has explosives it has to glow a red light well i alredy create that in a mod i was making for 1.12 but never release i fond the assets part of the code and some youtube videos from that age this old renderer dotn works anymore as minecraft code has change soo mutch old youtube video notice that it sets a hole entity in the world and some hole entityes has that glowing red circles inside based on the arrow tutorial i made a entity and a renderer whit the shape of a full cube and make it soo it matches the size and position of the on ground block this is 1.16.5 code X (first step done) know i need to render a small glowing red square on the back side of the cube the south face but OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k); just trow errors soo iwas looking into spidy and enderman renderers to understand how the eyes glow is a second renderer and get lost on that ############################################################################### i hope you could understand what im trying to say i gona try again i want to create a renderer using this tree holes texture but i want the red parts to glow in the dark only the red parts but just declaring the red parts as dedicated vertex face // el que se ve desde adelante x this.vertex(matrix4f, matrix3f, ivertexbuilder, 10, 10, -10, 0.00F, 0.00F, -1, 0, 0, p_225623_6_); this.vertex(matrix4f, matrix3f, ivertexbuilder, 10, 10, 10, 1.00F, 0.00F, -1, 0, 0, p_225623_6_); this.vertex(matrix4f, matrix3f, ivertexbuilder, 10, -10, 10, 1.00F, 1.00F, -1, 0, 0, p_225623_6_); this.vertex(matrix4f, matrix3f, ivertexbuilder, 10, -10, -10, 0.00F, 1.00F, -1, 0, 0, p_225623_6_); and conjure over it the moderm equivalent of OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)j, (float)k); GlStateManager.disableBlend(); GlStateManager.enableAlpha(); to make it glow Thanks for your time
  13. i find the second @Mod.EventBusSubscriber(modid = baseMmod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE ) public class modevents { @SubscribeEvent public static void on_toss(ItemTossEvent event) { Entity entity = event.getEntity(); World warudo = entity.level; if (entity instanceof ItemEntity) { ItemEntity item_e = (ItemEntity)entity; ItemStack itemstack = item_e.getItem(); System.out.println("\n ItemTossEvent " + itemstack.getItem().getRegistryName() + "\n"); if (itemstack.getItem() == MItems.INGOT_IRON_RED_HOT.get()) { //item_e.kill(); //MItemEntity drop = new MItemEntity(warudo, (double)(pos.getX() + 0.5F) , (double)(pos.getY() + 1.0F) , (double)(pos.getZ() + 0.5F) , itemstack ); //warudo.addFreshEntity(drop); } } } but the first one no idea
  14. good days and sorry for asking for complicated stuff i got this red hot iron ingot item that must be turned into a steel ingot item under certain conditions ☑ turn the item into steel when right click cauldron but only if there is water in it ☑ turn the item into steel when right click water block ☐ turn the item into steel when dropped on water how i made this first made custome MItemEntity extending vainilla ItemEntity but changing the code from the public void tick() {} method to ask if the entity is in water kill it and drop a normal ItemEntity whit the basemmod:ingot_steel item #### there comes the question how i declare mi custme MItemEntity soo forges pick it up and also where i get the especial render ItemEntity use to display the contained itemstak ? this dont works public class ModEntityTypes { public static DeferredRegister<EntityType<?>> ENTITY_TYPES = DeferredRegister.create(ForgeRegistries.ENTITIES, basemmod.MOD_ID); public static final RegistryObject<EntityType<MItemEntity>> MITEMENTITY = ENTITY_TYPES.register("mitementity", () -> EntityType.Builder.create(MItemEntity::new, EntityClassification.MISC).size(1f, 1f) .build(new ResourceLocation(basemmod.MOD_ID, "mitementity").toString())); public static void register(IEventBus eventBus) { ENTITY_TYPES.register(eventBus); } } the second thing is whats the name from the event that trigers when user drops and item whit keyboard [Q] key ?? @SubscribeEvent public static void onItemDrop_orsomething(EntityLeaveWorldEvent event) { Entity entity = event.getEntity(); World warudo = event.getWorld(); if (entity instanceof ItemEntity) { ItemEntity item_e = (ItemEntity)entity; ItemStack itemStack = item_e.getItem(); if (itemStack.getItem() == MItems.INGOT_IRON_RED_HOT.get()) { item_e.kill(); ItemStack dropstack = new ItemStack( MItems.INGOT_STEEL.get(), 1); MItemEntity drop = new MItemEntity(warudo, (double)(pos.getX() + 0.5F) , (double)(pos.getY() + 1.0F) , (double)(pos.getZ() + 0.5F) , dropstack ); warudo.addFreshEntity(drop); } } } thanks for your time and help
  15. thanks guys is working now /src/main/resources/data/basemmod/recipes/material/panel_mesh.json { "type": "minecraft:crafting_shaped", "pattern": [ "###", "###" ], "key": { "#": { "tag": "forge:ingots/steel" } }, "result": { "item": "basemmod:panel_mesh", "count": 16 } } /src/main/resources/data/forge/tags/items/ingots/steel.json { "replace": false, "values": [ "basemmod:ingot_steel" ] }
  16. time to remake items has come an have problems/things dont fully get whit recipes i been digiing other post in the forums and google but it well dont get it i copy paste from vainilla recipes and change names this furnace recipe works perfect to make red hot iron from ingot_iron and is located in the same folder /src/main/resources/data/basemmod/recipes/material/red_hot_iron.json /src/main/resources/data/basemmod/recipes/material/panel_mesh.json soo is not location or rights to open the file no problem here them there comes the panel_mesh recipe is a shaped recipe just copy paste the one from iron bars and change the names to match mi item and mi panel The ingot_steel works the panel_mesh works but the one dont works and i dont know why this one dont works { "type": "minecraft:crafting_shaped", "pattern": [ "###", "###" ], "key": { "#": { "item": "basemmod:ingot_steel", } }, "result": { "item": "basemmod:panel_mesh", "count": 16 } } ############################################################# well this goo first but the target is to make the recipe works whit ore dictionary sooo the panel_mesh can be made whit ingot_steel from another mods or mi ingot steel could be used in the recipes from other mods i been diging google for answers im using this one https://github.com/MinecraftForge/Documentation/blob/1.16.x/docs/utilities/recipes.md in this example they are calling diamond from any mod using this "tag": "forge:gems/diamond" know if i want to register mi ingot_steel i would have to do something like /src/main/resources/data/basemmod/tags/items/ingots/steel.json { "replace": false, "values": [ "basemmod:ingot_steel" ] } and callet it like "tag": "basemmod:ingots/steel" i try it like this first and it dont works i think i also wrong declare mi ingot ###### i need an example code from a shapped recipe using ore_ditionary but whit moderm tag system thanks for your time
  17. at the end was without the class thing if( blkstate.getBlock() instanceof base_door_big ) { center = cursor; break; }
  18. good days im redoing the big 9 blocks door from mi old mod the thing is there is a main door block created from the class public class base_door extends DoorBlock { surrounded by 8 panel blocks created whit public class base_sub_puerta extends Block { if one of the sub panel blocks get clicked it has to search all the surrounding blocks looking for the main block to activate the function in base_door public static void toogle_door() function the thing is i dont remeber how i made it in 1.8 and most of the old code its loss just have some assets and youtube videos it was something like if( BlockState.getBlock() instanceof base_door.class ) How i check if block or item is instance of custome class ?
  19. make two blocks then on getStateForPlacement(BlockPlaceContext pContext){} make the code to check if the companion block exist if not create it then on public void playerDestroy(World warudo, PlayerEntity pe, BlockPos blockpos, BlockState blkstate, @Nullable TileEntity p_180657_5_, ItemStack itemstack) {} make the code to check if companion block exist and if its destroy it too
  20. not clear not clear when you use the custome item this custome item gets consumed ? does your item extends bowItem class or is just a regular item the item in the other is just not show while using or its get consumed and disapear?
  21. good days im redoing mi horizontal door using as base DoorBlock class and im trying to make the door to close both sides at same time https://i.postimg.cc/FKtZS9dr/door-Update.gif[/img] and i have troubles whit it i cannot manage to make the complementary side to close open whit the door i put some system.outs to see what of the code was actually runing and when right click the door the "public void setOpen()" gets trigered it founds the door and the companion door then change the value of block attribute open and updateShape() method gets trigered two times setting back the state of the companion door soo it close back the companion door [12:05:33] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:setOpen:149]: setOpen(true)basemmod:puerta_mesh [12:05:33] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:updateShape:238]: updateShape (left) basemmod:puerta_mesh [12:05:33] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:updateShape:238]: updateShape (right) basemmod:puerta_mesh [12:05:34] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:setOpen:149]: setOpen(false)basemmod:puerta_mesh [12:05:34] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:updateShape:238]: updateShape (right) basemmod:puerta_mesh [12:05:34] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:updateShape:238]: updateShape (left) basemmod:puerta_mesh i see the minecraft code it writes the block states back to world using level.setBlock(companion_pos, companion_blkstate, 10); i dont know what the int in the 3 attribute means but seems to do nothing here in 1.12 zero breaks the block and drops one does something i dont remenber and two breaks the block witout droping nuthing ¿ soo is there a equivalent of level.setBlock(BlockPos, BlockState, "just apply but Dont trigger Block internal methods") ? //################################################################################################# the second thing is to make the door compatible whit villagers in 1.12 just extending DoorBlock and overrriding setOpen() was enought for villagers to acknowledge the door and interact opening close it in but here they seem to see the door walk to it but then they are incapable of opening the door i dotn even know what to ask for is some subclass in another place or a thing you have to suscribe to some bus soo the door soo villagers can use this custome made doors ? Thanks for your attention
  22. // ########## ########## ########## ########## public static boolean is_a_solid_block(World warudo, BlockPos pos) { Material pmat = warudo.getBlockState(pos).getMaterial(); if ((pmat == Material.AIR) || (pmat == Material.PLANT) || (pmat == Material.LEAVES) || (pmat == Material.REPLACEABLE_PLANT)) { return false; } if ((pmat == Material.SNOW) || (pmat == Material.WOOD) || (pmat == Material.NETHER_WOOD)) { return false; } return true; }
  23. this is getting harder than it must be i end doing the side of the world thing to make the get min max block from chunk thing to iterate trough all the blocks xz from the chunk to get whats the highest one whit bpos = warudo.getHeightmapPos(Heightmap.Type.WORLD_SURFACE , new BlockPos(x, bmin.getY(), z)); and no mater what i use as Heightmap it includes wood blocks soo it marks as higher block the top of trees and also wood pre existent structure's as the higher block i remeber having the same problem in 1.8 but dont remember how i solved an as i loss that code i just have some pieces from things i write in the forum soo i dont have that solution // ########## ########## ########## ########## // en que cuadrante del plano cartesiano se encuentra el blocke public static String get_cuadrante(Vector3d vector) { return get_cuadrante(vector.x, vector.y, vector.z); } public static String get_cuadrante(BlockPos pos) { return get_cuadrante(pos.getX(), pos.getY(), pos.getZ()); } public static String get_cuadrante(double x, double y, double z) { // nortwest - 0 - // norteast + 0 - // southwest - 0 + // southeast + 0 + if (x < 0.0D) { if (z < 0.0D) { return "nortwest"; } else { return "southwest"; } } else { if (z < 0.0D) { return "norteast"; } else { return "southeast"; } } } // ########## ########## ########## ########## // ########## ########## ########## ########## public static Set<BlockPos> chunk_minmax(World warudo, BlockPos pos) { Set<BlockPos> blocklist = new HashSet<BlockPos>(); // BlockPos pos = new BlockPos(le.getX(), le.getY(), le.getZ()); int chunkminX = (int) (pos.getX() / 16) * 16; int chunkminZ = (int) (pos.getZ() / 16) * 16; int chunkmaxX = chunkminX + 15; int chunkmaxZ = chunkminZ + 15; switch (util.get_cuadrante(pos)) { default: chunkmaxX = chunkminX + 15; chunkmaxZ = chunkminZ + 15; break; case "southwest": chunkminX -= 1; chunkmaxX = chunkminX - 15; break; case "nortwest": chunkminX -= 1; chunkmaxX = chunkminX - 15; chunkminZ -= 1; chunkmaxZ = chunkminZ - 15; break; case "norteast": chunkminZ -= 1; chunkmaxZ = chunkminZ - 15; break; } System.out.println("chunkminX = " + chunkminX + " chunkminZ = " + chunkminZ + " " + util.get_cuadrante(pos)); BlockState dirt = Blocks.DIRT.defaultBlockState(); // southeast BlockPos chunmin = new BlockPos(chunkminX, pos.getY(), chunkminZ); BlockPos chunmax = new BlockPos(chunkmaxX, pos.getY(), chunkmaxZ); blocklist.add(chunmin); blocklist.add(chunmax); return blocklist; } // ########## ########## ########## ########## public static BlockPos highest_block_inside_chunck(World warudo, BlockPos pos) { // System.out.println(" highest_block_inside_chunck "); // chunk_minmax(World warudo, BlockPos pos) Set<BlockPos> blocklist = new HashSet<BlockPos>(); ArrayList<BlockPos> minmax = new ArrayList<BlockPos>(); // Creating A New ArrayList... minmax.addAll(chunk_minmax(warudo, pos)); BlockPos bmin = minmax.get(0); BlockPos bmax = minmax.get(1); BlockPos bpos; // System.out.println(" bmin = " + bmin ); // System.out.println(" bmax = " + bmax ); int xmin = bmin.getX(); int xmax = bmax.getX(); int tmp = 0; if (xmin > xmax) { tmp = xmin; xmin = xmax; xmax = tmp; } int zmin = bmin.getZ(); int zmaz = bmax.getZ(); if (zmin > zmaz) { tmp = zmin; zmin = zmaz; zmaz = tmp; } BlockPos zpos = new BlockPos(0, -100, 0); for (int x = xmin; x < xmax; x++) { for (int z = zmin; z < zmaz; z++) { //MOTION_BLOCKING_NO_LEAVES bpos = warudo.getHeightmapPos(Heightmap.Type.WORLD_SURFACE , new BlockPos(x, bmin.getY(), z)); if (bpos.getY() > zpos.getY()) { System.out.println("x =" + x + " y =" + bpos.getY() + " z =" + z); zpos = bpos; } } } return zpos; } // ########## ########## ########## ########## im using that from a custome item right click // ########## ########## ########## ########## public void releaseUsing(ItemStack itemstack, World warudo, LivingEntity le, int p_77615_4_) { String mensaje = ""; if (!warudo.isClientSide) { BlockPos pos = new BlockPos(le.getX(), le.getY(), le.getZ()); BlockState bglow = Blocks.GLOWSTONE.defaultBlockState(); ArrayList<BlockPos> minmax = new ArrayList<BlockPos>(); // Creating A New ArrayList... minmax.addAll(util.chunk_minmax(warudo, pos)); warudo.setBlock(minmax.get(0), bglow, 2); warudo.setBlock(minmax.get(1), bglow, 2); System.out.println(minmax.get(0)); System.out.println(minmax.get(1)); BlockPos hpos = util.highest_block_inside_chunck(warudo, pos); System.out.println(hpos); warudo.setBlock(hpos, bglow, 2); //warudo.setBlock(hpos, bglow, 2); } }
  24. only wen leveling the area before spawning the town i found a old video from the 1.8 version from the minute two i spawn this inverted coup of dirt like 25 times one per chunk allways at the heigjt of the higher block in the chunk is to eliminate pitfalls or rivers inside the town
×
×
  • Create New...

Important Information

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