Jump to content

[1.14.4] Modifying Vanilla Content


MineModder2000

Recommended Posts

Bump

    @SubscribeEvent
    @SuppressWarnings("deprecation")
    public void breakSpeed(BreakSpeed event) {
    	
    	event.getEntityPlayer().posX
    }

 

I can get the player's position as seen above, but I need to know the block's position too, so I can cancel the BreakSpeed event if the range is to great (preventing mining at a distance). 

Link to comment
Share on other sites

Huh.

image.png.7d86122a0a516b071975503d3699bbaf.png

  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Next question, how to replace vanilla textures? I tried putting a json model file inside assets.minecraft.models.item, which points to a texture in assets.mymod.textures.item, but the vanilla default is still used. I'm trying to replace the ugly blocky 16 x 16 files with much sharper 32 x 32 files that I made. 

Edited by MineModder2000
Link to comment
Share on other sites

10 hours ago, MineModder2000 said:

how to replace vanilla textures?

You have the procedure down. Is the console yelling at you? What happens if you point it to a different vanilla texture? Basically is it even recognizing your model.

 

Also as a side note. You might want to not change all of the vanilla textures because other mods base their textures off the vanilla ones and honestly it would bug me to have me to have the vanilla textures changed dramatically. Especially, if the change made all of the other mods in a modpack look out of place. My recommendation is make a resource pack for your mods items and the vanilla items. And make your items take after the vanilla items to give the user a choice.

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

12 hours ago, Animefan8888 said:

You have the procedure down. Is the console yelling at you? What happens if you point it to a different vanilla texture? Basically is it even recognizing your model.

 

Also as a side note. You might want to not change all of the vanilla textures because other mods base their textures off the vanilla ones and honestly it would bug me to have me to have the vanilla textures changed dramatically. Especially, if the change made all of the other mods in a modpack look out of place. My recommendation is make a resource pack for your mods items and the vanilla items. And make your items take after the vanilla items to give the user a choice.

Nope, console doesn't scream at me (that would be terrifying ?). A different vanilla texture also fails to appear in game. Any good tutorials on how to make resource packs? Basically I want to replace some tool textures like the stone axe, because they are so blocky by default. 

Edited by MineModder2000
Link to comment
Share on other sites

26 minutes ago, MineModder2000 said:

A different vanilla texture also fails to appear in game. Any good tutorials on how to make resource packs?

This confirms its not a texture error.

24 minutes ago, MineModder2000 said:

Nope, console doesn't scream at me

That means it's not finding the file at all.

 

Can you send a picture of your resources(package) explorer.

27 minutes ago, MineModder2000 said:

Any good tutorials on how to make resource packs?

You can always google it. The forge mod is suppose to function like one it's basically make a zip folder that has the assets folder and a pack.mcmeta file.

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

18 hours ago, Animefan8888 said:

This confirms its not a texture error.

That means it's not finding the file at all.

 

Can you send a picture of your resources(package) explorer.

You can always google it. The forge mod is suppose to function like one it's basically make a zip folder that has the assets folder and a pack.mcmeta file.

I did already google it prior to posting, but I found that gamepedia link to be information-ally inadequate. I put a pack.mcmeta in the .minecraft folder and it doesn't get detected. 

 

Screenshot-5.png

Edited by MineModder2000
Link to comment
Share on other sites

1 minute ago, MineModder2000 said:

I put a pack.mcmeta in the .minecraft folder and it doesn't get detected. 

Well if you read it you would know it doesn't go into the .minecraft folder itself. Also why that screenshot and the link underneath it?

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

16 minutes ago, Animefan8888 said:

Well if you read it you would know it doesn't go into the .minecraft folder itself. Also why that screenshot and the link underneath it?

I did read it obviously, just not carefully enough though. I got to detect now, the screenshot was a mistake, wrong link, I have the correct one up. 

Edited by MineModder2000
Link to comment
Share on other sites

2 minutes ago, MineModder2000 said:

