Jump to content

Recommended Posts

Posted

It may not be the a very problematic but as far as I can see the .jars (Referenced libraries) are kept in the .gradle folder in the users account. I don't really like this method because I hate spreaded files which I have to search for if I want to clear the installation manually or something. It's just personal preference and maybe isn't that hard to archieve if you move the libraries into the same folder as gradlew or the assets or whatever. Also the foldername "cache" chosen by gradle could be misleading as you are normally allowed to delete cache without worries about your project what so ever.

Posted

I have used a custom development environment until now, following Pahimar's tutorials, but I am unsure how to set that up with the new Gradle system.If somebody managed to get it working please PM me.

 

Well that was completely unrelated to the topic.

 

To get on topic, I managed to install Forge using the new Gradle system by I couldn't find the usual MC classes.Then I downloaded the MCP beta version for 1.7.2 but I am not sure how to get the decompiled classes in the Forge workspace.I know I have to use MCP to decompile and deobfuscate MC, but what do I need to do after that?

Posted

It may not be the a very problematic but as far as I can see the .jars (Referenced libraries) are kept in the .gradle folder in the users account. I don't really like this method because I hate spreaded files which I have to search for if I want to clear the installation manually or something. It's just personal preference and maybe isn't that hard to archieve if you move the libraries into the same folder as gradlew or the assets or whatever. Also the foldername "cache" chosen by gradle could be misleading as you are normally allowed to delete cache without worries about your project what so ever.

You can delete the cache folder without issue, you just have to rebuild it by running setup again, just like any cache folder.

As for the location, user home was decided as a good place so that people who have multiple projects could benifit from caching system and not having to do things multiple times. If you don't like it, you can set the Gradle User home to whatever you want.

 

@decebaldecebal:

'Pahimars setup' is just A normal Multi-Project setup. It's all done internally by Gradle and Minecraft/Forge are referenced as a library. If you want to see the classes for it just look in your referenced libraries.

 

Seriously guys... This is pretty standard stuff....

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

I can't seem to get the workspace to work.

 

I opened the command prompt in the forge folder, typed the first command as shown on the instructions page, waited for it to finish, then typed "gradlew.bat eclipse" and waited for it to finish. I used the folder containing the forge folder as a workspace. I copied the name of the extracted forge folder and pasted it as a project name. Eclipse notified me that it would automatically configure the project from existing source. I assume it detected the .project file, because I saw all of the referenced libraries, but there are no run configurations, and I can't figure out which class to run and with what program and VM arguments.

 

What am I doing wrong? Or is something broken?

 

Read carefully how to setup your workspace :

http://www.minecraftforge.net/forum/index.php/topic,14048.0.html

 

Thanks, I was following the instructions on the wiki.

Posted

