TypeInNameHere
New member
- Joined
- Oct 1, 2020
- Messages
- 13
- Reaction score
- 0
- Points
- 0
Kann mir jemand sagen wie ich in Minecraft eine animierte GIF renderen kann?
Auf der Seite ist kein Codemit nen timer geht das https://hastebin.com/cebafahoyi.cpp
JIGSAW hat ein GIF-Ding für seinen Cracker. Schauen Sie sich das beliebte 0.24 src-Leck an (möglicherweise nicht in diesem Forum).Auf der Seite ist kein Code
public class GifAntimation {
private int pics;
private int cpic;
private TimeHelper time = new TimeHelper();
private ResourceLocation current;
private String path;
private String name;
public GifAntimation(int pics, String path, String name) {
this.pics = pics;
this.path = path;
this.name = name;
this.cpic = 0;
}
public ResourceLocation getNextFrame() {
if(time.hasReached(100)&¤t!=null){
ResourceLocation loc = new ResourceLocation(this.path + this.name + this.cpic + ".png");
if (this.cpic >= this.pics)
this.cpic = 0;
this.cpic++;
time.reset();
return current = loc;
}else{
return getCurrent();
}
}
public ResourceLocation getCurrent() {
return this.current;
}
}
Jo habe jetzt die Methode mit den Bildern einzeln rendern.Wenn du ganz viel Lust hast, kannst du ein gif mit java in buffered images umwandeln und dann per dynamic texture ne resource location draus bekommen. Oder du macht es wie die anderen geschrieben haben so, indem du einzelne Bilder nacheinander renderst.
Der Code unten würde dir das nächste Bild returnen
Das Bild rendern kannst du dann mit z.B. der Methode, die es in der Gui Klasse gibt.
Der Code ist am handy geschrieben.
Du solltest denke ich vlt auch ne hashmap für die Nummer und die resource location machenCode:public class GifAntimation { private int pics; private int cpic; private TimeHelper time = new TimeHelper(); private ResourceLocation current; private String path; private String name; public GifAntimation(int pics, String path, String name) { this.pics = pics; this.path = path; this.name = name; this.cpic = 0; } public ResourceLocation getNextFrame() { if(time.hasReached(100)&¤t!=null){ ResourceLocation loc = new ResourceLocation(this.path + this.name + this.cpic + ".png"); if (this.cpic >= this.pics) this.cpic = 0; this.cpic++; time.reset(); return current = loc; }else{ return getCurrent(); } } public ResourceLocation getCurrent() { return this.current; } }
public void explodelogo() {Auf der Seite ist kein Code