Compare commits

...
2 Commits
Author SHA1 Message Date
UltraProdigy 704861b666 Delete Forestry CONTRIBUTING.md (#126) 2026-07-04 19:02:06 +00:00
Algent db25dcce48 Dupe Fix - Make bag logic more lag resistant (#121) 2026-07-04 18:57:41 +00:00
6 changed files with 14 additions and 34 deletions

No files matched your search

-29
View File
@@ -1,29 +0,0 @@
How to submit a bug report to Forestry
====================================
Please make sure the bug has not already been reported by [searching the issues](https://github.com/ForestryMC/ForestryMC/issues?q=is%3Aissue).
If you can, see if the bug still happens with the latest unstable build.
[The latest unstable builds are available here](http://jenkins.ic2.player.to/job/Forestry_Dev/)
For crashes, you must post a link to the full crash report.
[gist.github.com](gist.github.com) or [pastebin.com](www.pastebin.com) are good places to upload them.
Full crash reports are located in [the minecraft data folder](http://hopper.minecraft.net/help/finding-minecraft-data-folder/), in "crash-reports".
Thank you for reporting bugs!
How to contribute to Forestry
====================================
### Contributor License Agreement
Before pull requests can be accepted, the contributor needs to sign a contributor license agreement. (Essentially giving a license for using his code and/or media and for re-licensing it, for details read the agreement linked below.)
### How do I sign?
To keep the hassle for everyone involved to a minimum, Forestry uses CLAHub to manage the agreements. To get started, <a href="https://www.clahub.com/agreements/ForestryMC/ForestryMC">sign the Contributor License Agreement</a>.
### Why is this needed?
Without CLAs it at some point becomes essentially impossible to change the license of a project which accepts contributions from third parties. Without an explicit agreement every contributor would still own the copyright to his code. So as long as it (or parts of it) remain in the code base, he would have to agree to every license change. If enough time has passed, there may be dozens, perhaps even hundreds of contributors involved and it will be very hard to track down each and every one of them and get them to agree on a new license.
This would make it impossible to change the license to a more permissive one at a later date, so the code would be locked into CC BY-NC-ND 3.0 until it passes into the public domain about a hundred years from now. This situation is to be avoided and that’s why you are being bothered with this CLA.
@@ -87,7 +87,7 @@ public abstract class ItemInventory implements IInventory, IFilterSlotDelegate {
public boolean isParentItemEquipped() {
return switch (location.type()) {
case HELD_BY_PLAYER, UNKNOWN -> isSameItemInventory(player.getCurrentEquippedItem(), parent);
case PLAYER_INVENTORY -> true;
case PLAYER_INVENTORY -> isSameItemInventory(player.inventory.getStackInSlot(location.slotIdx()), parent);
};
}
@@ -95,6 +95,10 @@ public abstract class ItemInventory implements IInventory, IFilterSlotDelegate {
return player;
}
public ItemLocation getLocation() {
return location;
}
public boolean isParentItemInventory(ItemStack itemStack) {
ItemStack parent = getParent();
return isSameItemInventory(parent, itemStack);
@@ -33,7 +33,7 @@ public abstract class ItemWithGui extends ItemForestry implements IGuiHandlerIte
}
protected void openGui(EntityPlayer entityplayer) {
GuiHandler.openGui(entityplayer, this);
GuiHandler.openGui(entityplayer, this, (short) 0, entityplayer.inventory.currentItem);
}
@Override
@@ -28,6 +28,11 @@ public class ItemInventoryBackpackPaged extends ItemInventoryBackpack implements
@Override
public void flipPage(EntityPlayer player, short page) {
GuiHandler.openGui(player, backpackNaturalist, page);
ItemLocation loc = getLocation();
if (loc.type() == ItemLocation.Type.PLAYER_INVENTORY) {
GuiHandler.openGui(player, backpackNaturalist, page, loc.slotIdx());
} else {
GuiHandler.openGui(player, backpackNaturalist, page);
}
}
}
@@ -72,7 +72,7 @@ public class ItemBackpack extends ItemWithGui implements ActivatableFromInventor
@Override
protected void openGui(EntityPlayer entityplayer) {
GuiHandler.openGui(entityplayer, this, (short) type.ordinal());
GuiHandler.openGui(entityplayer, this, (short) type.ordinal(), entityplayer.inventory.currentItem);
}
@Override
@@ -34,7 +34,7 @@ public class ItemBackpackNaturalist extends ItemBackpack {
@Override
protected void openGui(EntityPlayer entityplayer) {
GuiHandler.openGui(entityplayer, this);
GuiHandler.openGui(entityplayer, this, (short) 0, entityplayer.inventory.currentItem);
}
@Override