I hope Forge 1.7 is faster on my server, because my 1.6 server are very slow since the external minecraft forge jar came to the server and before the server was a lot faster (and the server has enough workspace (7GB Ram), but my internet isn't the fastest....) I'm really miss the old  forge universal zip, because this was faster for me on a server or an local server and now its so slow. (time delay from 2 to 5 seconds and before only if the map must be generated or loaded). I hope that one day they will come a version out, that is faster then now and that this version is for 1.7.

Developer of Primeval Forest.

Posted

so does this 'curse' change, mean that forge users will eventually have to pay to use forge? curse usually means hacked accounts, and pay for anything useful.

Posted

A very experienced coder will be able to recognize methods and variables of the code parts he uses habitually, but you better be patient and zen!

 

I probably won't try to update to 1.7.x (and 1.5.2) until both my current mod is in a usable state in 1.6.4 and some 1.7.x version of forge is mature enough to have non-obfuscated names for the functions I'm using.  Fortunately, I used wrapper classes so I only have to interact with Minecraft in a few lines of code.  Unfortunately, I  need be able reference and place lot of blocks in whatever new way is available.  Still very curious what the changes are like, especially this stuff about no IDs.

Developer of Doomlike Dungeons.

Posted

i don't understand here...is forge 1.7.4 released yet????

can anyone tell me? cuz i cant find the link or anything

 

there is no official release for 1.7.* there are dev builds available to modders, but nothing stable for general use quite yet.

Posted

Again as I said before, 1.7.2 is stable enough for people to use, it will not be RBed until King does Fluids. However for everything else you as a end user and modder can get to work.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

As the mojang blog post said, the major changes: IDs go bye bye, Networking System switched to netty, Sound system overhaul.

So yes when it comes to packets, things will change.

 

WHOAH WHOAH WHOAH!!!!

you mean to say that the ID system will be obsolete and minecraft can now have over 2 billion blocks & ITEMS?

eg you'd register

minecraftmod:Modded_block  ?

:-X

Also, I should have you know that you are reading my signature.

Posted

No, the limitation of 4096 is still in place as numerical ids are still used in storage/network traffic.

What it means is that the end user won't ever get any id conflicts anymore, and when you connect to servers/load old worlds it'll automatically load everything properly.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Does that mean that config files for mods are individually stored per-world (and per-server in the case of multiplayer)?

 

To the funny mod that deleted my post and banned me for a few days: Had you been less hasty to hit the delete+ban button and read my post again, you'd have realised that I wasn't remotely begging for a 1.8 version, which of course doesn't even exist. But let's assume it was an honest mistake and that my previous post was poorly worded, so let me rephrase that.

 

My question was if the massive number of changes introduced by the 1.7 version contain a measurable improvement in the overall quality of the code, in the sense of how much it eases maintenance or future changes. Changes such as those introduced by new versions of Minecraft, but mentioning 1.8 here was an example in my original post, and by no means a "plz i can haz a 1.8 version kthxbai". Or any other changes, but those were the most obvious and the first that came to mind.

Posted

Lex will make a thread for Forge 10 (MC 1.7) when it goes to RB.

 

For now. KEEP ALL THE HELP REQUESTS OUT OF THIS POST. I WILL NOT HESITATE TO DELETE ANY AND ALL HELP POSTS. KEEP IT TO 1.7 UPDATE DISCUSSION.

 

Modders, for instructions on:

Setting up gradle: http://www.minecraftforge.net/forum/index.php/board,118.0.html

Porting a mod to 1.7: http://www.minecraftforge.net/forum/index.php/board,73.0.html

 

Bugs/end user help requests: http://www.minecraftforge.net/forum/index.php/board,15.0.html

 

 

Read the EAQ before posting! OR ELSE!

 

This isn't building better software, its trying to grab a place in the commit list of a highly visible github project.

 

www.forgeessentials.com

 

Don't PM me, I don't check this account unless I have to.

Posted

which means that we can sync data when you connect to the server

[...]

meaning that server/client id conflicts should be gone! {after we implement it}

 

I'm assuming that even with this implemented, we're still gonna have that 4k block limit, is that correct? I've had ideas in the past for my mods which I've avoided as I don't want to go mad and overuse IDs, that's the only reason for asking :P

You can theoretically add as many blocks as you want while only taking up a single block id, limited only by the size of the metadata value. (I think IC2 does this)

Posted

Wanted to update you guys again. With recent news, the task of updating the Fluids has switched back to me.

However, at this exact moment in time I am dealing some personal issues, not the least of which is organizing a new place to live.

I will be working on the fluid system and hopefully getting it pushed out this week.

Everything else critical to a RB of 1.7 is done. So for all intents, Forge 1.7 IS stable! We just can't push out a RB until the fluids are back.

As for end users, play away! If there are bugs, report them and we shall squash them!

 

The S2S system that I've been wanting to roll out is coming along nicely thanks to Abrar's hard work.

But ya, I need to sit down and dedicate time to Forge, but as I said, real life things are getting in the way.

Combine it with the drama that has been unfolding lately and I find it less of a priority.. But enough of that...

 

Just wanted to give a little heads up on that.

One last thing: https://crowdin.net/project/minecraft-forge

I've officially started a Crowdin for Forge, I will be expanding it to FML, as well as expanding the localization of the things we do in Forge/FML {which admitadly isn't much but we do have a few strings} So if you want to help out go there.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