I got to detect now, the screenshot was a mistake, wrong link, I have the correct one up.

Try to just override the texture, It may be that you can't override models. So just put the texture at assets.minecraft.textures.item

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

34 minutes ago, MineModder2000 said:

change

Does that mean override entirely? Or add your own?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

2 hours ago, MineModder2000 said:

but for now I want to remove some. 

If I remember correctly even the treasure loot tables are loaded via JSON and might be overrideable. If not you'll have to look through the objects the event gives you and what methods you can call on those objects.

  • Thanks 1

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Overriding json files and adding supplementary files works basically the same way. 

  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

7 hours ago, Draco18s said:

Overriding json files and adding supplementary files works basically the same way. 

14 hours ago, Animefan8888 said:

If I remember correctly even the treasure loot tables are loaded via JSON and might be overrideable. If not you'll have to look through the objects the event gives you and what methods you can call on those objects.

 

I see. I found the loot tables, and there are a lot. I think I would rather just prevent the spawning of the ones that are game breaking when it comes to the balance of my mod. Would this would work as I have it :

 

   @SubscribeEvent
    public void lootTableLoadEvent(LootTableLoadEvent event) {
    	
    	if (event.getName().getNamespace() == "iron_ingot") {
    		
    		event.setCanceled(true);
    	}
    }

 

Edited by MineModder2000
Link to comment
Share on other sites

1 minute ago, MineModder2000 said:

Would this would work as I have it :

No probably not. Because it could severely affect other mods. And it wouldn't stop any vanilla loot tables. You need to override the loot tables by creating a json with the same name as the one you want to override. IE data.minecraft.loot_tables.chests.shipwreck_treasure.json

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

18 minutes ago, Animefan8888 said:

No probably not. Because it could severely affect other mods. And it wouldn't stop any vanilla loot tables. You need to override the loot tables by creating a json with the same name as the one you want to override. IE data.minecraft.loot_tables.chests.shipwreck_treasure.json

This is false, I just did it without the if statement check and it worked. I found a village in creative mode and all the chests were empty. Why in the world would this severely affect other mods? 

Link to comment
Share on other sites

1 minute ago, MineModder2000 said:

Why in the world would this severely affect other mods?

LootTableLoadEvent fires for every loot table even blocks. And all chest structures that the mod generates. What if a mod has a loot_table for a block that drops iron_ingots?

30 minutes ago, MineModder2000 said:

if (event.getName().getNamespace() == "iron_ingot") {

The reason why this wouldn't affect any vanilla loot tables is because "iron_ingot" == "iron_ingot" will never be true. You need to use String#equals.

 

7 minutes ago, MineModder2000 said:

I just did it without the if statement check and it worked

Cool you tested a piece of code without the necessary if statement to make it work how you want it to.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

7 minutes ago, Animefan8888 said:

LootTableLoadEvent fires for every loot table even blocks. And all chest structures that the mod generates. What if a mod has a loot_table for a block that drops iron_ingots?

The reason why this wouldn't affect any vanilla loot tables is because "iron_ingot" == "iron_ingot" will never be true. You need to use String#equals.

 

Cool you tested a piece of code without the necessary if statement to make it work how you want it to.

You don't get it, my mod isn't going to have any iron ingots and some other things from vanilla, if somebody wanted such they wouldn't play my mod. Why would I remove a loot item from vanilla only to have it appear in other mods? I am getting rid of it for a reason. You are helpful but you really don't have to be snide / snarky, I thought you meant this procedure wouldn't work in general, hence my test. I forgot about using the method instead of == operator, I am used to comparing object types in my mod. Well anyways this didn't work as iron golems still drop iron ingots :

 

  @SubscribeEvent
    public void lootTableLoadEvent(LootTableLoadEvent event) {
    	
    	if (event.getName().getNamespace().equals("iron_ingot")) {
    			
    		event.setCanceled(true);
    	}
    }

 

Assuming this applies to entities.....

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements




×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.