Jump to content

JimiIT92

Members
  • Posts

    788
  • Joined

  • Last visited

  • Days Won

    1

JimiIT92 last won the day on November 7 2017

JimiIT92 had the most liked content!

Converted

  • Gender
    Male
  • URL
    https://www.youtube.com/Minehendrix
  • Location
    Italy
  • Personal Text
    Creator of MineWorld mod!

Recent Profile Visitors

17608 profile views

JimiIT92's Achievements

Dragon Slayer

Dragon Slayer (6/8)

24

Reputation

  1. Thank you, for some reasone I didn't tried that and I thought it wasn't necessary since you override it ๐Ÿ˜… Added outside the base object, now it works
  2. I'm porting my mod to 1.19.2 and I noticed that Items with the forge:separate_transforms loader in the Item Model are rendered too dark inside the Inventory. This is how one of them looks right now And this is how it looks inside an Item Frame (which is correct) This is the Item model file { "loader": "forge:separate_transforms", "base": { "parent": "builtin/entity", "gui_light": "front", "textures": { "particle": "blazersmod:item/spear" }, "display": { "thirdperson_righthand": { "rotation": [ 0, 60, 0 ], "translation": [ 11, 17, -2 ], "scale": [ 1, 1, 1 ] }, "thirdperson_lefthand": { "rotation": [ 0, 60, 0 ], "translation": [ 3, 17, 12 ], "scale": [ 1, 1, 1 ] }, "firstperson_righthand": { "rotation": [ 0, -90, 25 ], "translation": [ -3, 17, 1], "scale": [ 1, 1, 1 ] }, "firstperson_lefthand": { "rotation": [ 0, 90, -25 ], "translation": [ 13, 17, 1], "scale": [ 1, 1, 1 ] } } }, "perspectives": { "gui": { "parent": "blazersmod:item/spear_inventory" }, "fixed": { "parent": "blazersmod:item/spear_inventory" }, "ground": { "parent": "blazersmod:item/spear_inventory" } }, "overrides": [ { "predicate": { "throwing": 1 }, "model": "blazersmod:item/spear_throwing" } ] } And this is the Inventory model file { "parent": "item/generated", "gui_light": "front", "textures": { "layer0": "blazersmod:item/spear" } } As you can see I already tried to add the gui_light: front property to the Inventory model, but it looks like is ignored. What should I add to light those items correctly?
  3. You don't need mixins for this. If you want to follow the "entity path" you can either summon an invisible, unkillable and uncollidable shulker with the glowing effect where the arrow lands or either create your own entity that by default has no rendering (it's just a transparent cube) or can camouflage to a blockstate you pass in when summoning (and then render the block as the entity texture)
  4. I suspected that ๐Ÿ˜… And what about the "vanilla events", the ones that are used for Sculk Sensors? Will we eventually switch to use that instead of Forge ones?
  5. So I was recently talking with another user in the "Modder Support" category, which asked if there was a way to catch when a block ticks. So that got me thinking: why there isn't such event? What are the reasons behind the choice to not fire an event when a block ticks? And in general what are the reasons that lead to fire/not firing an event?
  6. I ended up using an AT to make the FallingBlockEntity constructor with the pos public, as this is what I need in the dripstone code and so I can create an extended entity that overrides the fall method and set the dropItem property to false
  7. You can get the collision shape of a block using the BlockState#getCollisionShape method. You can then call the isEmpty method on the result, and if is true it means that the block you get the collision shape from has no collision
  8. Yes, this is exactly what I want to change. Not the fact that the block is placed (although it never does), but rather the "drops". I was trying to avoid using mixins as much as I can, and was rather curious about if there was a "proper" event to listen to change this behaviour
  9. A Feature is generally used (or at least in 99% of the cases is what I've used them for) for something that can be "placed" naturally inside the world (like ores, flowers, trees, structures....). An Event is something that Forge fires when something particular occurs (like an entity being spawned, a block being placed, a message bein sent...). So in this case what you want to use is an Event that listens for a blocks ticking and then, if some random criteria you decide are met, you can turn it into your own custom block. Unfortunately, as warjort said... So unless it comes out you need to find a "manual" solution to achieve what you want
  10. I made a custom Pointed Dripstone that, when the block above is broken, it falls and on landing it spawns some dripstone drops (like vanilla dripstone does). However what if I don't want those drops but instead I just want the FallingBlockEntity that is spawned to just be destroyed? I tried this in the onFall and onBrokenAfterFall methods fallingBlockEntity.dropItem = false; but that doesn't seem to do anything. I also tried to listen for the LivingDropsEvent but since the dropped dripstone aren't technically drops, but rather ItemEntitys added to the world, that event never gets called. I even tried to listen to the EntityJoinWorldEvent and indeed I can cancel it and no dripstone will be "dropped". However there's no way that I've found to actually tell if the ItemEntity has been "spawned" by the Falling Entity or not. I can only check if it has been tossed as a drop by an entity (checking the entity owner), but I guess that's not ideal. So how can I stop the falling entity to "drop" items when it lands?
  11. Thank you For reference if anyone has the same issue, this is what the JSON file now looks like { "loader": "forge:separate-perspective", "base": { "parent": "blazersmod:item/spear_in_hand" }, "perspectives": { "gui": { "parent": "blazersmod:item/spear_inventory" }, "fixed": { "parent": "blazersmod:item/spear_inventory" }, "ground": { "parent": "blazersmod:item/spear_inventory" } } } You don't need to specify the whole model inside, you can just reference an existing JSON file as "parent" for the given perspective (for instance, here I've set the "in_hand" model as my base model and the "inventory" model for when the Item is in Inventory, dropped on the ground or inside an Item Frame
  12. I have an Item that is also associated with an entity, and so the entity model is rendered in inventory. However how can I make so in Inventory a plain texture is rendered? This is what I tried so far: the JSON file for the Item is the following { "parent": "minecraft:builtin/entity", "gui_light": "front", "textures": { "particle": "blazersmod:item/spear" }, "display": { "thirdperson_righthand": { "rotation": [ 0, 60, 0 ], "translation": [ 11, 17, -2 ], "scale": [ 1, 1, 1 ] }, "thirdperson_lefthand": { "rotation": [ 0, 60, 0 ], "translation": [ 3, 17, 12 ], "scale": [ 1, 1, 1 ] }, "firstperson_righthand": { "rotation": [ 0, -90, 25 ], "translation": [ -3, 17, 1], "scale": [ 1, 1, 1 ] }, "firstperson_lefthand": { "rotation": [ 0, 90, -25 ], "translation": [ 13, 17, 1], "scale": [ 1, 1, 1 ] }, "fixed": { "rotation": [ 0, 180, 0 ], "translation": [ -2, 4, -5], "scale":[ 0.5, 0.5, 0.5] }, "ground": { "rotation": [ 0, 0, 0 ], "translation": [ 4, 4, 2], "scale":[ 0.25, 0.25, 0.25] }, "gui": { "rotation": [ 15, -25, -5 ], "translation": [ 2, 3, 0 ], "scale": [ 0.65, 0.65, 0.65 ] } }, "overrides": [ { "predicate": { "throwing": 1 }, "model": "blazersmod:item/spear_throwing" } ] } And in the Item class I override the initializeClient method to return my custom ItemRenderer instance @Override public void initializeClient(Consumer<IItemRenderProperties> consumer) { consumer.accept(new IItemRenderProperties() { @Override public BlockEntityWithoutLevelRenderer getItemStackRenderer() { return BlazersMod.getItemsRenderer(); } }); } for which, in the renderByItem method, I do this @Override public void renderByItem(ItemStack stack, ItemTransforms.@NotNull TransformType transformType, @NotNull PoseStack pose, @NotNull MultiBufferSource buffer, int packedLight, int packedOverlay) { if(stack.getItem() instanceof SpearItem) { pose.pushPose(); pose.scale(1.0F, -1.0F, -1.0F); EntityModel<ThrownSpear> model = this.spearModel; ResourceLocation layerLocation = ThrownSpearRenderer.SPEAR_LOCATION; VertexConsumer vertexConsumer = ItemRenderer.getFoilBufferDirect(buffer, model.renderType(layerLocation), false, stack.hasFoil()); model.renderToBuffer(pose, vertexConsumer, packedLight, packedOverlay, 1.0F, 1.0F, 1.0F, 1.0F); pose.popPose(); } } What should I specify to render not the model but a plain texture in Inventory? Or where can I look at? I tried looking at the Trident but can't find anything related
  13. I think a good starting point, as you already mentioned it, is to look at Zombie entity class and see what happens when the Zombie starts breaking a door. Specifically you can look at the BreakDoorGoal class that is used by the Zombie. Inside it, in the tick method, you will find this line this.mob.level.destroyBlockProgress(this.mob.getId(), this.doorPos, i); Essentially the function destroyBlockProgress is called by the zombie on its world (level) instance. I'm not sure if this is the actual method that shows the breaking overlay and also what values the last parameter (progress) should have, but by the name is definitively something I would try and see what it does
  14. Ok, so I've created the Recipe Category, but in the log I have this Unknown recipe category: blazersmod:fletching/blazersmod:carbon_bow carbon bow being an Item that can be crafted using the custom recipe type. I've created it like this RecipeBookCategories.create(BlazersMod.MOD_ID + ":fletching", new ItemStack(BLItems.CARBON_BOW.get())); and the JSON file for the recipe is the following { "type": "blazersmod:fletching", "addition": { "item": "blazersmod:carbon" }, "base": { "item": "minecraft:bow" }, "result": { "item": "blazersmod:carbon_bow" } } So I don't understand why is actually trying to recognize that category instead of the "main" fletching category
  15. Got it, during which event should I call the create method?
×
×
  • Create New...

Important Information

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