Glad to hear we're close to an update, however take as long as you need to. Especially with 1.8 being so close (well, at least snapshots being released), I'm half expecting some mods to miss 1.7 entirely! (You're not the only one sorting out a new place to live either! Good luck with that also.)

Posted

A quick question, With an RB coming soon does that mean that there is a RB for MCP also? I have been looking through some of the latest builds of Forge for 1.7 and I downloaded the Beta MCP but didn't know how to integrate it so had to stare at all the old funcs style again.

Posted

You can't integrate the mappings from MCP into the Forge world, you've never been able to.

However we are hard at working making that into a possibility.

Probably won't be before the RB. But should be for the 1.7.4 release, See here: https://github.com/AbrarSyed/Srg2Source

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

So Srg2Source will effectively decrease the amount of time and effort it takes to go from MCP release to Forge/Bukkit/etc... release in future versions? Will it have any impact on the initial effort of updating MCP?

Posted

I think the long delay for the recent MCP update is showing that there has to be a better way than relying on a few overworked folks at MCP to do all the decompiling and deobfuscation themselves.  This is something that could be crowdsourced relatively easily with the right tools because it is intrinsically parallel and verifying the "correct answer" is easy (i.e. the decompiled code compiles back to the original bytecode properly - although this might be compiler dependent?) 

 

I also think that, in order to properly realise the advantages of Srg2Source, there needs to be a much better repository than the chatbot currently available.  Perhaps something that lets you download a class file, "refactor" the names you're interested in using your IDE, then upload back up again to the server (so it can diff your source and extract the names you replaced).

 

A bit of cunning pattern matching would probably allow automatic matching of most of the names, perhaps with a manual sanity check if the signature has changed. 

 

I don't have most of the skills I'd need to even set up a proof of concept for this, but I'm seriously considering bringing myself up to speed.  (Only problem is that's going to take a long time).

 

-TGG

 

 

Guest
This topic is now closed to further replies.

