-
Posts
6157 -
Joined
-
Last visited
-
Days Won
59
Posts posted by Animefan8888
-
-
10 minutes ago, KidKoderMod033109 said:
The whole mod is based upon the logic and requires the logic to be in that class.
Why? It's your code you can manipulate it any way you want.
10 minutes ago, KidKoderMod033109 said:But, I have thought to create a "config" file for each world, would that work/how would I do that?
You can't do that using the forge config system.
-
21 minutes ago, Peerius said:
The one is with the SpriteRenderer
Use the SpriteRenderer
23 minutes ago, Peerius said:java.lang.IllegalStateException: Invalid entity data item type for field 7 on entity PigEntity['Schwein'/411, l='MpServer', x=-262.54, y=81.56, z=417.63]: old=0(class java.lang.Byte), new=1 air(class net.minecraft.item.ItemStack)
I dislike it when people cherry pick lines from the log/console. Was this the whole error? Was there a "Caused by..." line?
But this error sounds like the Entity being spawned on the Client wasn't your entity and instead a Pig was spawned. This happens when an Entity of an unregistered EntityType is requested to spawn. Which means your EntityType you are using was not registered. Which leads me to this.On 3/20/2020 at 12:39 PM, Peerius said:public static final EntityType<CensoredEntity> CENSORED = register();
This is not how registration works. EntityTypes are singleton values. You can't just create another one and expect it to work. You have to use the instance that you registered. Typically this is done with the @ObejctHolder annotation. You can read the documentation here.
-
33 minutes ago, Drachenbauer said:
Why this could happen?
Honestly I'm not sure. Try setting some breakpoint and debugging it.
-
10 minutes ago, Drachenbauer said:
Why this could happen?
What does your code look like?
-
5 minutes ago, GarlicBread said:
Is it possible to edit limb rotation using forge methods, or do I have to make a new model?
Depends on what exactly you want to do. Each Model is made of a collection of ModelRenderers each are a rectangular prism and have their own rotations. So yes you can rotate each "limb". But those limbs are strictly speaking limited. IE for a player a leg is one limb you can't bend it in the middle.
10 minutes ago, GarlicBread said:If I have to make a new model, how would you recommend going about doing so?
Honestly just write the Model class yourself. But if you really need to use a program(visual way) there are plenty out there.
Also you should use the RenderPlayerEvent. Events are documented here. What you want to do is cancel the event and render your own model under the circumstances that it should be rendered IE.
if (playerIsSitting()) {// Cancel Event
// Render Sitting Player
}
-
3 minutes ago, Drachenbauer said:
Why they stay activated?
Because they only tick when you tell them to tick. And you only ever tell them to tick when they become activated.
-
1 minute ago, Drachenbauer said:
Then it must be fine, if i delete it from my registration for overriding the block.
Yes you definitely don't want to have your Block tick randomly.
-
Just now, Drachenbauer said:
There came the error: that this keyword cannot be used the static way.
My bad forgot your activate method was static. You have the BlockState parameter use BlockState::getBlock
-
2 minutes ago, Drachenbauer said:
Should i use the name from the registration of this block (in my case with .get(), because it is a RegistryObject)?
What are you talking about? You have access to the Block object already. Use the "this" keyword.
-
2 minutes ago, SSKirillSS said:
How I can do this? Will I need make own GenerationSettings extends default, and override that's variable?
I'm not sure. If I had more time I could look into it. Why not look into it yourself
-
2 minutes ago, MarrsI said:
Minecraft Version: 1.12.2
Sorry 1.12.2 is no longer supported on this forum due to it's age. Please update to a more modern version of Minecraft. For more information check out the link at the top of the page about Forge's LTS.
-
2 minutes ago, Drachenbauer said:
ITickList tickList = world.getPendingBlockTicks();
ITickList is a generic class so what you really want is ITickList<Block>
And thus itemIn becomes Block instead of Object.
-
7 minutes ago, Drachenbauer said:
For the original redstone ore, it goes a bit random, how long it waits until it switches off.
But that random value is not given in that block class, it´s, where tick is called.
It's random because when the Blocks.REDSTONE_ORE instance is created it looks like this
new RedstoneOreBlock(Block.Properties.create(...).tickRandomly()...)...
That tick randomly lets the game know to call the tick function randomly.
8 minutes ago, Drachenbauer said:But for me the middle parameter is not Block, it´s Object.
What must i put there?
Show all of your code.
-
18 minutes ago, SSKirillSS said:
So I can’t change this block without creating my own dimension?
It looks like the easiest way to do this would be to add a feature to your biome(s) that replace all of the Stone blocks with whatever block you want. However if you feel adventurous feel free to look into GenerationSettings::defaultBlock and changing that between the block that you want to use and the vanilla Stone block.
-
13 minutes ago, Drachenbauer said:
How do i set the numberOfTicks to 80 ticks?
In the call to ITickList::scheduleTick.
14 minutes ago, Drachenbauer said:In the method tick of this block holds only the command switch it off.
But if i go deeper with call hirachy or show references, i find something, that adds a random value.
I'm not sure what you are saying here.
-
8 minutes ago, Drachenbauer said:
I´m not sure, how exactly to use World#getPendingBlockTicks.
World::getPendingBlockTicks returns an ITickList Then use ITickList::scheduleTick(BlockPos, Block, numberOfTicks)
Then override the Block::tick in your Block class. The world will call this method when the numberOfTicks have passed or more ticks have passed.
-
8 minutes ago, Peerius said:
Bump... still needing help with this
What actually is your current problem?
-
9 hours ago, Pacmandevil said:
and send it to the server to assign the texture
Why are you sending the texture to the server anyways? The server doesn't deal with assets at all. Are you trying to make this image the same across all players?
9 hours ago, Pacmandevil said:Hello! the mod I'm working on requires me to generate an image based on the player's perspective - similar (but not exactly like) a screenshot, in order to be used to generate a texture for a block (or entity, haven't figured out which is ideal to use yet)
What exactly are you trying to do. Why are you needing to generate an image? More specifically why can't this be done before runtime? What is the exact thing you want to do from a users perspective?
-
1 hour ago, AntonBespoiasov said:
assets/uc_auramagic/recipes/experience_shard.json
Recipes dont go in the assets folder. They go in the data folder.
If that doesnt fix it could you post your code as a github repo so it can be tested locally?
-
8 minutes ago, KidKoderMod033109 said:
I have a class that has the logic to decide what does into the ArrayList, and I want to save that ArrayList to data in the world
Put the logic into the WorldSavedData class?
-
47 minutes ago, Nurox said:
Do you know of a less janky way to tell if the ItemEntity is a sapling? I'm still using the .toString().contains(SAPLING) method. I've tried a few other ways, but can't figure it out.
Yes there is a system in Minecraft/Minecraft Forge called tags. Items, Blocks, entities, and fluids can be tagged together. There is a sapling one. To retrieve the tag do BlockTags.TAG_NAME.
-
52 minutes ago, JithuJilladi said:
Hey! I'm new to modding and I was just wandering how would you go about making an items with data values like wool:1 or wool:2 and have that make a difference? I have no clue how to handle data values nor create them. Any help would be appreciated! Thanks! ?
You don't, at least not anymore. Instead you create an Item for each of them and typically a block for each of them.
-
1 hour ago, KidKoderMod033109 said:
How do I save an ArrayList in to the class in a diffrent class, then retrive it when I need it?
Wait what? The ArrayList should be in your WorldSavedData class.
Use a ListNBT to store a "list" of Items. -
1 hour ago, TheGreyGhost said:
There's also no guarantee that the client side TileEntity will exist if the client and server worlds are slightly out of synch for some reason
Then that is a problem in it of itself. Solve the root of the problem not the visible one.
1 hour ago, TheGreyGhost said:It looks to me like this vanilla code is directly manipulating the ItemStack, not via the Slot methods for changing/insertion/deletion. Hence the reason the vanilla code must call onSlotChanged directly.
Actually even this is not a problem both experimentally and in the code. Because when a slot is clicked while it does call mergeItemstack later on it still calls Container::detectAndSendChanges on ServerPlayerNethandler 1201.
How do i meke the redstone ore glow for exact 4 secconds (80 ticks) after been activated?
in Modder Support
Posted
If you look at his most recent code. He doesn't override the tick method at all and it goes back into the super classes tick method which is RedstoneOreBlock::tick
The Cactus blocks Collision is slightly bigger than what is visual and thus allows the player to move ever so slightly inside of it and that is what is considered a collision. Take a look at CactusBlock for how it does that.