Everything posted by Draco18s
-
1.16 regestring
https://mcforge.readthedocs.io/en/1.17.x/concepts/registries/
-
detect if player is in different dimension
Yeah that's why I said "more or less." I'm unfamiliar with the official mappings.
-
detect if player is in different dimension
player.world.worldinfo.dimension More or less.
-
[1.16.5]Help with capabilities
Why the fak are you to-stringing that? if(source instanceof ImpactDamage) works just fine. You could also create single static instances of your new damage type and use things like ModDamageTypes.SLASHING and the == operator, like vanilla does. Your damage type instances have NO custom data in them at all, so you should just do that (yes I realize my own, very old, code is not following that). This is not how localization works. ItemStacks are never null. The player could be, though. Use ifPresent() instead. You should use the logger Forge provides you instead.
-
[1.17.1] Trying to get blocks to get a block to be see through.
...is not a real block. Glass would be a better thing to examine.
-
[1.16.5]Help with capabilities
Damage events don't have a player, you need to use event.getDamageSource() or event.getTrueSource() Be aware of the following: Source may be null Source may not be a player
-
[1.16.5]Help with capabilities
No, you would need capabilities for that (if an existing entity is resistant, or the player) unless only your own mobs are resistant.
-
[1.16.5]Help with capabilities
You don't need capabilities to create a new damage type. You just call... new DamageType(...) Super mega ultra old code, but its not like anything's changed much, if at all: https://github.com/Draco18s/Decaying-World/blob/master/draco18s/decay/items/IceNineShard.java#L38 https://github.com/Draco18s/Decaying-World/blob/master/temp-7-26-13/draco18s/decay/ColdDamage.java#L11
-
Custom Block Break "Overlay"
If you want a tiny fraction of offset, use float.epsilon. 0.01 will actually be noticeable. It's about 1/6th of a texture pixel.
-
Hod do i call from the tileentity screen a class in the tileentity tile?
Oh gosh, how simple. Oh boy howdy, how easy. If only the documentation matched. Oh wait it does. (I will note that I haven't messed with the code in like 3 years and I am sending and not verifying the TE pos)
-
Hod do i call from the tileentity screen a class in the tileentity tile?
https://mcforge.readthedocs.io/en/latest/networking/simpleimpl/#sending-to-the-server
-
[1.16.4]Ore Dictionary still in use?
No, it's handled by Tags now.
-
[1.16.5] Replacement Spawner Block that has Health
Basically you can't.
-
Hod do i call from the tileentity screen a class in the tileentity tile?
Buttons are client side only, you must send a packet to the server saying "this button was pressed."
-
[1.16.5] world.setBlock with ModBlock
Really what happened was that this parameter you were passing: worldIn.setBlock(pos, state, ... ); was this: BlockState state = worldIn.getBlockState(pos); when it should have been this: ModBlocks.SCORCHED_EARTH.get().getDefaultState()
-
[1.12.2] Setting a delay for onItemRightClicked
The Forge team can't support every version of Minecraft in-perpetuity. No software company does that with their software. Forge has decided that they will support the most recent major version (1.17) and a single LTS version (1.15) 1.12 is 4 years old at this point.
-
[1.16.4]DataPack, Object.class, RegisterObject, Custom Fluid, How to?
Well, no. You need to be able to cast the thing you want to register (in this case, a block). You can't make a RegistryObject<Item> store a new Block() for instance. That's precisely what the new keyword does.
-
[1.16.4]DataPack, Object.class, RegisterObject, Custom Fluid, How to?
This, by the way, doesn't need to be strictly typed to your class. You could just use RegistryObject<Block>
-
There is a error that it cant resolve the symbol food properties and I dont know why
Why not?
-
[1.16.4]DataPack, Object.class, RegisterObject, Custom Fluid, How to?
Being a professional software developer, no, a "coder" is "someone who codes." A software developer is the professional term. At best, you're a script kiddie.
-
[1.17.1] Block Drop Only With A Certain Tool
Yes
-
[1.16.4]DataPack, Object.class, RegisterObject, Custom Fluid, How to?
False. Your first thread on this very forum on this topic was this one in which you were already under the assumption that items and blocks were done via datapacks. The first reply even says "no you don't" and linked you the relevant documentation. Unless you mean this post which was referring to the blockstate, model, and loot table files which was already in reply to your complaint that datapacks are a hassle.
-
I want to make a block that breaks when I step on it.
Having done this in the past, stepOn is not super reliable, it'll pick up about 2 in every 3 blocks (less if you're sprinting). And if you want it to break as if it was harvested and drop items, you'll need to call the drops function (which I don't know the name of off-hand).
-
Modify a recipe from another mod
Oops, you were correct. I was having trouble finding the recipe and searched the entire repo. It did have the correct path in it though. Anyway, I see you got it.
-
Modify a recipe from another mod
That's the wrong location. /resources/data/create/advancements/recipes/create.base/crafting/kinetics/cogwheel.json https://github.com/Creators-of-Create/Create/blob/mc1.16/dev/src/generated/resources/data/create/advancements/recipes/create.base/crafting/kinetics/cogwheel.json
IPS spam blocked by CleanTalk.