Announcements




  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Version 1.19 - Forge 41.0.63 I want to create a wolf entity that I can ride, so far it seems to be working, but the problem is that when I get on the wolf, I can’t control it. I then discovered that the issue is that the server doesn’t detect that I’m riding the wolf, so I’m struggling with synchronization. However, it seems to not be working properly. As I understand it, the server receives the packet but doesn’t register it correctly. I’m a bit new to Java, and I’ll try to provide all the relevant code and prints *The comments and prints are translated by chatgpt since they were originally in Spanish* Thank you very much in advance No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. No player is mounted, or the passenger is not a player. MountableWolfEntity package com.vals.valscraft.entity; import com.vals.valscraft.network.MountSyncPacket; import com.vals.valscraft.network.NetworkHandler; import net.minecraft.client.Minecraft; import net.minecraft.network.syncher.EntityDataAccessor; import net.minecraft.network.syncher.EntityDataSerializers; import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.MinecraftServer; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.Mob; import net.minecraft.world.entity.ai.attributes.AttributeSupplier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.animal.Wolf; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.Entity; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.phys.Vec3; import net.minecraftforge.event.TickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.network.PacketDistributor; public class MountableWolfEntity extends Wolf { private boolean hasSaddle; private static final EntityDataAccessor<Byte> DATA_ID_FLAGS = SynchedEntityData.defineId(MountableWolfEntity.class, EntityDataSerializers.BYTE); public MountableWolfEntity(EntityType<? extends Wolf> type, Level level) { super(type, level); this.hasSaddle = false; } @Override protected void defineSynchedData() { super.defineSynchedData(); this.entityData.define(DATA_ID_FLAGS, (byte)0); } public static AttributeSupplier.Builder createAttributes() { return Wolf.createAttributes() .add(Attributes.MAX_HEALTH, 20.0) .add(Attributes.MOVEMENT_SPEED, 0.3); } @Override public InteractionResult mobInteract(Player player, InteractionHand hand) { ItemStack itemstack = player.getItemInHand(hand); if (itemstack.getItem() == Items.SADDLE && !this.hasSaddle()) { if (!player.isCreative()) { itemstack.shrink(1); } this.setSaddle(true); return InteractionResult.SUCCESS; } else if (!level.isClientSide && this.hasSaddle()) { player.startRiding(this); MountSyncPacket packet = new MountSyncPacket(true); // 'true' means the player is mounted NetworkHandler.CHANNEL.sendToServer(packet); // Ensure the server handles the packet return InteractionResult.SUCCESS; } return InteractionResult.PASS; } @Override public void travel(Vec3 travelVector) { if (this.isVehicle() && this.getControllingPassenger() instanceof Player) { System.out.println("The wolf has a passenger."); System.out.println("The passenger is a player."); Player player = (Player) this.getControllingPassenger(); // Ensure the player is the controller this.setYRot(player.getYRot()); this.yRotO = this.getYRot(); this.setXRot(player.getXRot() * 0.5F); this.setRot(this.getYRot(), this.getXRot()); this.yBodyRot = this.getYRot(); this.yHeadRot = this.yBodyRot; float forward = player.zza; float strafe = player.xxa; if (forward <= 0.0F) { forward *= 0.25F; } this.flyingSpeed = this.getSpeed() * 0.1F; this.setSpeed((float) this.getAttributeValue(Attributes.MOVEMENT_SPEED) * 1.5F); this.setDeltaMovement(new Vec3(strafe, travelVector.y, forward).scale(this.getSpeed())); this.calculateEntityAnimation(this, false); } else { // The wolf does not have a passenger or the passenger is not a player System.out.println("No player is mounted, or the passenger is not a player."); super.travel(travelVector); } } public boolean hasSaddle() { return this.hasSaddle; } public void setSaddle(boolean hasSaddle) { this.hasSaddle = hasSaddle; } @Override protected void dropEquipment() { super.dropEquipment(); if (this.hasSaddle()) { this.spawnAtLocation(Items.SADDLE); this.setSaddle(false); } } @SubscribeEvent public static void onServerTick(TickEvent.ServerTickEvent event) { if (event.phase == TickEvent.Phase.START) { MinecraftServer server = net.minecraftforge.server.ServerLifecycleHooks.getCurrentServer(); if (server != null) { for (ServerPlayer player : server.getPlayerList().getPlayers()) { if (player.isPassenger() && player.getVehicle() instanceof MountableWolfEntity) { MountableWolfEntity wolf = (MountableWolfEntity) player.getVehicle(); System.out.println("Tick: " + player.getName().getString() + " is correctly mounted on " + wolf); } } } } } private boolean lastMountedState = false; @Override public void tick() { super.tick(); if (!this.level.isClientSide) { // Only on the server boolean isMounted = this.isVehicle() && this.getControllingPassenger() instanceof Player; // Only print if the state changed if (isMounted != lastMountedState) { if (isMounted) { Player player = (Player) this.getControllingPassenger(); // Verify the passenger is a player System.out.println("Server: Player " + player.getName().getString() + " is now mounted."); } else { System.out.println("Server: The wolf no longer has a passenger."); } lastMountedState = isMounted; } } } @Override public void addPassenger(Entity passenger) { super.addPassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(true)); } } } @Override public void removePassenger(Entity passenger) { super.removePassenger(passenger); if (passenger instanceof Player) { Player player = (Player) passenger; if (!this.level.isClientSide && player instanceof ServerPlayer) { // Send the packet to the server to indicate the player is no longer mounted NetworkHandler.CHANNEL.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new MountSyncPacket(false)); } } } @Override public boolean isControlledByLocalInstance() { Entity entity = this.getControllingPassenger(); return entity instanceof Player; } @Override public void positionRider(Entity passenger) { if (this.hasPassenger(passenger)) { double xOffset = Math.cos(Math.toRadians(this.getYRot() + 90)) * 0.4; double zOffset = Math.sin(Math.toRadians(this.getYRot() + 90)) * 0.4; passenger.setPos(this.getX() + xOffset, this.getY() + this.getPassengersRidingOffset() + passenger.getMyRidingOffset(), this.getZ() + zOffset); } } } MountSyncPacket package com.vals.valscraft.network; import com.vals.valscraft.entity.MountableWolfEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class MountSyncPacket { private final boolean isMounted; public MountSyncPacket(boolean isMounted) { this.isMounted = isMounted; } public void encode(FriendlyByteBuf buffer) { buffer.writeBoolean(isMounted); } public static MountSyncPacket decode(FriendlyByteBuf buffer) { return new MountSyncPacket(buffer.readBoolean()); } public void handle(NetworkEvent.Context context) { context.enqueueWork(() -> { ServerPlayer player = context.getSender(); // Get the player from the context if (player != null) { // Verifies if the player has dismounted if (!isMounted) { Entity vehicle = player.getVehicle(); if (vehicle instanceof MountableWolfEntity wolf) { // Logic to remove the player as a passenger wolf.removePassenger(player); System.out.println("Server: Player " + player.getName().getString() + " is no longer mounted."); } } } }); context.setPacketHandled(true); // Marks the packet as handled } } networkHandler package com.vals.valscraft.network; import com.vals.valscraft.valscraft; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class NetworkHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel CHANNEL = NetworkRegistry.newSimpleChannel( new ResourceLocation(valscraft.MODID, "main"), () -> PROTOCOL_VERSION, PROTOCOL_VERSION::equals, PROTOCOL_VERSION::equals ); public static void init() { int packetId = 0; // Register the mount synchronization packet CHANNEL.registerMessage( packetId++, MountSyncPacket.class, MountSyncPacket::encode, MountSyncPacket::decode, (msg, context) -> msg.handle(context.get()) // Get the context with context.get() ); } }  
    • Do you use features of inventory profiles next (ipnext) or is there a change without it?
    • Remove rubidium - you are already using embeddium, which is a fork of rubidium
  • Topics

×
×
  • Create New...

Important Information

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