Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

immortalmice

Members
  • Content Count

    14
  • Joined

  • Last visited

Community Reputation

2 Neutral

About immortalmice

  • Rank
    Tree Puncher

Recent Profile Visitors

657 profile views
  1. ActionResultType has four elements, please correct me if i'm wrong. SUCCESS All the things is valid, and this action actually modified something in someway. FAIL Some thing is invalid, so this action failed. PASS This action is not related to me, and I didn't do anything with it. CONSUME ... I can't understand what does consume mean. I looked all the place that ActionResultType.CONSUME is used in vanilla Minecraft code, but I still can't sum up what this is. The only things I found is that it used in logical client side mo
  2. There's no texture under resource folder, because I want to use item's texture instead. I override the IForgeEffect#renderHUDEffect but it'll show a broken texture in the background. I tried to cover it, but failed. @OnlyIn(Dist.CLIENT) @Override public void renderHUDEffect(EffectInstance effect, AbstractGui gui, int x, int y, float z, float alpha){ /* Cover original icon */ Minecraft minecraft = Minecraft.getInstance(); minecraft.getTextureManager().bindTexture(ContainerScreen.INVENTORY_BACKGROUND); gui.blit(x, y, 141, 166, 24, 24); /* Show custom icon */ Item
  3. OK, because nobody reply me, so I tried to generate quads by my own code. Repo is here But I got another problem. Now everything looks fine when stack is in item frame or dropped on the ground, the side quads is not missing. They are in the right place with right color. But when on the left/right hand of first person camera, the side quads missing. BTW, stack in third person camera looks fine. I don't know where I did it wrong....and it confuse me why only first person camera will get this problem. I thi
  4. Thanks for replied and advice, I finished the exercise. PS. I spend a lot of time seeking which field I can hack in PotionSpriteUploader and plan to do it in TextureStitchEvent.Pre. After hours I realize that just hack TextureStitchEvent.Pre and everything will be done ?
  5. I have my effects, and I using DeferredRegister to regist them. Here's my effects. For FoodEffect, I need to reuse texture from specific items, I override the IForgeEffect#renderInventoryEffect to finish these. @OnlyIn(Dist.CLIENT) @Override public void renderInventoryEffect(EffectInstance effect, DisplayEffectsScreen<?> gui, int x, int y, float z){ /* Cover original icon */ Minecraft minecraft = gui.getMinecraft(); minecraft.getTextureManager().bindTexture(ContainerScreen.INVENTORY_BACKGROUND); gui.blit(x + 6, y, 6, 166, 18, 32); /* Show custom icon */ ItemRendere
  6. This is what ItemStack look now. All the thing in the front and back of ItemStack rendered correctly, but when holding in hand, you'll see the every side of this ItemStack is broken. Repo is here The code closely related with model is under meal folder I used a custom Loader, IModelGeometry and ItemOverrideList. My goal is select what textures to use by overriding ItemOverrideList#getModelWithOverrides And at the final of method I directly using ItemLayerModel to bake a new model.To stack textures together is actually what I want.
  7. Ok, here's repo. I set it public now. https://github.com/immortalmice/FoodPower This mod is under construction, so everything will be what I mention in README.txt. My mod have many parts. About making food, this mod has some cooking patterns, such as cake, pizza, salad...etc. You can select a pattern to make a recipe, pattern will tell you what ingredients is necessary, and what is optional(with certain food types). With recipe, you can follow cooking steps on it to make your food by using oven, frying pan, juicer...etc. Depend on what you used
  8. It seem that I solve my problem in someway. I still don't know how IModelConfiguration#resolveTexture worked, and I can't get a Material from it now too. But, now I found I can directly call new Material to solve my need. I tried new Material before but it fail at that point in time, because I missed a thing. I need to subscribe TextureStitchEvent, so that I can add my texture to AtlasTexture. @SubscribeEvent public static void onTextureStitch(TextureStitchEvent.Pre event){ if(event.getMap().func_229223_g_().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE)){ event
  9. Bow use a thing called ItemOverride, it can use key word "overrides" in json file to select a model depend on a float value. For example, how hard is the bow pulled, where should compass point to and what time is it now(Vanilla clock). To use your own float value, just call Item#addPropertyOverride and write the "predicate" field in the "overrides" section in json file that will be fine. This is what vanilla bow model json file like. { "parent": "item/generated", "textures": { "layer0": "item/bow" }, "display": { //... }, "overrides":
  10. What I need is the itemstack texture depend on its nbt, nbt will store some information about what ingredient player used to make this itemstack. For example, I may need a.png, b.png, c.png 3 picture and stack them together to display this itemstack. But according by how player maked this itemstack, I may need to stack a.png, d.png and e.png together now. I think it's not just a single json file can solve it. Thx for reply :).
  11. OK, now I know something more. Texture channel is the thing you write under "textures" in your json file. { "parent": "item/generated", "textures": { "layer0": "foodpower:blocks/juicer_top" }, "loader": "foodpower:meal" } I pass in "layer0", it finally return a normal Material instead of missing texture. IModelConfiguration#isTexturePresent also return true. But now I have another problem, if I change "layer0" to another key name, it won't work. And I found that BlockModelConfiguration#isTexturePresent called BlockModel#isTexturePresent.
  12. What I need, is a custom itemstack texture present base on some information(Currently I save these information in CompoundNBT). These information decide and pick several textures and I need to combine them just like what vanilla "layer#" do. These information isn't and won't be a float, so vanilla itemoverride can't solve it. I'm searching a way to solve it for several days, but I got stuck in something due to leak tutorial of this kind of things. I already read this intro to advance models in forge wesite, but it's hard to understand because I can't find things like
  13. I'm currently using 1.12.2-14.23.5.2847, I can't find NetworkEvent.Context. The method I process my message is something like this, I only have MessageContext. public static class Handler implements IMessageHandler<RecipeTableMessage, IMessage>{ @Override public IMessage onMessage(RecipeTableMessage message, MessageContext ctx){ /** do something here ...... */ } } Yes, I only send the action client did, and process data always on the server.
  14. OK, this often encounter when I need to change nbt data on gui action in client. I know I need to send custom packet to server when client do something on gui. But I confused the information I give in message (used in let server know what itemstack/tileentity to update) is appropriate or not. I don't want increase too much loading on server and the way must be logical. So, for itemstack. I may want to contain uuid of player in packet. Then on the server, I use uuid to get the PlayerEntity, use some method like PlayerEntity#getHeldEquipment get the it
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.