-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Posts posted by Animefan8888
-
-
19 minutes ago, PenWallet said:
and its super class are protected or private, so I have very little stuff to touch.
Have you looked for getters?
Also in the case of Screen::font just use Minecraft.getInstance().fontRenderer or use Reflection in order to get it.
23 minutes ago, PenWallet said:And it does move it, but only if it's fullscreen, if it isn't fullscreen, it goes somewhere else, like this:
Doing raw additions probably isn't the best idea. Things should be based on the Screen's width and height or the window's width and height.
26 minutes ago, PenWallet said:It didn't work, so I replaced minecraft's texture with mine in my mod's assets, and it does work, but I'm guessing that's not the way to do it.
You are correct it is not. I would instead just draw the portion you changed onto the screen not the whole gui.
28 minutes ago, PenWallet said:BackgroundDrawnEvent
This event is called after the tinting effect is called not when the actual screen is called.
-
22 minutes ago, Thomasino said:
Hi, I have problem.
I did a little remodeling of my mod. I copied a few lines from one video. But after launching it throws me this mistake. I tried everything I could but nothing happened.
Version:1.15.2
image: https://drive.google.com/file/d/1VBRzrxa63Ulv3Y9BKqasTlEM_-PKpKqZ/view?usp=sharing
latest.log: https://docs.google.com/document/d/179EvWuyzM7K9mDKmsf8m4HYyG7aKVf7tHh0zciTWkek/edit?usp=sharing
Easier to link here. Than to explain.
-
8 minutes ago, AntoPrime said:
Have you found this issue before? What do you think about it?
In what way are your replacing the recipes? I believe you can override any recipe or maybe any of the ones forge doesn't override itself.
-
20 minutes ago, DavidM said:
There is animation state machine, but as far as I know that is meant for block only.
It is usable for Entities. Check out the forge docs page here.
- 1
-
6 minutes ago, DavidM said:
What would be the best way to achieve this?
As far as I am aware an Entity is never told that it is being unloaded. Therefore your first approach seems to be the only way.
- 1
-
Just now, GhostGaming said:
Here is an image where I tried to add the block in the hotbar to the inventory and set it as the tab icon
Post your code as a working github repo I would like to test this locally to find an answer. I might be blind or missing information.
-
5 minutes ago, GhostGaming said:
I think this should be everything important
When, where, and how is ItemGroup.SEARCH initialized?
-
5 minutes ago, RobinCirex said:
java.lang.ClassCastException: me.cirex.erosionmod.CustomFlowingFluidBlock cannot be cast to net.minecraft.item.Item
There's more information to this error that helps like a line number.
-
Just now, GhostGaming said:
Basically, I loop through all my blocks in the item registry event and create and register a new ItemBlock with the ItemGroup. The weird thing is, that even when using one of my blocks as the tab icon it doesn't show up
If you don't show us your code no one on here can actually help you all we can do is make shortsighted guesses on what could be causing your problem. If you don't feel comfortable sharing your code then don't and know we can't really help you.
-
3 minutes ago, GhostGaming said:
Yes, I did. I used the code that Cadiboo used in his example mod
I don't need to look at someone else's code when I am helping you with your own. I have no guarantee you did everything Cadiboo did unless you directly copy-pasted his code.
-
4 minutes ago, RobinCirex said:
public static final Block WATER = register("water", new CustomFlowingFluidBlock(Fluids.WATER, Block.Properties.create(Material.WATER).doesNotBlockMovement().hardnessAndResistance(100.0F).noDrops())); private static Block register(String key, Block p_222382_1_) { return Registry.register(Registry.BLOCK, key, p_222382_1_); }
This is not how you register things.
Either use the events or the DeferredRegistry system. -
Just now, GhostGaming said:
Anyone has a clue why this could happen?
When you created your BlockItem instances did you set the ItemGroup via Item.Properties?
-
2 minutes ago, firebolt said:
code is executed twice in a row which toggles the property twice resulting in no change whatsoever at the end...
The Block::onBlockActivated method is called per logical side per hand. IE 2 sides 2 hands 2*2=4.
-
Just now, tydeFriz said:
thanks, mind explaining why?
When does a statically intialized instance get initialized? It's hard to answer that question because you never know when. As such forge can't assign it the proper MODID for it's registry name.
Also just noticing this now, but in the code snippets you posted you never set that blocks registry name in the first place. -
7 minutes ago, tydeFriz said:
public static final Block A_BLOCK = new Block(Block.Properties.create(Material.ROCK).hardnessAndResistance(3.0F, 3.0F));
You should never statically initialize registry entry values.
-
17 minutes ago, DarkAssassin said:
the game crashes with this error log
It would help if you showed more code. What does your Block look like what about your TileEntity? You are using a class for your Block and TileEntity right?
-
13 minutes ago, DarkAssassin said:
ok i will try that but what i´m wondering then is: why is the tile entity not loading and just a block when i comment out the TE out of my code when i place the vanilla item spawner
Did you register a TileEntityType for your TileEntity?
-
6 hours ago, PenWallet said:
This does indeed solve my problem, but I don't know why it smells like stinky code. Am I on the right here or is this just a shitty way to do it?
You send a pack to the server every frame the Screen is called...
Also when handling the packet you reach across logical sides by using Minecraft.getInstance() You cannot do this Minecraft.class is client only.
Instead whenever the currency is changed send it to the player aka the client. Then in your Screen you can just do Minecraft.getInstance().player.getCapability(...) to get your data from the capability. Your handle method for your packet should store the currency in the capability.
-
3 hours ago, firebolt said:
BlockState blockstateCycled = state.cycle(LOADED); JustToLearnMod.LOGGER.debug("before: " + worldIn.getBlockState(pos).get(LOADED).toString()); JustToLearnMod.LOGGER.debug("expected: " + blockstateCycled.get(LOADED).toString()); worldIn.setBlockState(pos, blockstateCycled, 3);
You are doing this on the logical client you cannot do that. Do it on the logical server IE !world.isRemote
-
5 minutes ago, _Cruelar_ said:
That'S a bummer as the approach via json multipart doesn't seem to accept any translation whatsoever for the item model.
If you make a json model for the item you can use the display tag(check out item/generated for an example) to translate the model. I think.
-
4 minutes ago, _Cruelar_ said:
but infinite amount of items, which means I'll probably need a fix for the TESR issue anyways
It's actually better for you to use a BakedModel instead since the rotations and scales are finite. However, I am unsure of the 1.14 way of doing that.
-
4 minutes ago, _Cruelar_ said:
I know bad practice and all.
No it's not bad practice you have a pretty good jumping off point, and you understand that it won't all be the same and know where to look. You'll get used to 1.14 in no time.
-
8 minutes ago, _Cruelar_ said:
Worst case I'll make a new model file just to align this.
I don't think multipart models support offsetting the models no. You'll have to make a new model file.
15 minutes ago, _Cruelar_ said:The Item is rendered without transparency (I guess overwrite Block::isOpaqueCube or 1.14 equivalent, sorry still mostly thinking in 1.12 methods)
The correct way to do this is to override Block::getRenderLayer and return BlockRenderLayer.CUTOUT_MIPPED
- 1
-
1 minute ago, DarkAssassin said:
What would be the best way to change vanilla spawners? i want them to ignore the distance between it and a player if powered by redstone.
Override the Blocks.SPAWNER block in the registry with your own. Note you cannot change the BlockState of the Block. Then create your own version of the MobSpawnerTileEntity which does everything the vanilla one does except insert your feature into it.
[1.15.2][Solved] Weird issue with adding blocks to creative tab
in Modder Support
Posted
Wait are you registering your Blocks twice? Here and here. I'm not sure how I didn't notice this. And commenting out the registry event fixes the issue. Register your Blocks once and only once.