-
Posts
444 -
Joined
-
Last visited
-
Days Won
5
Posts posted by kiou.23
-
-
1 hour ago, rafferty.smith@hotmail.com said:
How do you do that?
I don't know as I don't use eclipse
-
that's a bug with eclipse: https://bugs.eclipse.org/bugs/show_bug.cgi?id=558286
re-importing the gradle project should fix it
-
say what you did, post your code, and post the entire log
-
3 minutes ago, DMD_ said:
sorry I'm new to modding and java completely, but what is the maven package naming convention.
if you're new to java, minecraft modding is a pretty tough first-project, if you already have experience with similar OOP languages,, like C#, learning Java as you go isn't that hard, but if not, I'd suggest taking some time to understand java by itself before diving into modding
the maven naming convention is just a convention on how to name your packages, it should usually be under a domain you own (like a website), but backwards, and then the project. and if you don't own a domain, you can use your github account: https://maven.apache.org/guides/mini/guide-naming-conventions.html, but don't worry too much about it
if you can't find a tutorial for a supported version, silentchaos512 has a pretty good and updated series over on youtube for 1.16 I can recommend
-
1 minute ago, DMD_ said:
also im using 1.13.2
oh, 1.13 isn't supported anymore
update to 1.15 or 1.16-
1
-
-
what do you mean "won't appear"?
the forge mdk comes with a default examplemod under src/main/java, but it is not necessary, you can create your own package, following the maven package naming conventions, and put your mod there
-
1
-
-
6 minutes ago, immortalcatz said:
Found a version of what I was trying to do on github, had to tweak it a bit to make it updated to 1.16.5 tho....
package expanded.blocks;
import javax.annotation.Nullable;
import expanded.VanillaBuildingBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.RotatedPillarBlock;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;public class CustomLog extends RotatedPillarBlock {
public CustomLog(Properties properties) {
super(properties);
}
@Override
@Nullable
public BlockState getToolModifiedState(BlockState state, World world, BlockPos pos, PlayerEntity player, ItemStack stack, ToolType toolType) {
Block block = state.getBlock();
if (block == VanillaBuildingBlocks.acacia_log) {
return VanillaBuildingBlocks.stripped_acacia_log.defaultBlockState();
} else if (block == VanillaBuildingBlocks.spruce_log) {
return VanillaBuildingBlocks.stripped_spruce_log.defaultBlockState();
} else {
return super.getToolModifiedState(state, world, pos, player, stack, toolType);
}
}
}in case anyone else needs it.... This is solved now, thanks for all the help. ^^
that works... but makes the code really hard to mantain and expand upon, imagine you add 50 logs, you'd have 50 else-if statements?
the best solution I already told you 2 times, and now the 3rd: simply pass the stripped block to the constructor, and return it in the getToolModifiedState
also, you're not checking if the tool is an axe, so any tool would be able to strip the log block
EDIT: also, if you need to look up something this basic on github, maybe you should take some time to learn programming beforehand, that'll really make your life modding easier
-
Just now, immortalcatz said:
Not sure how I would do that, should I just make the stripped block extend Block or use something else like RotatdPillarBlock?
yes? you already have the class you called CustomLog, it's the same thing isn't it?
-
2 minutes ago, immortalcatz said:
how would I do that with the Strippable Log class?
the first way I thought of is to take a supplier of the stripped block in the constructor, and then return that in the proper method
-
4 minutes ago, immortalcatz said:
whenever i add more then one log type and i right click it turns into the acacia log, not it's own stripped version.... I'm using vanilla blocks to test it with so I know it's working.
*edit: like if I make a spruce and right click with an axe, the spruce log turns into the acacia log, not the stripped version, but the acacia log turns into stripped acacia.
of course, because you're registering the same class, and in the class you harcoded it to return acacia
what you can do is to write one class per log block
or make a StrippableLog class, which takes a supplier of the block you want to return in the constructor
-
10 minutes ago, killerjdog51 said:
How did you remove/prevent the generation? Because when I use f.remove() I get a ConcurrentModificationException.
make your own thread, explain your issue further, and post the full log
-
you should be getting mods from the curseforge website
then simply put the .jar files inside the .minecraft/mods folder -
1 hour ago, immortalcatz said:
How would I add that into the class file and which one would that be in?
the class for the block you want to make stripabble
-
public static void generateOres(final BiomeLoadingEvent event) { if (!(event.getCategory().equals(Biome.Category.NETHER) || event.getCategory().equals(Biome.Category.THEEND))) { buildOreFeature(BlockInit.BERYLORE.get(), Blocks.GRASS, 10, 0, 100, 20); } }
you're not actually adding the features to the biome, the return value of your method is just getting ignored, in mcp the method that you call is BiomeGenerationSettingsBuilder#withFeature, in mojmaps I don't know
private static ConfiguredFeature<?, ?> buildOreFeature(Block ore, Block filler, int maxVeinSize, int minVeinLevel, int maxVeinLevel, int spawnRate) { ConfiguredFeature<?, ?> feature = Feature.ORE.configured(new OreFeatureConfig(new BlockMatchRuleTest(filler), ore.defaultBlockState(), maxVeinSize)); feature = minMaxRange(feature, minVeinLevel, maxVeinLevel).squared(); feature = feature.count(spawnRate); return feature; }
this is not how you should create a ConfiguredFeature
1- I suggest you keep each feature in a static field
2- you need to actually Register the feature, or the game won't know about it, you can do so by calling Registry.register, and registering your feature to the Configured Features registry which can be found under the class WorldGenRegistries
3- you can chain the count, squared and so on methods, it'll make your code look cleaner
MinecraftForge.EVENT_BUS.addListener(EventPriority.HIGH, ModOreGen::generateOres);
There's no need set it to a high priority, and you're registering the listener to the wrong event bus
-
there isn't a function that does that already.
however writing your own helper function shouldn't be that hard
don't forget to handle the case when the ItemStacks contain different Items, or Items with non-64 maximum stack sizes
-
1
-
-
I guess you could start there, but "nbt examples" is very vague. nbts can be used for a lot of stuff, what you want is the methods to put values in tags, and recover values from tags
-
post the complete log, and say what you want to accomplish in a clearer and more objective way
-
method signatures did not change, only method names, due to the mappings change
if the method has a different signature, it may not be the method that you are looking for -
4 minutes ago, eggpasta said:
But that brings another question, is it possible to use something else instead of blaze powder
The BrewingStand har checks if the fuel is the Blaze Powder item, you can see it in the BrewingStandTileEntity class
so I assume the only way to get around this would be to replace the vanilla brewing stand -
post the entire log please
-
3 hours ago, eggpasta said:
Never mind i think i fixed it
it'd be helpful both for you and other people, if you told how
-
6 minutes ago, eggpasta said:
How?
I have git bash instaleld but whenever i do git init and then git add . i get
error: 'Downloads/forge-1.16.5-36.1.4-mdk/' does not have a commit checked out fatal: adding files failed
remove the .git directory that you should have created before in your src/main/java (I assume)
then try again -
5 minutes ago, eggpasta said:
What else do i need to add?
intialize the repo in the directory which contains the build.gradle
that directory should also have a .gitignore which will make sure you don't push anything you shouldn't to github -
4 minutes ago, eggpasta said:
What is the proper registry event?
actually, disregard the RegistryEvent thingy
[1.16] Render an Entity with an OBJ model
in Modder Support
Posted
I've got an entity that I wish to render using an obj model. The entity is a ProjectileItemEntity, and I've already got the obj model working for the item.
I tried to render my entity with the same Item Renderer, but the model wouldn't rotate with the entity, and instead would always face the player, which doesn't work for me since I need my entity to rotate around