diff options
-rwxr-xr-x | .gitignore | 7 | ||||
-rwxr-xr-x | options.txt | 21 | ||||
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/e.java | 12 | ||||
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java | 3 | ||||
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeaturePenguins.java | 111 | ||||
-rw-r--r-- | src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java | 57 | ||||
-rwxr-xr-x | src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java | 3 | ||||
-rw-r--r-- | src/main/resources/assets/dg/penguin.png | bin | 0 -> 290076 bytes |
8 files changed, 209 insertions, 5 deletions
@@ -23,4 +23,9 @@ gradle-app.setting # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 # gradle/wrapper/gradle-wrapper.properties -mods/*
\ No newline at end of file +mods/* +/modcore/config.toml +/modcore/Sk1er Modcore-0.1.47 (1.8.9).jar +/.mixin.out/audit/mixin_implementation_report.csv +/.mixin.out/audit/mixin_implementation_report.txt +/modcore/metadata.json diff --git a/options.txt b/options.txt index 364e4681..92e3dbcf 100755 --- a/options.txt +++ b/options.txt @@ -10,7 +10,7 @@ bobView:true anaglyph3d:false maxFps:120 fboEnable:true -difficulty:0 +difficulty:3 fancyGraphics:true ao:2 renderClouds:fast @@ -24,7 +24,7 @@ chatLinks:true chatLinksPrompt:true chatOpacity:1.0 snooperEnabled:true -fullscreen:true +fullscreen:false enableVsync:true useVbo:true hideServerAddress:false @@ -90,10 +90,27 @@ key_key.hotbar.6:7 key_key.hotbar.7:8 key_key.hotbar.8:9 key_key.hotbar.9:10 +key_Add item to inventory (Creative-only):38 +key_Set item as favourite:33 +key_Show usages for item:22 +key_Show recipe for item:19 +key_Toggle NEU overlay:0 +key_Close NEU panes:0 +key_Select Item:-98 key_start editing session:19 key_send and save bombdefuse solution:33 key_navigate to next secret. (Req option enabled at /dg):34 key_toggle Pathfind. (Req option enabled at /dg):47 +key_Settings:0 +key_Edit GUI Locations:0 +key_Lock Slot:38 +key_Freeze Backpack Preview:33 +key_Open Friends Gui:54 +key_Add Friend:0 +key_Flip (Hold):0 +key_Rotate (Hold):0 +key_Flip (Toggle):0 +key_Rotate (Toggle):0 soundCategory_master:1.0 soundCategory_music:0.0 soundCategory_record:1.0 diff --git a/src/main/java/kr/syeyoung/dungeonsguide/e.java b/src/main/java/kr/syeyoung/dungeonsguide/e.java index 3855a5d1..a06d2b29 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/e.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/e.java @@ -11,12 +11,14 @@ import kr.syeyoung.dungeonsguide.events.StompConnectedEvent; import kr.syeyoung.dungeonsguide.features.FeatureRegistry; import kr.syeyoung.dungeonsguide.party.PartyInviteViewer; import kr.syeyoung.dungeonsguide.party.PartyManager; +import kr.syeyoung.dungeonsguide.resources.DGTexturePack; import kr.syeyoung.dungeonsguide.stomp.CloseListener; import kr.syeyoung.dungeonsguide.stomp.StompClient; import kr.syeyoung.dungeonsguide.stomp.StompInterface; import kr.syeyoung.dungeonsguide.utils.AhUtils; import lombok.Getter; import net.minecraft.client.Minecraft; +import net.minecraft.client.resources.IResourcePack; import net.minecraft.command.ICommand; import net.minecraft.launchwrapper.LaunchClassLoader; import net.minecraft.launchwrapper.LogWrapper; @@ -45,6 +47,7 @@ import java.net.URL; import java.security.InvalidAlgorithmParameterException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; +import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.Executors; @@ -81,6 +84,7 @@ public class e implements c, CloseListener { public void init(FMLInitializationEvent event) { ProgressManager.ProgressBar progressbar = ProgressManager.push("DungeonsGuide", 4); + try { Set<String> invalid = ReflectionHelper.getPrivateValue(LaunchClassLoader.class, (LaunchClassLoader) a.class.getClassLoader(), "invalidClasses"); ((LaunchClassLoader)a.class.getClassLoader()).clearNegativeEntries(Sets.newHashSet("org.slf4j.LoggerFactory")); @@ -141,6 +145,7 @@ public class e implements c, CloseListener { e.printStackTrace(); } + ProgressManager.pop(progressbar); } public void pre(FMLPreInitializationEvent event) { @@ -151,6 +156,13 @@ public class e implements c, CloseListener { } Config.f = configFile; Minecraft.getMinecraft().getFramebuffer().enableStencil(); + + try { + List<IResourcePack> resourcePackList = ReflectionHelper.getPrivateValue(Minecraft.class, Minecraft.getMinecraft(),"defaultResourcePacks"); + resourcePackList.add(new DGTexturePack(authenticator)); + } catch (Throwable t){ + t.printStackTrace(); + } } private void copy(InputStream inputStream, File f) throws IOException { FileOutputStream fos = new FileOutputStream(f); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java index 90732771..2c2916c9 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/FeatureRegistry.java @@ -72,12 +72,13 @@ public class FeatureRegistry { public static final FeatureAutoAcceptReparty ETC_AUTO_ACCEPT_REPARTY = register(new FeatureAutoAcceptReparty()); public static final FeatureUpdateAlarm ETC_TEST = register(new FeatureUpdateAlarm()); - public static final SimpleFeature FIX_SPIRIT_BOOTS = register(new SimpleFeature("Fixes", "Spirit Boots Fixer", "Fix Spirit boots messing up with inventory", "fixes.spirit", true)); public static final FeatureDisableMessage FIX_MESSAGES = register(new FeatureDisableMessage()); public static final FeatureCopyMessages ETC_COPY_MSG = register(new FeatureCopyMessages()); + public static final FeaturePenguins ETC_PENGUIN = register(new FeaturePenguins()); + public static final FeatureWarningOnPortal BOSSFIGHT_WARNING_ON_PORTAL = register(new FeatureWarningOnPortal()); public static final SimpleFeature BOSSFIGHT_CHESTPRICE = register(new FeatureChestPrice()); public static final FeatureAutoReparty BOSSFIGHT_AUTOREPARTY = register(new FeatureAutoReparty()); diff --git a/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeaturePenguins.java b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeaturePenguins.java new file mode 100644 index 00000000..f5ae6802 --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/features/impl/etc/FeaturePenguins.java @@ -0,0 +1,111 @@ +package kr.syeyoung.dungeonsguide.features.impl.etc; + +import kr.syeyoung.dungeonsguide.SkyblockStatus; +import kr.syeyoung.dungeonsguide.dungeon.DungeonContext; +import kr.syeyoung.dungeonsguide.e; +import kr.syeyoung.dungeonsguide.features.SimpleFeature; +import kr.syeyoung.dungeonsguide.features.listener.PlayerRenderListener; +import net.minecraft.block.Block; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.AbstractClientPlayer; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.renderer.GlStateManager; +import net.minecraft.client.renderer.block.model.ItemCameraTransforms; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraft.item.ItemStack; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.client.event.RenderPlayerEvent; +import org.lwjgl.opengl.GL11; + + +public class FeaturePenguins extends SimpleFeature implements PlayerRenderListener { + public FeaturePenguins() { + super("ETC", "Penguins", "Awwww", "etc.penguin", false); + } + + + private SkyblockStatus skyblockStatus = e.getDungeonsGuide().getSkyblockStatus(); + private ResourceLocation penguin = new ResourceLocation("iamdg:penguin.png"); + + @Override + public void onEntityRenderPre(RenderPlayerEvent.Pre renderPlayerEvent) { + if (!isEnabled()) return; + renderPlayerEvent.setCanceled(true); + GlStateManager.pushMatrix(); + GlStateManager.translate(renderPlayerEvent.x, renderPlayerEvent.y, renderPlayerEvent.z); + + GlStateManager.rotate(-renderPlayerEvent.renderer.getRenderManager().playerViewY, 0.0f, 1.0f, 0.0f); + + GlStateManager.translate(0.5,2,0); + GlStateManager.scale(-1,-1,-1); + + if (renderPlayerEvent.entityPlayer.isSneaking()) + { + GlStateManager.translate(0.0F, 0.203125F, 0.0F); + } + + Minecraft.getMinecraft().getTextureManager().bindTexture(penguin); + GlStateManager.disableLighting(); + GlStateManager.color(1f, 1f, 1f, 1f); + Gui.drawModalRectWithCustomSizedTexture(0,0,0,0,1,2,1,2); + GlStateManager.bindTexture(0); + GlStateManager.enableLighting(); + GlStateManager.popMatrix(); + + EntityPlayer entitylivingbaseIn = renderPlayerEvent.entityPlayer; + { + ItemStack itemstack = entitylivingbaseIn.getHeldItem(); + + if (itemstack != null) + { + GlStateManager.pushMatrix(); + GlStateManager.translate(renderPlayerEvent.x, renderPlayerEvent.y, renderPlayerEvent.z); + GlStateManager.rotate(-renderPlayerEvent.renderer.getRenderManager().playerViewY, 0.0f, 1.0f, 0.0f); + GlStateManager.translate(-0.3,1.8,0.1); + GlStateManager.scale(0.8,0.8,0.8); + + + if (((EntityPlayer) entitylivingbaseIn).fishEntity != null) + { + itemstack = new ItemStack(Items.fishing_rod, 0); + } + + Item item = itemstack.getItem(); + Minecraft minecraft = Minecraft.getMinecraft(); + + if (item instanceof ItemBlock && Block.getBlockFromItem(item).getRenderType() == 2) + { + GlStateManager.translate(0,0,0.2); + GlStateManager.translate(0.0F, 0.1875F, -0.3125F); + GlStateManager.rotate(20.0F, 1.0F, 0.0F, 0.0F); + GlStateManager.rotate(45.0F, 0.0F, 1.0F, 0.0F); + float f1 = 0.375F; + GlStateManager.scale(-f1, -f1, f1); + } + + if (entitylivingbaseIn.isSneaking()) + { + GlStateManager.translate(0.0F, 0.203125F, 0.0F); + } + + minecraft.getItemRenderer().renderItem(entitylivingbaseIn, itemstack, ItemCameraTransforms.TransformType.THIRD_PERSON); + GlStateManager.popMatrix(); + } + } + + + renderPlayerEvent.renderer.renderName((AbstractClientPlayer) renderPlayerEvent.entityPlayer, renderPlayerEvent.x, renderPlayerEvent.y, renderPlayerEvent.z); + + + } + + @Override + public void onEntityRenderPost(RenderPlayerEvent.Post renderPlayerEvent) { + } + +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java b/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java new file mode 100644 index 00000000..a845757d --- /dev/null +++ b/src/main/java/kr/syeyoung/dungeonsguide/resources/DGTexturePack.java @@ -0,0 +1,57 @@ +package kr.syeyoung.dungeonsguide.resources; + +import kr.syeyoung.dungeonsguide.a; +import kr.syeyoung.dungeonsguide.b; +import kr.syeyoung.dungeonsguide.e; +import lombok.AllArgsConstructor; +import net.minecraft.client.resources.IResourcePack; +import net.minecraft.client.resources.data.IMetadataSection; +import net.minecraft.client.resources.data.IMetadataSerializer; +import net.minecraft.util.ResourceLocation; + +import java.awt.image.BufferedImage; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.Collections; +import java.util.Set; + +@AllArgsConstructor +public class DGTexturePack implements IResourcePack { + + private b authenticator; + + @Override + public InputStream getInputStream(ResourceLocation location) throws IOException { + InputStream inputStream = this.getClass().getResourceAsStream("/assets/dg/"+location.getResourcePath()); + if (inputStream != null) return inputStream; + return new ByteArrayInputStream(authenticator.d().get("assets/dg/"+location.getResourcePath())); + } + + @Override + public boolean resourceExists(ResourceLocation location) { + return authenticator.d().containsKey("assets/dg/"+location.getResourcePath()) + || this.getClass().getResourceAsStream("/assets/dg/"+location.getResourcePath()) != null; + } + + @Override + public Set<String> getResourceDomains() { + return Collections.singleton("iamdg"); + } + + @Override + public <T extends IMetadataSection> T getPackMetadata(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException { + return null; + } + + @Override + public BufferedImage getPackImage() throws IOException { + return new BufferedImage(512,512, BufferedImage.TYPE_INT_RGB); + } + + @Override + public String getPackName() { + return "Dungeons Guide Default Pack"; + } +} diff --git a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java index d8401756..d8764d72 100755 --- a/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/roomprocessor/RoomProcessorBlazeSolver.java @@ -29,6 +29,7 @@ import org.lwjgl.opengl.GL11; import java.awt.*; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; public class RoomProcessorBlazeSolver extends GeneralRoomProcessor { @@ -85,7 +86,7 @@ public class RoomProcessorBlazeSolver extends GeneralRoomProcessor { } if (semi_target != null) { EntityArmorStand finalSemi_target = semi_target; - nextBlaze = blazeList.stream().filter(e -> e.getDistanceSqToEntity(finalSemi_target) < 9).findFirst().orElse(null); + nextBlaze = blazeList.stream().min(Comparator.comparingDouble(e -> e.getDistanceSqToEntity(finalSemi_target))).orElse(null); } next = semi_target; diff --git a/src/main/resources/assets/dg/penguin.png b/src/main/resources/assets/dg/penguin.png Binary files differnew file mode 100644 index 00000000..ab93270f --- /dev/null +++ b/src/main/resources/assets/dg/penguin.png |